Virtual machine backup method and device, computer equipment, readable storage medium and program product

By receiving global backup tasks from the management server, the system automatically identifies and executes virtual machine backups, solving the inefficiency problem caused by manually confirming VM distribution in existing technologies. This achieves efficient and reliable virtual machine backups, improving the backup efficiency and system scalability of failover clusters.

CN120909847AActive Publication Date: 2025-11-07GUANGZHOU DINGJIA COMPUTER TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511318311.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-11-07
Estimated Expiration
2045-09-16

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, and comparing the global virtual machine set with the virtual machines currently running on the node, the local backup virtual machine set is automatically determined, and backup operations are performed on the node. A master-slave coordination architecture is established to coordinate and synchronize status information, simplifying management complexity and improving backup efficiency.

Benefits of technology

It achieves reliability and accuracy of virtual machine backup in dynamic environments, improves the backup efficiency of failover clusters, reduces management complexity, and enhances system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909847A_ABST
    Figure CN120909847A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual machine backup method and device, computer equipment, a computer readable storage medium and a computer program product, relates to the technical field of virtual machines, and can improve the virtual machine backup efficiency. The method comprises the steps that a global backup task is received, the global backup task is sent to one or more nodes in a failover cluster by a management server, and the global backup task indicates a global virtual machine set for backup within the range of the failover cluster; determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and the virtual machines running on the current node; and executing backup operation on the virtual machines in the local backup virtual machine 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] receive a master node identifier returned by the management server in response to the master node role request, and perform a backup operation on a virtual machine in the local backup virtual machine set based on the master node identifier; the master node identifier is generated by the management server after a node sending the first master node role request is designated as a master node of a current backup task according to the received first master node role request.

[0013] In one of the embodiments, the performing of the backup operation on the virtual machine in the local backup virtual machine set based on the master node identifier comprises:

[0014] determining whether the current node is the master node based on the master node identifier;

[0015] if the current node is not the master node, performing the backup operation on a virtual machine of the current node, and sending state information representing a real-time progress of the backup operation to a master node corresponding to the master node identifier.

[0016] In one of the embodiments, the performing of the backup operation on the virtual machine in the local backup virtual machine set based on the master node identifier further comprises:

[0017] if the current node is the master node, performing the backup operation on a virtual machine of the current node, and receiving the state information sent by a non-master node and synchronously integrating the received state information if the non-master node exists.

[0018] In one of the embodiments, after the receiving of the state information sent by the non-master node and the synchronously integrating of the received state information if the non-master node exists, the method further comprises:

[0019] obtaining an update duration of the state information of the non-master node;

[0020] if the update duration of the state information of the non-master node is greater than a preset duration threshold, determining the non-master node as a timeout fault node;

[0021] generating fault alarm information containing an identifier of the timeout fault node, and sending the fault alarm information to the management server.

[0022] In one of the embodiments, after the performing of the backup operation on the virtual machine in the local backup virtual machine set, the method further comprises:

[0023] Send the local task execution result containing the backup success or failure status to the management server to determine the backup result of the global backup task by the management server after receiving the task execution result of the global backup task.

[0024] In a second aspect, the present application provides a virtual machine backup device, applied to a node in a failover cluster, comprising:

[0025] A backup task receiving module, configured to receive a global backup task, wherein the global backup task is sent by a management server to one or more nodes in the failover cluster, and the global backup task indicates a global virtual machine set for backup within the failover cluster;

[0026] A backup virtual machine determining module, configured to determine a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node;

[0027] A backup executing module, configured to perform a backup operation on virtual machines in the local backup virtual machine set.

[0028] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0029] Receiving a global backup task, wherein the global backup task is sent by a management server to one or more nodes in the failover cluster, and the global backup task indicates a global virtual machine set for backup within the failover cluster;

[0030] Determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node;

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

[0032] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the following steps:

[0033] Receiving a global backup task, wherein the global backup task is sent by a management server to one or more nodes in the failover cluster, and the global backup task indicates a global virtual machine set for backup within the failover cluster;

[0034] Determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node;

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

[0036] In a fifth aspect, the present application provides a computer program product, comprising a computer program which, when executed by a processor, implements the following steps:

[0037] receiving a global backup task, the global backup task being sent by a management server to one or more nodes in the failover cluster, and the global backup task indicating a global virtual machine set for backup within the failover cluster;

[0038] determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node;

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

[0040] The virtual machine backup method, device, computer device, computer readable storage medium and computer program product, by receiving a global backup task, the global backup task being sent by a management server to one or more nodes in the failover cluster, and the global backup task indicating a global virtual machine set for backup within the failover cluster; determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node; performing a backup operation on the virtual machine in the local backup virtual machine set. In the present application, by letting the nodes of the failover cluster receive a global backup task facing the entire cluster, the management operation for multiple nodes is simplified to centralized configuration of a single logical entity, reducing the management complexity. On this basis, by comparing the global task and the locally running virtual machines in real time to determine the backup range of each node, the inefficient manual positioning and task allocation link in the prior art is automated, so that it can adapt to the dynamic migration of virtual machines in the cluster in real time, ensuring the reliability and accuracy of backup in a dynamic environment, thereby improving the backup efficiency of the failover cluster while ensuring that the node backup is still reliable under distributed management. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0042] Figure 1A flowchart of a virtual machine backup method in one embodiment;

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

[0044] Figure 3 A block diagram of a virtual machine backup apparatus in one embodiment;

[0045] Figure 4 An internal structure diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] For the purpose of making the object, technical solutions and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0047] The virtual machine backup method provided by the embodiments of the present application can be applied to a system including a management server and a failover cluster composed of multiple nodes, and the management server is responsible for unified management and issuing backup tasks. The failover cluster is an integrated strategy that can ensure high availability and uninterrupted operation in a critical environment, and involves a configuration of multiple independent computers, i.e., nodes, each of which runs an agent program and can run one or more virtual machines. The nodes work cooperatively to improve the availability and scalability of application programs and services, and the agent programs of the nodes can be connected with each other through physical wiring and software. If one or more nodes fail, the remaining nodes can automatically take over the work load (a process called failover) to minimize interruption. In addition, the agent programs of the nodes will continuously monitor the health status of the cluster roles. If the agent programs of the nodes detect any problem, the roles will be restarted or migrated to another node to maintain seamless operation. This active approach of the agent programs of the nodes can ensure that services remain consistently available even in the event of hardware or software failure.

[0048] In an exemplary embodiment, as shown in Figure 1 A virtual machine backup method is provided, and the method is applied to a case where it is installed on each node (host) in a failover cluster, and includes the following steps S102 to S106. Among them:

[0049] Step S102, receiving a global backup task.

[0050] The 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 virtual machine set for backup within the failover cluster.

[0051] In one embodiment, when the backup procedure is initiated, the agent installed on a node in the failover cluster can receive a global backup task 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 an XML file, which is generated by the management server and broadcast to all or part of the nodes in the cluster. The core content of the task is the global virtual machine set, i.e. a list containing the unique identifiers (such as VM name or VM ID) of all virtual machines currently scheduled for backup within the entire failover cluster. Optionally, the task can also include metadata such as task ID, backup strategy (such as full or incremental), target storage path, etc.

[0053] Step S104, based on the comparison result of 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] After receiving the global backup task, the agent on the node can perform a localized task determination operation. This operation mainly includes two stages:

[0055] First, the agent obtains the list of virtual machines currently running on the node. This can be achieved by calling the local virtual machine (Hyper-V) management service interface (for example, through Windows Management Instrumentation query or PowerShell script), thereby obtaining a list containing only all running VMs on the current physical machine.

[0056] Then, the agent performs a comparison operation. Specifically, the comparison can be a set intersection operation: compare the global virtual machine set (set A) with the list of local real-time running virtual machines obtained in the previous step (set B), and find the intersection of the two sets (C = A∩B). This intersection C, i.e. the local backup virtual machine set, contains those virtual machines that are both required to be backed up in this global task and running on the current node.

[0057] If the local backup virtual machine set after comparison is empty (i.e. there is no VM on the current node that needs to be backed up), the main procedure of the agent on the node in this global task is completed, and no subsequent backup operation is needed.

[0058] Step S106, perform backup operation on the virtual machines in the local backup virtual machine set.

[0059] The backup operation is a technical process aiming to create a data copy for a virtual machine. To ensure data consistency of the running virtual machine, the operation can adopt various technical means. For example, a time point snapshot can be created for the virtual machine by using the built-in checkpoint function at the Hyper-V level, and then data reading and copying are performed based on the snapshot disk file. In some implementations, the same data consistency goal can also be achieved by invoking the volume shadow copy service (VSS) at the operating system level. The backup data copy can finally be transmitted and stored to the target storage location (such as network attached storage (NAS), backup all-in-one machine, etc.) specified by the global backup task or agent program preset configuration.

[0060] In the embodiment, by letting the nodes of the failover cluster receive a global backup task for the entire cluster, the management operation for multiple nodes is simplified to centralized configuration of a single logical entity, reducing the management complexity. On this basis, by comparing the global task with the locally running virtual machines in real time to determine the backup range of each node, the inefficient manual positioning and task allocation link in the prior art is automated, enabling real-time adaptation to the dynamic migration of virtual machines in the cluster, ensuring the reliability and accuracy of backup in a dynamic environment, thereby improving the backup efficiency of the failover cluster while ensuring that node backup is still reliable under distributed management.

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

[0062] If the local backup virtual machine set is not empty, a master node role request is sent to the management server, and the master node role request is used to apply for the master node role of backup task coordination and synchronization state information in the current backup task.

[0063] Specifically, after determining the local backup virtual machine set and the set is not empty, the agent program 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 apply for the role of master node in the current global backup task to be responsible for subsequent backup task coordination and state information synchronization.

[0064] Performing a backup operation on the virtual machines in the local backup virtual machine set, comprising:

[0065] receive the master node identifier returned by the management server in response to the master node role request, and perform a backup operation on a virtual machine in the local backup virtual machine set based on the master node identifier; the master node identifier is generated by the management server after assigning the node sending the first master node role request as the master node of the current backup task according to the received first master node role request.

[0066] In one embodiment, the management server can directly assign the sender of the received first master node role request as the master node of the current task, and then generate and return the relevant identifier (such as its IP address or node name) of the master node to all nodes sending the request. Subsequently, the agent program on the node can receive the master node identifier returned by the management server. After receiving the identifier, the node can prepare to perform subsequent backup operations according to the identifier, for example, the non-master node can determine the master node reporting the backup progress through the master node identifier, and the master node knows the relevant non-master node assuming the coordination responsibility.

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

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

[0069] Based on the master node identifier, determining whether the current node is the master node; if the current node is a non-master node, performing a backup operation on the virtual machine of the current node, and sending state information representing the real-time progress of the backup operation to the master node corresponding to the master node identifier.

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

[0071] If the determination result is a non-master node, the agent program can periodically (e.g., every 1 minute) create a state information data packet while performing a backup operation on the local virtual machine, and send it to the master node corresponding to the master node identifier. The state information can include the identifier of the VM being backed up, the percentage of completed data transmission, etc., for real-time reporting of the backup progress to the master node.

[0072] In the embodiment, the progress information of each distributed node is summarized to a single master node to form a global task view, thereby solving the problem of task state opacity in a distributed environment. Meanwhile, since the information is reported to the temporary master node instead of the core management server, the communication and processing load of the management server is effectively reduced, and the scalability of the entire system is improved.

[0073] In an exemplary embodiment, performing the backup operation on the 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, performing the backup operation on the virtual machines of the current node, and if non-master nodes exist, receiving the state information sent by the non-master nodes and synchronously integrating the received state information.

[0075] Specifically, the agent program of the node compares the received master node identifier with the node identifier of the node itself. If the agent program determines that the current node is the master node of the task after judgment, the master node will assume dual responsibilities. On the one hand, the agent program of the node can perform the backup operation on the virtual machines of the current node itself like other non-master nodes. On the other hand, the agent program of the node can start a listening service for receiving the state information sent by one or more non-master nodes, and synchronously integrating the received and dispersed state information. For example, the master node can maintain a global state table in the memory to update the latest backup progress of each non-master node in real time.

[0076] In the embodiment, by specifying a master node to synchronously integrate the backup information, a single data source is provided for the real-time state of the entire backup task during the execution process, which avoids the management server from directly facing the frequent communication of a large number of nodes, avoids the confusion of information interaction between nodes, simplifies the coordination architecture of the distributed system, and makes the state management more clear and efficient.

[0077] In an exemplary embodiment, after receiving the state information sent by the non-master nodes and synchronously integrating the received state information if non-master nodes exist, the method further includes:

[0078] Obtaining the update duration of the state information of the non-master nodes; if the update duration of the state information of the non-master nodes is greater than a preset duration threshold, determining the non-master nodes as timeout fault nodes; generating fault alarm information containing the identifier of the timeout fault nodes, and sending the fault alarm information to the management server.

[0079] Specifically, the master node can perform a troubleshooting procedure after synchronously integrating the received status information. Specifically, the master node can record the update duration of each non-master node status information, i.e., the time elapsed since the last time the status information of the node was received. The master node can periodically check the duration, and if it finds that the update duration of a certain non-master node is greater than a preset duration threshold (e.g., 10 minutes), it considers that the non-master node has lost response due to program crash, network interruption, etc., and determines it as a timeout fault node.

[0080] After determining the timeout fault node, the master node can generate a fault alarm information containing the identification of the fault node, and actively send it to the management server, so as to respond to the intervention processing in a timely manner. In this way, the system has the distributed and automated health state monitoring and fault alarm capability.

[0081] In this embodiment, by using the status information integration capability of the master node, it is possible to timely discover nodes with program crash or network problems, improve the reliability of the backup task, and ensure that system abnormalities can be timely discovered and processed.

[0082] In an exemplary embodiment, after performing the backup operation on the virtual machines in the local backup virtual machine set, further comprising:

[0083] Sending the local task execution result containing the backup success or failure status to the management server, so that the management server determines the backup result of the global backup task after receiving the task execution result of the global backup task.

[0084] Exemplarily, after the node completes the backup operation on all virtual machines in its local backup virtual machine set, whether successful or failed, the agent program of the node can perform a backup result reporting step.

[0085] Specifically, the agent program can generate a local task execution result, which includes but is not limited to the end state of the local backup task (e.g., "success", "failure" or "partial success") and possible log summary. Subsequently, the agent program directly sends the execution result to the management server. The management server can collect the final execution results of all nodes participating in the backup, and when all results are collected, it can comprehensively determine the final backup result of the global backup task.

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

[0087] In an exemplary embodiment, in an application scenario, the scenario includes a server, three failover cluster nodes (node 1, 2, and 3), and a database, and the backup operation interaction flow of the server itself, as shown in Figure 2 includes:

[0088] First, the server distributes a global backup task to all nodes in the failover cluster, and the backup task contains a virtual machine set to be backed up in the entire cluster in this plan. After receiving the backup task, each node can compare the global task with the virtual machine currently running on the node to determine whether the node needs to participate in this backup. Subsequently, all nodes (shown as node 1, 2, and 3 in the figure) that need to participate can send master node request information to the server to participate in the election process of the backup task control node. After receiving the request from all nodes, the server can select a node (shown as node 1 in the figure) as the control node of the backup task, that is, the master node, according to a preset strategy (for example, selecting the first node that sends a request). After the selection is determined, the server can return the election result containing the master node identifier to all participating nodes, and thus the coordination and role allocation stage before backup is completed.

[0089] After the role allocation is completed, all nodes (master node 1, node 2, and node 3) can start to perform local backup operations in parallel to backup virtual machine data to a remote database. In order to realize task monitoring, node 2 and node 3 as non-master nodes can periodically report their respective backup states and progress to master node 1. Master node 1 is responsible for receiving and synchronously integrating the state information from other nodes to form 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 the backup results. Master node 1 can submit the final result and history record of the entire job to the server after performing its own backup task and receiving the backup results of all other nodes.

[0090] Finally, in the synchronization of backup results and submission of backup history stage, the server can wait to receive the backup results of all participating nodes, then synchronize the final result, and submit the backup history after confirming that the entire global job is completed, and end this flow.

[0091] In this embodiment, through backup task distribution and master node confirmation, the performance bottleneck caused by high-frequency communication between all nodes and the central server is avoided, and the scalability of the system is improved. Secondly, in the backup execution phase, through the information flow architecture of reporting progress from the node to the master node, integrating information, and finally reporting the results by the master node, a distributed backup management system with real-time monitoring of task status and clear responsibilities is realized, greatly improving the backup efficiency.

[0092] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.

[0093] Based on the same inventive concept, the embodiments of the present application also provide a virtual machine backup device for implementing the virtual machine backup method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more virtual machine backup device embodiments provided below can refer to the limitations of the virtual machine backup method described above, and will not be repeated here.

[0094] In one exemplary embodiment, as shown in Figure 3 A virtual machine backup device is provided, applied to a node in a failover cluster, the device comprising: a backup task receiving module 310, a backup virtual machine determining module 320, and a backup execution module 330, wherein:

[0095] The backup task receiving module 310 is configured to receive a global backup task, wherein the global backup task is sent by a management server to one or more nodes in the failover cluster, and the global backup task indicates a global virtual machine set for backup within the failover cluster;

[0096] The backup virtual machine determining module 320 is configured to determine a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and the virtual machine running on the current node;

[0097] The backup execution module 330 is configured to perform a backup operation 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, if the local backup virtual machine set is not empty, send a master node role request to the management server, the master node role request being used to apply for a master node role of performing backup task coordination and synchronization state information in the current 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 according to the received first master node role request, after designating the node sending the first master node role request as the master node of the current backup task.

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

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

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

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

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

[0105] Fault alarm information containing the identifier of the timeout fault node is generated, and the fault alarm information is sent to the management server.

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

[0107] The modules in the virtual machine backup apparatus can be implemented by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be invoked and executed by a processor to perform operations corresponding to the modules.

[0108] In one example embodiment, a computer device, which can be a node in a failover cluster, has an internal structure as shown in Figure 4 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, near field communication (NFC), or other technologies. The computer program is executed by the processor to implement a virtual machine backup method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, a trackball, or a touchpad arranged on the housing of the computer device. The input device can also be an external keyboard, a touchpad, or a mouse, etc.

[0109] Those skilled in the art can understand that Figure 4 The structure shown in the above figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.

[0111] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.

[0112] In an embodiment, a computer program product is provided, comprising a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.

[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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0116] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.

[0117] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A virtual machine backup method characterized by, Applied to a node in a failover cluster, comprising: receiving a global backup task, the global backup task being sent by a management server to one or more nodes in the failover cluster, and the global backup task indicating a global virtual machine set for backup within the failover cluster; determining a local backup virtual machine set of the current node based on a comparison result of the global virtual machine set and virtual machines running on the current node; performing a backup operation on virtual machines in the local backup virtual machine set.

2. The method of claim 1, wherein, After the determination of the local backup virtual machine set of the current node based on the comparison result of the global virtual machine set and virtual machines running on the current node, further comprising: if the local backup virtual machine set is not empty, sending a master node role request to the management server, the master node role request being used to apply for a master node role for backup task coordination and synchronization state information in the current backup task; the performing of the backup operation on virtual machines in the local backup virtual machine set, comprising: receiving a master node identifier returned by the management server in response to the master node role request, and performing the backup operation on virtual machines in the local backup virtual machine set based on the master node identifier; the master node identifier being generated by the management server after designating a node sending a first master node role request as a master node of the current backup task according to the received first master node role request.

3. The method of claim 2, wherein, the performing of the backup operation on virtual machines in the local backup virtual machine set based on the master node identifier, comprising: determining whether the current node is a master node based on the master node identifier; if the current node is not a master node, performing the backup operation on virtual machines of the current node, and sending state information representing a real-time progress of the backup operation to a master node corresponding to the master node identifier.

4. The method of claim 3, wherein, the performing of the backup operation on virtual machines in the local backup virtual machine set based on the master node identifier, further comprising: if the current node is the master node, performing the backup operation on virtual machines of the current node, and receiving the state information sent by a non-master node and synchronously integrating the received state information in the case that the non-master node exists.

5. The method of claim 4, wherein, after the receiving of the state information sent by the non-master node and the synchronous integration of the received state information in the case that the non-master node exists, further comprising: obtaining an update duration of the state information of the non-master node; if the update duration of the state information of the non-master node is greater than a preset duration threshold, determining the non-master node as a timeout fault node; generating fault alarm information containing an identifier of the timeout fault node, and sending the fault alarm information to the management server.

6. The method according to any one of claims 1 to 5, characterized in that, after the performing of the backup operation on virtual machines in the local backup virtual machine set, further comprising: sending a local task execution result containing a backup success or failure state to the management server, so that the management server determines a backup result of the global backup task after receiving a task execution result of the global backup task.

7. A virtual machine backup apparatus characterized by comprising: Applied to a node in a failover cluster, the apparatus comprises: a backup task receiving module, configured to receive a global backup task, the global backup task being sent by a management server to one or more nodes in the failover cluster, and the global backup task indicating a global virtual machine set for backup within the failover cluster; a backup virtual machine determining module, configured to determine a local backup virtual machine set of a current node based on a comparison result of the global virtual machine set and virtual machines running on the current node; a backup executing module, configured to perform a backup operation on virtual machines in the local backup virtual machine set.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN107133131A

  • Real-time backup method based on local storage in cloud platform and application

    CN113778629A

  • Disaster recovery backup method and system of virtual machine, computer equipment and storage medium

    CN114706661A

  • Virtual machine fault migration and disk data backup method, computer equipment, readable storage medium and program product

    CN119536915A

  • Highly available cluster agent for backup and restore operations

    US9842124B1