Virtual machine backup method, computing device and computer storage medium

The virtual machine backup method, which performs data copying and synchronization at the storage device level, solves the problem of resource consumption during virtual machine backup, ensures that the running performance of virtual machines is not affected, and achieves stable and efficient data backup.

WO2024255440A1PCT designated stage expired Publication Date: 2024-12-19ALIBABA CLOUD COMPUTING CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/088911
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-14
Filing Date
2024-04-19
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

In a cloud computing environment, during virtual machine backup, the running of the data backup thread consumes virtual machine resources, leading to a decrease in virtual machine performance.

Method used

By receiving virtual machine backup requests from the control server, determining the corresponding storage device for the virtual machine, and performing data copying and synchronization at the storage device level, data backup is achieved without occupying virtual machine memory.

Benefits of technology

Data backup is completed without affecting the virtual machine's performance, thus improving the stability and reliability of the virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024088911_19122024_PF_FP_ABST
    Figure CN2024088911_19122024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a virtual machine backup method, a computing device and a computer storage medium. The virtual machine backup method is applied to a control server, and the control server establishes a connection with a first virtual machine. The method comprises: receiving a virtual machine backup request, wherein the virtual machine backup request comprises a virtual machine identifier of the first virtual machine; on the basis of the virtual machine identifier, determining a first storage device corresponding to the first virtual machine, wherein the first storage device is used for storing first data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying said first data from the first storage device to the second storage device. According to the technical solution provided by the embodiments of the present application, the memory of a virtual machine does not need to be occupied, so that the operating performance of the virtual machine is not affected by a data backup process.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual machine backup method, computing device, and computer storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 14, 2023, with application number 202310707340.7 and invention name “Virtual Machine Backup Method, Computing Device and Computer Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a virtual machine backup method, a computing device, and a computer storage medium. Background Art

[0003] A cloud computing platform is a platform that can provide computing and storage services. It is usually composed of a cloud server cluster. With the rapid development of technology, cloud computing has brought convenient services to daily life and is widely used in various fields.

[0004] In a cloud computing environment, user services run in virtual machines. However, the instability of the cloud computing environment affects the stability and reliability of computing resource supply. As a result, sudden virtual machine failures can lead to problems such as user service interruptions. Therefore, in order to protect the normal operation of user services, virtual machines are backed up.

[0005] In the related art, a data backup thread is usually run in a virtual machine, and the data to be backed up of the virtual machine is read by the data backup thread, and the data to be backed up is sent to a backup storage device for storage.

[0006] In the process of realizing the concept of the present application, the inventors discovered that in the related art backup method of running a data backup thread in a virtual machine, the running of the backup thread consumes the running resources of the virtual machine, resulting in a reduction in the running performance of the virtual machine.

[0007] Summary of the Invention

[0008] Embodiments of the present application provide a virtual machine backup method, apparatus, computing device, and computer storage medium.

[0009] In a first aspect, an embodiment of the present application provides a virtual machine backup method, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the method includes: receiving a virtual machine backup request, the virtual machine backup request including a virtual machine identifier of the first virtual machine; determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying the first data to be backed up from the first storage device to the second storage device.

[0010] In the second aspect, an embodiment of the present application provides a virtual machine backup method, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the method includes: receiving a virtual machine backup request, the virtual machine backup request including a virtual machine identifier of the first virtual machine; determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first financial data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying the first financial data to be backed up from the first storage device to the second storage device.

[0011] In the third aspect, an embodiment of the present application provides a virtual machine backup device, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the device includes: a first request receiving module, which is used to receive a virtual machine backup request, and the virtual machine backup request includes a virtual machine identifier of the first virtual machine; a first determination module, which is used to determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, and the first storage device is used to store the first data to be backed up of the first virtual machine; a second determination module, which is used to determine a second storage device corresponding to the first storage device; and a first backup module, which is used to copy the first data to be backed up from the first storage device to the second storage device.

[0012] In a fourth aspect, an embodiment of the present application provides a virtual machine backup device, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the device includes: a second request receiving module, which is used to receive a virtual machine backup request, and the virtual machine backup request includes a virtual machine identifier of the first virtual machine; a third determination module, which is used to determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, and the first storage device is used to store the first financial data to be backed up of the first virtual machine; a fourth determination module, which is used to determine a second storage device corresponding to the first storage device; and a second backup module, which is used to copy the first financial data to be backed up from the first storage device to the second storage device.

[0013] In a fifth aspect, an embodiment of the present application provides a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the virtual machine backup method provided in an embodiment of the present application.

[0014] In a sixth aspect, an embodiment of the present application provides a computer storage medium storing a computer program. When the computer program is executed by a computer, the virtual machine backup method provided in the embodiment of the present application is implemented.

[0015] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in this application and should not be construed as limiting the scope of this application.

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] FIG1 schematically shows a flow chart of a virtual machine backup method provided by an embodiment of the present application.

[0019] FIG2 schematically shows a diagram of a virtual machine backup method provided in an embodiment of the present application.

[0020] FIG3 schematically shows a schematic diagram of backup control provided in an embodiment of the present application.

[0021] FIG4 schematically shows a block diagram of a virtual machine backup device provided in an embodiment of the present application.

[0022] FIG5 schematically shows a block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0024] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0025] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0026] A cloud computing platform is a platform that can provide computing and storage services. It is usually composed of a cloud server cluster. With the rapid development of technology, cloud computing has brought convenient services to daily life and is widely used in various fields.

[0027] In a cloud computing environment, user services run in virtual machines. However, the instability of the cloud computing environment affects the stability and reliability of computing resource supply. As a result, sudden virtual machine failures can lead to problems such as user service interruptions. Therefore, in order to protect the normal operation of user services, virtual machines are backed up.

[0028] In the related art, a data backup thread is usually run in a virtual machine, and the data to be backed up of the virtual machine is read by the data backup thread, and the data to be backed up is sent to a backup storage device for storage.

[0029] In the process of realizing the concept of the present application, the inventors discovered that in the related art backup method of running a data backup thread in a virtual machine, the running of the backup thread consumes the running resources of the virtual machine, resulting in a reduction in the running performance of the virtual machine.

[0030] In order to solve the technical problems existing in the related technology, an embodiment of the present application provides a virtual machine backup method, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the virtual machine backup method adopts: receiving a virtual machine backup request, the virtual machine backup request includes a virtual machine identifier of the first virtual machine; determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device is used to store the first data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying the first data to be backed up from the first storage device to the second storage device. The virtual machine backup method provided in the embodiment of the present application is executed by the control server, and the backup data is directly copied and synchronized at the underlying storage device level without occupying the memory of the virtual machine, so that the operating performance of the virtual machine is not affected by the data backup process.

[0031] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0032] Figure 1 schematically shows a flowchart of a virtual machine backup method provided by an embodiment of the present application, which is applied to a control server to establish a connection with a first virtual machine; as shown in Figure 1, the virtual machine backup method may include the following steps: 101, receiving a virtual machine backup request, the virtual machine backup request including a virtual machine identifier of the first virtual machine; 102, determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first data to be backed up of the first virtual machine; 103, determining a second storage device corresponding to the first storage device; 104, copying the first data to be backed up from the first storage device to the second storage device.

[0033] In an embodiment of the present application, a virtual machine backup request can be triggered by a user. There are various ways for a user to trigger a virtual machine backup request. In one embodiment, the user triggers the request through the virtual machine operating system. There are various ways to trigger the request, such as by clicking a data backup control on the operating system, by controlling a smart wearable device, or by voice, gesture, etc., which are not limited here.

[0034] In an embodiment of the present application, the virtual machine backup request can be generated immediately after being triggered by the user, or it can be generated according to the backup time set by the user. For example, if the user chooses to back up data at 8 pm, the virtual machine backup request is generated at 8 pm, or the backup request is generated according to the periodic backup time set by the user. For example, the user sets a backup once a day, and each backup time is 3 am. The time of the first backup cycle set by the user is 3 am on March 1, 2023, then the virtual machine backup request is generated at 3 am on March 1, 2023.

[0035] According to an embodiment of the present application, when triggering a virtual machine backup request, the user may trigger the virtual machine backup request on the first virtual machine that needs to be backed up, or may trigger the backup request for the first virtual machine in other virtual machines.

[0036] According to an embodiment of the present application, after the user triggers a virtual machine backup request, the virtual machine identifier of the first virtual machine to be backed up may be written into the virtual machine backup request, and then the virtual machine backup request may be sent to the control server.

[0037] According to an embodiment of the present application, after receiving the virtual machine backup request, the control server can parse the virtual machine backup request and obtain a virtual machine identifier to determine the first virtual machine that needs to be backed up.

[0038] According to an embodiment of the present application, the first storage device can be implemented as a cloud storage device or a local storage device, and the first storage device can establish a connection with the control server to receive operation instructions sent by the control server.

[0039] According to an embodiment of the present application, the first storage device may store data in the form of block storage, but is not limited thereto, and may also store data in the form of object storage, file storage, etc.

[0040] According to an embodiment of the present application, the first storage device may be a system disk of the first virtual machine, which may be used to store the operating system, application programs and configuration files of the first virtual machine, as well as data generated during operation or required for operation of the first virtual machine.

[0041] According to an embodiment of the present application, the correspondence between the first virtual machine and the first storage device can be pre-registered to the control server. Thus, after receiving the virtual machine backup request, the control server can determine the first storage device corresponding to the first virtual machine based on the pre-stored correspondence, thereby backing up the first data to be backed up stored in the first storage device.

[0042] According to an embodiment of the present application, when backing up the first data to be backed up, it can be implemented by synchronizing the second data to be backed up to the second storage device.

[0043] According to an embodiment of the present application, the second storage device can be a storage device that has pre-created a master-slave relationship with the first storage device. For example, the first storage device is the master storage device, which reads and writes data as the system disk of the first virtual machine, and the second storage device is the slave storage device of the first storage device, which is responsible for receiving and storing data synchronized from the first storage device.

[0044] According to an embodiment of the present application, when copying the first data to be backed up from the first storage device to the second storage device, it can be specifically implemented as follows: copying the first data to be backed up to obtain first copy data; and storing the first copy data in the second storage device.

[0045] In the implementation process of the virtual machine backup method provided in the embodiment of the present application, it is only necessary to use the first virtual machine to generate and send a virtual machine backup request, and then the control server side manages and controls the virtual machine backup, so that the backup process can be carried out at the storage device level without occupying the operating resources of the first virtual machine.

[0046] According to an embodiment of the present application, copying the first data to be backed up from the first storage device to the second storage device can be specifically implemented as follows: backing up the first data to be backed up to obtain snapshot data; and sending the snapshot data to the second storage device.

[0047] According to an embodiment of the present application, when backing up the first data to be backed up, a snapshot of the entire first data to be backed up stored in the first storage device can be taken to obtain snapshot data. The snapshot data can be a record of the data state of the first storage device at a certain point in time. The snapshot data can only record data that has changed on the first storage device. This can be achieved by creating a pointer or metadata.

[0048] According to an embodiment of the present application, after sending the snapshot data to the second storage device, the virtual machine backup method also includes: determining whether the first storage device meets the first backup condition; when the first storage device meets the first backup condition, determining the incremental data of the first storage device; backing up the incremental data to obtain incremental snapshot data; and sending the incremental snapshot data to the second storage device.

[0049] According to an embodiment of the present application, the first backup condition may include, for example, a time condition and a data volume condition. The time condition may include, for example, whether the time since the last backup is greater than a preset time period or whether a specified time point has been reached; the data volume condition may include, for example, whether the incremental data reaches a preset data volume.

[0050] According to an embodiment of the present application, after backing up the full amount of data stored in the first storage device, i.e., the first data to be backed up, the first storage device can be continuously backed up. For example, the incremental data of the first storage device can be backed up. For example, the full amount of data stored in the first storage device includes data A, data B, and data C. After data A, data B, and data C are backed up, data D is written to the first storage device. In this case, data D can be the incremental data of the first storage device. On this basis, data D can be backed up.

[0051] According to an embodiment of the present application, when performing incremental data backup on a first storage device, a snapshot of the incremental data can be taken to obtain incremental snapshot data, and the incremental snapshot data can be stored in a second storage device to ensure data consistency between the second storage device and the first storage device.

[0052] According to an embodiment of the present application, after receiving a virtual machine backup request, the virtual machine backup method also includes: creating a second storage device in response to the virtual machine backup request; creating a first backup relationship between the first storage device and the second storage device; determining the second storage device corresponding to the first storage device includes: determining the second storage device corresponding to the first storage device based on the first backup relationship.

[0053] According to an embodiment of the present application, a virtual machine backup request may include backup requirement information, and the backup requirement information may include, for example, storage space requirements, storage performance requirements, storage type requirements, and other information.

[0054] According to an embodiment of the present application, after receiving a virtual machine backup request, the virtual machine backup request can be parsed to obtain backup requirement information, and then a second storage device that can meet the backup requirements of the first virtual machine is created according to the backup requirement information.

[0055] According to an embodiment of the present application, after the second storage device is created and generated, the access interface of the second storage device may be exposed to the first storage device, so that the first storage device can transmit data using the access interface.

[0056] According to an embodiment of the present application, the first backup relationship is used to indicate the backup direction from the first storage device to the second storage device. By establishing the first backup relationship, a master-slave relationship between the first storage device and the second storage device can be determined. The first storage device is the master storage device, which reads and writes data as the system disk of the first virtual machine, and the second storage device is the slave storage device of the first storage device, responsible for receiving and storing data synchronized from the first storage device.

[0057] According to an embodiment of the present application, the virtual machine backup method also includes: receiving a backup relationship switching instruction; pausing the synchronization process of the backup data in response to the backup relationship switching instruction; switching the first backup relationship to a second backup relationship, the second backup relationship being used to indicate the backup direction from the second storage device to the first storage device; in response to the backup relationship switching to the second backup relationship, copying the second data to be backed up stored in the second storage device to the first storage device.

[0058] According to an embodiment of the present application, switching the backup relationship involves switching the master-slave relationship between the first storage device and the second storage device, switching the first storage device from a master storage device to a slave storage device, and switching the second storage device from a slave storage device to a master storage device. In the second backup relationship, the second storage device serves as the master storage device, reading and writing data as the system disk of the first virtual machine, while the first storage device serves as the slave storage device of the second storage device, responsible for receiving and storing data synchronized from the second storage device.

[0059] According to an embodiment of the present application, pausing the synchronization process of the backup data can be achieved by controlling the server to send a pause instruction to the first storage device and the second storage device respectively.

[0060] According to an embodiment of the present application, after the pause instruction reaches the first storage device and the second storage device, the master-slave relationship between the first storage device and the second storage device will be suspended, and the data synchronization process between the first storage device and the second storage device will be suspended.

[0061] According to an embodiment of the present application, the synchronization process of pausing data between the first storage device and the second storage device may refer to the suspension of the passing process of the incremental data generated after the pause instruction reaches the first storage device and the second storage device, and the data synchronization process that has been started before the pause instruction reaches the first storage device and the second storage device will continue to be executed.

[0062] According to an embodiment of the present application, the virtual machine backup method also includes: receiving a backup configuration instruction; pausing the synchronization process of the backup data in response to the backup configuration instruction; performing corresponding configuration operations on the synchronization process of the backup data based on the backup configuration instruction; and starting the synchronization process of the backup data in response to completion of the configuration operation.

[0063] According to an embodiment of the present application, the backup configuration instruction may be used to modify the RPO (Recovery Point Object), bandwidth, etc. during the data synchronization process.

[0064] According to the embodiments of the present application, when modifying configurations such as RPO and bandwidth, it is usually necessary to first stop the synchronization relationship to ensure data integrity and consistency. This is because during the synchronization process, there will be a certain amount of data delay between the first storage device and the second storage device. If the RPO and bandwidth configurations of the synchronization relationship are modified during this process, data may be lost or incomplete during transmission, thereby affecting the normal operation of the application and data integrity. Therefore, it is possible to stop the synchronization relationship first and then modify the relevant configurations.

[0065] According to an embodiment of the present application, receiving a backup relationship switching instruction may be specifically implemented as: receiving a backup relationship switching instruction sent by a user.

[0066] In an embodiment of the present application, the backup relationship switching instruction can be triggered by the user. There are multiple ways for the user to trigger the backup relationship switching instruction. In one embodiment, the user triggers it through the virtual machine operating system. There are multiple ways to trigger it, such as by the user clicking the relationship switching control of the operating system, by the control of a smart wearable device, or by voice, gesture, etc., which are not limited here.

[0067] According to another embodiment of the present application, receiving the backup relationship switching instruction may be specifically implemented as: receiving the backup relationship switching instruction triggered after a failure of the first storage device is detected.

[0068] According to an embodiment of the present application, after the first storage device fails, data writing and reading functions of the first storage device may become abnormal. At this time, the failed first storage device may cause the service running in the first virtual machine to become abnormal.

[0069] According to an embodiment of the present application, the first virtual machine can detect the operating status of the first storage device and generate a backup relationship switching instruction after detecting a failure of the first storage device.

[0070] According to an embodiment of the present application, after copying the first data to be backed up from the first storage device to the second storage device, the virtual machine backup method also includes: in the event of a failure of the first storage device, terminating the correspondence between the first virtual machine and the first storage device; and creating a correspondence between the first virtual machine and the second storage device.

[0071] According to an embodiment of the present application, after the first data to be backed up is copied from the first storage device to the second storage device, data consistency between the first storage device and the second storage device can be guaranteed.

[0072] According to an embodiment of the present application, a failure of the first storage device may cause abnormalities in the data writing and reading functions of the first storage device. In this case, the failed first storage device may cause abnormalities in the services running in the first virtual machine. Because the first storage device and the second storage device have data consistency, the second storage device can be directly configured as the system disk of the first virtual machine, and the data of the second storage device can be used to support the operation of the first virtual machine.

[0073] According to an embodiment of the present application, in response to a virtual machine backup request, creating a second storage device can be specifically implemented as follows: in response to the virtual machine backup request, determining the first area where the first storage device is located; and creating a second storage device in a second area different from the first area.

[0074] According to an embodiment of the present application, the first area and the second area may refer to different geographical areas, that is, the first storage device and the second storage device may operate in computer rooms located in different geographical areas.

[0075] According to an embodiment of the present application, by creating a second storage device in a second area different from the first area, the risk of simultaneous failure of the first storage device and the second storage device can be reduced.

[0076] FIG2 schematically shows a diagram of a virtual machine backup method provided in an embodiment of the present application.

[0077] In FIG. 2 , 201 may represent a first area, 202 may represent a second area, 203 may represent a control server, 204 may represent a first virtual machine, 2041 may represent a first storage device corresponding to the first virtual machine 204 , and 205 may be a second storage device.

[0078] As shown in FIG2 , the first storage device 2041 is deployed in the first area, and the second storage device 205 is deployed in the second area.

[0079] The first virtual machine 204 may send a virtual machine backup request to the control server 203. After receiving the virtual machine backup request, the control server 203 may determine the first storage device 2041 corresponding to the first virtual machine 204 and the second storage device 205 corresponding to the first storage device 2041.

[0080] Then, the control server 203 may instruct the first storage device 2031 to take a snapshot of the first data to be backed up stored therein, generate first snapshot data, and then back up the first snapshot data to the second storage device 205 .

[0081] According to an embodiment of the present application, the virtual machine backup method also includes: receiving a backup relationship termination instruction; pausing the synchronization process of the backup data in response to the backup relationship termination instruction; and cutting off the first backup relationship to terminate the backup data synchronization process from the first storage device to the second storage device.

[0082] FIG3 schematically shows a schematic diagram of backup control provided in an embodiment of the present application.

[0083] During the initialization phase, the control server can create a first storage device and a second storage device, and establish a synchronization pair relationship between the first storage device and the second storage device. This synchronization pair relationship allows the first storage device and the second storage device to synchronize data with each other. For example, the synchronization pair can be a master-slave synchronization pair relationship, with the first storage device set as the master storage device and the second storage device set as the slave storage device.

[0084] After the synchronization pair relationship is successfully created, the synchronization pair relationship can be activated by the control server. After activation, the synchronization pair relationship can be in an active state, that is, data synchronization can be performed.

[0085] During the data synchronization process, abnormal events may occur. For example, an abnormal event may occur when the first storage device fails. In this case, the data backup is in an abnormal state due to the failure of the first storage device. In this case, the synchronization relationship can be switched, that is, the first storage device is switched to the slave storage device and the second storage device is switched to the master storage device.

[0086] During the data synchronization process, the synchronization pair relationship can be paused, that is, the data synchronization process can be paused. When data synchronization is paused, synchronization configuration operations, master-slave relationship switching operations, etc. can be performed. Moreover, when the synchronization configuration operations and master-slave relationship switching operations are completed, the synchronization pair relationship can be switched to the active state to continue the data synchronization process.

[0087] When the synchronization pair relationship is suspended or an abnormal event occurs, the control server can delete the first storage device, the second storage device or the synchronization relationship.

[0088] Through FIG3 above, the embodiment of the present application proposes a data backup control method, so that the data backup can cope with possible abnormal situations and improve the efficiency of data backup.

[0089] An embodiment of the present application also provides a virtual machine backup method, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the method includes: receiving a virtual machine backup request, the virtual machine backup request including a virtual machine identifier of the first virtual machine; determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first financial data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying the first financial data to be backed up from the first storage device to the second storage device.

[0090] An embodiment of the present application provides a virtual machine backup method, which is applied to a control server, and the control server establishes a connection with a first virtual machine; the virtual machine backup method adopts: receiving a virtual machine backup request, the virtual machine backup request includes a virtual machine identifier of the first virtual machine; determining a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first data to be backed up of the first virtual machine; determining a second storage device corresponding to the first storage device; and copying the first data to be backed up from the first storage device to the second storage device. The virtual machine backup method provided in the embodiment of the present application is executed by the control server, and the backup data is directly copied and synchronized at the underlying storage device level without occupying the memory of the virtual machine, so that the operating performance of the virtual machine is not affected by the data backup process.

[0091] Figure 4 schematically shows a block diagram of a virtual machine backup device 400 provided in an embodiment of the present application, which is applied to a control server to establish a connection with a first virtual machine; as shown in Figure 4, the virtual machine backup device may include: a first request receiving module 401, used to receive a virtual machine backup request, the virtual machine backup request including a virtual machine identifier of the first virtual machine; a first determination module 402, used to determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, the first storage device being used to store first data to be backed up of the first virtual machine; a second determination module 403, used to determine a second storage device corresponding to the first storage device; a first backup module 404, used to copy the first data to be backed up from the first storage device to the second storage device.

[0092] According to an embodiment of the present application, the first backup module 404 includes: a first snapshot submodule, configured to back up the first data to be backed up to obtain snapshot data; and a first data sending submodule, configured to send the snapshot data to the second storage device.

[0093] According to an embodiment of the present application, the virtual machine backup device 400 also includes: a first judgment module, used to determine whether the first storage device meets the first backup condition; an incremental data determination module, used to determine the incremental data of the first storage device when the first storage device meets the first backup condition; an incremental backup module, used to back up the incremental data to obtain incremental snapshot data; and a first data sending module, used to send the incremental snapshot data to the second storage device.

[0094] According to an embodiment of the present application, the virtual machine backup apparatus 400 further includes: a storage device creation module for creating a second storage device in response to a virtual machine backup request; and a first relationship creation module for creating a first backup relationship between the first storage device and the second storage device.

[0095] According to an embodiment of the present application, the second determination module 403 includes: a first determination submodule, configured to determine a second storage device corresponding to the first storage device based on the first backup relationship.

[0096] According to an embodiment of the present application, the first backup relationship is used to indicate a backup direction from the first storage device to the second storage device.

[0097] According to an embodiment of the present application, the virtual machine backup device 400 also includes: a first instruction receiving module for receiving a backup relationship switching instruction; a first pause module for pausing the synchronization process of the backup data in response to the backup relationship switching instruction; a relationship switching module for switching the first backup relationship to a second backup relationship, the second backup relationship being used to indicate the backup direction from the second storage device to the first storage device; and a copy module for copying the second data to be backed up stored in the second storage device to the first storage device in response to the backup relationship switching to the second backup relationship.

[0098] According to an embodiment of the present application, the virtual machine backup device 400 also includes: a second instruction receiving module for receiving a backup configuration instruction; a second pause module for pausing the synchronization process of the backup data in response to the backup configuration instruction; a configuration module for performing corresponding configuration operations on the synchronization process of the backup data based on the backup configuration instruction; and a backup start module for starting the synchronization process of the backup data in response to the completion of the configuration operation.

[0099] According to an embodiment of the present application, the second instruction receiving module includes: a first instruction receiving submodule, used to receive a backup relationship switching instruction sent by a user; or, a second instruction receiving submodule, used to receive a backup relationship switching instruction triggered after detecting a failure of the first storage device.

[0100] According to an embodiment of the present application, the virtual machine backup device 400 also includes: a first relationship termination module, used to terminate the correspondence between the first virtual machine and the first storage device when the first storage device fails; and a second relationship creation module, used to create a correspondence between the first virtual machine and the second storage device.

[0101] According to an embodiment of the present application, the storage device creation module includes: a first area determination unit, used to determine the first area where the first storage device is located in response to a virtual machine backup request; and a storage device creation unit, used to create a second storage device in a second area different from the first area.

[0102] According to an embodiment of the present application, the virtual machine backup device 400 also includes: a third instruction receiving module for receiving a backup relationship termination instruction; a synchronization temporary module for suspending the synchronization process of the backup data in response to the backup relationship termination instruction; and a second relationship termination module for cutting off the first backup relationship to terminate the backup data synchronization process from the first storage device to the second storage device.

[0103] The virtual machine backup device shown in FIG4 can execute the virtual machine backup method described in the embodiment shown in FIG1. ​​The implementation principle and technical effects thereof are not further described. The specific manner in which the various modules and units of the virtual machine backup device in the above embodiment perform operations has been described in detail in the embodiment of the method and will not be further elaborated here.

[0104] An embodiment of the present application also provides a virtual machine backup device, which is applied to a control server to establish a connection with a first virtual machine; the virtual machine backup device may include: a second request receiving module, which is used to receive a virtual machine backup request, and the virtual machine backup request includes a virtual machine identifier of the first virtual machine; a third determination module, which is used to determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, and the first storage device is used to store first financial data to be backed up of the first virtual machine; a fourth determination module, which is used to determine a second storage device corresponding to the first storage device; and a second backup module, which is used to copy the first financial data to be backed up from the first storage device to the second storage device.

[0105] In one possible design, the virtual machine backup apparatus provided in an embodiment of the present application can be implemented as a computing device, as shown in Figure 5, which may include a storage component 501 and a processing component 502; the storage component 501 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 502 to implement the virtual machine backup method provided in an embodiment of the present application.

[0106] Of course, a computing device may also include other components, such as input / output interfaces and communication components. The input / output interface provides an interface between the processing component and peripheral interface modules, such as output devices and input devices. The communication component is configured to facilitate wired or wireless communication between the computing device and other devices.

[0107] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0108] When the computing device is a physical device, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device.

[0109] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the virtual machine backup method provided in an embodiment of the present application.

[0110] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a computer, can implement the virtual machine backup method provided in an embodiment of the present application.

[0111] The processing components in the above embodiments may include one or more processors to execute computer instructions to complete all or part of the steps in the above methods. Of course, the processing components may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0112] The memory component is configured to store various types of data to support operations in the device. The memory component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0113] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0115] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A virtual machine backup method, applied to a control server, wherein the control server establishes a connection with a first virtual machine; the method comprises: Receive a virtual machine backup request, wherein the virtual machine backup request includes a virtual machine identifier of a first virtual machine; Determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, where the first storage device is used to store first data to be backed up of the first virtual machine; Determining a second storage device corresponding to the first storage device; The first data to be backed up is copied from the first storage device to the second storage device.

2. The method according to claim 1, wherein: The step of copying the first data to be backed up from the first storage device to the second storage device comprises: Backing up the first data to be backed up to obtain snapshot data; The snapshot data is sent to the second storage device.

3. The method according to claim 2, wherein: After sending the snapshot data to the second storage device, the method further includes: Determining whether the first storage device meets a first backup condition; In a case where the first storage device satisfies the first backup condition, determining incremental data of the first storage device; Backing up the incremental data to obtain incremental snapshot data; The incremental snapshot data is sent to the second storage device.

4. The method according to claim 1, wherein: After receiving the virtual machine backup request, the method further includes: In response to the virtual machine backup request, creating the second storage device; Creating a first backup relationship between the first storage device and the second storage device; The determining a second storage device corresponding to the first storage device comprises: Based on the first backup relationship, a second storage device corresponding to the first storage device is determined.

5. The method according to claim 4, wherein: The first backup relationship is used to indicate a backup direction from the first storage device to the second storage device; the method further includes: Receiving a backup relationship switching instruction; In response to the backup relationship switching instruction, pausing the synchronization process of the backup data; Switching the first backup relationship to a second backup relationship, where the second backup relationship is used to indicate a backup direction from the second storage device to the first storage device; In response to the backup relationship being switched to the second backup relationship, the second data to be backed up stored in the second storage device is copied to the first storage device.

6. The method according to claim 4, wherein: The method further comprises: Receive backup configuration instructions; In response to the backup configuration instruction, pausing the synchronization process of the backup data; The synchronization process of the backup data performs corresponding configuration operations based on the backup configuration instructions; In response to the configuration operation being completed, a synchronization process of the backup data is started.

7. The method according to claim 5, wherein: The receiving of the backup relationship switching instruction comprises: Receiving the backup relationship switching instruction sent by the user; or, The backup relationship switching instruction triggered after a failure of the first storage device is detected is received.

8. The method according to claim 1, wherein: After copying the first data to be backed up from the first storage device to the second storage device, the method further includes: In the event of a failure of the first storage device, terminating the correspondence between the first virtual machine and the first storage device; A correspondence between the first virtual machine and the second storage device is created.

9. The method according to claim 4, wherein: The creating the second storage device in response to the virtual machine backup request includes: In response to the virtual machine backup request, determining a first area where the first storage device is located; The second storage device is created in a second area that is geographically different from the first area.

10. The method according to claim 4, wherein: The method further comprises: receiving a backup relationship termination instruction; In response to the backup relationship termination instruction, pausing the synchronization process of the backup data; The first backup relationship is severed to terminate the backup data synchronization process from the first storage device to the second storage device.

11. A virtual machine backup method, applied to a control server, wherein the control server establishes a connection with a first virtual machine; the method comprises: Receive a virtual machine backup request, wherein the virtual machine backup request includes a virtual machine identifier of a first virtual machine; Determine a first storage device corresponding to the first virtual machine based on the virtual machine identifier, where the first storage device is used to store first financial data to be backed up of the first virtual machine; Determining a second storage device corresponding to the first storage device; The first financial data to be backed up is copied from the first storage device to the second storage device.

12. A computing device comprising a processing component and a storage component; The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the virtual machine backup method as described in any one of claims 1 to 10, or to implement the virtual machine backup method as shown in claim 11.

13. A computer storage medium storing a computer program, wherein when the computer program is executed by a computer, the virtual machine backup method according to any one of claims 1 to 10 is implemented, or the virtual machine backup method according to claim 11 is implemented.

Citation Information

Patent Citations

  • Virtual machine backup method and device

    CN106776113A

  • Virtual machine data protection method in cloud platform environment

    CN106815095A

  • Backup method, device and system for virtual machine data

    CN111382008A

  • Virtual machine backup method and component and cloud computing system

    CN111651305A

  • Data backup method and device based on virtual machine, and computer equipment

    CN112395133A