CN114706661B - Disaster recovery backup method and system for virtual machine, computer equipment and storage medium - Google Patents

Disaster recovery backup method and system for virtual machine, computer equipment and storage medium Download PDF

Info

Publication number
CN114706661B
CN114706661B CN202210607060.4A CN202210607060A CN114706661B CN 114706661 B CN114706661 B CN 114706661B CN 202210607060 A CN202210607060 A CN 202210607060A CN 114706661 B CN114706661 B CN 114706661B
Authority
CN
China
Prior art keywords
virtual machine
backup
information
data
computer
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
CN202210607060.4A
Other languages
Chinese (zh)
Other versions
CN114706661A (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.)
Wuhan Barda Technology Co ltd
Original Assignee
Wuhan Sitong Information Service 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 Wuhan Sitong Information Service Co ltd filed Critical Wuhan Sitong Information Service Co ltd
Priority to CN202210607060.4A priority Critical patent/CN114706661B/en
Publication of CN114706661A publication Critical patent/CN114706661A/en
Application granted granted Critical
Publication of CN114706661B publication Critical patent/CN114706661B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • 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
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

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 embodiment of the application provides a disaster recovery backup method, a system, computer equipment and a storage medium of a virtual machine, the method comprises the steps of obtaining the identification of a main virtual machine, determining the main virtual machine from a plurality of VMware virtual machines according to the identification of the main virtual machine, obtaining the parameter information of the main virtual machine, carrying out virtual machine takeover configuration based on the parameter information of the main virtual machine and the parameter information of each computer, generating takeover configuration information, writing disk block data into a backup virtual machine according to a backup mode to obtain a backup data set of the backup virtual machine, because the backup virtual machine is created according to the parameter information of the main virtual machine, the backup virtual machine is more adaptive to the main virtual machine, the virtual machine resources are saved, the starting speed of the backup virtual machine is improved, and simultaneously, the disk block data of the main virtual machine is read according to the backup mode, the comprehensive and efficient reading of the disk block data is realized, the backup efficiency of the virtual machine is improved, the heat engine backup is realized, and the reliability of the disaster recovery backup is improved.

Description

Disaster recovery backup method and system for virtual machine, computer equipment and storage medium
Technical Field
The present application relates to the field of software development technologies, and in particular, to a disaster recovery backup method and system for a virtual machine, a computer device, and a storage medium.
Background
In the application scenario of the virtualization technology, when the primary virtual machine is damaged or data is deleted by mistake, the security of the virtualized resources and the working efficiency of the virtualization technology are inevitably affected, so the disaster recovery backup technology of the virtual machine is very important.
However, the backup mode needs to perform related configuration of backup after software is installed, such as take-over configuration, data recovery configuration, and the like, the configuration is complex, professional knowledge is needed, and the problem of limitation of the version of the virtual machine and the problem of load balance drift in a cluster environment exist, so that the backup operation of the virtual machine is complex, and the backup speed and efficiency are reduced.
Disclosure of Invention
The embodiment of the application provides a disaster recovery backup method, a disaster recovery backup system, computer equipment and a storage medium for a virtual machine, so as to solve the problems of complex configuration, time consumption and low backup efficiency of a disaster recovery technology in veeam software.
In one aspect, the present application provides a disaster recovery backup method for a virtual machine, which is applied to a disaster recovery backup system of the virtual machine, where the disaster recovery backup system of the virtual machine includes a computer cluster and a storage server, which are in communication connection, the computer cluster is deployed with a plurality of VMware virtual machines, and the storage server stores parameter information of each computer in the computer cluster, and the method includes:
acquiring an identifier of the primary virtual machine;
determining a primary virtual machine from the VMware virtual machines according to the identification of the primary virtual machine;
acquiring parameter information of the primary virtual machine, performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer, and generating takeover configuration information, wherein the takeover configuration information comprises parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, and the target computer is one computer in the computer cluster;
acquiring pre-stored backup plan information, wherein the backup plan information comprises backup modes, and the backup modes comprise full backup and incremental backup;
reading disk block data of the main virtual machine according to the backup mode;
and writing the disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine.
In one aspect, the present application provides a disaster recovery backup system for a virtual machine, including:
the first acquisition module is used for acquiring the identifier of the primary virtual machine;
a determining module, configured to determine a primary virtual machine from the multiple VMware virtual machines according to an identifier of the primary virtual machine;
the configuration module is used for acquiring parameter information of the primary virtual machine, performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer, and generating takeover configuration information, wherein the takeover configuration information comprises parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, and the target computer is one computer in the computer cluster;
the second acquisition module is used for acquiring pre-stored backup plan information, wherein the backup plan information comprises backup modes, and the backup modes comprise full backup and incremental backup;
the reading module is used for reading the disk block data of the main virtual machine according to the backup mode;
and the writing module is used for writing the disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine.
In one aspect, the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps in the disaster recovery backup method for a virtual machine.
In one aspect, the present application provides a computer readable medium, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps in the disaster recovery backup method for a virtual machine.
The embodiment of the application provides a disaster recovery backup method of a virtual machine. The method comprises the steps of determining a main virtual machine from a plurality of VMware virtual machines by acquiring the identifier of the main virtual machine, acquiring the parameter information of the main virtual machine, performing virtual machine takeover configuration based on the parameter information of the main virtual machine and the parameter information of each computer, generating takeover configuration information which comprises the parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, wherein the target computer is one of a computer cluster, acquiring pre-stored backup plan information which comprises a backup mode, the backup mode comprises full backup and incremental backup, writing disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine, and the standby virtual machine is created according to the parameter information of the main virtual machine, so that the standby virtual machine is more adaptive to the main virtual machine, and the virtual machine resources are saved, the starting speed of the standby virtual machine is improved, the disk block data of the main virtual machine is read according to the backup mode, the disk block data is comprehensively and efficiently read, the backup efficiency of the virtual machine is improved, the whole backup process does not need to be stopped, the heat engine backup is realized, the reliability of disaster recovery backup of the system is greatly improved, and the continuous protection of VMware virtualized resources is further realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flowchart of a disaster recovery backup method for a virtual machine in an embodiment;
FIG. 2 is an architecture diagram of a disaster recovery backup system for a virtual machine, according to an embodiment;
FIG. 3 is a schematic diagram of an interface for creating backup plan information in one embodiment;
FIG. 4 is a block diagram of a disaster recovery backup system for a virtual machine in an embodiment;
FIG. 5 is a block diagram of a computer device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
As shown in fig. 1, in an embodiment, a disaster recovery backup method for a virtual machine is provided, where the disaster recovery backup method for a virtual machine is applied to a disaster recovery backup system for a virtual machine, the disaster recovery backup system for a virtual machine includes a computer cluster and a storage server that are communicatively connected, the computer cluster is deployed with a plurality of VMware virtual machines, and the storage server stores parameter information of each computer in the computer cluster, and the disaster recovery backup method for a virtual machine specifically includes the following steps:
and 102, acquiring the identifier of the primary virtual machine.
The VMware virtual machine is a virtual machine constructed by adopting VMware software, and when the VMware virtual machine is actually applied, a plurality of Windows, DOS and LINUX systems are simultaneously operated on the same computer, so that automatic deployment can be ensured to be simultaneously carried out on the plurality of VMware virtual machines. As shown in fig. 2, it is an architecture diagram of the disaster recovery backup system of the virtual machine.
The primary virtual machine refers to a virtual machine which needs to perform virtual machine resource backup, and the primary virtual machine is one of a plurality of VMware virtual machines deployed in a computer cluster, for example, the virtual machine may be a vcenter. Specifically, the VMware virtual machine is connected through a vSphere WS API, wherein the vSphere WS API is an ESX/ESxi Host and vCenter Server developer interface provided by an official party, the virtual machine configuration information is viewed through the API, and the unique identifier in the data object of the configuration information is determined as the identifier of the main virtual machine.
And step 104, determining one main virtual machine from the multiple VMware virtual machines according to the identification of the main virtual machine.
Specifically, the VMware virtual machine with the identifier consistent with that of the primary virtual machine is determined as the primary virtual machine, and the method can be implemented in a VDDK (virtual disk development kit) manner, and a primary virtual disk storage File (VMDK File) is connected and accessed by using a C/C + + Lib library provided by VDDK, so as to implement backup of data of the primary virtual machine in the subsequent process.
And 106, acquiring parameter information of the main virtual machine, performing virtual machine takeover configuration based on the parameter information of the main virtual machine and the parameter information of each computer, and generating takeover configuration information, wherein the takeover configuration information comprises the parameter information of the standby virtual machine and a target computer for deploying the standby virtual machine, and the target computer is one computer in a computer cluster.
The parameter information of the primary virtual machine refers to parameter information reflecting performance and configuration information of the primary virtual machine, for example, IP, CPU version, network adapter information, disk information, memory information, and the like of the primary virtual machine. The standby virtual machine is a VMware virtual machine for backing up data of the main virtual machine. The target computer is one of the computers in the computer cluster and is used for deploying the standby virtual machine. Specifically, a jni (Java Native interface) technology may be used, a Java local interface may be used to write a virtual machine configuration code in advance, so as to ensure that the code is conveniently transplanted on different platforms, and the parameter information of the main virtual machine is obtained by executing the code. Taking over the configuration means that a standby virtual machine is created on the target computer, and data synchronization is realized with the main virtual machine. It can be understood that, in this embodiment, the parameter information of the standby virtual machine is determined according to the parameter information of the primary virtual machine, so that, compared with a conventional method in which the standby virtual machine is directly created, the standby virtual machine is more targeted and more adaptive to the primary virtual machine, the virtual machine resources are saved, the starting speed of the standby virtual machine is increased, meanwhile, the takeover configuration process does not need to be stopped, when other applications are run on the virtual machine, the standby virtual machine can be quickly started, the use of the applications is not affected, the normal operation of the virtual machine is ensured, and the takeover configuration efficiency of the virtual machine is greatly increased.
It is worth to be noted that, in this embodiment, a web page for performing virtual machine management may also be set, so that a user at a user side can manage management configuration information conveniently, for example, the user may log in the web page and view parameter information of the standby virtual machine, the primary virtual machine, and the target computer.
And step 108, obtaining pre-stored backup plan information, wherein the backup plan information comprises backup modes, and the backup modes comprise full backup and incremental backup.
The full backup refers to the backup of all data on the main virtual machine, and the incremental backup refers to the backup of added or updated data on the basis of the last backup. Specifically, the backup plan information may be acquired from the storage server, a button for adding the backup plan information may be added to a web page managed by the virtual machine for a user to set and select by himself, and then the information selected by the user is collected and stored, so that the backup plan information is acquired. As shown in fig. 3, an interface diagram for creating backup plan information is shown, where periodic full backup is full backup, and incremental backup is incremental backup. The backup mode can be determined according to the current backup condition, for example, for the first backup, full backup is adopted, otherwise, incremental backup is adopted, so that repeated backup data does not exist in the backed-up data set, the backup data volume and the backup time are reduced, and the backup efficiency is improved.
And step 110, reading disk block data of the primary virtual machine according to a backup mode.
Specifically, according to the backup mode, disk block data of the primary virtual machine is read, that is, when the backup mode is full backup, all data in the disk of the primary virtual machine is read as disk block data, and when the backup mode is incremental backup, data added or updated in the disk of the primary virtual machine is read as disk block data. As can be understood, in this embodiment, the disk block data of the main virtual machine is read according to the backup mode, so that the disk block data is comprehensively and efficiently read, and the virtual machine backup efficiency is favorably improved.
And step 112, writing the disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine.
Specifically, disk block data is written into the standby virtual machine to obtain a backup data set of the standby virtual machine, so that data of the main virtual machine is backed up on the standby virtual machine, backup of the virtual machine is achieved, backup efficiency of a system is improved by establishing the standby virtual machine in a targeted mode, backup is carried out according to a backup mode, reliability of disaster recovery backup of the system is improved, and continuous protection of VMware virtualized resources is achieved.
The disaster recovery backup method of the virtual machine comprises the steps of determining a main virtual machine from a plurality of VMware virtual machines by acquiring the identifier of the main virtual machine, acquiring the parameter information of the main virtual machine, performing virtual machine takeover configuration based on the parameter information of the main virtual machine and the parameter information of each computer, generating takeover configuration information which comprises the parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, wherein the target computer is one of a computer cluster, acquiring pre-stored backup plan information which comprises backup modes, the backup modes comprise full backup and incremental backup, writing disk data into the standby virtual machine to obtain a backup data set of the standby virtual machine, and the standby virtual machine is created according to the parameter information of the main virtual machine so that the standby virtual machine is more adaptive to the main virtual machine, the method has the advantages that the virtual machine resources are saved, the starting speed of the standby virtual machine is improved, the disk block data of the main virtual machine is read according to the backup mode, the disk block data are comprehensively and efficiently read, the backup efficiency of the virtual machine is improved, the whole backup process does not need to be stopped, the heat engine backup is realized, the reliability of disaster recovery backup of the system is greatly improved, and the continuous protection of VMware virtualized resources is further realized.
In one embodiment, obtaining an identification of a primary virtual machine includes: acquiring corresponding object information in VMware software depended by a plurality of VMware virtual machines; extracting a target data object from the object information; a unique identifier character in the target data object is determined as an identifier of the primary virtual machine.
Specifically, the VMware software creates a list of managed objects, which includes all managed objects, and when the VMware virtual machine is created, it creates a unique managed object in the list: the manager object reference data object comprises a type and a unique identification character of the data object, the main virtual machine can be accurately searched and positioned according to the identification, and the problem that the corresponding standby virtual machine cannot be found due to the drift phenomenon caused by load balance of the VMware virtual machine under a computer cluster is avoided.
In one embodiment, the parameter information of the primary virtual machine includes a CPU version, a memory size, disk information, and network adapter information; the parameter information of the computer comprises load data and performance data; performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer, and generating takeover configuration information, including: inputting the load data and the performance data of each computer into a first machine learning model with preset load balance, wherein the output result of the first machine learning model is a target computer; and inputting the load data and the performance data of the target computer, the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine into a second machine learning model matched with the preset virtual machine information, wherein the output result of the second machine learning model is the parameter information of the standby virtual machine.
In this embodiment, the machine learning model is used to predict parameter information of the target computer and the standby virtual machine, so as to accurately predict load data and performance data of the computer, The parameter information of the main virtual machine is analyzed, and the parameter information of the target computer and the parameter information of the standby virtual machine are determined according to the analysis result, so that the adaptability of the parameter information of the standby virtual machine to the main virtual machine and the target computer is improved, the starting speed of the standby virtual machine is further improved, and the resources of the standby virtual machine are saved.
In one embodiment, the parameter information of the standby virtual machine includes a CPU version, a memory size, disk information, and network adapter information of the standby virtual machine, and the virtual machine takeover configuration is performed based on the parameter information of the primary virtual machine and the parameter information of each computer to generate takeover configuration information, including: determining a target computer according to the load data and the performance data of each computer; and determining correction information of the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine based on the load data and the performance data of the target computer, and respectively correcting the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine by using the correction information to obtain the CPU version, the memory size, the disk information and the network adapter information of the standby virtual machine.
Specifically, based on the load balancing principle, the load data and the performance data of each computer are analyzed, and according to the analysis result, a target computer is determined from the computer cluster. In order to quickly start the standby virtual machine, when the standby virtual machine is created, correction information of the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine is determined according to load data and performance data of a target computer, the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine are respectively corrected by using the correction information, the CPU version, the memory size, the disk information and the network adapter information of the standby virtual machine are obtained, and the adaptability of the parameter information of the standby virtual machine to the main virtual machine and the target computer is improved. In a specific implementation manner, a client can be provided to rapidly configure a web page, when the client selects to enable a standby virtual machine, the client can rapidly configure correction information of a CPU version, a memory size, disk information and network adapter information on the web page, and the standby virtual machine corrects the CPU version, the memory size, the disk information and the network adapter information of a main virtual machine according to the correction information.
It is worth to be noted that there are multiple types of disk information of the VMware virtual machine, which are allocation of storage space in advance and data cleaning (higher disk performance), allocation of space being used, i.e. zeroing, and allocation without advance, and as a preference of this embodiment, the disk information of the standby virtual machine is allocated without advance allocation, so that the standby virtual machine does not occupy a large storage space in advance, and the start speed of the standby virtual machine is further increased.
In one embodiment, reading disk block data of the primary virtual machine in a backup manner includes: if the backup mode is full backup, calling a disk of which a preset interface is connected with the main virtual machine, and reading full data of the disk; storing the full disk data in a buffer pool, reading the full disk data from the buffer pool and performing compression processing to obtain disk block data; if the backup mode is incremental backup, starting a data block modification tracking (CBT) thread of the main virtual machine, and reading incremental data of a disk; and storing the disk incremental data in a buffer pool, reading the disk incremental data from the buffer pool and performing compression processing to obtain disk block data.
The VMware software provides a convenient data Block modification Tracking (CBT) technology and provides a basis for incremental backup of the VMware virtual machine, and except for the fact that the whole data needs to be completely transmitted during first backup or synchronization, the subsequent backup only needs to acquire which abnormal moving blocks by inquiring CBT records and then only backups the abnormal moving blocks, so that the time for scanning a disk and judging the abnormal moving blocks is saved, and the data volume needing to be transmitted is also greatly reduced. Specifically, if the backup mode is full backup, calling a disk of a preset interface connected with the main virtual machine, creating a virtual machine snapshot, and reading full data of the disk; if the backup mode is incremental backup, starting a data block modification tracking CBT thread of the main virtual machine, reading disk incremental data, storing the disk incremental data in a buffer pool, reading the disk incremental data from the buffer pool and performing compression processing, namely reading the disk incremental data from the buffer pool in sequence, waiting when the buffer pool is empty, adding data to be cached at the tail of the buffer pool list, performing capacity expansion or write-in waiting of the buffer pool according to memory information after the buffer pool is full, and releasing the memory of the buffer pool when an exception occurs to obtain disk block data and delete a virtual machine snapshot.
In one embodiment, after writing the disk block data into the standby virtual machine to obtain the backup data set of the standby virtual machine, the method further includes: when the main virtual machine is damaged, creating a virtual machine in the computer cluster as a recovery virtual machine; decompressing the backup data set to obtain a decompressed data set; and restoring the decompressed data set to a recovery virtual machine to obtain the virtual machine containing the decompressed data set.
Specifically, the damage of the primary virtual machine includes, but is not limited to, a network attack, an intrusion, a power failure, or an operation error, and at this time, according to parameter information of the primary virtual machine, a recovery virtual machine is created for recovering a virtual machine backed up by a damaged time node, where the damaged time node can be obtained from a system log, the backup data set is decompressed to obtain a decompressed data set, i.e., a virtual machine snapshot is created, a written local interface is used to connect to a virtual machine disk, a thread is started to read the backup data set, the backup data set is stored in a buffer pool, the thread is started at the same time, data is read from the buffer pool and written into the virtual machine disk, the snapshot is recovered, and then the snapshot is deleted, so that the decompressed data set is recovered to the recovery virtual machine, and the virtual machine including the decompressed data set is obtained, thereby enabling the virtual machine including the decompressed data set to be complete and complete, The original system is quickly, simply and reliably recovered, and the normal operation of the system is guaranteed within a certain range.
In one embodiment, after restoring the backup data set to the restore virtual machine to obtain the virtual machine containing the backup data set, the method further includes: checking the backup data set; and synchronizing the backup data set to the primary virtual machine under the condition that the verification result is that the verification is passed.
Specifically, the backup data set can be verified, and the backup data set is synchronized to the main virtual machine under the condition that the verification result is that the verification is passed, that is, reverse backup of the virtual machine is realized, the data retrieving speed is improved, and continuous protection of VMware virtualized resources is realized.
As shown in fig. 4, in an embodiment, a disaster recovery backup system of a virtual machine is provided, where the disaster recovery backup system of the virtual machine includes a computer cluster and a storage server, which are communicatively connected, where the computer cluster is deployed with a plurality of VMware virtual machines, and the storage server stores parameter information of each computer in the computer cluster, and the system includes:
a first obtaining module 402, configured to obtain an identifier of the primary virtual machine;
a determining module 404, configured to determine a primary virtual machine from the multiple VMware virtual machines according to the identifier of the primary virtual machine;
a configuration module 406, configured to obtain parameter information of the primary virtual machine, perform virtual machine takeover configuration based on the parameter information of the primary virtual machine and parameter information of each computer, and generate takeover configuration information, where the takeover configuration information includes parameter information of a standby virtual machine and a target computer used for deploying the standby virtual machine, and the target computer is one computer in the computer cluster;
a second obtaining module 408, configured to obtain pre-stored backup plan information, where the backup plan information includes backup manners, and the backup manners include full backup and incremental backup;
a reading module 410, configured to read, according to the backup manner, disk block data of the primary virtual machine;
a writing module 412, configured to write the disk block data into the standby virtual machine, so as to obtain a backup data set of the standby virtual machine.
In one embodiment, the first obtaining module includes:
a first obtaining unit, configured to obtain corresponding object information in VMware software depended on by the multiple VMware virtual machines;
an extracting unit configured to extract a target data object from the object information;
and the determining unit is used for determining the unique identifier character in the target data object as the identifier of the primary virtual machine.
In one embodiment, the configuration module comprises:
the first configuration unit is used for inputting the load data and the performance data of each computer into a first machine learning model with preset load balance, and the output result of the first machine learning model is the target computer;
and the second configuration unit is used for inputting the load data and the performance data of the target computer and the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine into a second machine learning model matched with preset virtual machine information, wherein the output result of the second machine learning model is the parameter information of the standby virtual machine.
In one embodiment, the configuration module comprises:
a third configuration unit, configured to determine a target computer according to the load data and the performance data of each computer;
and the fourth configuration unit is used for determining correction information of the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine based on the load data and the performance data of the target computer, and respectively correcting the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine by using the correction information to obtain the CPU version, the memory size, the disk information and the network adapter information of the standby virtual machine.
In one embodiment, the reading module includes:
the first calling unit is used for calling a disk of a preset interface connected with the main virtual machine and reading the full data of the disk if the backup mode is the full backup;
the first reading unit is used for storing the full disk data in a buffer pool, reading the full disk data from the buffer pool and performing compression processing to obtain the disk block data;
the second calling unit is used for starting a data block modification tracking (CBT) thread of the main virtual machine and reading incremental data of a disk if the backup mode is the incremental backup;
and the second reading unit is used for storing the disk incremental data in a buffer pool, reading the disk incremental data from the buffer pool and performing compression processing to obtain the disk block data.
In one embodiment, the disaster recovery backup system of the virtual machine further includes:
a creating module, configured to create a virtual machine in the computer cluster as a recovery virtual machine when the primary virtual machine is damaged;
the compression module is used for decompressing the backup data set to obtain a decompressed data set;
and the recovery module is used for recovering the decompressed data set to the recovery virtual machine to obtain the virtual machine containing the decompressed data set.
In one embodiment, the disaster recovery backup system of the virtual machine further includes:
the checking module is used for checking the backup data set;
and the synchronization module is used for synchronizing the backup data set to the primary virtual machine under the condition that the verification result is that the verification is passed.
FIG. 5 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a server including, but not limited to, a high performance computer and a cluster of high performance computers. As shown in fig. 5, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, causes the processor to implement a disaster recovery backup method for the virtual machine. The internal memory may also store a computer program, and when the computer program is executed by the processor, the computer program may cause the processor to execute the disaster recovery backup method of the virtual machine. Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the disaster recovery backup method for a virtual machine provided in the present application may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in fig. 5. The memory of the computer device may store therein the respective program templates that make up the disaster recovery backup system of the virtual machine. For example, the first obtaining module 402, the determining module 404, the configuring module 406, the second obtaining module 408, the reading module 410, and the writing module 412.
A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps in the disaster recovery backup method of the virtual machine are implemented.
A computer-readable storage medium, which stores a computer program, which, when executed by a processor, implements the steps in the disaster recovery backup method for a virtual machine described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. A disaster recovery backup method of a virtual machine is characterized in that the method is applied to a disaster recovery backup system of the virtual machine, the disaster recovery backup system of the virtual machine comprises a computer cluster and a storage server which are in communication connection, the computer cluster is deployed with a plurality of VMware virtual machines, and the storage server stores parameter information of each computer in the computer cluster, and the method comprises the following steps:
acquiring an identifier of a primary virtual machine, including:
acquiring corresponding object information in VMware software depended by the VMware virtual machines, wherein the object information is a unique data object of a ManagedObjectReference, and the data object comprises the type and the unique identification character of the data object;
extracting a target data object from the object information;
determining a unique identifier character in the target data object as an identifier of the primary virtual machine;
determining a primary virtual machine from the VMware virtual machines according to the identification of the primary virtual machine;
acquiring parameter information of the primary virtual machine, performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer, and generating takeover configuration information, wherein the takeover configuration information comprises parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, the target computer is one computer in the computer cluster, and the parameter information of the primary virtual machine comprises a Central Processing Unit (CPU) version, a memory size, disk information and network adapter information; the parameter information of the computer comprises load data and performance data; the parameter information of the standby virtual machine comprises a CPU version, a memory size, disk information and network adapter information of the standby virtual machine;
performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer to generate takeover configuration information, including:
inputting the load data and the performance data of each computer into a first machine learning model with preset load balance, wherein the output result of the first machine learning model is the target computer; inputting load data and performance data of the target computer and CPU version, memory size, disk information and network adapter information of the main virtual machine into a second machine learning model matched with preset virtual machine information, wherein the output result of the second machine learning model is parameter information of the auxiliary virtual machine, the first machine learning model with preset load balance refers to a convolutional neural network which is trained in advance and used for selecting a target computer matched with the main virtual machine from a computer cluster under the premise of ensuring load balance, and the second machine learning model matched with the preset virtual machine information refers to a convolutional neural network which is trained in advance and used for determining the parameter information of the auxiliary virtual machine matched with the parameter information of the main virtual machine according to the parameter information of the target computer and the parameter information of the main virtual machine; or the like, or, alternatively,
determining a target computer according to the load data and the performance data of each computer; determining correction information of the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine based on the load data and the performance data of the target computer, and respectively correcting the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine by using the correction information to obtain the CPU version, the memory size, the disk information and the network adapter information of the standby virtual machine;
acquiring pre-stored backup plan information, wherein the backup plan information comprises backup modes, and the backup modes comprise full backup and incremental backup;
reading the disk block data of the primary virtual machine according to the backup mode, wherein the reading comprises the following steps:
if the backup mode is the full backup, calling a preset interface to connect a disk of the main virtual machine, and reading the full data of the disk;
storing the total data of the disk in a buffer pool, reading the total data of the disk from the buffer pool and performing compression processing to obtain the data of the disk block;
if the backup mode is the incremental backup, starting a data block modification tracking (CBT) thread of the main virtual machine, and reading incremental data of a disk;
storing the disk incremental data in a buffer pool, reading the disk incremental data from the buffer pool and performing compression processing to obtain the disk block data;
and writing the disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine.
2. The disaster recovery backup method for a virtual machine according to claim 1, wherein after the writing of the disk block data into the standby virtual machine to obtain the backup data set of the standby virtual machine, the method further comprises:
when the main virtual machine is damaged, creating a virtual machine in the computer cluster as a recovery virtual machine;
decompressing the backup data set to obtain a decompressed data set;
and restoring the decompressed data set to the restored virtual machine to obtain the virtual machine containing the decompressed data set.
3. The disaster recovery backup method for a virtual machine according to claim 2, wherein after the virtual machine containing the backup data set is obtained by restoring the backup data set to the recovery virtual machine, the method further comprises:
verifying the backup data set;
and synchronizing the backup data set to the primary virtual machine under the condition that the verification result is that the verification is passed.
4. A disaster recovery backup system of a virtual machine is characterized in that the disaster recovery backup system of the virtual machine comprises a computer cluster and a storage server which are in communication connection, wherein a plurality of VMware virtual machines are deployed in the computer cluster, and the storage server stores parameter information of each computer in the computer cluster, and the system comprises:
the first obtaining module is used for obtaining the identifier of the primary virtual machine, and comprises:
acquiring corresponding object information in VMware software depended by the VMware virtual machines, wherein the object information is a unique data object of a ManagedObjectReference, and the data object comprises a type and a unique identification character of the data object;
extracting a target data object from the object information;
determining a unique identifier character in the target data object as an identifier of the primary virtual machine;
a determining module, configured to determine a primary virtual machine from the multiple VMware virtual machines according to an identifier of the primary virtual machine;
the configuration module is used for acquiring parameter information of the primary virtual machine, performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer, and generating takeover configuration information, wherein the takeover configuration information comprises parameter information of a standby virtual machine and a target computer for deploying the standby virtual machine, the target computer is one computer in the computer cluster, and the parameter information of the primary virtual machine comprises a Central Processing Unit (CPU) version, a memory size, disk information and network adapter information; the parameter information of the computer comprises load data and performance data; the parameter information of the standby virtual machine comprises a CPU version, a memory size, disk information and network adapter information of the standby virtual machine;
performing virtual machine takeover configuration based on the parameter information of the primary virtual machine and the parameter information of each computer to generate takeover configuration information, including:
inputting the load data and the performance data of each computer into a first machine learning model with preset load balance, wherein the output result of the first machine learning model is the target computer; inputting load data and performance data of the target computer and CPU version, memory size, disk information and network adapter information of the main virtual machine into a second machine learning model matched with preset virtual machine information, wherein the output result of the second machine learning model is parameter information of the auxiliary virtual machine, the first machine learning model with preset load balance refers to a convolutional neural network which is trained in advance and used for selecting a target computer matched with the main virtual machine from a computer cluster under the premise of ensuring load balance, and the second machine learning model matched with the preset virtual machine information refers to a convolutional neural network which is trained in advance and used for determining the parameter information of the auxiliary virtual machine matched with the parameter information of the main virtual machine according to the parameter information of the target computer and the parameter information of the main virtual machine; or the like, or, alternatively,
determining a target computer according to the load data and the performance data of each computer; determining correction information of the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine based on the load data and the performance data of the target computer, and respectively correcting the CPU version, the memory size, the disk information and the network adapter information of the main virtual machine by using the correction information to obtain the CPU version, the memory size, the disk information and the network adapter information of the standby virtual machine;
the second acquisition module is used for acquiring pre-stored backup plan information, wherein the backup plan information comprises backup modes, and the backup modes comprise full backup and incremental backup;
a reading module, configured to read disk block data of the primary virtual machine according to the backup manner, where the reading module includes:
if the backup mode is the full backup, calling a preset interface to connect a disk of the main virtual machine, and reading the full data of the disk;
storing the total data of the disk in a buffer pool, reading the total data of the disk from the buffer pool and performing compression processing to obtain the data of the disk block;
if the backup mode is the incremental backup, starting a data block modification tracking (CBT) thread of the main virtual machine, and reading incremental data of a disk;
storing the disk incremental data in a buffer pool, reading the disk incremental data from the buffer pool and performing compression processing to obtain the disk block data;
and the writing module is used for writing the disk block data into the standby virtual machine to obtain a backup data set of the standby virtual machine.
5. A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the disaster recovery backup method of a virtual machine according to any one of claims 1 to 3 when executing said computer program.
6. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the disaster recovery backup method for a virtual machine according to any one of claims 1 to 3.
CN202210607060.4A 2022-05-31 2022-05-31 Disaster recovery backup method and system for virtual machine, computer equipment and storage medium Active CN114706661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210607060.4A CN114706661B (en) 2022-05-31 2022-05-31 Disaster recovery backup method and system for virtual machine, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210607060.4A CN114706661B (en) 2022-05-31 2022-05-31 Disaster recovery backup method and system for virtual machine, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114706661A CN114706661A (en) 2022-07-05
CN114706661B true CN114706661B (en) 2022-09-20

Family

ID=82175756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210607060.4A Active CN114706661B (en) 2022-05-31 2022-05-31 Disaster recovery backup method and system for virtual machine, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114706661B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578447B (en) * 2023-07-12 2023-10-10 武汉吧哒科技股份有限公司 Virtual machine data recovery method and device, computer equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344423B (en) * 2022-08-01 2023-07-04 和元达信息科技有限公司 Backup method, mount recovery method, server, and computer-readable storage medium
CN115426251B (en) * 2022-08-30 2024-02-13 山东海量信息技术研究院 Disaster recovery method, device and medium of cloud host
CN117608494B (en) * 2023-12-06 2024-06-07 太极计算机股份有限公司 Storage method and system of cloud computing cluster

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776113B (en) * 2016-02-18 2021-03-02 新华三技术有限公司 Virtual machine backup method and device
CN112241341A (en) * 2019-07-16 2021-01-19 中兴通讯股份有限公司 Remote disaster recovery method, device and system
CN111580929A (en) * 2020-05-07 2020-08-25 上海英方软件股份有限公司 Validity verification system and method based on virtual machine protection data
CN112000437A (en) * 2020-08-21 2020-11-27 济南浪潮数据技术有限公司 Disaster recovery method and device, electronic equipment and storage medium
CN112948177A (en) * 2021-02-23 2021-06-11 北京金山云网络技术有限公司 Disaster recovery backup method and device, electronic equipment and storage medium
CN113505026B (en) * 2021-09-10 2021-12-24 深圳市科力锐科技有限公司 Method, device and equipment for verifying backup data and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578447B (en) * 2023-07-12 2023-10-10 武汉吧哒科技股份有限公司 Virtual machine data recovery method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114706661A (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN114706661B (en) Disaster recovery backup method and system for virtual machine, computer equipment and storage medium
CN107608757B (en) Container-based isolation processing method and related equipment
CN106951345B (en) Consistency test method and device for disk data of virtual machine
US10635473B2 (en) Setting support program, setting support method, and setting support device
US7669021B2 (en) File system based offline disk management
US11886902B2 (en) Physical-to-virtual migration method and apparatus, and storage medium
US20110093437A1 (en) Method and system for generating a space-efficient snapshot or snapclone of logical disks
US20190227710A1 (en) Incremental data restoration method and apparatus
US11550595B2 (en) Adaptive system for smart boot sequence formation of VMs for disaster recovery
CN104572354A (en) Backup and restoration method for operating system based on restoration service and equipment thereof
CN110209525B (en) Operating system restoration method and device
CN113656149A (en) Application processing method and device and related equipment
CN113672350A (en) Application processing method and device and related equipment
CN114138549A (en) Data backup and recovery method based on kubernets system
US11150831B2 (en) Virtual machine synchronization and recovery
US10860442B2 (en) Systems, methods and computer readable media for business continuity and disaster recovery (BCDR)
CN111382012B (en) Backup method and device for MySQL cloud database, computer equipment and storage medium
CN116339908A (en) Virtual machine starting method, device, computer equipment and storage medium
CN115827069A (en) Starting control method, system and device for server mainboard
CN114780208A (en) Method, system, device and storage medium for verifying backup validity of multi-platform virtual machine
CN114356369A (en) SSD firmware consistency loading method and device, computer equipment and storage medium
CN112596954A (en) Data backup and reconstruction method, device, equipment and storage medium
CN112099992A (en) System backup recovery method and device for server, computer equipment and storage medium
CN115617580B (en) Incremental backup and recovery method and system based on Shared SST (SST) file
CN114780356B (en) Method, device, medium and equipment for storing log data of SSD (solid State disk) system

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
CP01 Change in the name or title of a patent holder

Address after: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee after: Wuhan Barda Technology Co.,Ltd.

Address before: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee before: Wuhan Sitong Information Service Co.,Ltd.

CP01 Change in the name or title of a patent holder