Virtual machine backup methods, apparatus, computer equipment, readable storage media, and program products

By receiving global backup tasks sent by the management server in the failover cluster, determining the local backup virtual machine set based on the comparison results between the global virtual machine set and the virtual machines running on the current node, and automatically executing backup operations, a master-slave coordination architecture is established to coordinate and synchronize state information, which solves the problem of low efficiency in the prior art and improves backup efficiency and reliability.

CN120909847BActive Publication Date: 2026-03-13GUANGZHOU DINGJIA COMPUTER TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The existing virtual machine backup method requires administrators to manually confirm the VM distribution and adjust node tasks, resulting in low efficiency.

Method used

By receiving global backup tasks sent by the management server, the local backup virtual machine set is determined based on the comparison results between the global virtual machine set and the virtual machines running on the current node, and the backup operation is automatically executed. A master-slave coordination architecture is established to coordinate and synchronize status information.

Benefits of technology

It achieves reliability and accuracy of virtual machine backup in dynamic environments, improves the backup efficiency of failover clusters, simplifies management complexity, and reduces manual location and task allocation steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909847B_ABST
    Figure CN120909847B_ABST
Patent Text Reader

Abstract

This application relates to a virtual machine backup method, apparatus, computer device, computer-readable storage medium, and computer program product, belonging to the field of virtual machine technology, and can improve virtual machine backup efficiency. The method includes: receiving a global backup task, which is sent by a management server to one or more nodes in a failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster; determining a local backup set of virtual machines for the current node based on a comparison between the global set of virtual machines and the virtual machines running on the current node; and performing backup operations on the virtual machines in the local backup set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual machine technology, and in particular to a virtual machine backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] In a failover cluster, virtual machines (VMs) can be dynamically migrated between different host nodes to achieve high availability. Backups of these VMs rely on agents installed on each node. One existing backup method involves the administrator manually identifying the specific node where the VM to be backed up is located, and then operating the agent on that node to complete the backup.

[0003] However, this method requires the administrator to repeatedly check the distribution of VMs and manually adjust the tasks on each node before each backup, which is a very tedious and inefficient process. Summary of the Invention

[0004] Therefore, it is necessary to provide a virtual machine backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0005] Firstly, this application provides a virtual machine backup method applied to nodes in a failover cluster, including:

[0006] Receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0007] Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the local backup virtual machine set of the current node is determined.

[0008] Perform a backup operation on the virtual machines in the local backup virtual machine set.

[0009] In one embodiment, after determining the local backup virtual machine set of the current node based on the comparison result between the global virtual machine set and the virtual machines running on the current node, the method further includes:

[0010] If the local backup virtual machine set is not empty, a master node role request is sent to the management server. The master node role request is used to apply for the master node role to coordinate backup tasks and synchronize status information in this backup task.

[0011] The step of performing a backup operation on the virtual machines in the local backup virtual machine set includes:

[0012] The system receives the master node identifier returned by the management server in response to the master node role request, and performs backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier. The master node identifier is generated by the management server after designating the node that sent the first master node role request as the master node for this backup task based on the first master node role request received.

[0013] In one embodiment, performing a backup operation on the virtual machines in the local backup virtual machine set based on the master node identifier includes:

[0014] Based on the master node identifier, determine whether the current node is a master node;

[0015] If the current node is not the master node, then the backup operation is performed on the virtual machine of the current node, and status information representing the real-time progress of the backup operation is sent to the master node identifier corresponding to the master node.

[0016] In one embodiment, the step of performing a backup operation on the virtual machines in the local backup virtual machine set based on the master node identifier further includes:

[0017] If the current node is the master node, a backup operation is performed on the virtual machine of the current node, and if a non-master node exists, the status information sent by the non-master node is received, and the received status information is synchronized and integrated.

[0018] In one embodiment, after receiving the status information sent by the non-master node and synchronizing and integrating the received status information in the absence of a master node, the method further includes:

[0019] Obtain the update duration of the status information of the non-master node;

[0020] If the update duration of the status information of the non-master node is greater than a preset duration threshold, then the non-master node is identified as a timeout fault node.

[0021] Generate a fault alarm message containing the identifier of the timeout fault node, and send the fault alarm message to the management server.

[0022] In one embodiment, after performing the backup operation on the virtual machines in the local backup virtual machine set, the method further includes:

[0023] The local task execution result, including the backup success or failure status, is sent to the management server so that the management server can determine the backup result of the global backup task after receiving the task execution result of the global backup task.

[0024] Secondly, this application also provides a virtual machine backup device, applied to nodes in a failover cluster, comprising:

[0025] A backup task receiving module is used to receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0026] The backup virtual machine determination module is used to determine the local backup virtual machine set of the current node based on the comparison results between the global virtual machine set and the virtual machines running on the current node.

[0027] The backup execution module is used to perform backup operations on the virtual machines in the local backup virtual machine set.

[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0029] Receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0030] Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the local backup virtual machine set of the current node is determined.

[0031] Perform a backup operation on the virtual machines in the local backup virtual machine set.

[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0033] Receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0034] Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the local backup virtual machine set of the current node is determined.

[0035] Perform a backup operation on the virtual machines in the local backup virtual machine set.

[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0037] Receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0038] Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the local backup virtual machine set of the current node is determined.

[0039] Perform a backup operation on the virtual machines in the local backup virtual machine set.

[0040] The aforementioned virtual machine backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product receive a global backup task, which is sent by a management server to one or more nodes in the failover cluster. The global backup task indicates a global set of virtual machines to be backed up within the failover cluster. Based on a comparison between the global set of virtual machines and the virtual machines running on the current node, a local backup set of virtual machines for the current node is determined. Backup operations are then performed on the virtual machines in the local backup set. In this application, by having nodes in the failover cluster receive a global backup task for the entire cluster, the management operations for multiple nodes are simplified to centralized configuration of a single logical entity, reducing management complexity. Furthermore, by having each node compare the global task with its locally running virtual machines in real time to determine its backup scope, the inefficient manual location and task allocation processes in existing technologies are automated. This allows for real-time adaptation to the dynamic migration of virtual machines in the cluster, ensuring the reliability and accuracy of backups in dynamic environments. This improves the backup efficiency of the failover cluster while ensuring reliable node backups under distributed management. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1This is a flowchart illustrating a virtual machine backup method in one embodiment;

[0043] Figure 2 A timing diagram for a virtual machine backup method in another embodiment;

[0044] Figure 3 This is a structural block diagram of a virtual machine backup device in one embodiment;

[0045] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0047] The virtual machine backup method provided in this application embodiment can be applied to a system consisting of a management server and a failover cluster composed of multiple nodes. The management server is responsible for unified management and distribution of backup tasks. A failover cluster is an integrated strategy that ensures high availability and uninterrupted operation in critical environments. It involves a configuration of multiple independent computers, i.e., nodes, each running an agent and capable of running one or more virtual machines. Nodes work together to improve the availability and scalability of applications and services. The node agents are interconnected via physical cabling and software. If one or more nodes fail, the remaining nodes can automatically take over the workload (a process called failover) to minimize interruptions. Furthermore, the node agents continuously monitor the health of cluster roles. If the node agents detect any problems, the roles will restart or migrate to another node to maintain seamless operation. This proactive approach by the node agents ensures that services remain consistently available even in the event of hardware or software failures.

[0048] In one exemplary embodiment, such as Figure 1 As shown, a virtual machine backup method is provided. Taking the application of this method on each node (host machine) in a failover cluster as an example, the method includes the following steps S102 to S106. Wherein:

[0049] Step S102: Receive the global backup task.

[0050] A global backup task is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0051] In one embodiment, when the backup process is initiated, an agent installed on a node in the failover cluster can receive global backup tasks sent from the management server through its network interface.

[0052] The global backup task here is a data structure, such as a JSON object or XML file, generated by the management server and broadcast to all or some nodes in the cluster. At its core is a global collection of virtual machines—a list containing unique identifiers (such as VM names or VM IDs) for all virtual machines currently scheduled for backup across the entire failover cluster. Optionally, the task may also include metadata such as task ID, backup policy (such as full or incremental), and target storage path.

[0053] Step S104: Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, determine the local backup virtual machine set of the current node.

[0054] Upon receiving a global backup task, the agent on the node can perform a localized task determination operation. This operation mainly consists of two phases:

[0055] First, the agent retrieves a list of virtual machines running on the current node. This can be achieved by calling the node's local Hyper-V management service interface (e.g., via a Windows management specification query or a PowerShell script) to obtain a list containing only all running VMs on the current physical machine.

[0056] Then, the agent performs a comparison operation. Specifically, this comparison can be an intersection operation of sets: the global set of virtual machines (set A) is compared with the list of locally running virtual machines obtained in the previous step (set B), and the intersection of the two sets is found (C=A∩B). This intersection C is the local backup set of virtual machines, which contains those virtual machines that are required to be backed up by this global task and are running on the current node.

[0057] If the local backup virtual machine set after comparison is empty (i.e., there are no VMs that need to be backed up on the current node), then the main process of the agent program on that node in this global task is over, and no further backup operations are required.

[0058] Step S106: Perform a backup operation on the virtual machines in the local backup virtual machine set.

[0059] Backup is a technical process designed to create data copies for virtual machines. To ensure data consistency for running virtual machines, this operation can employ various techniques. For example, at the Hyper-V level, its built-in checkpointing feature can be used to create a point-in-time snapshot of the virtual machine, and then data can be read and copied based on the disk files of that snapshot. In some implementations, the same data consistency goal can also be achieved by calling the operating system-level Volume Shadow Copy Service (VSS). The backed-up data copies can ultimately be transferred and stored to the target storage location (such as Network Attached Storage (NAS), backup appliances, etc.) specified by the global backup task or agent's preset configuration.

[0060] In this embodiment, by having nodes in the failover cluster receive a global backup task for the entire cluster, the management operations for multiple nodes are simplified to centralized configuration of a single logical entity, reducing management complexity. Furthermore, by having each node compare the global task with its locally running virtual machines in real time to determine its backup scope, the inefficient manual location and task allocation processes in existing technologies are automated. This allows for real-time adaptation to the dynamic migration of virtual machines within the cluster, ensuring the reliability and accuracy of backups in dynamic environments. This improves the backup efficiency of the failover cluster while maintaining reliable node backups under distributed management.

[0061] In an exemplary embodiment, after determining the local backup virtual machine set of the current node based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the method further includes:

[0062] If the local backup virtual machine set is not empty, a master node role request is sent to the management server. The master node role request is used to apply for the master node role to coordinate backup tasks and synchronize status information in this backup task.

[0063] Specifically, after determining the local backup virtual machine set, and assuming the set is not empty, the agent on the node can send a master node role request to the management server. The purpose of the master node role request is to indicate to the management server that the current node has actual backup tasks to be executed, and to request to play the role of master node in this global backup task, in order to be responsible for subsequent backup task coordination and status information synchronization.

[0064] Perform backup operations on the virtual machines in the local backup virtual machine set, including:

[0065] Receive the master node identifier returned by the management server in response to the master node role request, and perform backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier; the master node identifier is generated by the management server after designating the node that sent the first master node role request as the master node for this backup task based on the first master node role request received.

[0066] In one embodiment, the management server can directly designate the sender of the first master node role request received as the master node for this task, and then generate and return the relevant identifier of that master node (such as its IP address or node name) to all nodes that sent the request. Subsequently, the agent program on the node can receive the master node identifier returned by the management server. After receiving this identifier, the node can prepare to perform subsequent backup operations based on it. For example, non-master nodes can use the master node identifier to determine the master node reporting backup progress, while the master node knows the relevant non-master nodes that are responsible for coordination.

[0067] In this embodiment, through the above steps, a dynamic master-slave coordination architecture is established among the nodes with tasks, laying the foundation for efficient and orderly execution of distributed backup and state synchronization.

[0068] In one exemplary embodiment, performing a backup operation on virtual machines in the local backup virtual machine set based on the master node identifier includes:

[0069] Based on the master node identifier, determine whether the current node is the master node; if the current node is not the master node, perform a backup operation on the virtual machine of the current node, and send status information representing the real-time progress of the backup operation to the master node corresponding to the master node identifier.

[0070] Specifically, before performing a backup operation, the agent program on the node can first compare the received master node identifier with its own node identifier to determine whether it is the master node for this task.

[0071] If the determination result is a non-master node, the agent program, while performing backup operations on the local virtual machine, can periodically (e.g., every minute) create a status information data packet and send it to the master node corresponding to the master node identifier. This status information can include the identifier of the VM currently being backed up, the percentage of data transfer completed, etc., to report the backup progress to the master node in real time.

[0072] In this embodiment, by aggregating the progress information of each distributed node to a single master node to form a global task view, the problem of opaque task status in a distributed environment is solved. Simultaneously, since the information is reported to a temporary master node rather than the core management server, the communication and processing load on the management server is effectively reduced, improving the scalability of the entire system.

[0073] In an exemplary embodiment, performing a backup operation on virtual machines in the local backup virtual machine set based on the master node identifier further includes:

[0074] If the current node is the master node, a backup operation is performed on the virtual machine of the current node. If a non-master node exists, the status information sent by the non-master node is received and the received status information is synchronized and integrated.

[0075] Specifically, the node's agent compares the received master node identifier with its own node identifier. If, after evaluation, the agent determines that the current node is the master node for this task, the master node will assume dual responsibilities. On one hand, the node's agent can perform backup operations on its own virtual machine, just like other non-master nodes. On the other hand, the node's agent can start a listening service to receive status information sent by one or more non-master nodes and synchronize and integrate this received, scattered status information. For example, the master node can maintain a global status table in memory to update the latest backup progress of each non-master node in real time.

[0076] In this embodiment, a master node is designated to synchronize and integrate backup information, providing a single data source for the real-time status of the entire backup task during execution. This avoids the management server having to directly face frequent communication with a large number of nodes, and also avoids the chaos of information interaction between nodes, simplifying the coordination architecture of the distributed system and making status management clearer and more efficient.

[0077] In an exemplary embodiment, when a non-master node exists, after receiving status information sent by the non-master node and synchronizing and integrating the received status information, the method further includes:

[0078] Obtain the update duration of the status information of non-master nodes; if the update duration of the status information of non-master nodes exceeds the preset duration threshold, then identify the non-master node as a timeout fault node; generate fault alarm information containing the identifier of the timeout fault node, and send the fault alarm information to the management server.

[0079] Specifically, after synchronizing and integrating the received status information, the master node can also execute a fault diagnosis process. Specifically, the master node can record the update duration of each non-master node's status information, that is, the time elapsed since the last time the master node's status information was received. The master node can periodically check this duration. If it finds that the update duration of a non-master node exceeds a preset threshold (e.g., 10 minutes), it considers that the non-master node may have lost response due to program crashes, network interruptions, or other reasons, and identifies it as a timeout fault node.

[0080] Once a timeout failure node is identified, the master node can generate a fault alarm message containing the identifier of that failure node and proactively send it to the management server for timely intervention. In this way, the system possesses distributed and automated health status monitoring and fault alarm capabilities.

[0081] In this embodiment, by utilizing the master node's status information integration capability, nodes that have crashed or have network problems can be detected in a timely manner, thereby improving the reliability of backup tasks and ensuring that system anomalies can be detected and handled promptly.

[0082] In an exemplary embodiment, after performing a backup operation on the virtual machines in the locally backed-up virtual machine set, the method further includes:

[0083] The local task execution result, including the backup success or failure status, is sent to the management server so that the management server can determine the backup result of the global backup task after receiving the task execution result of the global backup task.

[0084] For example, once a node has completed the backup operation of all virtual machines in its local backup virtual machine set, regardless of success or failure, the node's agent can perform a backup result reporting step.

[0085] Specifically, the agent can generate a local task execution result, which includes, but is not limited to, the completion status of this local backup task (e.g., "success," "failure," or "partial success") and a possible log summary. The agent then sends this execution result directly to the management server. The management server can collect the final execution results from all participating nodes, and once all results have been collected, it can comprehensively determine the final backup result of this global backup task.

[0086] In this embodiment, by separating the high-frequency process progress (reported to the master node) from the low-frequency but important backup results (reported to the management server) in the information flow, it is ensured that the management server can accurately track the final success or failure of each subtask, providing a reliable data foundation for accurately calculating the final success rate of the entire global backup task, as well as for subsequent log auditing and report generation.

[0087] In an exemplary embodiment, in an application scenario, the scenario includes a server, three failover cluster nodes (nodes 1, 2, and 3), and a database. The backup operation interaction process itself is as follows: Figure 2 As shown, it includes:

[0088] First, the server distributes a global backup task to all nodes in the failover cluster. This task includes the set of virtual machines to be backed up across the entire cluster. Upon receiving the backup task, each node compares the global task with its own currently running virtual machines to determine whether it needs to participate in the backup. Then, all participating nodes (shown as nodes 1, 2, and 3 in the diagram) can send a master node request to the server to participate in the election process for the backup task's control node. After receiving all requests, the server selects a node (shown as node 1 in the diagram) as the control node for this backup task, i.e., the master node, based on a preset strategy (e.g., selecting the first node to send a request). Once the selection is confirmed, the server returns the election result, including the master node's identifier, to all participating nodes. This completes the pre-backup coordination and role allocation phase.

[0089] After role assignment, all nodes (master node 1, node 2, and node 3) can begin executing their respective local backup operations in parallel, backing up virtual machine data to a remote database. During the backup process, to enable task monitoring, nodes 2 and 3, as non-master nodes, can periodically report their backup status and progress to master node 1. Master node 1 is responsible for receiving and synchronizing this status information from other nodes, forming a global real-time task view. When the non-master nodes (node ​​2 and node 3) complete their respective backup tasks, they can notify master node 1 of their backup results. After completing its own backup task and receiving the backup results from all other nodes, master node 1 can submit the final result and historical records of the entire job to the server.

[0090] Finally, during the phase of synchronizing backup results and submitting backup history, the server can wait to receive backup results from all participating nodes, then synchronize the final results, and after confirming that the entire global job is completed, submit the backup history and end the process.

[0091] In this embodiment, by distributing backup tasks and confirming with the master node, the performance bottleneck caused by high-frequency direct communication between all nodes and the central server is avoided, thus improving the system's scalability. Secondly, during the backup execution phase, an information flow architecture—from node progress reporting to the master node integrating information and finally the master node reporting the results—is implemented, achieving a distributed backup management system with real-time monitoring of task status and clear responsibilities, significantly improving backup efficiency.

[0092] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0093] Based on the same inventive concept, this application also provides a virtual machine backup apparatus for implementing the virtual machine backup method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more virtual machine backup apparatus embodiments provided below can be found in the limitations of the virtual machine backup method described above, and will not be repeated here.

[0094] In one exemplary embodiment, such as Figure 3 As shown, a virtual machine backup device is provided, applied to nodes in a failover cluster. The device includes: a backup task receiving module 310, a backup virtual machine determination module 320, and a backup execution module 330, wherein:

[0095] Backup task receiving module 310 is used to receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster.

[0096] The backup virtual machine determination module 320 is used to determine the local backup virtual machine set of the current node based on the comparison results between the global virtual machine set and the virtual machines running on the current node.

[0097] Backup execution module 330 is used to perform backup operations on the virtual machines in the local backup virtual machine set.

[0098] In one embodiment, the backup virtual machine determination module 320 is further configured to send a master node role request to the management server if the local backup virtual machine set is not empty. The master node role request is used to apply for a master node role to coordinate backup tasks and synchronize status information in this backup task.

[0099] In one embodiment, the backup execution module 330 is further configured to receive a master node identifier returned by the management server in response to the master node role request, and perform a backup operation on the virtual machines in the local backup virtual machine set based on the master node identifier; the master node identifier is generated by the management server after designating the node that sent the first master node role request as the master node for this backup task according to the first master node role request received.

[0100] In one embodiment, the backup virtual machine determination module 320 is further configured to determine whether the current node is a master node based on the master node identifier;

[0101] If the current node is not the master node, then the backup operation is performed on the virtual machine of the current node, and status information representing the real-time progress of the backup operation is sent to the master node identifier corresponding to the master node.

[0102] In one embodiment, the backup virtual machine determination module 320 is further configured to perform a backup operation on the virtual machine of the current node if the current node is the master node, and receive the status information sent by the non-master node in the presence of a non-master node, and synchronize and integrate the received status information.

[0103] In one embodiment, the backup execution module 330 is further configured to obtain the update duration of the status information of the non-master node;

[0104] If the update duration of the status information of the non-master node is greater than a preset duration threshold, then the non-master node is identified as a timeout fault node.

[0105] Generate a fault alarm message containing the identifier of the timeout fault node, and send the fault alarm message to the management server.

[0106] In one embodiment, the backup execution module 330 is further configured to send the local task execution result, which includes the backup success or failure status, to the management server, so that the management server can determine the backup result of the global backup task after receiving the task execution result of the global backup task.

[0107] The modules in the aforementioned virtual machine backup device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0108] In one exemplary embodiment, a computer device is provided, which may be a node in a failover cluster, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a virtual machine backup method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0109] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0111] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0112] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0113] 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0114] 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0115] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0117] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A virtual machine backup method, characterized in that, Nodes used in failover clusters include: Receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster. Based on the comparison results between the global virtual machine set and the virtual machines running on the current node, the local backup virtual machine set of the current node is determined. If the local backup virtual machine set is not empty, a master node role request is sent to the management server. The master node role request is used to apply for the master node role to coordinate backup tasks and synchronize status information in this backup task. The system receives the master node identifier returned by the management server in response to the master node role request, and performs backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier. The master node identifier is generated by the management server after designating the node that sent the first master node role request as the master node for this backup task based on the first master node role request received.

2. The method according to claim 1, characterized in that, The step of performing backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier includes: Based on the master node identifier, determine whether the current node is a master node; If the current node is not the master node, then the backup operation is performed on the virtual machine of the current node, and status information representing the real-time progress of the backup operation is sent to the master node identifier corresponding to the master node.

3. The method according to claim 2, characterized in that, The step of performing backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier further includes: If the current node is the master node, a backup operation is performed on the virtual machine of the current node, and if a non-master node exists, the status information sent by the non-master node is received, and the received status information is synchronized and integrated.

4. The method according to claim 3, characterized in that, In the absence of a non-master node, after receiving the status information sent by the non-master node and synchronizing and integrating the received status information, the method further includes: Obtain the update duration of the status information of the non-master node; If the update duration of the status information of the non-master node is greater than a preset duration threshold, then the non-master node is identified as a timeout fault node. Generate a fault alarm message containing the identifier of the timeout fault node, and send the fault alarm message to the management server.

5. The method according to any one of claims 1 to 4, characterized in that, After performing the backup operation on the virtual machines in the locally backed-up virtual machine set, the method further includes: The local task execution result, including the backup success or failure status, is sent to the management server so that the management server can determine the backup result of the global backup task after receiving the task execution result of the global backup task.

6. A virtual machine backup device, characterized in that, The device is used on nodes in a failover cluster and includes: A backup task receiving module is used to receive a global backup task, which is sent by the management server to one or more nodes in the failover cluster, and the global backup task indicates a global set of virtual machines to be backed up within the failover cluster. The backup virtual machine determination module is used to determine the local backup virtual machine set of the current node based on the comparison results between the global virtual machine set and the virtual machines running on the current node. The backup execution module is configured to send a master node role request to the management server if the local backup virtual machine set is not empty. The master node role request is used to apply for the master node role to coordinate backup tasks and synchronize status information in this backup task. The module receives a master node identifier returned by the management server in response to the master node role request, and performs backup operations on the virtual machines in the local backup virtual machine set based on the master node identifier. The master node identifier is generated by the management server after designating the node that sent the first master node role request as the master node for this backup task based on the first master node role request received.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Virtual machine combination backup method based on VMware (Virtual Machine ware)

    CN107133131A

  • Highly available cluster agent for backup and restore operations

    US9842124B1