Continuous data protection method and device, electronic equipment and storage medium

By creating a copy image file and initializing the data before starting the virtual machine, combined with the backfill processing of continuous data protection, the problem of time-consuming data initialization before the virtual machine is started is solved, and the startup speed of the virtual machine and the accuracy of data recording are improved.

CN118734294AActive Publication Date: 2024-10-01GUANGDONG CHANMING INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410935659.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-01
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Continuous data protection needs to be initialized before the virtual machine is enabled, causing the writing of the data source to be suspended, which is time-consuming and affects the operation of the virtualized environment.

Method used

Before the virtual machine starts, a copy image file is temporarily created based on the disk image file as the initial disk media, and the data initialization operation is performed at the initial stage of startup. After completion, the disk image file obtains modified data through the backfill processing of continuous data protection, thereby eliminating the need to pause the virtual machine. Run to record the data source.

Benefits of technology

Significantly improves the startup rate of virtual machines, solves the time-consuming problem of continuous data protection initialization, and ensures the integrity and accuracy of data initialization operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734294A_ABST
    Figure CN118734294A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of virtual machines, and particularly discloses a continuous data protection method and device, electronic equipment and a storage medium, and the method comprises the steps: temporarily creating a copy mirror image file, and taking the copy mirror image file as a disk medium of a virtual machine; the virtual machine is started, data operation is carried out, recording is carried out based on continuous data protection, and meanwhile data initialization operation is carried out; after the data initialization operation is completed, switching the disk mirror image file into a disk medium of the virtual machine; performing backfilling processing on the disk mirror image file; performing data operation and recording based on continuous data protection; according to the method, the copy mirror image file is temporarily created before the virtual machine is started, the copy mirror image file is used as a disk medium used by the virtual machine in the initial stage, and the data initialization operation is performed at the same time, so that the virtual machine does not need to stop running to record a data source in the initial stage of starting, the starting speed of the virtual machine can be greatly improved, and the starting efficiency is improved. And the problem of time consumption in initialization of continuous data protection is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual machine technology, and in particular to a continuous data protection method, device, electronic device and storage medium. Background Art

[0002] Continuous data protection is an efficient data backup and recovery strategy that records data modifications and metadata in real time, supports recovery to any historical time point in seconds, and achieves near-zero data loss. It is particularly suitable for cloud computing virtualization environments, such as virtual machines.

[0003] However, before the virtual machine is enabled, continuous data protection needs to be initialized to record the initial data of the data source to prevent data loss during recovery. However, this recording process requires suspending the writing of the data source, which is time-consuming for a large amount of initial data and affects the operation of the virtualization environment.

[0004] There is currently no effective technical solution to the above problems. Summary of the invention

[0005] The purpose of the present application is to provide a continuous data protection method, device, electronic device and storage medium to solve the problem of time-consuming initialization of continuous data protection and improve the startup rate of virtual machines.

[0006] In a first aspect, the present application provides a continuous data protection method, which is applied in a virtual machine, and the continuous data protection method comprises the following steps: S1, temporarily creating a copy image file based on the disk image file, and using the copy image file as the disk medium of the virtual machine; S2, start the virtual machine, and perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, wherein the data initialization operations include: recording the disk image file and corresponding metadata into continuous data protection; S3, after the data initialization operation is completed, switching the disk image file to the disk medium of the virtual machine; S4, backfilling the disk image file according to the backup file of the continuous data protection; S5. Perform data operations based on the disk image file and record based on continuous data protection.

[0007] The continuous data protection method of the present application temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the early stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source at the initial startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection.

[0008] The continuous data protection method, wherein the continuous data protection method further includes a step performed before step S2: A1, setting the disk image file as a read-only file; Step S3 includes: S31. After the data initialization operation is completed, the disk image file is switched to the disk medium of the virtual machine, and the disk image file is restored to a readable and writable file.

[0009] In order to more effectively prevent the disk image file from being contaminated during the data initialization operation, the continuous data protection method of the present application sets the disk image file to a read-only file before starting the virtual machine, thereby preventing the virtual machine or the real system from accidentally modifying the data content of the disk image file and causing the data initialization operation to fail.

[0010] The continuous data protection method, wherein step S3 further comprises: S32, deleting the copy image file.

[0011] In order to avoid excessive accumulation of copy image files and occupying system resources, the continuous data protection method of the present application deletes the copy image file created by starting the virtual machine this time after setting the disk image file as the disk medium.

[0012] The continuous data protection method, wherein step S4 comprises: Based on the time point when the data initialization operation is completed, the data operation on the replica image file is previously performed, and the disk image file is backfilled by calling the backup file of the continuous data protection.

[0013] In the continuous data protection method, the disk image file and the copy image file are both QCOW2 files.

[0014] The continuous data protection method, wherein the step of temporarily creating a copy image file based on the disk image file comprises: Temporarily create an empty copy image file using the disk image file as the parent file.

[0015] In the continuous data protection method, step S4 and step S5 are executed synchronously.

[0016] In a second aspect, the present application further provides a continuous data protection device, which is applied in a virtual machine, and the continuous data protection device includes: A replica creation module, used to temporarily create a replica image file based on the disk image file, and use the replica image file as the disk medium of the virtual machine; An initialization module is used to start the virtual machine, perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, wherein the data initialization operations include: recording the disk image file and the corresponding metadata into continuous data protection; A switching module, used for switching the disk image file to the disk medium of the virtual machine after the data initialization operation is completed; A backfill module, used for backfilling the disk image file according to the backup file of the continuous data protection; The data protection module is used to perform data operations based on the disk image file and record based on continuous data protection.

[0017] The continuous data protection device of the present application temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the initial stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source in the initial stage of startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection.

[0018] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are executed.

[0019] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the method provided in the first aspect are executed.

[0020] As can be seen from the above, the present application provides a continuous data protection method, device, electronic device and storage medium, wherein the continuous data protection method temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the initial stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source at the initial stage of startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of a continuous data protection method provided in an embodiment of the present application.

[0022] Figure 2 A schematic diagram of the structure of a continuous data protection device provided in an embodiment of the present application.

[0023] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0024] Figure numerals: 201, replica creation module; 202, initialization module; 203, switching module; 204, backfill module; 205, data protection module; 301, processor; 302, memory; 303, communication bus. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0026] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0027] First, please refer to Figure 1 Some embodiments of the present application provide a continuous data protection method, which is applied in a virtual machine. The continuous data protection method includes the following steps: S1, temporarily creating a copy image file based on the disk image file, and using the copy image file as the disk medium of the virtual machine; S2, start the virtual machine, and perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, the data initialization operations include: recording the disk image file and corresponding metadata into continuous data protection; S3. After the data initialization operation is completed, the disk image file is switched to the disk medium of the virtual machine; S4, backfilling the disk image file according to the backup file of continuous data protection; S5. Perform data operations based on the disk image file and record based on continuous data protection.

[0028] Specifically, the continuous data protection method of the embodiment of the present application is used to perform continuous data protection of a virtual machine, and is particularly suitable for situations where the data source in the virtual machine already has data before the virtual machine is started. In the embodiment of the present application, the disk image file is the data source.

[0029] More specifically, in existing virtual machines, disk image files are generally used directly as disk media for virtual machines. The continuous data protection method of the embodiment of the present application adds a copy image file as the disk media used in the initial startup of the virtual machine to back up the data initially stored in the disk image file while taking into account the startup speed of the virtual machine.

[0030] More specifically, the copy image file is a temporarily created file that is consistent with the format of the disk image file. It is used to replace the disk image file as a disk medium in the initial stage of virtual machine startup to avoid related data operations in the initial stage of virtual machine startup from contaminating the disk image file and affecting the backup of the disk image file. Among them, the copy image file needs to be created before the virtual machine is officially started. Therefore, step S1 can be a pre-operation executed before the virtual machine is started according to the virtual machine startup command, or it can be an end operation for the next virtual machine startup service after the virtual machine is shut down.

[0031] More specifically, the copy image file can be an image file that can automatically read relevant data from the disk image file according to the virtual machine usage requirements, or it can be an image file that copies data from the disk image file. In the embodiment of the present application, the former is preferred, which can further save the time spent on starting the virtual machine.

[0032] More specifically, after the virtual machine is started, the user can perform normal operations, which will generate data operations performed on the copy image file, where the data operation is an operation to modify the virtual machine storage medium, and the data generated during the operation includes modified data and metadata, the modified data includes written data, and the metadata includes one or more of timestamp, disk offset and size; continuous data protection is used to record data operations, that is, to record the modified data based on metadata (especially timestamp and disk offset).

[0033] More specifically, after the virtual machine is started, step S2 also performs an initialization operation on the disk image file. The initialization operation is actually used to record the data in the data source into the continuous data protection, which is equivalent to backing up the data content in the disk image file. In this process, the data operations generated by the user's normal operations are all modifications to the copy image file. The modified data generated in the process are all written into the copy image file and recorded in the continuous data protection, and will not affect the data content in the disk image file, so that step S2 can successfully record the original disk image file and the corresponding metadata completely into the continuous data protection; wherein, the metadata corresponding to the disk image file can be characteristic data about the disk image file, such as disk offset and size, etc., and can also include a timestamp determined based on the virtual machine startup time, so that the continuous data protection can restore the disk image file to its original state in subsequent operations.

[0034] More specifically, in step S2, the user's normal operation and the data initialization operation are performed simultaneously without affecting each other, that is, the data initialization operation will not affect the user's normal operation, so that the user can directly start the virtual machine to operate.

[0035] More specifically, the completion of the data initialization operation means that the original disk image file and the corresponding metadata have been completely recorded in the continuous data protection, which means that the continuous data protection can restore the disk image file to its original state in subsequent operations. In this case, the disk image file can be switched again to a disk medium directly used by the virtual machine. However, considering that during the data initialization operation, the copy image file generates modified data that the disk image file does not have based on the data operation. Therefore, the continuous data protection method of the embodiment of the present application uses step S4 to backfill the disk image file so that the disk image file has the modified data newly added to the copy image file in the data initialization operation. Among them, the continuous data protection includes a data recording function and a data recovery function. The backfilling process actually utilizes the data recovery function of the continuous data protection to restore the modification records of the copy image file during the data initialization operation to the disk image file, so that the modified data of the disk image file and the copy image file are aligned.

[0036] More specifically, when the backfill process of the disk image file is completed, the user can continue normal operations, which will produce data operations performed on the disk image file; the continuous data protection in step S5 is also used to record data operations, the difference is that what is recorded is the data operations on the disk image file.

[0037] It should be noted that the amount of modified data corresponding to the modification record of the copy image file during the data initialization operation is generally much smaller than the data content of the disk image file. Therefore, step S4 can complete the backfill processing in an instant without affecting the user experience.

[0038] It should be noted that the backup file of continuous data protection is a file used to record the aforementioned modified data and metadata.

[0039] The continuous data protection method of the embodiment of the present application temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the initial stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source at the initial stage of startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection.

[0040] In some preferred embodiments, the continuous data protection method further includes the following steps performed before step S2: A1. Set the disk image file as a read-only file; Step S3 includes: S31. After the data initialization operation is completed, the disk image file is switched to the disk medium of the virtual machine, and the disk image file is restored to a readable and writable file.

[0041] Specifically, in order to more effectively prevent the disk image file from being contaminated during the data initialization operation, the continuous data protection method of the embodiment of the present application sets the disk image file as a read-only file before starting the virtual machine, thereby preventing the virtual machine or real system from accidentally modifying the data content of the disk image file and causing the data initialization operation to fail.

[0042] It should be noted that step A1 is executed before step S2. It can be executed between step S1 and step S2, or before step S1, or synchronously with step S1. In the embodiment of the present application, it is preferably executed between step S1 and step S2.

[0043] More specifically, after the data initialization operation is completed, step S31 needs to restore the disk image file in the read-only state to a read-write file before subsequent backfill processing and data operations can be performed.

[0044] In some preferred embodiments, step S3 further includes: S32, delete the copy image file.

[0045] Specifically, based on the foregoing content, it can be known that the continuous data protection method of the embodiment of the present application temporarily creates a copy image file before each virtual machine is started. In order to avoid excessive accumulation of copy image files and occupying system resources, the continuous data protection method of the embodiment of the present application deletes the copy image file created by starting the virtual machine this time after setting the disk image file as the disk medium.

[0046] In some preferred embodiments, step S4 comprises: S41, based on the time point when the data initialization operation is completed, the disk image file is backfilled by calling the backup file of the continuous data protection based on the previous data operation on the copy image file.

[0047] Specifically, the continuous data protection method of the embodiment of the present application marks the corresponding time node when the initialization operation is completed, and obtains the time node P1, so that step S41 is actually based on the time node P1 to restore the disk image file based on the modification record of the copy image file during the data initialization operation in the backup file of the continuous data protection to achieve the effect of backfill processing; the backfill processing process actually directly uses the data recovery function of the continuous data protection after switching the disk medium, without the need to additionally configure special backfill logic, and can fully utilize the functional characteristics of continuous data protection.

[0048] In some preferred implementations, both the disk image file and the copy image file are QCOW2 files.

[0049] Specifically, in the embodiment of the present application, the virtual machine is preferably QEMU (Quick Emulator), so the corresponding disk image file and the copy image file are preferably image files in the QCOW2 (QEMU copy on write version 2) format. The QCOW2 file is a copy-on-write file that can be used for copying data operations to achieve continuous data protection.

[0050] In some preferred implementations, the step of temporarily creating a copy image file based on the disk image file includes: Temporarily create an empty copy image file using the disk image file as the parent file.

[0051] Specifically, based on the foregoing content, it can be known that the copy image file is preferably an image file that can automatically read relevant data from the disk image file according to the use requirements of the virtual machine. Therefore, the continuous data protection method of the embodiment of the present application designs the copy image file as an image file with empty content, so that the copy image file can be created instantly and will not affect the time consumption of virtual machine startup; after the virtual machine is started, the copy image file can read the corresponding data from the read-only parent file (disk image file) according to the use requirements of the virtual machine to realize the normal use of the virtual machine, and the new modified data generated by the virtual machine will be written into the copy image file.

[0052] In some preferred implementations, step S4 and step S5 are performed synchronously.

[0053] Specifically, after the disk image file is switched to the disk medium, the continuous data protection method of the embodiment of the present application can further optimize the user experience by synchronously executing step S4 and step S5, that is, performing backfill processing and data operations on the disk image file concurrently without waiting for the backfill processing to be completed.

[0054] More specifically, since the data content in the disk image file has completed the data initialization operation, the backfill data will not pollute and affect the recorded data. The operating system or running program is generally temporarily stored in RAM (random access memory). The disk image file undergoing backfill processing will not affect the user's normal operation. The modified data corresponding to the data operations generated by the user's normal operation can be directly written into the disk image file undergoing backfill processing.

[0055] Second, please refer to Figure 2 Some embodiments of the present application further provide a continuous data protection device, which is applied in a virtual machine. The continuous data protection device includes: A replica creation module 201 is used to temporarily create a replica image file based on the disk image file, and use the replica image file as the disk medium of the virtual machine; Initialization module 202, used to start the virtual machine, perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, the data initialization operations include: recording the disk image file and the corresponding metadata into continuous data protection; The switching module 203 is used to switch the disk image file to the disk medium of the virtual machine after the data initialization operation is completed; A backfill module 204, used to backfill the disk image file according to the backup file of continuous data protection; The data protection module 205 is used to perform data operations based on the disk image file and record based on continuous data protection.

[0056] The continuous data protection device of the embodiment of the present application temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the initial stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source at the initial stage of startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection.

[0057] In some preferred implementations, the continuous data protection device of the embodiments of the present application is used to execute the continuous data protection method provided in the first aspect above.

[0058] Third, please refer to Figure 3 Some embodiments of the present application also provide a structural diagram of an electronic device. The present application provides an electronic device, including: a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not marked). The memory 302 stores computer-readable instructions executable by the processor 301. When the electronic device is running, the processor 301 executes the computer-readable instructions to execute the method in any optional implementation of the above embodiments.

[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method in any optional implementation of the above embodiment is executed. The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.

[0060] In summary, the embodiments of the present application provide a continuous data protection method, device, electronic device and storage medium, wherein the continuous data protection method temporarily creates a copy image file based on the disk image file before the virtual machine is started, and uses the copy image file as the disk medium used by the virtual machine in the initial stage, and performs data initialization operations at the same time, so that the virtual machine does not need to suspend operation to record the data source at the initial stage of startup, and after the data initialization operation is completed, the disk image file is backfilled through the continuous data protection data recovery function, so that the disk image file can accurately obtain the modified data completed by the data initialization operation, so that the disk medium can smoothly transition and switch from the copy image file to the disk image file, which can greatly improve the startup rate of the virtual machine and effectively solve the problem of time-consuming initialization in continuous data protection.

[0061] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0062] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0063] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0064] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0065] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A continuous data protection method, applied in a virtual machine, characterized in that: The continuous data protection method comprises the following steps: S1, temporarily creating a copy image file based on the disk image file, and using the copy image file as the disk medium of the virtual machine; S2, start the virtual machine, and perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, wherein the data initialization operations include: recording the disk image file and corresponding metadata into continuous data protection; S3, after the data initialization operation is completed, switching the disk image file to the disk medium of the virtual machine; S4, backfilling the disk image file according to the backup file of the continuous data protection; S5. Perform data operations based on the disk image file and record based on continuous data protection.

2. The continuous data protection method according to claim 1, characterized in that: The continuous data protection method further includes the following steps performed before step S2: A1, setting the disk image file as a read-only file; Step S3 includes: S31. After the data initialization operation is completed, the disk image file is switched to the disk medium of the virtual machine, and the disk image file is restored to a readable and writable file.

3. The continuous data protection method according to claim 2, characterized in that: Step S3 also includes: S32, deleting the copy image file.

4. The continuous data protection method according to claim 1, characterized in that: Step S4 includes: Based on the time point when the data initialization operation is completed, the data operation on the replica image file is previously performed, and the disk image file is backfilled by calling the backup file of the continuous data protection.

5. The continuous data protection method according to claim 1, characterized in that: The disk image file and the copy image file are both QCOW2 files.

6. The continuous data protection method according to claim 1, characterized in that: The step of temporarily creating a copy image file based on the disk image file comprises: Temporarily create an empty copy image file using the disk image file as the parent file.

7. The continuous data protection method according to claim 1, characterized in that: Step S4 and step S5 are executed synchronously.

8. A continuous data protection device, applied in a virtual machine, characterized in that: The continuous data protection device comprises: A replica creation module, used to temporarily create a replica image file based on the disk image file, and use the replica image file as the disk medium of the virtual machine; An initialization module is used to start the virtual machine, perform data operations based on the replica image file and record based on continuous data protection, and perform data initialization operations at the same time, wherein the data initialization operations include: recording the disk image file and the corresponding metadata into continuous data protection; A switching module, used for switching the disk image file to the disk medium of the virtual machine after the data initialization operation is completed; A backfill module, used for backfilling the disk image file according to the backup file of the continuous data protection; The data protection module is used to perform data operations based on the disk image file and record based on continuous data protection.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Continuous data protection method based on disk partition

    CN102831036A

  • Data backup method for virtual machines

    CN103678045A

  • Continuous data protection method

    CN104866435A

  • Continuous data protection system and method combining with snapshot technology

    CN105389230A

  • Continuous data protection based virtual machine data protection method

    CN106648981A

Cited By

  • Data synchronization method, mirror image mounting method, equipment and medium

    CN120448358A