Disk data backup method of virtual machine, server and storage medium
By receiving and transmitting disk backup identification and data, the support problem of heterogeneous server backup is solved, data transmission and backup between heterogeneous servers is realized, data reading and writing capabilities are improved, and backup space is saved.
Patent Information
- Application Number
- CN202411780994.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
AI Technical Summary
The existing technology cannot support backup of heterogeneous servers, and only supports system backups for processors with x86 architectures.
By receiving the disk backup identifier sent by the second server and sending a first instruction to the VMware server, obtaining the disk data of the disk to be backed up, and transmitting it to the second server, data transmission and backup between heterogeneous servers are realized.
It solves the support problem of heterogeneous server backup, realizes data transmission and backup between heterogeneous servers, improves data reading and writing capabilities, and saves backup space.
Smart Images

Figure CN119645729A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a disk data backup method, a server and a storage medium for a virtual machine. Background Art
[0002] VMware Workstation (VMware) is a desktop virtual computer software used to simulate a complete network environment on a physical machine and generate portable virtual machines.
[0003] Since VMware itself provides software for developing virtual machine backup, most of the current solutions for VMware virtual machine backup do not require a backup agent. However, the software for developing virtual machine backup provided by VMware itself does not support the backup of heterogeneous servers, and only supports the backup of systems with x86 processor architecture.
[0004] Therefore, it is urgent to propose a new method to solve the above problems. Summary of the invention
[0005] The embodiment of the present invention provides a disk data backup method, a server and a storage medium for a virtual machine, which solves the problem that the current backup of heterogeneous servers cannot be supported and realizes data transmission and data backup between heterogeneous servers.
[0006] According to one aspect of the present invention, a method for backing up disk data of a virtual machine is provided, which is applied to a first server, and the first server supports a VMware virtual machine function; the method comprises:
[0007] Receive the disk backup identifier sent by the second server, and send a first instruction to the VMware server, wherein the disk backup identifier is obtained by the third server from the VMware server and forwarded to the second server, and the first instruction includes the disk identifier of the disk to be backed up and the disk backup identifier;
[0008] Obtain disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier;
[0009] Send the disk data to the second server.
[0010] According to another aspect of the present invention, another method for backing up disk data of a virtual machine is provided, which is applied to a VMware server; the method comprises:
[0011] Sending a disk backup identifier to a third server;
[0012] receiving a first instruction sent by a first server, wherein the first server supports a VMware virtual machine function, and the first instruction includes a disk identifier and a disk backup identifier of a disk to be backed up, and the disk backup identifier is obtained by the second server from a third server and forwarded to the first server;
[0013] Disk data corresponding to the disk backup identifier in the disk to be backed up determined according to the disk identifier;
[0014] The disk data is sent to the first server so that the first server sends the disk data to the second server.
[0015] According to another aspect of the present invention, a disk data backup device for a virtual machine is provided, the device comprising:
[0016] A first receiving module is used to receive the disk backup identifier sent by the second server, and send a first instruction to the VMware server, wherein the disk backup identifier is obtained by the third server from the VMware server and forwarded to the second server, and the first instruction includes the disk identifier and the disk backup identifier of the disk to be backed up;
[0017] The first acquisition module is used to acquire disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier;
[0018] The first sending module is used to send the disk data to the second server.
[0019] According to another aspect of the present invention, another disk data backup device for a virtual machine is provided, the device comprising:
[0020] A second sending module is used to send a disk backup identifier to a third server;
[0021] A second receiving module is used to receive a first instruction sent by the first server, wherein the first server supports a VMware virtual machine function, and the first instruction includes a disk identifier and a disk backup identifier of a disk to be backed up, and the disk backup identifier is obtained by the second server from a third server and forwarded to the first server;
[0022] A determination module, used for determining disk data corresponding to the disk backup identifier in the disk to be backed up according to the disk identifier;
[0023] The third sending module is used to send the disk data to the first server, so that the first server sends the disk data to the second server.
[0024] According to another aspect of the present invention, a server is provided, the server comprising:
[0025] at least one processor; and
[0026] a memory communicatively connected to at least one processor; wherein,
[0027] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the disk data backup method of a virtual machine according to any embodiment of the present invention.
[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for enabling a processor to implement the disk data backup method of a virtual machine according to any embodiment of the present invention when the computer instructions are executed.
[0029] The disk data backup method of the virtual machine provided by the embodiment of the present invention receives the disk backup identifier sent by the second server, and sends the first instruction to the VMware server; obtains the disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier; and sends the disk data to the second server. In the above technical scheme, on the one hand, the first instruction carrying the disk identifier and the disk backup identifier of the disk is used to obtain the corresponding disk data from the VMware server, so as to accurately obtain the disk data of the disk to be backed up, and to determine whether the backed-up disk data is full data or incremental data according to the disk backup identifier. On the other hand, the disk data is sent to the second server so that the second server backs up the disk data of the disk to be backed up, which solves the problem that the backup of heterogeneous servers cannot be supported at present, and realizes the data transmission and data backup between heterogeneous servers. At the same time, since the first server supports the VMware virtual machine function, it is realized that the disk data of the disk to be backed up in the VMware server is directly obtained by the first server, and in the process of sending it to the second server, the dedicated network used will not cause performance loss, thereby improving the data reading and writing capabilities. Furthermore, the disk backup identifier determines whether the backed-up disk data is full data or incremental data, so that after the disk data of the disk to be backed up is backed up for the first time, subsequent data backup only needs incremental backup. Compared with traditional data backup methods, it has high backup efficiency and saves backup space.
[0030] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A schematic diagram of a flow chart of a method for backing up disk data of a virtual machine provided by an embodiment of the present invention;
[0033] Figure 2 Another schematic diagram of a flow chart of a method for backing up disk data of a virtual machine provided by an embodiment of the present invention;
[0034] Figure 3 Another schematic diagram of a process of backing up disk data of a virtual machine provided by an embodiment of the present invention;
[0035] Figure 4 An example diagram of an interaction of a method for backing up disk data of a virtual machine provided by an embodiment of the present invention;
[0036] Figure 5 A schematic diagram of the structure of a disk data backup device for a virtual machine provided by an embodiment of the present invention;
[0037] Figure 6 Another structural schematic diagram of a disk data backup device for a virtual machine provided by an embodiment of the present invention;
[0038] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variation of the terms "including" and "having" is intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] Figure 1 A flow chart of a disk data backup method for a virtual machine provided in an embodiment of the present invention, this embodiment is applicable to the situation where disk data to be backed up in a VMware server is backed up to a second server via a first server. The method can be executed by a disk data backup device of the virtual machine, and the disk data backup device of the virtual machine can be implemented in the form of hardware and / or software, and the disk data backup device of the virtual machine can be configured in the server. In this embodiment, the server can be a server that supports VMware virtual machine functions. Also, in this embodiment, the first server, the second server, the third server and the VMware server can all be servers that support virtual machine functions, and the third server and the second server can support virtual machine functions of multiple virtual machine platforms. The VMware server is a cloud management terminal of VMware, such as a server that carries a VMware server. The above-mentioned servers can be heterogeneous servers. Such as Figure 1 As shown, the method includes:
[0042] S101. Receive a disk backup identifier sent by a second server, and send a first instruction to a VMware server.
[0043] The disk backup identifier is obtained by the third server from the VMware server and forwarded to the second server, and the first instruction includes the disk identifier of the disk to be backed up and the disk backup identifier.
[0044] In this embodiment, the first server supports VMware virtual machine functions, and therefore, a read-write virtual machine of VMware for performing read and write operations is provided on the first server. The second server supports virtual machine functions of various platforms, and therefore, a storage virtual machine for performing storage functions is provided on the second server. And, the third server supports virtual machine functions of various platforms, and therefore, a control virtual machine for controlling virtual machines in other servers is provided on the third server. This embodiment is an exemplary explanation based on the working interaction between the virtual machines provided in the above three servers. Therefore, for the convenience of explanation, the following example is taken as an example of the interaction process between the first server, the second server and the third server, but in reality, it is the process of interaction between the virtual machines in the above three servers.
[0045] Specifically, the third server can be used as a server that carries the function of controlling virtual machines, and controls other servers before backup. For example, before the first server receives the disk backup identifier sent by the second server, the third server can control the start of the read-write virtual machine in the first server, and control the initialization of the storage virtual machine of the storage function of the second server. Afterwards, the disk backup identifier of the disk to be backed up is obtained from the service end of the VMware server. After the third server obtains the disk backup identifier, it sends the disk backup identifier to the second server. At this time, the first server can receive the disk backup identifier sent by the second server, and send the first instruction to the VMware server.
[0046] Exemplarily, the initialization content of the storage virtual machine in the second server controlled by the third server may include: the type of backup task, the identifier of the disk to be sent, the number of disks, the size of the disk, and other information.
[0047] S102: Obtain disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier.
[0048] Specifically, after the first server sends the first instruction to the VMware server, since the first instruction includes the disk identifier of the disk to be backed up, the VMware server can determine the disk data corresponding to the disk identifier and the disk backup identifier among all the disk data it has according to the disk identifier. And, after the VMware server determines the disk data, it can send the disk data to the first server. And, the first server can receive the disk data of the disk to be backed up fed back by the VMware server.
[0049] Exemplarily, the disk identifier is used to indicate the disk to be backed up, and the disk backup identifier is used to indicate the data of the disk to be backed up that needs to be backed up this time. For example, the VMware server includes disk data of three disks A, B, and C. The disk identifier is used to determine that the disk to be backed up this time is B, and then the disk backup identifier can be used to determine whether the backup is the full data or incremental data in disk B.
[0050] In this embodiment, the first instruction carrying the disk identifier and disk backup identifier of the disk is used to obtain the corresponding disk data from the VMware server, thereby accurately obtaining the disk data of the disk to be backed up and determining whether the backed-up disk data is full data or incremental data based on the disk backup identifier.
[0051] S103: Send the disk data to the second server.
[0052] Specifically, after the first server receives the disk data, the first server may send the disk data to the second server, so that the second server saves the disk data, thereby backing up the disk data of the disk to be backed up.
[0053] In this embodiment, disk data is sent to the second server so that the second server backs up the disk data of the disk to be backed up, which solves the current problem of not being able to support heterogeneous server backup and realizes data transmission and data backup between heterogeneous servers. At the same time, since the first server supports the VMware virtual machine function, the first server directly obtains the disk data of the disk to be backed up in the VMware server and sends it to the second server. The dedicated network used will not cause performance loss, which improves the data reading and writing capabilities. Furthermore, it is determined whether the backed-up disk data is full data or incremental data based on the disk backup identifier, so that after the disk data of the disk to be backed up is backed up for the first time, subsequent data backup only needs to be incremental backup.
[0054] Compared with traditional data backup methods, it has high backup efficiency and saves backup space.
[0055] The disk data backup method of the virtual machine provided by the embodiment of the present invention receives the disk backup identifier sent by the second server, and sends the first instruction to the VMware server; obtains the disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier; and sends the disk data to the second server. In the above technical scheme, on the one hand, the first instruction carrying the disk identifier and the disk backup identifier of the disk is used to obtain the corresponding disk data from the VMware server, so as to accurately obtain the disk data of the disk to be backed up, and to determine whether the backed-up disk data is full data or incremental data according to the disk backup identifier. On the other hand, the disk data is sent to the second server so that the second server backs up the disk data of the disk to be backed up, which solves the problem that the backup of heterogeneous servers cannot be supported at present, and realizes the data transmission and data backup between heterogeneous servers. At the same time, since the first server supports the VMware virtual machine function, it is realized that the disk data of the disk to be backed up in the VMware server is directly obtained by the first server, and in the process of sending it to the second server, the dedicated network used will not cause performance loss, thereby improving the data reading and writing capabilities. Furthermore, the disk backup identifier determines whether the backed-up disk data is full data or incremental data, so that after the disk data of the disk to be backed up is backed up for the first time, subsequent data backup only needs incremental backup. Compared with traditional data backup methods, it has high backup efficiency and saves backup space.
[0056] Figure 2 Another flowchart of the method for backing up disk data of a virtual machine provided by an embodiment of the present invention is provided. Based on the above embodiments and feasible examples, this embodiment describes in detail the steps of "after receiving the CBT information sent by the second server" and "after sending the disk data to the second server". Figure 2 As shown, the method includes:
[0057] S201. Receive CBT information sent by the second server.
[0058] The disk backup identifier is the CBT information of the changed data blocks of the disk to be backed up. CBT information is a technology used to implement incremental backup in VMware virtualization environment.
[0059] Specifically, before backing up the data of the disk to be backed up, you can first determine whether the data to be backed up this time is full data or incremental data. Therefore, you can use a third server to first obtain CBT information from the VMware server, and forward the obtained CBT information to the second server. The second server forwards the obtained CBT information to the first server. At this point, the first server receives the CBT information sent by the second server, and can determine whether the disk data of the disk to be backed up that needs to be read during this backup process is a full backup or an incremental backup.
[0060] In this embodiment, since other servers are used to obtain CBT information from the VMware server, it is possible to determine CBT information without relying on the host and without shutting down the virtual machine. At the same time, it also provides support for backing up disk data later without shutting down the virtual machine.
[0061] S202: Send a second instruction to the VMware server.
[0062] The second instruction includes a disk identifier. In this embodiment, the disk identifier includes an identity identifier of the disk to be backed up, and also includes an identifier for obtaining a metadata file (meta file) of the disk to be backed up.
[0063] Specifically, after determining whether the data backed up this time is a full backup or an incremental backup, the first server may send a second instruction to the VMware server.
[0064] S203: Receive the metadata file of the disk to be backed up determined by the VMware server according to the disk identifier.
[0065] The metadata file is a meta file. The meta file is used to store important metadata about the main resource to ensure the consistency and correct management of the resource in the editor and version control system.
[0066] Specifically, after the first server sends the second instruction to the VMware server, the VMware server determines the metadata file of the disk to be backed up according to the disk identifier in the second instruction, and after determination, feeds the metadata file back to the first server. At this point, the first server can receive the metadata file. In addition, the metadata file can be sent to the second server for storage, so as to prepare space for the second server to store the disk data of the disk to be backed up.
[0067] S204: Send a first instruction to the VMware server.
[0068] Specifically, after the first server receives the metadata file, it may send a first instruction to the VMware server.
[0069] S205: Obtain disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier.
[0070] Specifically, after receiving the first instruction sent by the first server, the VMware server determines the disk to be backed up according to the disk identifier in the first instruction, and determines the full disk data or incremental disk data to be backed up this time according to the disk backup identifier, that is, the CBT information. After determination, the disk data is sent to the first server, and the first server obtains the disk data.
[0071] S206: Send the disk data to the second server.
[0072] Specifically, after the first server obtains the disk data, the disk data may be sent to the second server so that the second server backs up the disk data.
[0073] At this point, the process of backing up the data on the backup disk is completed. After that, the process of restoring the data on the recovery disk begins.
[0074] S207: Receive the metadata file of the disk to be restored sent by the second server, and send the metadata file of the disk to be restored to the VMware server.
[0075] Specifically, before receiving the metadata file of the disk to be restored sent by the second server, the third server will send a recovery request to the second server. The recovery request is used to indicate the disk number identification information of the disk to be restored that needs to be restored this time. Therefore, after the third server sends the recovery request to the second server, the first server will receive the metadata file of the disk to be restored sent by the second server. And, the first server will send the metadata file to the VMware server.
[0076] S208: Receive the disk data to be restored sent by the second server.
[0077] The disk data to be restored is determined by the second server after receiving the restoration request sent by the third server, according to the number identification information of the restoration disk carried in the restoration request.
[0078] Specifically, after the third server sends a recovery request to the second server, the first server will also receive the disk data to be recovered sent by the second server. That is, the second server will determine the disk data to be recovered of the disk to be recovered based on the serial number identification information of the disk to be recovered carried in the recovery request and based on the metadata information, and send the disk data to be recovered to the first server.
[0079] S209: Send a recovery instruction to the VMware server.
[0080] The recovery instruction includes the disk data to be recovered, so that the VMware server recovers the disk data to be recovered according to the recovery instruction.
[0081] Specifically, after the first server receives the disk data to be restored, it can send a restore instruction to the VMware server. The restore instruction includes the disk data to be restored. Therefore, after the VMware server receives the restore instruction, it can restore the disk data of the disk to be restored according to the disk data to be restored in the restore instruction.
[0082] In this embodiment, multiple servers are used to interact with the VMware server to implement the recovery process of the backup data stored in the second server, and the backup and recovery of data between heterogeneous servers is implemented without shutting down.
[0083] Figure 3 This is another flow chart of the method for backing up disk data of a virtual machine provided by an embodiment of the present invention. This embodiment uses VMware server as the execution subject and describes the interaction process between VMware server and other three servers. Figure 3 As shown, the method includes:
[0084] S301. Send a disk backup identifier to a third server.
[0085] Specifically, after receiving the acquisition instruction from the third server, a disk backup identifier is sent to the third server, wherein the disk backup identifier is the CBT information of the changed data block of the disk to be backed up.
[0086] S302: Receive a first instruction sent by a first server.
[0087] The first server supports VMware virtual machine function, the first instruction includes a disk identifier and a disk backup identifier of the disk to be backed up, and the disk backup identifier is obtained by the second server from the third server and forwarded to the first server.
[0088] Before receiving the first instruction sent by the first server, the method further includes:
[0089] (1) Receive a second instruction sent by the first server.
[0090] The second instruction includes a disk identifier.
[0091] Specifically, after sending the CBT information to the third server, the first server will send the second instruction to the VMware server, so the VMware server can receive the second instruction.
[0092] (2) The metadata file of the disk to be backed up is determined according to the disk identifier.
[0093] Specifically, the VMware server determines the metadata file of the disk to be backed up according to the disk identifier in the second instruction.
[0094] (3) Sending the metadata file of the disk to be backed up to the first server.
[0095] Specifically, after the VMware server determines the metadata file of the disk to be backed up, it sends the metadata file of the disk to be backed up to the first server.
[0096] And, after sending the metadata file of the disk to be backed up to the first server, the first server will send a first instruction. At this time, the VMware server can receive the first instruction.
[0097] S303: Determine the disk data corresponding to the disk backup identifier in the disk to be backed up according to the disk identifier.
[0098] Specifically, since the VMware server contains all the disk data and other data, in order to determine the disk data of the disk to be backed up from all the disk data, the disk to be backed up can be determined according to the disk identifier, and the full disk data or incremental disk data in the disk data of the disk to be backed up can be determined according to the disk backup identifier.
[0099] S304: Send the disk data to the first server, so that the first server sends the disk data to the second server.
[0100] Specifically, after determining the disk data, the VMware server may send the disk data to the first server, so that the first server sends the disk data to the second server, thereby implementing backup of the disk data.
[0101] Optionally, after sending the disk data to the first server, the method further includes:
[0102] (1) Receive a recovery instruction sent by the first server.
[0103] The recovery instruction includes the disk data to be recovered, and the disk data to be recovered is determined by the second server according to the number identification information of the recovery disk carried in the recovery request after receiving the recovery request sent by the third server.
[0104] Before receiving the recovery instruction sent by the first server, the method further includes:
[0105] Receive the metadata file of the disk to be restored sent by the first server.
[0106] The metadata file of the disk to be restored is sent by the second server to the first server.
[0107] Specifically, before receiving the recovery instruction sent by the first server, the second server will receive the recovery request from the third server, and the second server will send the metadata file of the disk to be recovered to the first server according to the recovery request. At this time, the first server sends the received metadata file to the VMware server. The VMware server can receive the metadata file of the disk to be recovered.
[0108] Specifically, when the first server obtains the disk data to be restored of the disk to be restored from the second server, the first server will send a restoration instruction to the VMware server. At this time, the VMware server can receive the restoration instruction sent by the first server.
[0109] (2) Restore the disk data to be restored according to the recovery instructions.
[0110] Specifically, according to the recovery instruction, the VMware server can recover the disk data of the disk to be recovered.
[0111] After introducing the disk data backup method of a virtual machine provided by an embodiment of the present invention, in order to make the method provided by the present invention clearer, a specific embodiment is provided here for detailed description. Figure 4 As shown, Figure 4 This is an example diagram of an interactive method for backing up disk data of a virtual machine provided by an embodiment of the present invention. Figure 4 In the example, the system is first divided into a third server, a first server, a VMware server and a second server. A control virtual machine is running in the third server, which is used to control the operation of virtual machines in other servers. The platform of this virtual machine is a virtual machine of any platform. A read-write virtual machine is running in the first server, which is used to read and write disk data and related data. The platform of this virtual machine is the VMware platform. The VMware server is a server on the VMware service side, which is used to manage the operation and storage data of all virtual machines on the VMware platform. A storage virtual machine is running in the second server, which is used to store disk data to be backed up. The platform of this virtual machine is a virtual machine of any platform.
[0112] Specifically, the control virtual machine in the third server sends a startup command to the read-write virtual machine in the first server to start the read-write virtual machine. Also, the control virtual machine in the third server sends an initialization command to the storage virtual machine in the second server to enable the storage virtual machine to determine the initialization information, such as the type of backup task, the disk identifier to be sent, the number of disks, the disk size, and other information, and to prepare to receive disk data. Afterwards, the third server sends a CBT information acquisition request to the VMware server, and the VMware server returns the CBT information to the control virtual machine of the third server. The control virtual machine of the third server sends the received CBT information to the storage virtual machine of the second server, and forwards it to the read-write virtual machine of the first server for reading and writing. At this time, the read-write virtual machine of the first server uses the interface provided by the VMware server according to the CBT information to send a connection request to the VMware server and send a second instruction. The VMware server determines the meta file of the disk to be backed up according to the disk identifier in the second instruction, and returns the meta file of the disk to be backed up to the read-write virtual machine of the first server. The read-write virtual machine of the first server sends the meta file of the disk to be backed up to the storage virtual machine of the second server, and the storage virtual machine of the second server backs up the meta file. And, the read-write virtual machine of the first server sends a first instruction to the VMware server, and the VMware server determines the disk to be backed up according to the disk identifier in the first instruction, and determines the full or incremental disk data of the disk to be backed up according to the CBT information, and returns the disk data to be backed up to the read-write virtual machine of the first server. The read-write virtual machine of the first server sends the disk data to be backed up to the storage virtual machine of the second server, so that the storage virtual machine of the second server backs up the disk data. At this point, the disk data of the virtual machine is backed up.
[0113] If it is necessary to restore the disk data that has been backed up, the control virtual machine of the third server sends a recovery request to the storage virtual machine of the second server. The storage virtual machine of the second server determines the meta file of the disk to be restored based on the number identifier of the disk to be restored in the recovery request, and sends it to the read-write virtual machine of the first server, so that the read-write virtual machine of the first server sends the meta file to be restored to the VMware server. In addition, the storage virtual machine of the second server sends the disk data to be restored to the read-write virtual machine of the first server, and the read-write virtual machine of the first server sends it to the VMware server, thereby realizing the recovery of the backed-up disk data.
[0114] The beneficial effect of the above method is that it realizes the backup and recovery of VMware virtual machines, which is suitable for scenarios with agents. In addition, the first backup is a full backup, and each subsequent backup is an incremental backup. The full backup and incremental backup processes are consistent. After the full backup, a small amount of data that has changed can be backed up incrementally to obtain a full backup, which is more efficient than traditional backup and saves space. The backed-up file is consistent with the original virtual machine file format and can be used directly to mount the virtual machine. The virtual machine can be mounted and used in a short time. Finally, the backup of this method does not depend on the host, and the backup and recovery do not require shutdown operations, which does not affect the normal operation of the virtual machine. It is compatible with multiple versions and has a fast backup and recovery speed.
[0115] Figure 5 A schematic diagram of a structure of a disk data backup device for a virtual machine provided by an embodiment of the present invention. Figure 5 As shown, the device is applied to a first server, the first server supports VMware virtual machine function, and includes:
[0116] The first receiving module 501 is used to receive the disk backup identifier sent by the second server, and send a first instruction to the VMware server, wherein the disk backup identifier is obtained by the third server from the VMware server and forwarded to the second server, and the first instruction includes the disk identifier of the disk to be backed up and the disk backup identifier;
[0117] The first acquisition module 502 is used to acquire disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier;
[0118] The first sending module 503 is used to send the disk data to the second server.
[0119] Optionally, the disk backup identifier is CBT information of the changed data blocks of the disk to be backed up; after receiving the CBT information sent by the second server, the first receiving module 501 is further used to:
[0120] Send a second instruction to the VMware server, wherein the second instruction includes a disk identifier; and receive a metadata file of the disk to be backed up determined by the VMware server according to the disk identifier.
[0121] Optionally, after sending the disk data to the second server, the first sending module 503 is further used to:
[0122] Receive the disk data to be recovered sent by the second server, wherein the disk data to be recovered is determined by the second server after receiving the recovery request sent by the third server based on the number identification information of the disk to be recovered carried in the recovery request; send a recovery instruction to the VMware server, wherein the recovery instruction includes the disk data to be recovered, so that the VMware server recovers the disk data to be recovered according to the recovery instruction.
[0123] Optionally, before receiving the disk data to be restored sent by the second server, the first sending module 503 is further used to:
[0124] Receive the metadata file of the disk to be restored sent by the second server, and send the metadata file of the disk to be restored to the VMware server.
[0125] Figure 6 Another structural diagram of a disk data backup device for a virtual machine provided by an embodiment of the present invention. Figure 6 As shown, it is applied to VMware server; the device includes:
[0126] The second sending module 601 is used to send the disk backup identifier to the third server;
[0127] The second receiving module 602 is used to receive a first instruction sent by the first server, wherein the first server supports the VMware virtual machine function, and the first instruction includes a disk identifier and a disk backup identifier of the disk to be backed up, and the disk backup identifier is obtained by the second server from the third server and forwarded to the first server;
[0128] A determination module 603 is used to determine the disk data corresponding to the disk backup identifier in the disk to be backed up according to the disk identifier;
[0129] The third sending module 604 is used to send the disk data to the first server, so that the first server sends the disk data to the second server.
[0130] Optionally, after sending the disk data to the first server, the third sending module 604 is further used to:
[0131] Receive a recovery instruction sent by the first server, wherein the recovery instruction includes disk data to be recovered, and the disk data to be recovered is determined by the second server after receiving the recovery request sent by the third server based on the number identification information of the recovery disk carried in the recovery request; and recover the disk data to be recovered according to the recovery instruction.
[0132] Optionally, before receiving the recovery instruction sent by the first server, the second receiving module 602 is further configured to:
[0133] A metadata file of the disk to be restored sent by the first server is received, wherein the metadata file of the disk to be restored is sent by the second server to the first server.
[0134] The disk data backup device for a virtual machine provided in the embodiment of the present invention can execute the disk data backup method for a virtual machine provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] Figure 7 A schematic diagram of the structure of a server 10 provided for an embodiment of the present invention. The server is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0136] like Figure 7 As shown, the server 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the server 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0137] A number of components in the server 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the server 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0138] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a disk data backup method for a virtual machine.
[0139] In some embodiments, the disk data backup method of a virtual machine may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the server 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the disk data backup method of the virtual machine described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the disk data backup method of the virtual machine in any other appropriate manner (e.g., by means of firmware).
[0140] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0142] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0143] To provide interaction with a user, the systems and techniques described herein may be implemented on a server having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the server. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0144] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0145] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0146] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0147] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for backing up disk data of a virtual machine, characterized in that: Applied to a first server, the first server supports VMware virtual machine function; the method includes: Receive the disk backup identifier sent by the second server, and send a first instruction to the VMware server, wherein the disk backup identifier is obtained by the third server from the VMware server and forwarded to the second server, and the first instruction includes the disk identifier of the disk to be backed up and the disk backup identifier; Obtaining disk data corresponding to the disk backup identifier in the disk to be backed up determined by the VMware server according to the disk identifier; The disk data is sent to the second server.
2. The method for backing up disk data of a virtual machine according to claim 1, characterized in that: The disk backup identifier is the CBT information of the changed data blocks of the disk to be backed up; After receiving the CBT information sent by the second server, the method further includes: Sending a second instruction to the VMware server, wherein the second instruction includes the disk identifier; Receive the metadata file of the disk to be backed up determined by the VMware server according to the disk identifier.
3. The method for backing up disk data of a virtual machine according to claim 1, characterized in that: After sending the disk data to the second server, the method further includes: Receiving the disk data to be restored sent by the second server, wherein the disk data to be restored is determined by the second server after receiving the restoration request sent by the third server, according to the serial number identification information of the disk to be restored carried in the restoration request; Sending a recovery instruction to the VMware server, wherein the recovery instruction includes the disk data to be recovered, so that the VMware server recovers the disk data to be recovered according to the recovery instruction.
4. The method for backing up disk data of a virtual machine according to claim 3, characterized in that: Before receiving the disk data to be restored sent by the second server, the method further includes: Receive the metadata file of the disk to be restored sent by the second server, and send the metadata file of the disk to be restored to the VMware server.
5. A method for backing up disk data of a virtual machine, characterized in that: Applied to VMware server; the method comprises: Sending a disk backup identifier to a third server; Receive a first instruction sent by a first server, wherein the first server supports a VMware virtual machine function, and the first instruction includes a disk identifier of a disk to be backed up and the disk backup identifier, and the disk backup identifier is obtained by the second server from the third server and forwarded to the first server; The disk data corresponding to the disk backup identifier in the disk to be backed up determined according to the disk identifier; The disk data is sent to the first server, so that the first server sends the disk data to the second server.
6. The method for backing up disk data of a virtual machine according to claim 5, characterized in that: Before receiving the first instruction sent by the first server, the method further includes: receiving a second instruction sent by the first server, wherein the second instruction includes the disk identifier; A metadata file of the disk to be backed up determined according to the disk identifier; Send the metadata file of the disk to be backed up to the first server.
7. The method for backing up disk data of a virtual machine according to claim 5, characterized in that: After sending the disk data to the first server, the method further includes: receiving a recovery instruction sent by the first server, wherein the recovery instruction includes disk data to be recovered, and the disk data to be recovered is determined by the second server according to the number identification information of the recovery disk carried in the recovery request after receiving the recovery request sent by the third server; The disk data to be restored is restored according to the restoration instruction.
8. The method for backing up disk data of a virtual machine according to claim 7, characterized in that: Before receiving the recovery instruction sent by the first server, the method further includes: The metadata file of the disk to be restored sent by the first server is received, wherein the metadata file of the disk to be restored is sent by the second server to the first server.
9. A server, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the disk data backup method for a virtual machine as described in any one of claims 1-4, or implement the disk data backup method for a virtual machine as described in any one of claims 5-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the disk data backup method of a virtual machine according to any one of claims 1-4, or to implement the disk data backup method of a virtual machine according to any one of claims 5-8 when executed.