CN111158959A - Virtual machine backup method and device and virtual machine recovery method and device - Google Patents

Virtual machine backup method and device and virtual machine recovery method and device Download PDF

Info

Publication number
CN111158959A
CN111158959A CN201911411890.4A CN201911411890A CN111158959A CN 111158959 A CN111158959 A CN 111158959A CN 201911411890 A CN201911411890 A CN 201911411890A CN 111158959 A CN111158959 A CN 111158959A
Authority
CN
China
Prior art keywords
virtual machine
vmware
proxy server
request
backup
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.)
Pending
Application number
CN201911411890.4A
Other languages
Chinese (zh)
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.)
Scutech Corp
Original Assignee
Scutech Corp
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 Scutech Corp filed Critical Scutech Corp
Priority to CN201911411890.4A priority Critical patent/CN111158959A/en
Publication of CN111158959A publication Critical patent/CN111158959A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • 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
    • 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
    • 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/45595Network integration; Enabling network access in virtual machine instances

Abstract

The application relates to a virtual machine backup method and device and a virtual machine recovery method and device. The backup method comprises the steps of obtaining a virtual machine backup request, obtaining the position information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information; sending a snapshot creating request to a proxy server; when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata; sending a snapshot acquisition instruction to a proxy server; and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata. According to the method and the system, the proxy server is requested to create the snapshot file of the VMware virtual machine through the snapshot creating request, the snapshot file of the VMware virtual machine is obtained through the snapshot obtaining instruction, and then the virtual machine backup is carried out, so that the backup process of the VMware virtual machine is not limited on an X86 platform, and the expansibility of the backup process of the VMware virtual machine can be effectively improved.

Description

Virtual machine backup method and device and virtual machine recovery method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a virtual machine backup method and apparatus, and a virtual machine recovery method and apparatus.
Background
With the development of Virtual Machine technology, VMware (Virtual Machine) technology is developed, and at present, a virtualization product of VMware is widely applied to data center construction, and VMware Virtual Machine software is "Virtual PC" software which enables a user to run two or more operating systems on one Machine at the same time. .
Backup recovery software for the VMware virtual machine is also of a lot of brands, however, the running platform of these third party backup software is also limited to the X86 platform, and it is difficult to realize backup of the VMware virtual machine for a data center built on an ARM (Reduced Instruction set computing Machines) platform.
Disclosure of Invention
Therefore, in order to solve the technical problems, a virtual machine backup method and device, a virtual machine recovery method and device, a computer device, and a storage medium are provided, wherein the virtual machine backup method and device, the virtual machine recovery method and device, and the virtual machine recovery device can effectively improve the scalability of the VMware virtual machine backup and recovery processes.
A virtual machine backup method, the method comprising:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
In one embodiment, the obtaining a virtual machine backup request, obtaining location information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching for a proxy server according to the location information includes:
acquiring a virtual machine backup request, and acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request;
searching each available proxy server according to the position information;
acquiring load data of each available proxy server;
and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the virtual machine backup request includes a virtual machine cluster backup request, the obtaining of the virtual machine backup request, obtaining location information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searching for the proxy server according to the location information includes:
acquiring a virtual machine cluster backup request;
sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server;
acquiring a virtual machine list fed back by the preset scanning server according to the virtual cluster position information;
generating a VMware virtual machine list to be backed up according to the virtual machine list;
scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence;
when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
A virtual machine recovery method is used for recovering the VMware virtual machine to be backed up, and comprises the following steps:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to backup file metadata and position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to the proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by the proxy server is received, acquiring target snapshot data corresponding to the VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server and performing data recovery on the created virtual machine according to the target snapshot data;
and sending the virtual machine recovery message to the proxy server.
In one embodiment, the obtaining of the virtual machine recovery request, obtaining the recovery location information of the VMware virtual machine to be recovered and the backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching for the proxy server according to the location information of the VMware virtual machine to be recovered includes:
acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request;
searching each available proxy server according to the recovery position information;
acquiring load data of each available proxy server;
and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the obtaining of the virtual machine recovery request, obtaining, according to the virtual machine recovery request, recovery location information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered, and searching for the proxy server according to the location information of the VMware virtual machine to be recovered includes:
acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to a VMware virtual machine to be recovered according to the virtual machine cluster recovery request;
generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine;
and sequentially scanning recovery space information corresponding to each VMware virtual machine in the VMware virtual machine list to be recovered according to the recovery position information, acquiring the recovery position information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered when the recovery space information of the current VMware virtual machine to be recovered meets a recovery condition, and searching a proxy server according to the position information of the VMware virtual machine to be recovered.
A virtual machine backup apparatus, the apparatus comprising:
the backup request acquisition module is used for acquiring a virtual machine backup request, acquiring the position information of the VMware virtual machine to be backed up according to the virtual machine backup request and searching the proxy server according to the position information;
the snapshot creating module is used for sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API (hardware description kit) to create snapshot file data of the VMware virtual machine to be backed up;
the metadata acquisition module is used for acquiring backup file metadata when receiving a snapshot creation success message fed back by the proxy server;
the snapshot obtaining module is used for sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and the virtual machine backup module is used for backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata after receiving the target snapshot data.
A virtual machine recovery device is used for recovering the VMware virtual machine to be backed up, and the device comprises:
the recovery request acquisition module is used for acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
the virtual machine creating module is used for generating a virtual machine creating request according to the metadata of the backup file and the position information of the VMware virtual machine to be restored, and sending the virtual machine creating request to the proxy server, wherein the virtual machine creating request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the metadata of the backup file and the position information;
a snapshot sending module, configured to, when receiving a virtual machine creation success message sent by the proxy server, obtain target snapshot data corresponding to the VMware virtual machine to be created, create a virtual machine recovery message according to the target snapshot data, where the virtual machine recovery message is used to request the proxy server, and perform data recovery on the created virtual machine according to the target snapshot data;
and the virtual machine recovery module is used for sending the virtual machine recovery message to the proxy server.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to backup file metadata and position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to the proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by the proxy server is received, acquiring target snapshot data corresponding to the VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server and performing data recovery on the created virtual machine according to the target snapshot data;
and sending the virtual machine recovery message to the proxy server.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to backup file metadata and position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to the proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by the proxy server is received, acquiring target snapshot data corresponding to the VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server and performing data recovery on the created virtual machine according to the target snapshot data;
and sending the virtual machine recovery message to the proxy server.
According to the virtual machine backup method, the virtual machine backup device, the computer equipment and the storage medium, the virtual machine backup request is obtained, the position information of the VMware virtual machine to be backed up is obtained according to the virtual machine backup request, and the proxy server is searched according to the position information; sending a snapshot creating request to a proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDKAPI (virtual machine interface) to create snapshot file data of a VMware virtual machine to be backed up; when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata; sending a snapshot obtaining instruction to a proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in snapshot file data; and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata. According to the method and the system, the proxy server is requested to create the snapshot file of the VMware virtual machine through the snapshot creating request, the snapshot file of the VMware virtual machine is obtained through the snapshot obtaining instruction, and then the virtual machine backup is carried out, so that the backup process of the VMware virtual machine is not limited on an X86 platform, and the expansibility of the backup process of the VMware virtual machine can be effectively improved.
Drawings
FIG. 1 is a diagram of an application environment of a virtual machine backup method in one embodiment;
FIG. 2 is a flowchart illustrating a virtual machine backup method according to an embodiment;
FIG. 3 is a schematic sub-flow chart of step 210 of FIG. 2 in one embodiment;
FIG. 4 is a flowchart illustrating a method for recovering a virtual machine according to an embodiment;
FIG. 5 is a block diagram of an embodiment of a virtual machine backup apparatus;
FIG. 6 is a block diagram showing the structure of a virtual machine recovery apparatus according to one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The virtual machine backup method and the virtual machine recovery method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the backup control server 104 through a network. Backup control server 104 communicates with proxy server 106 and home server 108 over a network. The proxy server 106 communicates with a host server 108 on which the virtual machine to be backed up is located through a network. The terminal 102 sends a virtual machine backup request to the backup control server 104, the backup control server 104 obtains the virtual machine backup request, obtains the position information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searches the proxy server 106 according to the position information; sending a snapshot creation request to the proxy server 106; the proxy server 106 creates a snapshot file corresponding to the VMware virtual machine to be backed up loaded on the host server 108 according to the snapshot creation request, and then sends a snapshot creation success message to the backup control server 104. When the backup control server 104 receives the snapshot creation success message fed back by the proxy server 106, the backup control server 104 obtains the backup file metadata; sending a snapshot acquisition instruction to the proxy server 106, receiving the snapshot acquisition instruction by the proxy server 106, and then intercepting target snapshot data in the snapshot file data according to the snapshot acquisition instruction; and feeding back the target snapshot data to the backup control server 104, and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up by the backup control server 104 according to the target snapshot data and the backup file metadata. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the backup control server 104, the proxy server 106, and the host server 108 may be implemented by independent servers or a server cluster formed by a plurality of servers. The proxy server 106 may also be implemented by a virtual machine.
In one embodiment, as shown in fig. 2, a virtual machine backup method is provided, which is described by taking the method as an example applied to the backup control server 104 in fig. 1, and includes the following steps:
s210, acquiring a virtual machine backup request, acquiring the position information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searching the proxy server according to the position information.
Specifically, the backup control server 104 may operate on an ARM platform, and the virtual machine backup request refers to a request used for backing up a target VMware virtual machine, where the request specifically includes location information of the VMware virtual machine to be backed up. The location information specifically includes location information of a location of a host of the VMware virtual machine to be backed up, and location information of a location of a computing resource of the VMware virtual machine to be backed up. The proxy server refers to a server that needs to be controlled in the backup process, and in one embodiment, the proxy server may specifically be a virtual machine running under the X86 platform.
Specifically, the backup control server may receive a virtual machine backup request, then obtain location information of the VMware virtual machine to be backed up according to the virtual machine backup request, and determine an optimal proxy server in the virtual machine backup process from a preset proxy server list according to the location information.
And S230, sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up.
The snapshot specifically refers to a VMware snapshot, and the disk "snapshot" is a copy of a disk file of the virtual machine at a certain point in time. A system crash or system exception may be used to maintain disk file systems and system storage using a restore to snapshot. The VMware SDK refers to a software toolkit used in the VMware development process, and the VMware SDK API refers to an interface of the VMware SDK.
The backup control server can send a snapshot creation request to the proxy server of the X86 platform, and after receiving the snapshot creation request, the proxy server can call the VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up. After the snapshot file data is created, the proxy server feeds back a snapshot creation success message to the backup controller.
And S250, when receiving the snapshot creation success message fed back by the proxy server, acquiring the metadata of the backup file.
The backup file metadata refers to description information of backup data, and specifically includes virtual machine configuration, backup start time, data storage format and the like of the VMware virtual machine to be backed up.
After the proxy server snapshot is created, the backup control server may obtain the backup file metadata according to the information of the backup process and the information of the VMware virtual machine to be backed up. And backing up the VMware virtual machine to be backed up based on the backup file metadata.
And S270, sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data.
The target snapshot data refers to snapshot file data needed in the backup process of the virtual machine. And the snapshot acquisition instruction comprises relevant information such as offset and length of the target snapshot data in the snapshot file data. The snapshot file data contains the disk file data of the virtual machine in each period. And in the virtual machine backup process, only the virtual machine at the specified time point needs to be backed up, so that after the backup file metadata is obtained, the snapshot obtaining instruction can be sent to the proxy server, and after the proxy server receives the snapshot obtaining instruction, the virtual machine snapshot data with the specified offset and length is read from the snapshot file data to serve as the target snapshot data. And then transmitted back to the backup control server in a fixed binary message format.
And S290, after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
After receiving the target snapshot data fed back by the proxy server, the backup control server writes the target snapshot data into the designated position of the local backup file, then checks whether the backup is completely completed or not, if not, returns to the step of sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining the target snapshot data in the snapshot file data, obtains the required target snapshot data, and knows that all the required target snapshot data are obtained. The backup of the VMware virtual machine to be backed up can be completed according to the target snapshot data and the backup file metadata.
Further, after the backup is completed, the backup control server notifies the proxy server that the backup process is finished; after receiving the request for finishing the backup process, the proxy server executes resource cleaning operation locally, including closing snapshot handles, releasing virtual machine locks, deleting backup snapshots and the like, and then informs the backup control server that all resources are cleaned; and the backup control server receives the resource cleaning completion message, then releases the scheduling resources of the local virtual machine, and completely ends the virtual machine backup process.
According to the virtual machine backup method, the virtual machine backup request is obtained, the position information of the VMware virtual machine to be backed up is obtained according to the virtual machine backup request, and the proxy server is searched according to the position information; sending a snapshot creating request to a proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API (software development kit) to create snapshot file data of a VMware virtual machine to be backed up; when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata; sending a snapshot obtaining instruction to a proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in snapshot file data; and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata. According to the method and the system, the proxy server is requested to create the snapshot file of the VMware virtual machine through the snapshot creating request, the snapshot file of the VMware virtual machine is obtained through the snapshot obtaining instruction, and then the virtual machine backup is carried out, so that the backup process of the VMware virtual machine is not limited on an X86 platform, and the expansibility of the backup process of the VMware virtual machine can be effectively improved.
In one embodiment, as shown in FIG. 3, step 210 comprises:
s212, obtaining a virtual machine backup request, and obtaining the position information of the VMware virtual machine to be backed up according to the virtual machine backup request.
S214, searching each available proxy server according to the position information.
S216, load data of each available proxy server is obtained.
S218, the proxy server is obtained according to the load data of each available proxy server.
Firstly, a backup control server firstly acquires a virtual machine backup request, then searches the position information of a VMware virtual machine to be backed up, and then screens out a corresponding proxy list according to the position information of a host machine, computing resources and the like where the virtual machine is located. Specifically, the available server specifically refers to other virtual machines installed under the host machine where the VMware virtual machine to be backed up is located, except the VMware virtual machine to be backed up. Other virtual machines under the host machine where the virtual machine is located can be selected as proxy servers to participate in the backup of the virtual machine. Specifically, the host may include a plurality of available proxy servers, and the proxy control server may read load information of the available proxy servers, and then, based on a load balancing manner, may promote an optimal available proxy server as a proxy server in the backup process. And selecting a proper proxy server according to the load data, so that the working efficiency of the proxy server can be effectively improved, and further the working efficiency of the virtual machine in the backup process is improved.
In one embodiment, the virtual machine backup request comprises a virtual machine cluster backup request, and step 210 comprises: acquiring a virtual machine cluster backup request; sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server; acquiring a virtual machine list fed back by a preset scanning server according to the virtual cluster position information; generating a VMware virtual machine list to be backed up according to the virtual machine list; scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence; when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
The virtual machine backup request may specifically be a virtual machine cluster backup request, and is used to request to backup a virtual machine in a target cluster. After receiving a virtual machine cluster backup request; the virtual machine cluster position information corresponding to the virtual machine cluster backup request can be sent to a preset scanning server; the scanning server can scan the virtual machine cluster according to the virtual machine cluster position information, and arrange out relevant information of each VMware virtual machine to be backed up in the cluster, then package the list and the information into json (JavaScript Object Notation) information, feed the json Object Notation) information back to the backup control server, the backup control server receives the information returned by the scanning server, analyzes the virtual machine list in a promissory format, and then sequentially scans the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up according to the list sequence; when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information. The corresponding list is established and then scanned, and the virtual machines in the list meeting the backup condition are backed up, so that the backup efficiency can be effectively improved.
In addition, as shown in fig. 4, the present application further provides a virtual machine recovery method, which is used for recovering a VMware virtual machine that is backed up in an ARM environment, and the method may be performed by a recovery control server, and specifically includes the following steps:
s410, acquiring a virtual machine recovery request, acquiring recovery position information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching the proxy server according to the position information of the VMware virtual machine to be recovered.
The recovery control server firstly obtains a virtual machine recovery request, determines the position of the virtual machine after recovery according to the virtual machine recovery request, simultaneously obtains backup file metadata of the VMware virtual machine to be recovered according to the virtual machine recovery request, obtains information such as configuration and name of the VMware virtual machine to be recovered, and simultaneously can search an available proxy server according to the position information of the VMware virtual machine to be recovered.
And S430, generating a virtual machine creation request according to the backup file metadata and the position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to the proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create the corresponding VMware virtual machine according to the backup file metadata and the position information.
And after the backup file metadata are obtained, a virtual machine creation request can be generated according to the backup file metadata and the position information of the VMware virtual machine to be restored. And sending the virtual machine creation request to the selected proxy server, and acquiring the specified name and the specified configured virtual machine by the selected proxy server at the recovery position corresponding to the recovery position information through the backup file metadata.
S450, when a virtual machine creation success message sent by the proxy server is received, acquiring target snapshot data corresponding to the VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server, and performing data recovery on the created virtual machine according to the target snapshot data.
S470, sending the virtual machine recovery message to the proxy server.
After the virtual machine is created, the proxy server feeds back a virtual machine creation success message to the recovery control server. When a virtual machine creation success message sent by the proxy server is received, the recovery control server directly extracts and obtains target snapshot data corresponding to the VMware virtual machine to be created from a locally stored virtual machine backup database, and creates a virtual machine recovery message according to the target snapshot data, specifically, the target snapshot data can be sent to the proxy server in a binary format through the virtual machine recovery message. After the proxy server receives the virtual machine recovery message, the target snapshot file can be stored to the corresponding position of the host machine disk according to the virtual machine recovery message, and the whole virtual machine recovery process is completed.
According to the virtual machine recovery method, by acquiring a virtual machine recovery request, recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered are acquired according to the virtual machine recovery request, and a proxy server is searched according to the position information of the VMware virtual machine to be recovered; generating a virtual machine creation request according to the backup file metadata and the position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to a proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information; when a virtual machine creation success message sent by a proxy server is received, acquiring target snapshot data corresponding to a VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server, and performing data recovery on the created virtual machine according to the target snapshot data; and sending a virtual machine recovery message to the proxy server. According to the method and the device, the proxy server is requested to create the VMware virtual machine through the virtual machine creation request, the snapshot file of the backed-up VMware virtual machine is restored through the virtual machine restoration message, and then the virtual machine is restored, so that the restoration process of the VMware virtual machine is not limited on an X86 platform, and the expansibility of the restoration process of the VMware virtual machine can be effectively improved.
In one embodiment, step S410 includes: acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request; searching each available proxy server according to the recovery position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
Specifically, the recovery control server firstly obtains a virtual machine recovery request, and then obtains the recovery position information of the VMware virtual machine to be recovered according to the virtual machine recovery request. And searching and obtaining backup file metadata corresponding to the VMware virtual machine to be restored from the list of the backed-up virtual machine. And then, searching each available proxy server through the recovery position information, wherein the available proxy server specifically refers to other virtual machines under the host machine corresponding to the VMware virtual machine to be recovered. Then, load data of each available proxy server can be obtained; and acquiring the proxy server according to the load data of each available proxy server. Specifically, an optimal available proxy server is proposed as the proxy server in the current recovery process based on a load balancing manner. And selecting a proper proxy server according to the load data, so that the working efficiency of the proxy server can be effectively improved, and further the working efficiency of the virtual machine recovery process is improved.
In one embodiment, the virtual machine recovery request includes a virtual machine cluster recovery request, and step S410 includes: acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to the VMware virtual machine to be recovered according to the virtual machine cluster recovery request; generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine; scanning restoration space information corresponding to each VMware virtual machine in the VMware virtual machine list to be restored according to the restoration position information, acquiring the restoration position information of the VMware virtual machine to be restored and backup file metadata corresponding to the VMware virtual machine to be restored when the restoration space information of the current VMware virtual machine to be restored meets the restoration condition, and searching the proxy server according to the position information of the VMware virtual machine to be restored.
The virtual machine recovery request may specifically be a virtual machine cluster recovery request, and is used to request recovery of a virtual machine in a target cluster. After receiving the virtual machine cluster recovery request, the recovery control server can search the corresponding backed-up VMware virtual machine and the recovery position information corresponding to the VMware virtual machine to be recovered according to the virtual machine cluster recovery request. And then generating a VMware virtual machine list to be restored, determining restoration space information corresponding to each VMware virtual machine to be restored in each virtual machine list, when the restoration space information of the current VMware virtual machine to be restored meets restoration conditions, acquiring restoration position information of the VMware virtual machine to be restored and backup file metadata corresponding to the VMware virtual machine to be restored, and searching a proxy server according to the position information of the VMware virtual machine to be restored. The storage space of the virtual machine to be recovered is scanned after the corresponding recovery list is established, so that the virtual machine meeting the recovery conditions is recovered, and the efficiency of the recovery process can be effectively improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a virtual machine backup apparatus, including:
the backup request obtaining module 210 is configured to obtain a virtual machine backup request, obtain location information of the VMware virtual machine to be backed up according to the virtual machine backup request, and search the proxy server according to the location information.
And the snapshot creating module 230 is configured to send a snapshot creating request to the proxy server, where the snapshot creating request is used to request the proxy server to call the VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up.
And a metadata obtaining module 250, configured to obtain the metadata of the backup file when receiving the snapshot creation success message fed back by the proxy server.
And a snapshot obtaining module 270, configured to send a snapshot obtaining instruction to the proxy server, where the snapshot obtaining instruction is used to obtain target snapshot data in the snapshot file data.
And the virtual machine backup module 290 is configured to backup the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata after receiving the target snapshot data. .
In one embodiment, the backup request obtaining module 210 is configured to: acquiring a virtual machine backup request, and acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request; searching each available proxy server according to the position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the virtual machine backup request includes a virtual machine cluster backup request, and the backup request obtaining module 210 is configured to: acquiring a virtual machine cluster backup request; sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server; acquiring a virtual machine list fed back by a preset scanning server according to the virtual cluster position information; generating a VMware virtual machine list to be backed up according to the virtual machine list; scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence; when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
For specific limitations of the virtual machine backup device, reference may be made to the above limitations of the virtual machine backup method, which is not described herein again. The modules in the backup device of the virtual machine can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 6, there is provided a virtual machine recovery apparatus, including:
the recovery request obtaining module 410 is configured to obtain a virtual machine recovery request, obtain recovery location information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and search the proxy server according to the location information of the VMware virtual machine to be recovered.
And the virtual machine creating module 430 is configured to generate a virtual machine creating request according to the backup file metadata and the location information of the VMware virtual machine to be restored, and send the virtual machine creating request to the proxy server, where the virtual machine creating request is used to request the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the location information.
The snapshot sending module 450 is configured to, when receiving a virtual machine creation success message sent by the proxy server, obtain target snapshot data corresponding to the VMware virtual machine to be created, create a virtual machine recovery message according to the target snapshot data, where the virtual machine recovery message is used to request the proxy server, and perform data recovery on the created virtual machine according to the target snapshot data.
The virtual machine recovery module 470 is configured to send a virtual machine recovery message to the proxy server.
In one embodiment, the recovery request obtaining module 410 is configured to: acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request; searching each available proxy server according to the recovery position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the virtual machine recovery request includes a virtual machine cluster recovery request, and the recovery request obtaining module 410 is configured to: acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to the VMware virtual machine to be recovered according to the virtual machine cluster recovery request; generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine; scanning restoration space information corresponding to each VMware virtual machine in the VMware virtual machine list to be restored according to the restoration position information, acquiring the restoration position information of the VMware virtual machine to be restored and backup file metadata corresponding to the VMware virtual machine to be restored when the restoration space information of the current VMware virtual machine to be restored meets the restoration condition, and searching the proxy server according to the position information of the VMware virtual machine to be restored.
For specific limitations of the virtual machine recovery apparatus, reference may be made to the above limitations of the virtual machine recovery method, which is not described herein again. The modules in the virtual machine recovery apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing virtual machine snapshot data and backup file metadata. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a virtual machine backup method or a virtual machine recovery method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 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, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to a proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API (virtual machine virtualization application server) to create snapshot file data of a VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to a proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a virtual machine backup request, and acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request; searching each available proxy server according to the position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a virtual machine cluster backup request; sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server; acquiring a virtual machine list fed back by a preset scanning server according to the virtual cluster position information; generating a VMware virtual machine list to be backed up according to the virtual machine list; scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence; when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to the backup file metadata and the position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to a proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by a proxy server is received, acquiring target snapshot data corresponding to a VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server, and performing data recovery on the created virtual machine according to the target snapshot data;
and sending a virtual machine recovery message to the proxy server.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request; searching each available proxy server according to the recovery position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to the VMware virtual machine to be recovered according to the virtual machine cluster recovery request; generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine; scanning restoration space information corresponding to each VMware virtual machine in the VMware virtual machine list to be restored according to the restoration position information, acquiring the restoration position information of the VMware virtual machine to be restored and backup file metadata corresponding to the VMware virtual machine to be restored when the restoration space information of the current VMware virtual machine to be restored meets the restoration condition, and searching the proxy server according to the position information of the VMware virtual machine to be restored.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to a proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API (virtual machine virtualization application server) to create snapshot file data of a VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to a proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a virtual machine backup request, and acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request; searching each available proxy server according to the position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a virtual machine cluster backup request; sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server; acquiring a virtual machine list fed back by a preset scanning server according to the virtual cluster position information; generating a VMware virtual machine list to be backed up according to the virtual machine list; scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence; when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to the backup file metadata and the position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to a proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by a proxy server is received, acquiring target snapshot data corresponding to a VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server, and performing data recovery on the created virtual machine according to the target snapshot data;
and sending a virtual machine recovery message to the proxy server.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request; searching each available proxy server according to the recovery position information; acquiring load data of each available proxy server; and acquiring the proxy server according to the load data of each available proxy server.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to the VMware virtual machine to be recovered according to the virtual machine cluster recovery request; generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine; scanning restoration space information corresponding to each VMware virtual machine in the VMware virtual machine list to be restored according to the restoration position information, acquiring the restoration position information of the VMware virtual machine to be restored and backup file metadata corresponding to the VMware virtual machine to be restored when the restoration space information of the current VMware virtual machine to be restored meets the restoration condition, and searching the proxy server according to the position information of the VMware virtual machine to be restored.
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 hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile memory may include Read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
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 examples 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 invention. 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 (10)

1. A virtual machine backup method, the method comprising:
acquiring a virtual machine backup request, acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request, and searching a proxy server according to the position information;
sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API to create snapshot file data of the VMware virtual machine to be backed up;
when a snapshot creation success message fed back by the proxy server is received, obtaining backup file metadata;
sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and after receiving the target snapshot data, backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata.
2. The method according to claim 1, wherein the obtaining of the virtual machine backup request, obtaining the location information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searching for the proxy server according to the location information comprises:
acquiring a virtual machine backup request, and acquiring the position information of a VMware virtual machine to be backed up according to the virtual machine backup request;
searching each available proxy server according to the position information;
acquiring load data of each available proxy server;
and acquiring the proxy server according to the load data of each available proxy server.
3. The method according to claim 1, wherein the virtual machine backup request comprises a virtual machine cluster backup request, the obtaining a virtual machine backup request, obtaining location information of the VMware virtual machine to be backed up according to the virtual machine backup request, and searching for the proxy server according to the location information comprises:
acquiring a virtual machine cluster backup request;
sending virtual machine cluster position information corresponding to the virtual machine cluster backup request to a preset scanning server;
acquiring a virtual machine list fed back by the preset scanning server according to the virtual cluster position information;
generating a VMware virtual machine list to be backed up according to the virtual machine list;
scanning the working states of the VMware virtual machines to be backed up in the VMware virtual machine list to be backed up in sequence;
when the scanned working state of the VMware virtual machine to be backed up meets the backup condition, the position information of the VMware virtual machine to be backed up is obtained, and the proxy server is searched according to the position information.
4. A virtual machine recovery method for recovering the VMware virtual machine to be backed up in claims 1 to 3, the method comprising:
acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
generating a virtual machine creation request according to backup file metadata and position information of the VMware virtual machine to be restored, and sending the virtual machine creation request to the proxy server, wherein the virtual machine creation request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the backup file metadata and the position information;
when a virtual machine creation success message sent by the proxy server is received, acquiring target snapshot data corresponding to the VMware virtual machine to be created, creating a virtual machine recovery message according to the target snapshot data, wherein the virtual machine recovery message is used for requesting the proxy server and performing data recovery on the created virtual machine according to the target snapshot data;
and sending the virtual machine recovery message to the proxy server.
5. The method as claimed in claim 4, wherein the obtaining of the virtual machine recovery request, obtaining the recovery location information of the VMware virtual machine to be recovered and the backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching for the proxy server according to the location information of the VMware virtual machine to be recovered comprises:
acquiring a virtual machine recovery request, and acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request;
searching each available proxy server according to the recovery position information;
acquiring load data of each available proxy server;
and acquiring the proxy server according to the load data of each available proxy server.
6. The method according to claim 4, wherein the virtual machine recovery request comprises a virtual machine cluster recovery request, the obtaining of the virtual machine recovery request, obtaining recovery location information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching for the proxy server according to the location information of the VMware virtual machine to be recovered comprises:
acquiring a virtual machine cluster recovery request, and searching a corresponding backed-up VMware virtual machine and recovery position information corresponding to a VMware virtual machine to be recovered according to the virtual machine cluster recovery request;
generating a VMware virtual machine list to be restored according to the backup information and the position information of the backed up VMware virtual machine;
and sequentially scanning recovery space information corresponding to each VMware virtual machine in the VMware virtual machine list to be recovered according to the recovery position information, acquiring the recovery position information of the VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered when the recovery space information of the current VMware virtual machine to be recovered meets a recovery condition, and searching a proxy server according to the position information of the VMware virtual machine to be recovered.
7. An apparatus for virtual machine backup, the apparatus comprising:
the backup request acquisition module is used for acquiring a virtual machine backup request, acquiring the position information of the VMware virtual machine to be backed up according to the virtual machine backup request and searching the proxy server according to the position information;
the snapshot creating module is used for sending a snapshot creating request to the proxy server, wherein the snapshot creating request is used for requesting the proxy server to call a VMware SDK API (hardware description kit) to create snapshot file data of the VMware virtual machine to be backed up;
the metadata acquisition module is used for acquiring backup file metadata when receiving a snapshot creation success message fed back by the proxy server;
the snapshot obtaining module is used for sending a snapshot obtaining instruction to the proxy server, wherein the snapshot obtaining instruction is used for obtaining target snapshot data in the snapshot file data;
and the virtual machine backup module is used for backing up the VMware virtual machine to be backed up according to the target snapshot data and the backup file metadata after receiving the target snapshot data.
8. A virtual machine recovery apparatus, configured to recover the VMware virtual machine to be backed up according to claim 7, the apparatus comprising:
the recovery request acquisition module is used for acquiring a virtual machine recovery request, acquiring recovery position information of a VMware virtual machine to be recovered and backup file metadata corresponding to the VMware virtual machine to be recovered according to the virtual machine recovery request, and searching a proxy server according to the position information of the VMware virtual machine to be recovered;
the virtual machine creating module is used for generating a virtual machine creating request according to the metadata of the backup file and the position information of the VMware virtual machine to be restored, and sending the virtual machine creating request to the proxy server, wherein the virtual machine creating request is used for requesting the proxy server to create a corresponding VMware virtual machine according to the metadata of the backup file and the position information;
a snapshot sending module, configured to, when receiving a virtual machine creation success message sent by the proxy server, obtain target snapshot data corresponding to the VMware virtual machine to be created, create a virtual machine recovery message according to the target snapshot data, where the virtual machine recovery message is used to request the proxy server, and perform data recovery on the created virtual machine according to the target snapshot data;
and the virtual machine recovery module is used for sending the virtual machine recovery message to the proxy server.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201911411890.4A 2019-12-31 2019-12-31 Virtual machine backup method and device and virtual machine recovery method and device Pending CN111158959A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911411890.4A CN111158959A (en) 2019-12-31 2019-12-31 Virtual machine backup method and device and virtual machine recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911411890.4A CN111158959A (en) 2019-12-31 2019-12-31 Virtual machine backup method and device and virtual machine recovery method and device

Publications (1)

Publication Number Publication Date
CN111158959A true CN111158959A (en) 2020-05-15

Family

ID=70560319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911411890.4A Pending CN111158959A (en) 2019-12-31 2019-12-31 Virtual machine backup method and device and virtual machine recovery method and device

Country Status (1)

Country Link
CN (1) CN111158959A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395133A (en) * 2020-11-17 2021-02-23 平安科技(深圳)有限公司 Data backup method and device based on virtual machine and computer equipment
CN112698913A (en) * 2020-12-29 2021-04-23 中国银联股份有限公司 Virtual machine snapshot generation method and device, electronic equipment and medium
CN115344428A (en) * 2022-08-12 2022-11-15 广州鼎甲计算机科技有限公司 Data processing method, data processing apparatus, computer device, storage medium, and program product
CN117421160A (en) * 2023-11-01 2024-01-19 广州鼎甲计算机科技有限公司 Data backup method, device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102576322A (en) * 2009-08-21 2012-07-11 赛门铁克公司 Proxy backup of virtual disk image files on NAS devices
CN104407938A (en) * 2014-11-21 2015-03-11 上海爱数软件有限公司 Recovery method for various granularities after mirror-image-level backup of virtual machine
CN107092538A (en) * 2017-03-14 2017-08-25 平安科技(深圳)有限公司 Virtual-machine data backup method and system
CN107133131A (en) * 2017-05-31 2017-09-05 广州鼎甲计算机科技有限公司 A kind of virtual machine synthesized backup method based on VMware
CN107908501A (en) * 2017-10-26 2018-04-13 南京壹进制信息技术股份有限公司 A kind of VMware virtual machine synthesized backup methods based on index
US20180373599A1 (en) * 2014-03-28 2018-12-27 EMC IP Holding Company LLC Optimized backup of clusters with multiple proxy servers
CN109445908A (en) * 2018-10-30 2019-03-08 张家口浩扬科技有限公司 A kind of virtual machine backup method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102576322A (en) * 2009-08-21 2012-07-11 赛门铁克公司 Proxy backup of virtual disk image files on NAS devices
US20180373599A1 (en) * 2014-03-28 2018-12-27 EMC IP Holding Company LLC Optimized backup of clusters with multiple proxy servers
CN104407938A (en) * 2014-11-21 2015-03-11 上海爱数软件有限公司 Recovery method for various granularities after mirror-image-level backup of virtual machine
CN107092538A (en) * 2017-03-14 2017-08-25 平安科技(深圳)有限公司 Virtual-machine data backup method and system
CN107133131A (en) * 2017-05-31 2017-09-05 广州鼎甲计算机科技有限公司 A kind of virtual machine synthesized backup method based on VMware
CN107908501A (en) * 2017-10-26 2018-04-13 南京壹进制信息技术股份有限公司 A kind of VMware virtual machine synthesized backup methods based on index
CN109445908A (en) * 2018-10-30 2019-03-08 张家口浩扬科技有限公司 A kind of virtual machine backup method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395133A (en) * 2020-11-17 2021-02-23 平安科技(深圳)有限公司 Data backup method and device based on virtual machine and computer equipment
CN112698913A (en) * 2020-12-29 2021-04-23 中国银联股份有限公司 Virtual machine snapshot generation method and device, electronic equipment and medium
CN115344428A (en) * 2022-08-12 2022-11-15 广州鼎甲计算机科技有限公司 Data processing method, data processing apparatus, computer device, storage medium, and program product
CN117421160A (en) * 2023-11-01 2024-01-19 广州鼎甲计算机科技有限公司 Data backup method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111158959A (en) Virtual machine backup method and device and virtual machine recovery method and device
US11010240B2 (en) Tracking status and restarting distributed replication
US20200348852A1 (en) Distributed object replication architecture
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
US20190243688A1 (en) Dynamic allocation of worker nodes for distributed replication
US20190245918A1 (en) Distributed replication of an object
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN110602169B (en) Service calling method and device, computer equipment and storage medium
CN109542682B (en) Data backup method, device, equipment and storage medium
US8893272B2 (en) Method and device for recombining runtime instruction
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN110704161B (en) Virtual machine creation method and device and computer equipment
CN114706661B (en) Disaster recovery backup method and system for virtual machine, computer equipment and storage medium
US11216343B1 (en) System and method for accelerating processing in event-driven server-less computing
CN110569083A (en) Image segmentation processing method and device, computer equipment and storage medium
CN111382012B (en) Backup method and device for MySQL cloud database, computer equipment and storage medium
CN115221156A (en) Database cluster capacity expansion method and device, computer equipment and storage medium
CN113821333A (en) Android application program migration method and device
CN111090701B (en) Service request processing method, device, readable storage medium and computer equipment
CN114615263A (en) Cluster online migration method, device, equipment and storage medium
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN109254870B (en) Data backup method and device
CN112104569A (en) Message data processing method and device, computer equipment and storage medium
CN111191082A (en) Data management method and device, computer equipment and storage medium
CN113311995B (en) Cloud hard disk preparation method and device, computer equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200515