CN110109775B - Virtual machine recovery method and device, terminal equipment and storage medium - Google Patents

Virtual machine recovery method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110109775B
CN110109775B CN201910348607.1A CN201910348607A CN110109775B CN 110109775 B CN110109775 B CN 110109775B CN 201910348607 A CN201910348607 A CN 201910348607A CN 110109775 B CN110109775 B CN 110109775B
Authority
CN
China
Prior art keywords
virtual machine
target
data
recovery
image file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910348607.1A
Other languages
Chinese (zh)
Other versions
CN110109775A (en
Inventor
李凡
张清波
谢鸿钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201910348607.1A priority Critical patent/CN110109775B/en
Publication of CN110109775A publication Critical patent/CN110109775A/en
Application granted granted Critical
Publication of CN110109775B publication Critical patent/CN110109775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality
    • G06F11/1484Generic software techniques for error detection or fault masking by means of middleware or OS functionality involving virtual machines
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a virtual machine recovery method, a virtual machine recovery device, terminal equipment and a storage medium. According to the method, after the virtual machine breaks down, the IO log is not converted into the mirror image FILE, target data to be restored is firstly obtained, then the target data is mapped into target block equipment, then a target increment mirror image FILE is created for the BACKING_FILE according to the target block equipment, and finally the virtual machine is started based on the target increment mirror image FILE, so that the influence of the data quantity and storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.

Description

Virtual machine recovery method and device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of data security technologies, and in particular, to a virtual machine recovery method, a device, a terminal device, and a storage medium.
Background
To cope with unexpected situations such as file, data loss or damage, etc., the data in the electronic computer storage device is copied to the mass storage device such as tape, etc., and the process of copying the data is the backup.
In the conventional periodic backup manner, only an hour-level backup can be performed on a Virtual Machine (VM), that is, a recovery point target (Recovery Point Objective, RPO) is in an hour level, which means that once a storage fails, an hour-level data volume will be lost, which is unacceptable for some critical services of a user, so that a technology of continuous data protection (continual data protection, CDP) appears in the industry, which records each WRITE operation (i.e., WRITE IO) of the VM and stores the WRITE operation as an IO log (IOLOG), and when a VM system fails, the recovery point can be recovered to any point of time in the last period, so as to implement the RPO in the IO level.
When the CDP backup scheme is adopted and the VM is restored to the appointed time point, an IOLOG in a range needs to be converted into an IMAGE (IMAGE) file, and then the IMAGE file is used for starting the VM. The process of converting the IOLOG into the IMAGE file is affected by the data volume and storage performance of the IOLOG, which usually takes a long time, possibly tens of minutes or even hours, resulting in too long recovery time of the VM, and failing to meet the client requirements with higher requirements on the recovery time objective (Recovery Time Objective, RTO).
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a virtual machine recovery method, a device, terminal equipment and a storage medium, and aims to solve the technical problem that in the prior art, when a virtual machine is recovered, the recovery time of the virtual machine is too long.
In order to achieve the above object, the present invention provides a virtual machine recovery method, which includes the steps of:
when the virtual machine fails, acquiring target data to be recovered;
mapping the target data into target block equipment;
creating a target increment mirror image FILE for the BACKING_FILE according to the target block device;
and starting the virtual machine based on the target increment mirror image file.
Preferably, after the virtual machine fails, acquiring target data to be recovered specifically includes:
when the virtual machine fails, receiving a recovery instruction input by a user;
and extracting the recovery time from the recovery instruction, and determining target data to be recovered according to the recovery time.
Preferably, the extracting the recovery time from the recovery instruction, and determining the target data to be recovered according to the recovery time specifically includes:
and extracting the recovery time from the recovery instruction, and searching target data from the backup data of the virtual machine according to the recovery time.
Preferably, after the virtual machine fails, before receiving a recovery instruction input by a user, the virtual machine recovery method further includes:
at the starting time of continuous data protection of the virtual machine, carrying out full-quantity backup on the data of the virtual machine, and adding datum point data generated by the full-quantity backup into the backup data of the virtual machine;
when the write operation of the virtual machine is obtained, a corresponding IO log file is generated according to the write operation of the virtual machine, and the generated IO log file is added into backup data of the virtual machine.
Preferably, the searching the target data from the backup data of the virtual machine according to the recovery time specifically includes:
and taking the datum point data and the IO log file generated between the starting time and the recovery time as target data.
Preferably, after the virtual machine is started based on the target incremental image file to restore the operation of the virtual machine, the virtual machine restoration method further includes:
sequentially merging the data corresponding to the target block device into the target increment mirror image file;
judging whether the data corresponding to the target block equipment are completely merged into the target increment mirror image file or not;
and when the data corresponding to the target block equipment is completely combined to the target increment mirror image file, the mapping of the target block equipment is released.
Preferably, after the determining whether the data corresponding to the target block device is completely merged into the target incremental image file, the virtual machine recovery method further includes:
and returning to the step of sequentially merging the data corresponding to the target block device into the target incremental image file when the data corresponding to the target block device is not completely merged into the target incremental image file.
In addition, to achieve the above object, the present invention further provides a virtual machine recovery apparatus, including:
the data acquisition module is used for acquiring target data to be recovered after the virtual machine fails;
the data mapping module is used for mapping the target data into target block equipment;
the image creation module is used for creating a target increment image FILE for the BACKING_FILE according to the target block device;
and the virtual machine starting module is used for starting the virtual machine based on the target increment mirror image file so as to restore the operation of the virtual machine.
In addition, to achieve the above object, the present invention also provides a terminal device including: a memory, a processor, and a virtual machine recovery program stored on the memory and executable on the processor, the virtual machine recovery program configured to implement the steps of the virtual machine recovery method as described above.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a virtual machine recovery program which, when executed by a processor, implements the steps of the virtual machine recovery method described above.
According to the method, after the virtual machine breaks down, the IO log is not converted into the mirror image FILE, target data to be restored is firstly obtained, then the target data is mapped into target block equipment, then a target increment mirror image FILE is created for the BACKING_FILE according to the target block equipment, and finally the virtual machine is started based on the target increment mirror image FILE, so that the influence of the data quantity and storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.
Drawings
FIG. 1 is a schematic diagram of a terminal device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a virtual machine recovery method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of backup data of a virtual machine according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of mapping the target data into target block devices according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of creating a target delta image file according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a virtual machine recovery method according to a second embodiment of the present invention;
FIG. 7 is a schematic diagram of mapping a target block device according to an embodiment of the present invention;
fig. 8 is a block diagram of a first embodiment of a virtual machine recovery apparatus according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal device of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
In a specific implementation, the terminal device is a device that may be used to run a virtual machine, which is not limited in this embodiment.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the terminal device, and may include more or less components than illustrated, or may combine certain components, or may be arranged in different components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a virtual machine recovery program may be included in a memory 1005, which is one type of computer storage medium.
In the terminal device shown in fig. 1, the network interface 1004 is mainly used for data communication with an external network; the user interface 1003 is mainly used for receiving an input instruction of a user; the terminal apparatus calls a virtual machine restoration program stored in the memory 1005 through the processor 1001, and performs the following operations:
when the virtual machine fails, acquiring target data to be recovered;
mapping the target data into target block equipment;
creating a target increment mirror image FILE for the BACKING_FILE according to the target block device;
and starting the virtual machine based on the target increment mirror image file.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
when the virtual machine fails, receiving a recovery instruction input by a user;
and extracting the recovery time from the recovery instruction, and determining target data to be recovered according to the recovery time.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
and extracting the recovery time from the recovery instruction, and searching target data from the backup data of the virtual machine according to the recovery time.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
at the starting time of continuous data protection of the virtual machine, carrying out full-quantity backup on the data of the virtual machine, and adding datum point data generated by the full-quantity backup into the backup data of the virtual machine;
when the write operation of the virtual machine is obtained, a corresponding IO log file is generated according to the write operation of the virtual machine, and the generated IO log file is added into backup data of the virtual machine.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
and taking the IO log file generated between the reference point data and the starting time and the recovery time as target data.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
sequentially merging the data corresponding to the target block device into the target increment mirror image file;
judging whether the data corresponding to the target block equipment are completely merged into the target increment mirror image file or not;
and when the data corresponding to the target block equipment is completely combined to the target increment mirror image file, the mapping of the target block equipment is released.
Further, the processor 1001 may call a virtual machine recovery program stored in the memory 1005, and further perform the following operations:
and returning to the step of sequentially merging the data corresponding to the target block device into the target incremental image file when the data corresponding to the target block device is not completely merged into the target incremental image file.
According to the scheme, after the virtual machine fails, the IO log is not converted into the mirror image FILE, target data to be restored is firstly obtained, then the target data is mapped into target block equipment, then a target increment mirror image FILE is created for the BACKING_FILE according to the target block equipment, and finally the virtual machine is started based on the target increment mirror image FILE, so that the influence of the data quantity and the storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.
Based on the hardware structure, the embodiment of the virtual machine recovery method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a virtual machine recovery method according to a first embodiment of the present invention.
In a first embodiment, the virtual machine recovery method includes the steps of:
s10: and when the virtual machine fails, acquiring target data to be recovered.
In addition, during the operation of the Virtual Machine (VM), a fault is likely to occur, and at this time, the Virtual Machine needs to be restored to the data before the fault occurs, so when the Virtual Machine fails, the target data to be restored needs to be obtained.
It can be understood that when the virtual machine is recovered, it is generally required to recover to a certain time before the occurrence of the fault, and to ensure flexibility, the recovery time is usually selected by a user, so in this embodiment, when the target data to be recovered is obtained, a recovery instruction input by the user may be received first, then the recovery time is extracted from the recovery instruction, and the target data to be recovered is determined according to the recovery time.
In a specific implementation, when determining target data to be restored, the target data may be searched from backup data of the virtual machine according to the restoration time.
It can be understood that, in order to facilitate generating the backup data of the virtual machine, thereby facilitating generating the target data of the virtual machine, in this embodiment, continuous Data Protection (CDP) may be performed on the virtual machine before step S10, specifically, first, at a starting time of continuous data protection on the virtual machine, full-scale backup may be performed on the data of the virtual machine, and reference point data generated by the full-scale backup may be added to the backup data of the virtual machine; then, when the write operation of the virtual machine is obtained, a corresponding IO log file is generated according to the write operation of the virtual machine, and the generated IO log file is added into the backup data of the virtual machine.
In order to ensure the integrity of the target data of the virtual machine, in this embodiment, when the target data is searched from the backup data of the virtual machine according to the recovery time, the reference point data and the IO log file generated between the start time and the recovery time are used as the target data.
Assuming that the datum point data of the virtual machine is BP, the IO log file generated by the write operation of the virtual machine at the time 14:00:00 is RP1, the IO log file generated by the write operation at the time 14:00:05 is RP2, the IO log file generated by the write operation at the time 14:00:10 is RP3, the IO log file generated by the write operation at the time 14:00:15 is RP4, the IO log file generated by the write operation at the time 14:00:20 is RP5, the IO log file generated by the write operation at the time 14:00:25 is RP6, the IO log file generated by the write operation at the time 14:00:30 is RP7, and the IO log file generated by the write operation at the time 14:00:35 is RP8, and the backup data of the virtual machine can refer to fig. 3.
If the virtual machine needs to be restored to the time of 14:00:20 at this time, BP, RP1, RP2, RP3, RP4 and RP5 can be used as the target data.
S20: and mapping the target data into target block equipment.
It will be appreciated that, in order to facilitate mapping the target data to the target block device, in this embodiment, an iolog_mapper code may be set, and referring to fig. 4, the target data is mapped to the target block device by calling the iolog_mapper code, for example: the target data is mapped to block device/dev/blkN.
It should be noted that, the backup_file may be understood as a parent image of the virtual machine data, but a general FILE cannot be used as the backup_file, so in this embodiment, the target data needs to be mapped to the target block device first.
S30: and creating a target increment image FILE for the BACKING_FILE according to the target block device.
In a specific implementation, since the backup_file may be understood as a master image of the virtual machine data, when the target block device is used as the backup_file, a child image may be generated based on the master image, where the child image may be used as the target delta image FILE target.
S40: and starting the virtual machine based on the target increment mirror image file so as to enable the virtual machine to resume running.
It should be noted that, after the target incremental image file target. Img is created, referring to fig. 5, a virtual machine may be started based on the target incremental image file, and at this time, the virtual machine resumes operation, so that subsequent service processing may be completed.
In this embodiment, after a virtual machine fails, the IO log is not converted into an image FILE, but target data to be restored is obtained first, then the target data is mapped into target block devices, then a target incremental image FILE is created for the backup_file according to the target block devices, and finally the virtual machine is started based on the target incremental image FILE, so that the influence of the data amount and storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.
Further, as shown in fig. 6, a second embodiment of the virtual machine recovery method according to the present invention is proposed based on the first embodiment, and in this embodiment, after step S40, the virtual machine recovery method further includes:
s50: and merging the data corresponding to the target block equipment into the target increment mirror image file in sequence.
It should be noted that, since the backup_file is the mapped target block device, the backup_file does not have the data itself, but only has the location where the data is stored (similar to a pointer), and the target delta image FILE target. Img is generated based on the backup_file, so that the target delta image FILE target. Img also has only the location where the data is stored, and when a virtual machine needs a certain data to be used, the virtual machine must first acquire the location where the data to be used is stored in the target delta image FILE target. Img, and then read the data according to the location, which may result in too low efficiency of data call, so that when the virtual machine operates, the data corresponding to the target block device (i.e. the target data) can be sequentially combined into the target delta image FILE target. Img.
S60: and judging whether the data corresponding to the target block equipment is completely merged into the target increment mirror image file.
It can be understood that the data corresponding to the target block device is identical to the target incremental image file, that is, it is assumed that the data corresponding to the target block device is BP, RP1, RP2, RP3, RP4, and RP5, and the target incremental image file also has BP, RP1, RP2, RP3, RP4, and RP5.
S70: and when the data corresponding to the target block equipment is completely combined to the target increment mirror image file, the mapping of the target block equipment is released.
In a specific implementation, when the data corresponding to the target block device is completely merged into the target incremental image file, the target incremental image file can be understood to be a full-quantity image file, and then the virtual machine can independently operate according to the target incremental image file without depending on the target block device, at this time, referring to fig. 7, the iolog_mapper code can be not called any more, and mapping of the target block device can be directly released, so that corresponding resources are released, and the process has no influence on service processing in the virtual machine.
Of course, when the data corresponding to the target block device is not completely merged into the target incremental image file, the step S50 is returned, so that the data corresponding to the target block device is continuously merged into the target incremental image file in sequence.
In addition, an embodiment of the present invention further provides a virtual machine recovery apparatus, referring to fig. 8, where the virtual machine recovery apparatus includes:
the data acquisition module 10 is used for acquiring target data to be recovered after the virtual machine fails;
a data mapping module 20, configured to map the target data into a target block device;
the image creation module 30 is configured to create a target incremental image FILE for the backup_file according to the target block device;
and the virtual machine starting module 40 is used for starting the virtual machine based on the target increment mirror image file so as to restore the operation of the virtual machine.
In this embodiment, after a virtual machine fails, the IO log is not converted into an image FILE, but target data to be restored is obtained first, then the target data is mapped into target block devices, then a target incremental image FILE is created for the backup_file according to the target block devices, and finally the virtual machine is started based on the target incremental image FILE, so that the influence of the data amount and storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.
The modules in the above apparatus may be used to implement the steps in the above method, which are not described herein.
In addition, an embodiment of the present invention further provides a computer readable storage medium, where a virtual machine recovery program is stored, where the virtual machine recovery program when executed by a processor performs the following operations:
when the virtual machine fails, acquiring target data to be recovered;
mapping the target data into target block equipment;
creating a target increment mirror image FILE for the BACKING_FILE according to the target block device;
and starting the virtual machine based on the target increment mirror image file.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
when the virtual machine fails, receiving a recovery instruction input by a user;
and extracting the recovery time from the recovery instruction, and determining target data to be recovered according to the recovery time.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
and extracting the recovery time from the recovery instruction, and searching target data from the backup data of the virtual machine according to the recovery time.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
at the starting time of continuous data protection of the virtual machine, carrying out full-quantity backup on the data of the virtual machine, and adding datum point data generated by the full-quantity backup into the backup data of the virtual machine;
when the write operation of the virtual machine is obtained, a corresponding IO log file is generated according to the write operation of the virtual machine, and the generated IO log file is added into backup data of the virtual machine.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
and taking the datum point data and the IO log file generated between the starting time and the recovery time as target data.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
sequentially merging the data corresponding to the target block device into the target increment mirror image file;
judging whether the data corresponding to the target block equipment are completely merged into the target increment mirror image file or not;
and when the data corresponding to the target block equipment is completely combined to the target increment mirror image file, the mapping of the target block equipment is released.
Further, the virtual machine recovery program, when executed by the processor, further performs the following operations:
and returning to the step of sequentially merging the data corresponding to the target block device into the target incremental image file when the data corresponding to the target block device is not completely merged into the target incremental image file.
According to the scheme, after the virtual machine fails, the IO log is not converted into the mirror image FILE, target data to be restored is firstly obtained, then the target data is mapped into target block equipment, then a target increment mirror image FILE is created for the BACKING_FILE according to the target block equipment, and finally the virtual machine is started based on the target increment mirror image FILE, so that the influence of the data quantity and the storage performance of the IO log is avoided, immediate restoration can be realized, and the RTO time for CDP backup restoration is greatly shortened.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The virtual machine recovery method is characterized by comprising the following steps of:
when the virtual machine fails, acquiring target data to be recovered; the target data comprises IO log files;
mapping the target data into target block equipment;
creating a target increment mirror image FILE for the BACKING_FILE according to the target block device;
starting a virtual machine based on the target increment mirror image file so as to enable the virtual machine to resume operation;
and sequentially merging the data corresponding to the target block equipment into the target increment mirror image file to obtain the full image file.
2. The method for recovering a virtual machine according to claim 1, wherein the obtaining target data to be recovered after the virtual machine fails specifically comprises:
when the virtual machine fails, receiving a recovery instruction input by a user;
and extracting the recovery time from the recovery instruction, and determining target data to be recovered according to the recovery time.
3. The virtual machine recovery method according to claim 2, wherein the extracting the recovery time from the recovery instruction and determining the target data to be recovered according to the recovery time specifically includes:
and extracting the recovery time from the recovery instruction, and searching target data from the backup data of the virtual machine according to the recovery time.
4. The virtual machine recovery method as claimed in claim 3, wherein after the virtual machine fails, before receiving the recovery instruction input by the user, the virtual machine recovery method further comprises:
at the starting time of continuous data protection of the virtual machine, carrying out full-quantity backup on the data of the virtual machine, and adding datum point data generated by the full-quantity backup into the backup data of the virtual machine;
when the write operation of the virtual machine is obtained, a corresponding IO log file is generated according to the write operation of the virtual machine, and the generated IO log file is added into backup data of the virtual machine.
5. The virtual machine restoration method as set forth in claim 4, wherein searching for target data from backup data of the virtual machine according to the restoration time specifically includes:
and taking the datum point data and the IO log file generated between the starting time and the recovery time as target data.
6. The virtual machine recovery method according to any one of claims 1 to 5, wherein after the step of sequentially merging the data corresponding to the target block device into the target incremental image file, the virtual machine recovery method further includes:
judging whether the data corresponding to the target block equipment are completely merged into the target increment mirror image file or not;
and when the data corresponding to the target block equipment is completely combined to the target increment mirror image file, the mapping of the target block equipment is released.
7. The virtual machine recovery method according to claim 6, wherein after determining whether the data corresponding to the target block device is completely merged into the target incremental image file, the virtual machine recovery method further comprises:
and returning to the step of sequentially merging the data corresponding to the target block device into the target incremental image file when the data corresponding to the target block device is not completely merged into the target incremental image file.
8. A virtual machine recovery apparatus, characterized in that the virtual machine recovery apparatus comprises:
the data acquisition module is used for acquiring target data to be recovered after the virtual machine fails; the target data comprises IO log files;
the data mapping module is used for mapping the target data into target block equipment;
the image creation module is used for creating a target increment image FILE for the BACKING_FILE according to the target block device;
the virtual machine starting module is used for starting a virtual machine based on the target increment mirror image file so as to enable the virtual machine to resume operation;
and the virtual machine recovery device is also used for sequentially merging the data corresponding to the target block device into the target increment mirror image file after the virtual machine is recovered to run, so as to obtain the full image file.
9. A terminal device, characterized in that the terminal device comprises: memory, a processor and a virtual machine recovery program stored on the memory and executable on the processor, the virtual machine recovery program configured to implement the steps of the virtual machine recovery method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a virtual machine restoration program, which when executed by a processor, implements the steps of the virtual machine restoration method according to any one of claims 1 to 7.
CN201910348607.1A 2019-04-25 2019-04-25 Virtual machine recovery method and device, terminal equipment and storage medium Active CN110109775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910348607.1A CN110109775B (en) 2019-04-25 2019-04-25 Virtual machine recovery method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910348607.1A CN110109775B (en) 2019-04-25 2019-04-25 Virtual machine recovery method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110109775A CN110109775A (en) 2019-08-09
CN110109775B true CN110109775B (en) 2023-09-05

Family

ID=67487127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910348607.1A Active CN110109775B (en) 2019-04-25 2019-04-25 Virtual machine recovery method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110109775B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886143B (en) * 2021-10-19 2022-09-13 深圳市木浪云科技有限公司 Virtual machine continuous data protection method and device and data recovery method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770410A (en) * 2009-01-07 2010-07-07 联想(北京)有限公司 System restore method, virtual machine managing device and system based on client operating system
CN102662751A (en) * 2012-03-30 2012-09-12 浪潮电子信息产业股份有限公司 Method for improving availability of virtual machine system based on thermomigration
CN107092538A (en) * 2017-03-14 2017-08-25 平安科技(深圳)有限公司 Virtual-machine data backup method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822827B2 (en) * 2008-06-30 2010-10-26 Symantec Corporation Continuous data protection and remote block-level storage for a data volume
US10007533B2 (en) * 2012-08-22 2018-06-26 V3 Systems Holdings, Inc. Virtual machine migration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770410A (en) * 2009-01-07 2010-07-07 联想(北京)有限公司 System restore method, virtual machine managing device and system based on client operating system
CN102662751A (en) * 2012-03-30 2012-09-12 浪潮电子信息产业股份有限公司 Method for improving availability of virtual machine system based on thermomigration
CN107092538A (en) * 2017-03-14 2017-08-25 平安科技(深圳)有限公司 Virtual-machine data backup method and system

Also Published As

Publication number Publication date
CN110109775A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
CN107729041B (en) Application program hot updating method, device, terminal and storage medium
CN109597677B (en) Method and apparatus for processing information
CN111414362A (en) Data reading method, device, equipment and storage medium
CN112596951A (en) NAS data disaster tolerance method, device, equipment and storage medium
CN113157347A (en) Automatic probe deployment method, electronic device and storage medium
CN112559140A (en) Transaction control method, system, equipment and storage medium for data consistency
CN110109775B (en) Virtual machine recovery method and device, terminal equipment and storage medium
CN111651304A (en) Software recovery method and device based on double-core intelligent electric meter and computer equipment
CN111930429A (en) Method for quickly starting Android operating system and electronic equipment
CN113468143A (en) Data migration method, system, computing device and storage medium
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
CN108241543B (en) Method, service server and system for executing service operation breakpoint
CN116339908A (en) Virtual machine starting method, device, computer equipment and storage medium
CN111737964B (en) Form dynamic processing method, equipment and medium
CN113515291A (en) Equipment online upgrading method and device
CN113609478A (en) IOS platform application program tampering detection method and device
CN112286634A (en) Method, system, equipment and readable storage medium for repairing virtual machine
CN112286733A (en) Method, device and equipment for determining backup data recovery time and storage medium
CN112069065B (en) Algorithm debugging method, electronic equipment and computer readable storage medium
CN112988460B (en) Data backup method and device for virtual machine
CN117555729A (en) Automatic backup and recovery method for system, terminal equipment and storage medium
CN115481455A (en) Method and system for rapidly preparing assembly and readable storage medium
CN116225766A (en) Breakpoint memory recovery method, breakpoint memory recovery device, electronic device and computer readable storage medium
CN114443354A (en) File recovery method and device, electronic equipment and storage medium
CN116955003A (en) Resource backup and recovery method for project modification comparison test

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Virtual machine recovery methods, devices, terminal devices, and storage media

Effective date of registration: 20231212

Granted publication date: 20230905

Pledgee: Shenzhen Branch of China Merchants Bank Co.,Ltd.

Pledgor: SANGFOR TECHNOLOGIES Inc.

Registration number: Y2023980070863