Oracle database management method and device based on VMware snapshot, equipment and storage medium
By creating a target virtual machine on the VMware virtual platform and generating a snapshot after a full backup and recovery, combined with incremental backup updates, the problem of low storage resource utilization in existing technologies is solved, backup and recovery efficiency is improved, storage resource utilization is optimized, and efficient data consistency and storage resource optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-03-20
AI Technical Summary
Traditional database backup and recovery technologies cannot effectively combine with VMware snapshot features in virtualized environments, resulting in long operation times, insufficient data reliability, and low storage resource utilization, especially in high-frequency scheduling scenarios.
Create the target virtual machine on the VMware virtual platform, perform a full backup and restore to generate the first VMware snapshot, and obtain and restore data through incremental backup. Update the snapshot to ensure data consistency, and optimize storage resource utilization by combining snapshot management strategies.
It improves backup and recovery efficiency, ensures data consistency, optimizes storage resource utilization, and avoids the storage redundancy problem of traditional whole-machine snapshots.
Smart Images

Figure CN121092369B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of database management, and particularly relates to an Oracle database management method and device based on VMware snapshots, equipment and a storage medium. BACKGROUND
[0002] With the continuous development of technology, database backup and recovery technology has experienced multiple development stages, and different stages use different ways to process to achieve data protection. For example, the backup mode based on the RMAN tool can achieve data protection, but its complex configuration process and long recovery time cannot meet the needs of high-frequency scheduling scenarios. For example, the storage layer LUN snapshot technology lacks a database state awareness mechanism and has the risk of data inconsistency. For example, the whole machine snapshot technology simplifies the operation process, but brings the problems of storage space waste and low recovery efficiency.
[0003] With the continuous improvement of application requirements, the traditional method often faces multiple challenges such as time-consuming operation, insufficient data reliability and low storage resource utilization. In particular, in a virtualization environment, the traditional method cannot effectively combine the VMware snapshot characteristics to achieve database-aware rapid backup and recovery. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide an Oracle database management method and device based on VMware snapshots, equipment and a storage medium, which has the technical effects of improving backup and recovery efficiency, guaranteeing data consistency and optimizing storage resources.
[0005] In a first aspect, the embodiments of the present application provide an Oracle database management method based on VMware snapshots, comprising:
[0006] Creating a target virtual machine on a VMware virtual platform, and restoring based on full backup of an Oracle database on the target virtual machine;
[0007] When full backup restoration of the target virtual machine is completed, performing snapshot processing on the target virtual machine to generate a first VMware snapshot of the target virtual machine;
[0008] When performing incremental backup, obtaining incremental data of the Oracle database in a current backup stage, wherein the current backup stage is a stage between the current backup and an adjacent previous backup;
[0009] Performing incremental restoration in the target virtual machine to obtain a database copy of the target virtual machine at the time when the adjacent previous incremental backup is completed, and restoring the incremental data into the database copy;
[0010] When the recovery process is completed, the first VMware snapshot is updated based on the incremental data.
[0011] In a second aspect, the embodiments of the present application provide an Oracle database management apparatus based on VMware snapshot, comprising:
[0012] A full backup module is configured to create a target virtual machine on a VMware virtual platform and perform recovery based on full backup of an Oracle database on the target virtual machine;
[0013] A snapshot generation module is configured to perform snapshot processing on the target virtual machine when the full backup recovery of the target virtual machine is completed, to generate a first VMware snapshot of the target virtual machine;
[0014] An incremental backup module is configured to acquire incremental data of the Oracle database in a current backup stage when performing incremental backup, wherein the current backup stage is a stage between the current backup and a previous adjacent backup;
[0015] An incremental recovery module is configured to perform incremental recovery in the target virtual machine, to obtain a database copy of the target virtual machine when a previous adjacent incremental backup is completed, and to recover the incremental data into the database copy;
[0016] A snapshot update module is configured to update the first VMware snapshot based on the incremental data when the recovery process is completed.
[0017] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a processor, a memory, and a computer program or embedded program stored in the internal storage of the memory and executable on the processor, and the processor executes the computer program or embedded program to implement the steps of the Oracle database management method based on VMware snapshot.
[0018] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program or embedded program, and the computer program or embedded program is executed by a processor to implement the steps of the Oracle database management method based on VMware snapshot.
[0019] This application provides an Oracle database management method, apparatus, device, and storage medium based on VMware snapshots. A target virtual machine is created on a VMware virtual platform, and recovery is performed on the target virtual machine based on a full backup of the Oracle database. Upon completion of the full backup recovery of the target virtual machine, a snapshot is taken, generating a first VMware snapshot of the target virtual machine. During incremental backup, incremental data of the Oracle database at the current backup stage is obtained, where the current backup stage is the stage between the current backup and the adjacent previous backup. Incremental recovery is performed on the target virtual machine to obtain a database copy of the target virtual machine at the time of the adjacent previous incremental backup, and the incremental data is restored to the database copy. Upon completion of the recovery process, the first VMware snapshot is updated based on the incremental data. By combining the VMware snapshot mechanism with Oracle database incremental recovery technology, a basic snapshot is generated after a full backup recovery, and subsequent updates to the snapshot copy using incremental data avoid the storage redundancy problem of traditional full-machine snapshots and ensure data consistency through a database-aware snapshot update mechanism, significantly improving backup and recovery efficiency. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the steps of the Oracle database management method based on VMware snapshots provided in this application embodiment;
[0021] Figure 2 This is a schematic diagram of a process for updating a first VMware snapshot provided in an embodiment of this application;
[0022] Figure 3 This is another flowchart illustrating the Oracle database management method based on VMware snapshots provided in this application embodiment;
[0023] Figure 4 This is a schematic diagram of a VMware snapshot-based Oracle database management device provided in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0025] Figure 6 This is another structural schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0026] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of the present application.
[0027] It should be understood that each step described in the method embodiments disclosed in the present application can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present application is not limited in this respect.
[0028] The term "comprising" and variations thereof as used in the present application are open-ended, that is, "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related definitions of other terms will be given in the description below.
[0029] In the related art, database backup and recovery technology has gone through several development stages. Although the early backup method based on RMAN tool can realize data protection, its complex configuration process and long recovery time cannot meet the needs of high-frequency scheduling scenarios. The storage layer LUN snapshot technology lacks a database state awareness mechanism, and there is a risk of data inconsistency. The whole machine snapshot technology simplifies the operation process, but brings the problems of storage space waste and low recovery efficiency. When an enterprise needs to quickly provide a usable database copy for testing, development or disaster recovery system, the traditional method often faces multiple challenges such as time-consuming operation, insufficient data reliability and low storage resource utilization.
[0030] In order to solve the technical problems in the related art, the present application provides an Oracle database management method based on VMware snapshot, please see Figure 1 , Figure 1 is a flow diagram of the steps of the Oracle database management method based on VMware snapshot provided by the embodiments of the present application, which includes steps 101 to 105.
[0031] Step 101, creating a target virtual machine on a VMware virtual platform, and restoring based on full backup of the Oracle database on the target virtual machine.
[0032] In an embodiment, a target virtual machine is created on a VMware virtual platform, and a full backup for the target virtual machine is obtained for recovery processing, and the full backup is a full backup for a corresponding Oracle database, and the recovery processing of the full backup is used to complete initialization processing of the target virtual machine.
[0033] Exemplarily, the target virtual machine refers to a virtualized computing instance dedicated to carrying a database copy, and can be specifically created by using a VMware vSphere platform, and is used to isolate a production environment and a copy operation environment. The full backup recovery refers to a process of restoring a complete backup file of a database to a target virtual machine, and can be specifically implemented by using an Oracle RMAN recovery command, and ensures the integrity of basic data.
[0034] When the created target virtual machine is subjected to recovery processing of a full backup, that is, initialization processing, full data of a corresponding associated Oracle database is obtained, and a corresponding recovery operation is performed, so as to complete initialization processing of the target virtual machine, and the initialization processing specifically includes: creating the target virtual machine on a VMware virtual platform, and configuring a corresponding backup script and a recovery directory on the Oracle database; performing a recovery operation of the full backup of the Oracle database on the target virtual machine based on the backup script, and performing consistency checking on the Oracle database of the recovered target virtual machine.
[0035] Specifically, the backup script refers to a set of instructions for automatically performing an Oracle database backup and recovery operation, and can be specifically implemented by using a Shell script or a Python script combined with an RMAN command, and by using pre-defined backup parameters and execution logic, manual intervention is reduced. The recovery directory refers to a specified path for storing backup files and metadata of the Oracle database, and can be specifically implemented by using NFS shared storage or a local disk directory, and is used to ensure that the backup files can be accessed by the target virtual machine. The consistency checking refers to a process of verifying the integrity of a recovered database file and transaction consistency, and can be specifically implemented by executing an Oracle built-in DBVERIFY tool or querying a V$DATABASE view, and is used to detect data file damage or log synchronization problems.
[0036] After the target virtual machine is created in a VMware virtualization environment, a backup script needs to be pre-configured on an Oracle database server side, the script includes an RMAN command sequence required for full backup and a storage path parameter, the recovery directory is set to a specific path in shared storage, so that the target virtual machine can directly access full backup files in the directory. When the full recovery operation is performed, the target virtual machine calls the backup script to automatically complete the recovery process of data files, control files, and archive logs.
[0037] At step 102, when the full backup recovery of the target virtual machine is completed, the target virtual machine is subjected to snapshot processing to generate a first VMware snapshot of the target virtual machine.
[0038] In an embodiment, when the full backup recovery of the target virtual machine is completed, the target virtual machine is subjected to snapshot processing to generate a first VMware snapshot of the target virtual machine.
[0039] Illustratively, the snapshot processing refers to the frozen saving of the state of the virtual machine disk, which can be implemented through the Snapshot Manager interface of VMware, and is used to create a recoverable recovery node. When the full backup is recovered to the target virtual machine, the creation of the initial copy is completed, and when the snapshot processing is continued, the first VMware snapshot of the target virtual machine is generated to serve as the copy baseline of the initial copy. It should be noted that the copy baseline refers to the first complete and consistent Oracle database copy generated in the target VMware virtual machine through the full recovery of the Oracle RMAN, which is the "original reference baseline" for the subsequent synchronization of all incremental backups and copy updates, and is also the starting point of the "manageable copy" in the CDM (Copy Data Management) system. Meanwhile, the copy baseline can be updated with the completion of the incremental backup.
[0040] Further, when the first VMware snapshot is generated, the target virtual machine that has completed the full backup recovery needs to be subjected to verification processing, and then the snapshot processing is performed when the verification is passed. Specifically, when the full backup recovery of the target virtual machine is completed, the target virtual machine is subjected to snapshot processing to generate a first VMware snapshot of the target virtual machine, which includes: when the verification is passed, performing snapshot processing on the target virtual machine after the full backup recovery to obtain a first VMware snapshot corresponding to the target virtual machine.
[0041] That is, after the full backup recovery of the target virtual machine is completed, a verification program is run to check whether the database is in a consistent state, for example, to verify whether all data file headers match the SCN recorded in the control file. Only when the consistency verification is passed, the snapshot operation is performed on the virtual machine to generate the first snapshot, so as to avoid invalid data in the snapshot due to recovery errors.
[0042] At step 103, when the incremental backup is performed, the incremental data of the Oracle database in the current backup stage is obtained, wherein the current backup stage is the stage between the current backup and the adjacent previous backup.
[0043] In an embodiment, after the full backup of the target virtual machine is restored, the incremental backup processing can be performed periodically or periodically, such as once every certain time interval, and when the incremental backup is performed, the incremental data of the Oracle production database in the current backup phase is obtained, and the current backup phase is the phase between the current backup and the adjacent previous backup, such as the time interval between the current backup time and the adjacent previous backup time.
[0044] Step 104, performing incremental recovery in the target virtual machine to obtain a database copy of the target virtual machine at the time when the adjacent previous incremental backup is completed, and restoring the incremental data into the database copy.
[0045] In an embodiment, after the incremental data is obtained, the incremental recovery is performed in the target virtual machine when the incremental backup recovery is performed, a database copy of the target virtual machine at the time when the adjacent previous incremental backup is completed is obtained, and the obtained incremental data is restored into the database copy, such as merging the incremental data into the database copy.
[0046] Exemplarily, when the incremental backup recovery is performed, the incremental backup only captures the data blocks modified since the last LEVEL 0 / LEVEL 1 backup (such as newly added order data of the production database and updated user information), the backup volume is much smaller than the full backup, the scheduling system triggers the incremental recovery task of the target virtual machine, reads the latest LEVEL 1 incremental backup metadata, and the incremental recovery task is: RMAN connects the Recovery Catalog (recovery catalog), and when the incremental synthesis recovery is performed, the changed data in the incremental backup is "merged" into the baseline data of the target copy by the RECOVER COPY OF DATABASE instruction, instead of covering the full data state.
[0047] Step 105, updating the first VMware snapshot based on the incremental data when the recovery processing is completed.
[0048] In an embodiment, after the incremental backup recovery processing is completed, the first VMware snapshot is updated based on the incremental data. Specifically, after each incremental recovery is completed, the recovery result is solidified by updating the virtual machine snapshot to form a chain snapshot version.
[0049] Exemplarily, when the first VMware snapshot is updated, the method can refer to Figure 2 , Figure 2 is a flowchart of updating the first VMware snapshot provided by the embodiment of the application, and the step includes steps 201 to 203.
[0050] Step 201, when the recovery process is completed, execute the first instruction to put the Oracle database in VMware into the hot standby mode;
[0051] Step 202, perform a snapshot operation on the target virtual machine after the recovery process, obtain a second VMware snapshot, and update the first VMware snapshot based on the second VMware snapshot;
[0052] Step 203, when the update process is completed, execute the second instruction to restore the Oracle database in VMware to normal operation.
[0053] Specifically, the hot standby mode refers to a state in which the database is readable but limited to write operations, which can be implemented by executing the ALTER DATABASE BEGIN BACKUP command. This mode ensures that the snapshot operation is performed on data files in a consistent state, avoiding data corruption caused by uncommitted transactions or cache not being written to disk. The snapshot operation refers to a time point freezing storage operation on virtual machine disk files, which can be implemented by using the CreateSnapshot_Task method provided by VMware vSphere to generate an incremental snapshot copy by capturing the current disk state of the virtual machine. The update process refers to replacing the first snapshot with the second snapshot as the new baseline snapshot, which can be implemented by deleting obsolete nodes in the original snapshot chain and re-establishing snapshot dependency relationships, thereby reducing the depth of the snapshot chain and optimizing storage space occupation.
[0054] Exemplarily, after the incremental data recovery is completed, the Oracle database is first switched to the hot standby mode through a database instruction, at which time the database suspends transaction submission and forces all cache data to be flushed to the disk, ensuring that the file system is in a silent state. Then, VMware API is called to perform a snapshot operation on the target virtual machine, generating a second VMware snapshot containing the incremental recovery result. The second VMware snapshot is set as the new baseline snapshot to replace the first VMware snapshot, while the original first VMware snapshot is marked as deletable, thereby forming a chain structure that only retains the latest valid snapshot. Finally, the hot standby mode is released through a database instruction to restore the database to normal read-write operation. The entire process is controlled by the timing of the hot standby mode and the snapshot operation, ensuring that the database is in a transaction consistent state when the snapshot is generated.
[0055] Here, by actively controlling the database to enter the hot standby mode, the cache data persistence is forced to be completed and the transaction submission is suspended, so as to fundamentally eliminate the risk of data inconsistency during snapshot operation. At the same time, by replacing the full snapshot update mechanism with the incremental snapshot, compared with the whole machine snapshot scheme, the redundant data storage amount is reduced, the resource waste caused by the repeated storage of operating system files in the traditional whole machine snapshot scheme is avoided, and the efficiency and reliability of snapshot management are significantly improved.
[0056] Further, in order to improve the management efficiency of snapshots and replicas, a unified snapshot and replica management strategy can be specified, referring to Figure 3 , Figure 3 is another flow diagram of the VMware snapshot-based Oracle database management method provided by the embodiment of the present application, wherein the step includes steps 301 to 304.
[0057] Step 301, register the first VMware snapshot to the snapshot replica management database, and generate a first identifier of the first VMware snapshot;
[0058] Step 302, record the metadata of the first VMware snapshot, and associate and record the metadata with the first identifier;
[0059] Step 303, set a retention policy of the first VMware snapshot in the snapshot replica management database, and manage the first VMware snapshot based on the retention policy;
[0060] Step 304, when it is determined according to the retention policy that the first VMware snapshot is in an expired state, delete the first VMware snapshot and the metadata or perform a merging processing on all snapshots in the expired state.
[0061] Specifically, the snapshot copy management database refers to a database system for centrally storing and managing virtual machine snapshot information, which can be implemented by a relational database or a distributed database. Its function is to provide unified registration, query, and life cycle management functions for snapshot copies. The first identifier refers to a code or string used to uniquely identify a snapshot copy, which can be generated using a hash algorithm or a timestamp-based serial number. Its function is to achieve fast positioning and version tracing of snapshots through identification. Metadata refers to structured data describing snapshot properties, which can include snapshot creation time, associated virtual machine name, data size, and storage path. Its function is to provide basic data support for snapshot compliance audit and status monitoring. The retention policy refers to a management policy that defines snapshot storage period and disposal rules, which can be configured based on time threshold or snapshot chain depth parameters. Its function is to control storage resource occupation and avoid data redundancy through an automated mechanism. Merge processing refers to the operation of integrating multiple incremental snapshots into a single snapshot, which can be implemented through a virtual machine snapshot chain merge tool. Its function is to reduce snapshot chain levels to optimize storage efficiency while ensuring data integrity.
[0062] For example, after completing snapshot creation, the snapshot copy management database automatically registers the snapshot into the database and generates a unique identifier, such as an identification code in the format "VM_SNAP_20231001_001". The metadata recording module synchronously extracts the snapshot creation time, associated virtual machine IP, and storage volume information, and establishes a mapping relationship with the identification code and stores it in the database table. The retention policy module manages according to the preset rules, such as setting the maximum snapshot retention period to 30 days or limiting the snapshot chain depth to no more than 5 levels. When detecting that the snapshot exceeds the retention period, the system automatically triggers the deletion operation to release the corresponding storage space; if the snapshot chain depth exceeds the threshold, the merge program is started to integrate adjacent incremental snapshots into a complete copy, such as merging the 3rd-5th layer incremental snapshots into a new base snapshot.
[0063] Based on the above processing method, through automatic registration and policy-driven management, not only the standardized storage of snapshot information is realized, but also the storage resources are dynamically adjusted, such as preferentially merging low-frequency historical snapshots when the storage space is insufficient, thereby avoiding the performance degradation problem caused by snapshot accumulation in the storage array. The problems of copy management confusion, storage resource waste, and compliance audit difficulty are solved, which is specifically manifested as: precise tracing of snapshots is achieved through the unique identification and metadata association mechanism; automatic cleaning based on the retention policy reduces invalid storage occupation; the merge processing function effectively controls the complexity of the snapshot chain, improving the execution efficiency of subsequent recovery operations.
[0064] In addition, when setting the retention policy, the chain depth of the snapshot can also be set, specifically, the first VMware snapshot is managed based on the retention policy, further comprising: counting the chain depth reached by the registered VMware snapshot in the snapshot copy management system, and comparing the chain depth with the maximum depth of the snapshot chain; when the chain depth is greater than the maximum depth of the snapshot chain, the plurality of adjacent incremental snapshots are merged.
[0065] Specifically, the chain depth refers to the number of levels formed by the incremental snapshots generated in time sequence under the same virtual machine in the snapshot copy management system, which can be counted by using the timestamp sequence in the snapshot metadata, and the chain depth reflects the version history length of the snapshot copy. The maximum depth of the snapshot chain refers to the preset maximum number threshold of the allowed incremental snapshots, which can be implemented by setting a numerical parameter through a configuration management interface, and is used to control the occupation size of the snapshot storage resource. The merging processing refers to merging and calculating the data differences of the plurality of incremental snapshots to generate a new composite snapshot, which can be implemented by using a block-level difference merging algorithm or a log playback technology. The merged snapshot will replace the original plurality of snapshots to reduce storage redundancy.
[0066] Specifically, the snapshot copy management system automatically detects the number of levels of the current snapshot chain each time an incremental snapshot is generated. When it is detected that the chain depth exceeds the preset maximum depth threshold, the system automatically triggers the merging process: selecting a group of adjacent incremental snapshots that meet the merging conditions, for example, selecting the three incremental snapshots generated earliest, and merging the difference data of the three snapshots into a single composite snapshot by comparing the data change blocks between the snapshots. After the merging is completed, the metadata of the original three incremental snapshots will be updated to point to the new composite snapshot, and the storage space occupied by the merged snapshots will be released. The process is executed asynchronously through a background task to ensure that it does not affect ongoing backup or recovery operations.
[0067] Here, by establishing the snapshot chain depth detection and dynamic merging mechanism, the storage consumption of the incremental snapshots is significantly reduced under the premise of ensuring data recoverability. Specifically, the automatic merging mechanism is used to maintain the snapshot chain within a controllable range, avoiding the decline of storage performance caused by unlimited growth of the number of snapshots. At the same time, the merging operation preserves the necessary historical version data, ensuring that complete recovery can still be achieved through the combination of the composite snapshot and the remaining incremental snapshots when it is necessary to recover a copy at any time point.
[0068] Further, the snapshot copy management system can also establish a connection with other external systems to meet different usage requirements, such as testing, development, auditing, etc. Specifically, for the entire target virtual machine, the following can also be implemented: providing a connection interface for establishing a connection with an external system, and providing the target virtual machine under different VMware snapshots for the external system based on the connection interface, wherein the external system includes at least one of a test system, a development system, a disaster recovery system, and an audit system.
[0069] Specifically, the connection interface refers to a standardized protocol or programmed interface for realizing inter-system communication and data transmission, which can be implemented in the form of RESTful API, Web Service, or SDK. Its role is to establish a standardized interaction channel with external systems and eliminate the docking obstacles between heterogeneous systems. The target virtual machine under different VMware snapshots refers to the virtual machine instances corresponding to the multiple time point database copies generated based on full or incremental recovery, which can be implemented through the mapping relationship between snapshot metadata index and virtual machine instances. Its role is to provide traceable and state-isolated database environments for external systems. The external system includes a test system, a development system, a disaster recovery system, and an audit system, which can be differentiated in terms of snapshot copy allocation based on the access permissions and data processing requirements of different systems. Its role is to meet the immediate calling requirements of database copies in multiple scenarios.
[0070] Illustratively, the connection interface is configured to receive access requests from external systems and retrieve the corresponding VMware snapshot in the snapshot copy management database according to the snapshot identifier or time point parameter specified in the request. When the target snapshot is matched, the snapshot corresponding target virtual machine is mounted to the specified network environment through the virtual machine management platform, and the access permission is opened to the external system. For example, the test system can request to mount the snapshot virtual machine containing the latest incremental data for regression testing; the audit system can request to mount the snapshot virtual machine at a historical time point for data tracing and compliance verification. In this process, the mapping relationship between the metadata of the snapshot copy and the virtual machine instance is dynamically maintained to ensure the independence and traceability of the virtual machine environment obtained by each external system.
[0071] In the above processing process, the standardized interface is used to realize the automatic mounting and access control of the snapshot virtual machine, avoiding the problems of copy chaos and permission management deficiency caused by manual operation. At the same time, by realizing the unified management and on-demand calling of database copies across system environments, the problems of chaotic copy naming, missing permission control, and redundant deployment process in traditional methods are solved, so that the test, development, disaster recovery, etc. Scenarios can quickly obtain database copies consistent with the production environment, and the security and compliance of data flow are guaranteed through the interface-based access control.
[0072] In summary, the above embodiment provides an Oracle database management method based on VMware snapshot, creates a target virtual machine on a VMware virtual platform, and restores based on full backup of the Oracle database on the target virtual machine; when full backup restoration of the target virtual machine is completed, the target virtual machine is snapshot processed to generate a first VMware snapshot of the target virtual machine; when incremental backup is performed, incremental data of the Oracle database in a current backup stage is acquired, wherein the current backup stage is a stage between the current backup and an adjacent previous backup; incremental restoration is performed in the target virtual machine to obtain a database copy of the target virtual machine at a time when the adjacent previous incremental backup is completed, and the incremental data is restored into the database copy; when the restoration processing is completed, the first VMware snapshot is updated based on the incremental data. By combining the VMware snapshot mechanism and the incremental restoration technology of the Oracle database, a basic snapshot is generated after full backup restoration, and the snapshot copy is updated through incremental data subsequently, which not only avoids the storage redundancy problem of traditional whole-machine snapshot, but also guarantees data consistency through the snapshot update mechanism of the database awareness, and significantly improves the backup restoration efficiency.
[0073] According to the method described in the above embodiment, the present embodiment will be further described from the perspective of an Oracle database management device based on VMware snapshot. The Oracle database management device based on VMware snapshot can be implemented as an independent entity, or can be integrated in an electronic device, such as a terminal, which can include a mobile phone, a tablet computer, etc.
[0074] Please refer to Figure 4 , Figure 4 is a structural schematic diagram of an Oracle database management device based on VMware snapshot provided by the present embodiment, as Figure 4 shown, the Oracle database management device based on VMware snapshot 400 provided by the present embodiment includes:
[0075] The full backup module 401 is configured to create a target virtual machine on a VMware virtual platform, and restore based on full backup of the Oracle database on the target virtual machine;
[0076] The snapshot generation module 402 is configured to, when full backup restoration of the target virtual machine is completed, perform snapshot processing on the target virtual machine to generate a first VMware snapshot of the target virtual machine;
[0077] The incremental backup module 403 is configured to, when incremental backup is performed, acquire incremental data of the Oracle database in a current backup stage, wherein the current backup stage is a stage between the current backup and an adjacent previous backup;
[0078] The incremental recovery module 404 is configured to perform incremental recovery in the target virtual machine, obtain a database copy of the target virtual machine at a time when an adjacent previous incremental backup is completed, and restore the incremental data into the database copy;
[0079] The snapshot updating module 405 is configured to, when the recovery processing is completed, update the first VMware snapshot based on the incremental data.
[0080] In an embodiment, the full backup module 401 is further configured to:
[0081] create the target virtual machine on a VMware virtual platform, and configure corresponding backup scripts and recovery directories on an Oracle database;
[0082] perform a full backup recovery operation on the Oracle database based on the backup scripts on the target virtual machine, and perform consistency verification on the recovered Oracle database of the target virtual machine.
[0083] The snapshot generating module 402 is further configured to:
[0084] When the verification passes, perform snapshot processing on the target virtual machine after the full backup recovery, and obtain the first VMware snapshot corresponding to the target virtual machine.
[0085] In an embodiment, the incremental backup module 403 is further configured to:
[0086] When the incremental backup is performed, determine an adjacent previous backup node, and read corresponding incremental data metadata in the recovery directory of the Oracle database based on the adjacent previous backup node.
[0087] In an embodiment, the snapshot updating module 405 is further configured to:
[0088] When the recovery processing is completed, execute a first instruction to place the Oracle database in the VMware into a hot backup mode;
[0089] perform snapshot operation on the target virtual machine after the recovery processing, obtain a second VMware snapshot, and perform updating processing on the first VMware snapshot based on the second VMware snapshot;
[0090] When the updating processing is completed, execute a second instruction to restore the Oracle database in the VMware to normal operation.
[0091] In an embodiment, the Oracle database management apparatus based on the VMware snapshot 400 further comprises a snapshot management module configured to:
[0092] register the first VMware snapshot to a snapshot copy management database, and generate a first identifier of the first VMware snapshot;
[0093] record metadata of the first VMware snapshot, and associate and record the metadata with the first identifier;
[0094] set a retention policy of the first VMware snapshot in the snapshot copy management database, and manage the first VMware snapshot based on the retention policy;
[0095] when it is determined that the first VMware snapshot is in an expired state according to the retention policy, delete the first VMware snapshot and the metadata or perform a merging processing on all snapshots in the expired state.
[0096] In an embodiment, the snapshot management module is further configured to:
[0097] count a chain depth reached by the registered VMware snapshot in the snapshot copy management system, and compare the chain depth with a maximum depth of a snapshot chain;
[0098] when the chain depth is greater than the maximum depth of the snapshot chain, perform a merging processing on a plurality of adjacent incremental snapshots.
[0099] In an embodiment, the VMware snapshot-based Oracle database management apparatus 400 further comprises an interface providing module configured to:
[0100] provide a connection interface for establishing a connection with an external system, and provide a target virtual machine under different VMware snapshots for the external system based on the connection interface, wherein the external system at least includes one of a test system, a development system, a disaster recovery system and an audit system.
[0101] In addition, please refer to Figure 5 , Figure 5 is a structural schematic diagram of an electronic device provided by the embodiment of the present application. As shown in Figure 5 , the electronic device 500 comprises a processor 501 and a memory 502. The processor 501 is electrically connected with the memory 502.
[0102] The processor 501 is the control center of the electronic device 500, and connects each part of the entire electronic device by using various interfaces and circuits, etc. Through running or loading an application program stored in the internal flash of the memory 502, and the application program can be an embedded program, and calling data stored in the memory 502, the signal obtained in the dual-mode communication is managed based on the above-mentioned VMware snapshot-based Oracle database management method.
[0103] In the embodiment, the processor 501 in the electronic device 500 loads the instructions corresponding to the processes of one or more than one application into the memory 502 according to the steps of the Oracle database management method based on VMware snapshot as described above, and runs the application stored in the memory 502 by the processor 501, thereby realizing the Oracle database management and analysis based on VMware snapshot.
[0104] The electronic device 500 can realize the steps in any embodiment of the Oracle database management method based on VMware snapshot provided by the embodiments of the present application, and thus can realize the beneficial effects of any Oracle database management method based on VMware snapshot provided by the embodiments of the present application. Details are described in the foregoing embodiments, which will not be described here.
[0105] Please refer to Figure 6 , Figure 6 is another structural schematic diagram of the electronic device provided by the embodiments of the present application, as Figure 6 shown, Figure 6 shows a specific structural block diagram of the electronic device provided by the embodiments of the present application, which can be used to implement the Oracle database management method based on VMware snapshot provided in the foregoing embodiments.
[0106] The RF circuit 610 is used to receive and send electromagnetic waves, and to convert electromagnetic waves and electrical signals to each other, so as to communicate with a communication network or other devices. The RF circuit 610 can include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and the like. The RF circuit 610 can communicate with various networks, such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network. The wireless network can include a cellular telephone network, a wireless local or metropolitan area network. The wireless network can use various communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging, and short message service, and any other suitable communication protocol, even those not yet developed as of the date of the disclosure.
[0107] The memory 620 can be used to store software programs and modules, such as the program instructions / modules corresponding to the VMware snapshot-based Oracle database management method described in the above embodiments, and the processor 680 executes various functional applications to implement the VMware snapshot-based Oracle database management method by running the dual-mode module stored in the internal flash of the memory 620 and the program for controlling the dual-mode module. The program for controlling the dual-mode module can be an embedded program stored in the internal flash of the memory 620.
[0108] Memory 620 can include high-speed random access memory and can also include nonvolatile memory, such as one or more magnetic data storage disks, flash memory, or other nonvolatile solid-state memory. In some examples, memory 620 can further include memory that is remote from processor 680, such as the memory memory of a remote server that is connected to electronic device 600 through a network. Examples of such networks include, without limitation, the Internet, an enterprise intranet, a local area network, a mobile communications network, and combinations thereof.
[0109] Input unit 630 can be used to receive uploaded digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls. In particular, input unit 630 can include a touch-sensitive surface 631 and other input devices 632. Touch-sensitive surface 631, also known as a touch display or touchpad, can gather touch operations by a user thereon or proximate thereto (such as operations by a user using a finger, a stylus, or any suitable object or accessory on or proximate to touch-sensitive surface 631) and drive corresponding connected devices according to pre-set programming. Optionally, touch-sensitive surface 631 can include both touch detection means and a touch controller. The touch detection means detects the position of a touch by a user and detects signals resulting from the touch operation and transmits the signals to the touch controller; the touch controller receives the touch information from the touch detection means and converts it to touch coordinates, which are then sent to processor 680, and can also receive commands from processor 680 and execute them. In addition, touch-sensitive surface 631 can be implemented in a variety of ways, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surface 631, input unit 630 can also include other input devices 632. In particular, other input devices 632 can include one or more of, without limitation, a physical keyboard, function keys (such as volume control keys, on / off keys, etc.), a trackball, a mouse, a joystick, and the like.
[0110] The display unit 640 can be used to display information input by a user or provided to the user, as well as various graphical user interfaces of the electronic device 600, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 640 can include a display panel 641, which can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like, optionally. Further, the touch-sensitive surface 631 can cover the display panel 641, and when the touch-sensitive surface 631 detects a touch operation thereon or adjacent thereto, transmit to the processor 680 to determine the type of touch event, and then the processor 680 provides corresponding visual output on the display panel 641 according to the type of touch event. Although in the figure, the touch-sensitive surface 631 and the display panel 641 are implemented as two independent components to realize the input and output functions, in some embodiments, the touch-sensitive surface 631 and the display panel 641 can be integrated to realize the input and output functions.
[0111] The electronic device 600 can further include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor that can adjust the brightness of the display panel 641 according to the brightness of ambient light, and a proximity sensor that can generate an interrupt when the cover is closed or turned off. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, can detect the magnitude and direction of gravity, which can be used for applications such as identifying the posture of the mobile phone (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, tapping), and the like; as well as other sensors that the electronic device 600 can be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which will not be described here.
[0112] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the electronic device 600. The audio circuit 660 can convert received audio data into an electrical signal, transmit the electrical signal to the speaker 661, and convert the electrical signal into a sound signal output by the speaker 661; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, which is output to the processor 680 for processing, and then transmitted to another terminal via the RF circuit 610, or output to the memory 620 for further processing. The audio circuit 660 can also include an earphone jack to provide communication between an external earphone and the electronic device 600.
[0113] The electronic device 600 can help the user to receive requests, send information, etc. through the transmission module 670 (e.g., a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 670 is shown in the figure, it can be understood that it does not belong to the necessary components of the electronic device 600, and can be omitted as needed without changing the essence of the application.
[0114] The processor 680 is the control center of the electronic device 600, which connects various parts of the entire mobile phone through various interfaces and lines, executes various functions of the electronic device 600 and processes data by running or executing software programs and / or modules stored in the memory 620 and calling data stored in the memory 620, thereby monitoring the entire electronic device. Optionally, the processor 680 can include one or more processing cores; in some embodiments, the processor 680 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 680.
[0115] The electronic device 600 further includes a power supply 690 (such as a battery) for supplying power to various components, and in some embodiments, the power supply can be logically connected to the processor 680 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. The power supply 690 can also include one or more direct or alternating power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
[0116] In this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal further includes a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors to implement any of the steps of the VMware snapshot-based Oracle database management method provided by the above embodiments.
[0117] In specific implementation, the above various modules can be implemented as independent entities, or can be combined as the same or several entities, and the specific implementation of the above various modules can be referred to the method embodiments described above, which will not be described here.
[0118] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the embodiments of the present application provide a storage medium, which stores a plurality of instructions, which can be executed by a processor to implement any step in the VMware snapshot-based Oracle database management method provided by the above embodiments.
[0119] The storage medium can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. Specifically, the storage medium can be an internal flash memory, that is, the embedded program for implementing the VMware snapshot-based Oracle database management method can be stored in the internal flash memory.
[0120] Since the instructions stored in the storage medium can execute the steps in any embodiment of the VMware snapshot-based Oracle database management method provided by the embodiments of the present application, the beneficial effects of any VMware snapshot-based Oracle database management method provided by the embodiments of the present application can be achieved, which are described in detail in the foregoing embodiments and will not be described here.
[0121] The above describes in detail the VMware snapshot-based Oracle database management method, device, electronic equipment and storage medium provided by the embodiments of the present application. The principle and implementation manner of the present application are described by applying specific examples. The above embodiment is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the principle of the present application, the specific implementation manner and application range can be changed; in summary, the content of the specification should not be understood as a limitation of the present application. Moreover, for those skilled in the art, some improvements and refinements can be made without departing from the principle of the present application, and these improvements and refinements are also regarded as the protection scope of the present application.
Claims
1. An Oracle database management method based on VMware snapshots, characterized in that, include: Create the target virtual machine on the VMware virtual machine platform and restore it based on a full backup of the Oracle database. When the full backup and recovery of the target virtual machine is completed, a consistency check is performed on the Oracle database of the restored target virtual machine. If the check passes, a snapshot is taken of the target virtual machine to generate the first VMware snapshot of the target virtual machine. When performing an incremental backup, the incremental data of the Oracle database in the current backup stage is obtained, wherein the current backup stage is the stage between the current backup and the adjacent previous backup. Incremental recovery is performed on the target virtual machine to obtain a database copy of the target virtual machine when the previous incremental backup was completed, and the incremental data is restored to the database copy. Upon completion of the recovery process, the first VMware snapshot is updated based on the incremental data; The step of updating the first VMware snapshot based on the incremental data includes: A snapshot operation is performed on the target virtual machine after the recovery process to obtain a second VMware snapshot. The first VMware snapshot is then updated based on the second VMware snapshot. After each incremental recovery is completed, the recovery result is solidified by updating the virtual machine snapshot, forming a chain of snapshot versions.
2. The method as described in claim 1, characterized in that, The process of creating a target virtual machine on the VMware virtual platform and restoring it based on a full backup of the Oracle database includes: Create the target virtual machine on the VMware virtual platform and configure the corresponding backup scripts and recovery catalog on the Oracle database; On the target virtual machine, a full backup of the Oracle database is restored based on the backup script, and a consistency check is performed on the restored Oracle database on the target virtual machine. The step of performing snapshot processing on the target virtual machine to generate a first VMware snapshot of the target virtual machine upon completion of a full backup and recovery includes: Upon successful verification, a snapshot is performed on the target virtual machine after full backup and recovery to obtain the first VMware snapshot corresponding to the target virtual machine.
3. The method as described in claim 2, characterized in that, The step of obtaining incremental data of the Oracle database during the current backup phase during incremental backup includes: When performing an incremental backup, the adjacent previous backup node is determined, and the corresponding incremental data metadata is read from the recovery directory of the Oracle database based on the adjacent previous backup node.
4. The method as described in claim 1, characterized in that, The step of updating the first VMware snapshot based on the incremental data upon completion of the recovery process includes: Upon completion of the recovery process, the first instruction is executed to put the Oracle database in VMware into hot standby mode. Perform a snapshot operation on the target virtual machine after recovery to obtain a second VMware snapshot, and update the first VMware snapshot based on the second VMware snapshot; Once the update process is complete, execute the second instruction to restore the Oracle database in the VMware to normal operation.
5. The method as described in claim 1, characterized in that, The method further includes: Register the first VMware snapshot to the snapshot replica management database and generate a first identifier for the first VMware snapshot; Record the metadata of the first VMware snapshot, and associate and record the metadata with the first identifier; Set the retention policy for the first VMware snapshot in the snapshot copy management database, and manage the first VMware snapshot based on the retention policy; When it is determined that the first VMware snapshot is in an expired state according to the retention policy, the first VMware snapshot and the metadata are deleted, or all snapshots in an expired state are merged.
6. The method as described in claim 5, characterized in that, Managing the first VMware snapshot based on the retention policy further includes: The chain depth reached by the VMware snapshots registered in the snapshot copy management database is calculated and compared with the maximum depth of the snapshot chain. When the chain depth is greater than the maximum depth of the snapshot chain, multiple adjacent incremental snapshots are merged.
7. The method as described in claim 1, characterized in that, The method further includes: Provides a connection interface for establishing connections with external systems, and provides target virtual machines under different VMware snapshots for the external systems based on the connection interface, wherein the external systems include at least one of a test system, a development system, a disaster recovery system, and an audit system.
8. An Oracle database management device based on VMware snapshots, characterized in that, include: The full backup module is used to create a target virtual machine on the VMware virtual platform and restore it based on a full backup of the Oracle database on the target virtual machine. The snapshot generation module is used to perform consistency verification on the Oracle database of the restored target virtual machine when the full backup and recovery of the target virtual machine is completed, and to perform snapshot processing on the target virtual machine when the verification passes, thereby generating the first VMware snapshot of the target virtual machine. The incremental backup module is used to obtain incremental data of the Oracle database in the current backup stage when performing incremental backup, wherein the current backup stage is the stage between the current backup and the adjacent previous backup. The incremental recovery module is used to perform incremental recovery on the target virtual machine, obtain a database copy of the target virtual machine when it completed the previous incremental backup, and restore the incremental data to the database copy; The snapshot update module is used to update the first VMware snapshot based on the incremental data when the recovery process is completed; The snapshot update module is further used for: A snapshot operation is performed on the target virtual machine after the recovery process to obtain a second VMware snapshot. The first VMware snapshot is then updated based on the second VMware snapshot. After each incremental recovery is completed, the recovery result is solidified by updating the virtual machine snapshot, forming a chain of snapshot versions.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a computer program or embedded program stored in the internal storage of the memory and executable on the processor, wherein the processor executes the computer program or embedded program to implement the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or embedded program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data backup recovery method and device based on data merging
CN119292828A
Application-aware database backups
US20180365110A1
Full snapshot selection for reverse operations
US20250225035A1