CN115562911B - Virtual machine data backup method, device, system, electronic equipment and storage medium - Google Patents

Virtual machine data backup method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN115562911B
CN115562911B CN202211560664.4A CN202211560664A CN115562911B CN 115562911 B CN115562911 B CN 115562911B CN 202211560664 A CN202211560664 A CN 202211560664A CN 115562911 B CN115562911 B CN 115562911B
Authority
CN
China
Prior art keywords
backup
virtual machine
node
message
management node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211560664.4A
Other languages
Chinese (zh)
Other versions
CN115562911A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nfs China Software Co ltd
Original Assignee
Nfs China Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nfs China Software Co ltd filed Critical Nfs China Software Co ltd
Priority to CN202211560664.4A priority Critical patent/CN115562911B/en
Publication of CN115562911A publication Critical patent/CN115562911A/en
Application granted granted Critical
Publication of CN115562911B publication Critical patent/CN115562911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a virtual machine data backup method, a virtual machine data backup device, a virtual machine data backup system, electronic equipment and a storage medium, and relates to the technical field of cloud platforms. The virtual machine data backup method provided by the application is applied to a cloud platform, wherein the cloud platform comprises a management node and a plurality of computing nodes, and the virtual machine data backup method comprises the following steps: the method comprises the steps that a management node obtains a target computing node corresponding to a virtual machine to be backed up, backup information is created according to a backup task, a backup message with a route value named by the name of the target computing node is created according to the backup information, the backup message is sent to one or more computing nodes, and the one or more computing nodes comprise the target computing node; and the target computing node receives the corresponding backup message according to the routing value of the backup message, and backups the data to be backed up in the virtual machine to the backup storage server according to the received backup message. The technical scheme of the application can solve the problem of concurrency of backup tasks when a large number of virtual machines are subjected to data backup.

Description

Virtual machine data backup method, device, system, electronic equipment and storage medium
Technical Field
The application relates to the technical field of cloud platforms, in particular to a virtual machine data backup method, a virtual machine data backup device, a virtual machine data backup system, electronic equipment and a storage medium.
Background
The meaning of the data backup and recovery is that after the system is invaded by a hacker, hardware fault, software fault or misoperation and other accidents, the original data can be completely, quickly, simply and reliably recovered, the normal operation of the system is ensured as much as possible within a certain time range, and the data backup is an important means for ensuring the data safety.
At present, the data backup mode of the virtual machine comprises the following two modes:
the first way is intrusion, i.e. the proxy software is installed in the virtual machine, by which the data in the virtual machine is copied to a remote backup server. The first mode has the advantages of independent backup for different types of data, less data volume, and the disadvantage of requiring separate tools or plug-ins for different types of data, and complicated maintenance of the proxy module;
the second way is non-invasive, i.e. the data in the entire virtual machine is backed up. The second approach has the advantage of simple maintenance, and the disadvantage of a large amount of data to be backed up.
In a cloud environment, the number of virtual machines borne by a cloud platform is generally large, and when a large number of virtual machines on the cloud platform carry out data backup at the same time, the bottleneck problem of processing a large number of backup tasks concurrently exists by adopting any data backup mode.
Disclosure of Invention
The application provides a virtual machine data backup method, a device, a system, electronic equipment and a storage medium, which can solve the problem of concurrency of backup tasks when a large number of virtual machines are subjected to data backup.
In a first aspect, the present application provides a virtual machine data backup method, which adopts the following technical scheme:
the virtual machine data backup method is applied to a cloud platform, the cloud platform comprises a management node and a plurality of computing nodes, each virtual machine is provided with a corresponding computing node, and the virtual machine data backup method comprises the following steps:
the management node acquires a target computing node corresponding to a virtual machine to be backed up;
the management node creates backup information according to the backup task;
the management node creates a backup message with the name of the target computing node named as a route value according to the backup information;
the management node sending the backup message to one or more computing nodes, the one or more computing nodes including the target computing node;
The target computing node receives the corresponding backup message according to the route value of the backup message;
and the target computing node backs up the data to be backed up in the virtual machine to a backup storage server according to the received backup message.
Optionally, the creating backup information by the management node according to the backup task includes:
the management node generates a backup instruction according to the backup task;
and the management node creates backup information according to the backup instruction.
Optionally, the virtual machine data backup method further includes: and after the management node creates backup information according to the backup task, the backup information is stored in a database of the management node.
Optionally, the virtual machine data backup method further includes: after the target computing node receives the backup message, the target computing node sends confirmation information to the management node, and the management node updates the state of the backup task according to the confirmation information.
Optionally, the virtual machine data backup method further includes: after the target computing node backs up the data to be backed up in the virtual machine according to the backup message, the target computing node sends a backup completion notification to the management node, and the management node updates the state of the backup task according to the backup completion notification.
Optionally, the virtual machine data backup method further includes: and after the management node is abnormally restored, searching the unfinished backup tasks, and updating the states of all unfinished backup tasks.
Optionally, updating the status of all outstanding backup tasks includes:
the management node sends a backup task exception notification to each computing node in a message mode;
after each computing node receives the abnormal notification of the backup task, reporting the state of the current backup task to the management node;
and the management node updates the states of all unfinished backup tasks according to the states of the current backup tasks reported by the computing nodes.
Optionally, the virtual machine data backup method further includes: after the abnormal recovery of the computing node, the computing node reports the abnormal recovery to the management node, the management node re-issues the unfinished backup task on the computing node, and the computing node re-executes the backup task.
Optionally, the virtual machine data backup method further includes: and before the computing node re-executes the backup task, the computing node cleans up the data which is not backup-completed in the backup storage server.
Optionally, the virtual machine data backup method further includes: after the computing node reports the abnormal recovery to the management node, the management node updates the state of the backup task, and before the management node re-issues the unfinished backup task on the computing node, the state of the backup task is updated again.
Optionally, backing up the data to be backed up in the virtual machine to a backup storage server includes: copying the data to be backed up in the virtual machine to the backup storage server in a remote copying mode to obtain a backup file.
Optionally, the virtual machine data backup method further includes: and naming the backup file according to the disk ID and the backup time of the backup file.
Optionally, the virtual machine data backup method further includes: and persisting the naming information of the backup file in a database of the management node.
Optionally, the virtual machine data backup method further includes: and constructing a backup storage pool, wherein the backup storage pool comprises a plurality of backup storage servers.
Optionally, the virtual machine data backup method further includes: and establishing a mapping relation between the backup storage server and the computing node in the backup storage pool.
Optionally, the virtual machine data backup method further includes: and before the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the backup message, determining the backup storage server corresponding to the target computing node according to the mapping relation.
Optionally, the virtual machine data backup method further includes: registering each of the backup storage servers in the backup storage pool with the management node; when adding backup storage servers, registering the added backup storage servers in the management node, and maintaining the mapping relation by the management node according to the total number of the computing nodes and the total number of the backup storage servers; when deleting the backup storage server, the deleted backup storage server is logged off at the management node, and the management node maintains the mapping relation according to the total number of the computing nodes and the total number of the backup storage servers.
In a second aspect, the present application provides a virtual machine data backup apparatus, which adopts the following technical scheme:
the virtual machine data backup device is applied to a cloud platform, the cloud platform comprises a management node and a plurality of computing nodes, each virtual machine is provided with a corresponding computing node, and the virtual machine data backup device comprises:
The node acquisition module is used for acquiring a target computing node corresponding to the virtual machine to be backed up;
the information creation module is used for creating backup information according to the backup task;
the message creation module is used for creating a backup message with the name of the target computing node named as a route value according to the backup information;
a message sending module configured to send the backup message to one or more computing nodes, where the one or more computing nodes include the target computing node;
the message receiving module is used for receiving the corresponding backup message according to the route value of the backup message;
the backup execution module is used for backing up the data to be backed up in the virtual machine to a backup storage server according to the received backup message;
the node acquisition module, the information creation module, the message creation module and the message sending module are deployed on the management node, and the message receiving module and the backup execution module are deployed on the computing node.
In a third aspect, the present application provides a virtual machine data backup system, which adopts the following technical scheme:
the virtual machine data backup system comprises the virtual machine data backup device and at least one backup storage server.
In a fourth aspect, the present application provides an electronic device, which adopts the following technical scheme:
the electronic device includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the virtual machine data backup methods described above.
In a fifth aspect, the present application provides a computer readable storage medium, which adopts the following technical solutions:
the computer readable storage medium stores computer instructions for causing a computer to perform any of the virtual machine data backup methods described above.
The embodiment of the application provides a virtual machine data backup method, a device, a system, electronic equipment and a storage medium, wherein the virtual machine data backup method is applied to a cloud platform, the cloud platform comprises a management node and a computing node, the management node obtains a target computing node corresponding to a virtual machine to be backed up in the process of carrying out data backup by applying the virtual machine data backup method, backup information is created according to a backup task, backup information with a name of the target computing node named as a route value is created according to the backup information, the backup information is sent to one or more computing nodes, the target computing node receives the corresponding backup information according to the route value of the backup information, and the data to be backed up in the virtual machine is backed up to a backup storage server according to the received backup information. In the above process, a distributed backup task distribution manner is adopted, namely, a management node distributes a backup task, and a target computing node corresponding to a virtual machine to be backed up processes the backup task, so that on one hand, the same node or equipment is prevented from managing the backup task and executing the backup task, and on the other hand, a large number of backup tasks of the virtual machines can be distributed to different target computing nodes for processing. Therefore, the data backup method for the virtual machines can solve the problem of concurrency of backup tasks when a large number of virtual machines are subjected to data backup.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of a cloud platform provided in an embodiment of the present application;
FIG. 2 is a flowchart of a virtual machine data backup method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a change in backup task status according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a data backup process according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data backup and data recovery process according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of incremental backup provided in an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating a mapping of backup storage pools and computing nodes according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a virtual machine data backup apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that, all technical features in the embodiments of the present application may be combined with each other without conflict.
The embodiment of the application provides a virtual machine data backup method, which is applied to a cloud platform, as shown in fig. 1, where the cloud platform includes a management node (may also be referred to as a control node, and may be composed of one or more control servers) and a plurality of computing nodes (may be composed of one or more computing servers), and each virtual machine has a corresponding computing node (a relationship between a computing node and a virtual machine may be one-to-one or one-to-many), and specifically, as shown in fig. 2, the virtual machine data backup method includes:
And S1, the management node acquires a target computing node corresponding to the virtual machine to be backed up.
The management node can obtain the target computing node corresponding to the virtual machine to be backed up according to the corresponding relation between the virtual machine and the computing node.
And S2, the management node creates backup information according to the backup task.
Illustratively, the management node generates a backup instruction according to the backup task, and then creates backup information according to the backup instruction.
Illustratively, the backup instruction may be issued as follows: and selecting a virtual machine to be backed up according to the backup task, and enabling the management node to automatically issue a backup instruction in a mode of setting a backup strategy on the management node. The above backup policies may include backup time, backup period, backup type (full or incremental), etc. For example, the backup policy is that a full-scale backup is performed on a certain virtual machine at 3 pm every day, and then the backup instruction automatically issued by the management node is that the full-scale data backup is performed on the virtual machine at 3 pm every day. Of course, the backup command may also be manually triggered by the administrator through the management node, where the manual trigger refers to a one-time immediate backup. Those skilled in the art can make the selection according to actual needs.
Illustratively, the backup information may include, but is not limited to, creation time, backup object (virtual machine), task status, backup type (incremental or full backup), backup file name, backup storage server name, and the like.
Optionally, in the embodiment of the present application, the virtual machine data backup method further includes: after the management node creates the backup information according to the backup instruction, the backup information is stored in a database of the management node so as to facilitate subsequent maintenance of the backup information (for example, updating task states in the backup information).
And step S3, the management node creates a backup message with the name of the target computing node as a route value according to the backup information.
That is, the header of the generated backup message is assigned as the name of the target computing node in order to distinguish the recipients of the backup message.
Illustratively, the backup message contains information of a backup object (virtual machine), a backup type (incremental or full backup), a backup storage server name, a backup time, and the like.
And step S4, the management node sends the backup message to one or more computing nodes.
The one or more computing nodes include a target computing node.
Optionally, in an embodiment of the present application, the management node sends the backup message to one or more computing nodes through a message middleware, for example, the management node sends the backup message to all computing nodes through the message middleware. The above method can make the mode of sending the backup message by the management node simple, does not need any judging process, and is applicable to all computing nodes.
And S5, the target computing node receives the corresponding backup message according to the routing value of the backup message.
That is, the target computing node only receives the backup message belonging to the own node according to the routing value, so as to execute the backup task corresponding to the own node.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: after the target computing node receives the backup message, the target computing node sends confirmation information to the management node, and the management node updates the state of the backup task according to the confirmation information so as to accurately judge whether the backup task is executed or not. Illustratively, as shown in FIG. 3, the status of the backup task is updated to "in progress".
And S6, the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the received backup message.
For example, the target computing node performs data backup on the data to be backed up in the virtual machine according to the information indicated by the backup message, such as the backup object (virtual machine), the backup type (incremental backup or full backup), the backup storage server name, the backup time, and the like.
Optionally, as shown in fig. 4 and fig. 5, backing up the data to be backed up in the virtual machine to the backup storage server in the embodiment of the present application includes: copying the data to be backed up in the virtual machine to a backup storage server in a remote copying mode to obtain backup files. Further, the virtual machine data backup method further comprises the following steps: and naming the backup file according to the disk ID and the backup time corresponding to the backup file. Further, the virtual machine data backup method further comprises the following steps: and the naming information of the backup file is persisted in a database of the management node.
In one example, the backup type is "full backup," then all of the data to be backed up is copied to the backup storage server. The specific process is as follows: all disk (including system disk and data disk) data are exported from the storage system of the virtual machine and copied to the backup storage server by remote copy. The backup file naming is composed of a disk ID (which is unique and not duplicated) and a backup time, such as: 4e863410-e076-4605-b8f4-96a4569a e6e8_202209419130100.
In yet another example, the backup type is "incremental backup", and then the data in the virtual machine is snapshot-operated, the incremental data in the two snapshots is exported, and copied to the backup storage server by remote copy. The specific process is as follows: as shown in fig. 6, a certain virtual machine is backed up, a system disk and a data disk of the virtual machine are backed up respectively, taking the system disk as an example (the data disk backup process is similar to the system disk), a snapshot is made on the disk during backup, if the backup is the first time, data to be backed up is derived based on the snapshot, if the backup is not the first time, the difference value between the current snapshot and the previous snapshot is compared, the incremental data is derived as the data to be backed up, and the data is copied to a backup storage server in a remote copy mode. The backup file naming is composed of a disk ID (which is unique and not duplicated) and a backup time, such as: 4e863410-e076-4605-b8f4-96a4569a e6e8_202209419130100.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: after the target computing node backs up the data to be backed up in the virtual machine according to the backup message, the target computing node sends a backup completion notification to the management node, and the management node updates the state of the backup task according to the backup completion notification. Illustratively, as shown in FIG. 3, the status of the backup task is updated from "in progress" to "completed".
In addition, the management node and the computing node also bear other basic functions of the cloud platform, for example, the management node is mainly responsible for management of cloud platform resource scheduling, authentication, calculation, storage, network and the like, and the computing node is a service bearing node and is used for bearing the running of the virtual machine.
The embodiment of the application provides a virtual machine data backup method, which is applied to a cloud platform, wherein the cloud platform comprises a management node and a plurality of computing nodes, each virtual machine is provided with a corresponding computing node, in the process of carrying out data backup by applying the virtual machine data backup method, the management node acquires a target computing node corresponding to a virtual machine to be backed up, backup information is created according to a backup task, backup information with a name of the target computing node being named as a route value is created according to the backup information, the backup information is sent to one or more computing nodes, the target computing node receives the corresponding backup information according to the route value of the backup information, and the data to be backed up in the virtual machine is backed up to a backup storage server according to the received backup information. In the above process, a distributed backup task distribution manner is adopted, namely, a management node distributes a backup task, and a target computing node corresponding to a virtual machine to be backed up processes the backup task, so that on one hand, the same node or equipment is prevented from managing the backup task and executing the backup task, and on the other hand, a large number of backup tasks of the virtual machines can be distributed to different target computing nodes for processing. Therefore, the data backup method for the virtual machines can solve the problem of concurrency of backup tasks when a large number of virtual machines are subjected to data backup.
After the data backup method for the virtual machine is adopted to carry out data backup, when data in the virtual machine is lost due to accidents or misoperation, as shown in fig. 5, the data recovery can be carried out by the following modes:
restoration of full back-up data: selecting a virtual machine to be subjected to data recovery, selecting a backup file at a certain time point, remotely pulling the backup file from a backup storage server, and recovering the backup file to a disk corresponding to the virtual machine.
Restoration of incremental backup data: selecting a virtual machine to be subjected to data recovery, selecting a certain time point, remotely pulling all backup files before the time point from a backup storage server, merging all the backup files before the time point into a total backup file, and recovering the total backup file to a disk corresponding to the virtual machine. It should be noted that, the data that is backed up in an incremental manner has a dependency relationship, when the data is restored, backup files need to be merged according to the dependency relationship, for example, 4 backup files file1, file2, file3 and file4 are generated, when the data needs to be restored, the 4 backup files need to be merged into a total backup file, and then restored to the virtual machine.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: after the management node is abnormally restored, the incomplete backup tasks are searched (for example, the incomplete backup tasks are searched by querying a database in the management node), and the states of all the incomplete backup tasks are updated. By the mode, even when the management node is abnormal (such as power failure, faults and the like) in the actual running process of the cloud platform, the states of all unfinished backup tasks can be updated in time after the abnormal recovery, so that the states of the backup tasks are consistent with the actual execution conditions. For example, when a management node is abnormal, a certain backup task is already executed and completed, the state of the backup task is updated from "in progress" to "completed". Illustratively, in the embodiment of the present application, updating the status of all outstanding backup tasks includes: the management node sends a backup task exception notification to each computing node in a message mode; after each computing node receives the abnormal notification of the backup task, reporting the state of the current backup task to the management node; and the management node updates the states of all unfinished backup tasks according to the states of the current backup tasks reported by the computing nodes.
Optionally, the virtual machine data backup method further includes: after the abnormal recovery of the computing node, the computing node reports the abnormal recovery to the management node, the management node re-issues the unfinished backup task on the computing node, the computing node re-executes the backup task, and the re-issuing and re-executing modes are the same as the first issuing and executing modes, and the method is referred to the previous steps, and no redundant description is given here. By the mode, even when the computing node is abnormal (such as power failure, faults and the like) in the actual running process of the cloud platform, the backup task can be re-executed after the abnormal recovery.
Illustratively, in the embodiment of the present application, the virtual machine data backup method further includes: before the computing node re-executes the backup task, the computing node cleans up the data in the backup storage server that is not backup completed. These unrepeated completed data, which may also be referred to as dirty data, have no actual effect and only occupy storage space in the backup storage server.
Optionally, in the embodiment of the present application, the virtual machine data backup method further includes: after the computing node reports the abnormal recovery to the management node, the management node updates the state of the backup task, and the state of the backup task is updated again before the management node re-issues the unfinished backup task on the computing node. As shown in fig. 3, after the abnormal recovery of the computing node, the computing node reports the abnormal recovery to the management node, and the management node updates the state of the backup task to "failure", checks (can check by querying the backup information) whether there is an unfinished backup task on the computing node, resets the state of the backup task to "rebuild" when there is an unfinished backup task, and issues the backup task again, and the computing node firstly cleans unfinished dirty data and then performs execution of the backup task again.
It should be added that when the backup information is stored in the database of the management node, the above-mentioned state of updating the backup task refers to a task state contained in the backup information in the update database.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: a backup storage pool is constructed, as shown in fig. 7, which includes a plurality of backup storage servers. By the method, the lateral expansion of the backup storage server can be realized, so that the storage performance of the backup storage server can be expanded, and the existing bottleneck problem is solved. The number of backup storage servers can be determined according to the performance of the backup storage server network and disk IO, the scale of the cloud platform and the load condition of the backup service. Illustratively, the backup storage pool data structure may comprise: backup storage pool name, ID, creation time, backup storage server name (globally unique), etc.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: the mapping relationship between the backup storage server and the computing nodes in the backup storage pool is established, and the mapping relationship can also be called a corresponding computing node list of the backup storage server. For example, as shown in FIG. 7, the mapping relationship is that the 1 st backup storage server corresponds to the 1 st and 2 nd computing nodes, the 2 nd backup storage server corresponds to the 3 rd and 4 th computing nodes, and so on. The mapping may be contained in a backup storage pool data structure. Through the mapping relation, the storage resources of the backup storage pool can be reasonably allocated to each computing node, and the problem of low transmission efficiency caused by copying backup data to the same backup storage server when a large number of computing nodes execute backup tasks is avoided. Optionally, in the method for backing up virtual machine data in the embodiment of the present application, a backup storage server corresponding to the target computing node is determined according to the mapping relationship, and then the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the backup message.
Optionally, the virtual machine data backup method in the embodiment of the present application further includes: when the backup storage server is increased or decreased, the mapping relationship is maintained, so that the storage resource allocation of the backup storage pool is continuously in a better state.
Illustratively, the virtual machine data backup method further comprises: each backup storage server in the backup storage pool is registered with the management node. Specifically, after the cloud platform completes deployment, a backup storage server is configured by default in the backup storage pool, and is registered to the management node at the same time, the management node makes unique numbers for the backup storage pool and the backup storage server, maintains corresponding information, and all computing nodes correspond to the backup storage server when only one backup storage server exists; when the backup storage server is added, the backup storage server is registered, and when the backup storage server is deleted, the deleted backup storage server is logged off.
Based on the above, when adding or subtracting the backup storage server, maintaining the mapping relation, the process of managing the backup storage pool includes:
(2) When a backup storage server is added, the backup storage server is registered in a management node, the management node maintains the backup storage server, meanwhile, calculation is carried out according to the number of calculation nodes, the total number of calculation nodes is divided by the total number of the backup storage servers, and the corresponding mapping relation is maintained. When the backup task is scheduled, storage of backup data is performed according to the mapping relation between the computing nodes and the backup storage servers, for example, the cloud platform comprises 10 computing nodes (the total number of computing nodes in the cloud platform is determined when a cloud platform scheme is designed, and is usually a fixed value), 1 backup storage server is marked before the backup storage pool, 2 backup storage servers are shared after 1 backup storage server is added, the total number of computing nodes is marked as S1 and S2, the result of dividing the total number of computing nodes by the total number of backup storage servers 2 is 5, each backup storage server corresponds to 5 computing nodes, and C1-C5 can be caused to correspond to S1, and C6-C10 can be caused to correspond to S2. In other cases, if the backup storage server cannot be divided completely, one backup storage server can be made to correspond to fewer computing nodes.
(3) When deleting a backup storage server, the backup storage server logs off at the management node, and simultaneously, calculates the mapping relation again according to the number of the calculation nodes, divides the total number of the calculation nodes by the total number of the backup storage servers, and maintains the corresponding mapping relation. It should be noted that the backup storage server should be logged off to ensure that there is no backup data. For example, the cloud platform includes 10 computing nodes, marked as C1-C10, 3 backup storage servers are in front of the backup storage pool, after 1 backup storage server is deleted, 2 backup storage servers are left, marked as S1 and S2, and the result of dividing the total number of computing nodes by the total number of backup storage servers 2 by 10 is 5, so that each backup storage server corresponds to 5 computing nodes, and C1-C5 can be made to correspond to S1, and C6-C10 can be made to correspond to S2. In other cases, if the node is not divided, one of the backup storage servers may be made to correspond to fewer nodes.
In addition, the embodiment of the application further provides a virtual machine data backup device, which is applied to a cloud platform, wherein the cloud platform comprises a management node and a computing node, each virtual machine is provided with a corresponding computing node, and as shown in fig. 8, the virtual machine data backup device comprises:
The node acquisition module 10 is used for acquiring a target computing node corresponding to the virtual machine to be backed up;
an information creation module 20 for creating backup information according to the backup task;
a message creation module 30 for creating a backup message naming a route value with the name of the target computing node according to the backup information;
a message sending module 40 for sending the backup message to one or more computing nodes, the one or more computing nodes including the target computing node;
a message receiving module 50, configured to receive a corresponding backup message according to the routing value of the backup message;
the backup execution module 60 is configured to backup data to be backed up in the virtual machine to the backup storage server according to the received backup message;
the node acquisition module 10, the information creation module 20, the message generation module 30 and the message sending module 40 are deployed on a management node, and the message receiving module 50 and the backup execution module 60 are deployed on a computing node.
In fig. 8, only one computing node is shown, and the connection manner of the management node and other computing nodes is the same as that shown in fig. 8, and those skilled in the art can derive based on the above. In addition, each computing node may include one or more backup execution modules to perform backup tasks.
Optionally, the message sending module 40 in the embodiment of the present application is a message middleware, for example, a message middleware such as ActiveMQ, rabbitMQ, kafka, rocketMQ.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a storage module and a database, where the storage module and the database are disposed on the management node, and the storage module is configured to store the backup information in the database of the management node after the management node creates the backup information according to the backup instruction, and/or to persist the naming information of the backup file in the database of the management node.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a feedback module and a state update module, where the feedback module is disposed on the computing node, and the state update module is disposed on the management node. Wherein,,
the feedback module is used for sending confirmation information to the management node after the message receiving module receives the backup message, and/or sending a backup completion notification to the management node after the backup of the data to be backed up in the virtual machine is carried out according to the backup message, and/or reporting the state of the current backup task to the management node and/or reporting the abnormal recovery to the management node after the abnormal notification of the backup task is received.
The state updating module is used for receiving the confirmation information, updating the state of the backup task according to the confirmation information, and/or updating the state of the backup task according to the notification of the completion of backup, and/or updating the state of all unfinished backup tasks according to the state of the current backup task reported by the computing node after the abnormal recovery of the management node, and/or updating the state of the backup task after the abnormal recovery reported by the computing node to the management node, and updating the state of the backup task again before the management node resends the unfinished backup task on the computing node.
Optionally, the virtual machine data backup apparatus in the embodiment of the present application further includes a cleaning module, configured to clean data that is not backed up in the backup storage server before the computing node re-executes the backup task. The cleaning module is deployed on the computing node.
Optionally, the virtual machine data backup apparatus in the embodiment of the present application further includes a construction module, configured to construct a backup storage pool, where the backup storage pool includes a plurality of backup storage servers. The construction module is deployed on the management node.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a relationship establishing module, configured to establish a mapping relationship between the backup storage server and the computing node. The relationship establishing module is deployed on the management node.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a relationship determining module, configured to determine, according to the mapping relationship, a backup storage server corresponding to the target computing node before the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the backup message. The relationship determination module is deployed on the management node.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a registration module, where the registration module is configured to register each backup storage server in the backup storage pool to the management node, register the added backup storage server in the management node when the backup storage server is added, and cancel the deleted backup storage server in the management node when the backup storage server is deleted. The registration module is deployed on the management node.
Optionally, the virtual machine data backup device in the embodiment of the present application further includes a relationship maintenance module, configured to maintain the mapping relationship according to the total number of computing nodes and the total number of backup storage servers when adding or deleting the backup storage servers. The relationship maintenance module is deployed on the management node.
It should be noted that, in the embodiment of the present application, relevant details of the virtual machine data backup method are applicable to the corresponding modules, and are not described herein.
In addition, the embodiment of the application also provides a virtual machine data backup system, which comprises the virtual machine data backup device and at least one backup storage server.
In addition, the embodiment of the application also provides electronic equipment, which comprises:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the virtual machine data backup methods described above.
In addition, the embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores computer instructions for causing a computer to execute any one of the virtual machine data backup methods.
Embodiments of the present application may be implemented as an apparatus for performing a desired configuration using any suitable hardware, firmware, software, or any combination thereof, which may include: terminal equipment, servers (clusters), and other electronic devices. Fig. 9 schematically illustrates an example apparatus 1100 that may be used to implement various embodiments described herein.
For one embodiment, fig. 9 illustrates an example apparatus 1100 having one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the processor(s) 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory (NVM)/storage 1108 coupled to the control module 1104, one or more input/output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.
The processor 1102 may include one or more single-core or multi-core processors, and the processor 1102 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1100 can be used as a terminal device, a server (cluster), or the like in the embodiments of the present application.
In some embodiments, apparatus 1100 may include one or more computer-readable media (e.g., memory 1106 or NVM/storage 1108) having instructions 1114 and one or more processors 1102 combined with the one or more computer-readable media configured to execute instructions 1114 to implement modules to perform the actions described herein.
For one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1102 and/or any suitable device or component in communication with the control module 1104.
The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller modules may be hardware modules, software modules, and/or firmware modules.
Memory 1106 may be used to load and store data and/or instructions 1114 for device 1100, for example. For one embodiment, memory 1106 may comprise any suitable volatile memory, such as, for example, a suitable DRAM. In some embodiments, memory 1106 may comprise double data rate type four synchronous dynamic random access memory (DDR 4 SDRAM).
For one embodiment, the control module 1104 may include one or more input/output controllers to provide interfaces to the NVM/storage 1108 and the input/output device(s) 1110.
For example, NVM/storage 1108 may be used to store data and/or instructions 1114. NVM/storage 1108 may include any suitable nonvolatile memory (e.g., flash memory) and/or may include any suitable nonvolatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 1108 may include storage resources that are physically part of the device on which apparatus 1100 is installed or may be accessible by the device without necessarily being part of the device. For example, NVM/storage 1108 may be accessed over a network via input/output device(s) 1110.
Input/output device(s) 1110 may provide an interface for apparatus 1100 to communicate with any other suitable device, input/output device 1110 may include communication components, audio components, sensor components, and the like. Network interface 1112 may provide an interface for device 1100 to communicate over one or more networks, and device 1100 may communicate wirelessly with one or more components of a wireless network in accordance with any of one or more wireless network standards and/or protocols, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1102 may be packaged together with logic of one or more controllers (e.g., memory controller modules) of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be packaged together with logic of one or more controllers of the control module 1104 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1102 may be integrated on the same mold as logic of one or more controllers of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die as logic of one or more controllers of the control module 1104 to form a system on chip (SoC).
In various embodiments, apparatus 1100 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, device 1100 may have more or fewer components and/or different architectures. For example, in some embodiments, the apparatus 1100 includes one or more cameras, keyboards, liquid Crystal Display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, application Specific Integrated Circuits (ASICs), and speakers.
The detection device can adopt a main control chip as a processor or a control module, sensor data, position information and the like are stored in a memory or an NVM/storage device, a sensor group can be used as an input/output device, and a communication interface can comprise a network interface.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. The utility model provides a virtual machine data backup method, is applied to cloud platform, the cloud platform includes management node and a plurality of computing node, and every virtual machine has a corresponding computing node, characterized in that, the virtual machine data backup method includes:
the management node acquires a target computing node corresponding to a virtual machine to be backed up;
the management node creates backup information according to the backup task;
the management node creates a backup message with the name of the target computing node named as a route value according to the backup information;
the management node sends the backup message to a plurality of computing nodes, including the target computing node;
The target computing node receives the corresponding backup message according to the route value of the backup message;
the target computing node backs up the data to be backed up in the virtual machine to a backup storage server according to the received backup message;
the virtual machine data backup method further comprises the following steps:
constructing a backup storage pool, wherein the backup storage pool comprises a plurality of backup storage servers;
establishing a mapping relation between a backup storage server and a computing node in the backup storage pool;
and before the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the backup message, determining the backup storage server corresponding to the target computing node according to the mapping relation.
2. The virtual machine data backup method of claim 1, further comprising: and after the management node creates backup information according to the backup task, the backup information is stored in a database of the management node.
3. The virtual machine data backup method of claim 1, further comprising: and after the management node is abnormally restored, searching the unfinished backup tasks, and updating the states of all unfinished backup tasks.
4. A virtual machine data backup method as claimed in claim 3, wherein said updating the status of all outstanding backup tasks comprises:
the management node sends a backup task exception notification to each computing node in a message mode;
after each computing node receives the abnormal notification of the backup task, reporting the state of the current backup task to the management node;
and the management node updates the states of all unfinished backup tasks according to the states of the current backup tasks reported by the computing nodes.
5. The virtual machine data backup method of claim 1, further comprising: after the abnormal recovery of the computing node, the computing node reports the abnormal recovery to the management node, the management node re-issues the unfinished backup task on the computing node, and the computing node re-executes the backup task.
6. The virtual machine data backup method of claim 1, further comprising: registering each of the backup storage servers in the backup storage pool with the management node; when adding backup storage servers, registering the added backup storage servers in the management node, and maintaining the mapping relation by the management node according to the total number of the computing nodes and the total number of the backup storage servers; when deleting the backup storage server, the deleted backup storage server is logged off at the management node, and the management node maintains the mapping relation according to the total number of the computing nodes and the total number of the backup storage servers.
7. A virtual machine data backup apparatus applied to a cloud platform, the cloud platform including a management node and a plurality of computing nodes, each virtual machine having a corresponding one of the computing nodes, the virtual machine data backup apparatus comprising:
the node acquisition module is used for acquiring a target computing node corresponding to the virtual machine to be backed up;
the information creation module is used for creating backup information according to the backup task;
the message creation module is used for creating a backup message with the name of the target computing node named as a route value according to the backup information;
a message sending module, configured to send the backup message to a plurality of computing nodes, where the plurality of computing nodes includes the target computing node;
the message receiving module is used for receiving the corresponding backup message according to the route value of the backup message;
the backup execution module is used for backing up the data to be backed up in the virtual machine to a backup storage server according to the received backup message;
the node acquisition module, the information creation module, the message creation module and the message sending module are deployed on the management node, and the message receiving module and the backup execution module are deployed on the computing node;
The virtual machine data backup apparatus further includes:
the system comprises a construction module, a storage management module and a storage management module, wherein the construction module is used for constructing a backup storage pool, and the backup storage pool comprises a plurality of backup storage servers;
the relation establishing module is used for establishing a mapping relation between the backup storage server and the computing node in the backup storage pool;
and the relation determining module is used for determining the backup storage server corresponding to the target computing node according to the mapping relation before the target computing node backs up the data to be backed up in the virtual machine to the backup storage server according to the backup message.
8. A virtual machine data backup system comprising the virtual machine data backup apparatus of claim 7 and at least one backup storage server.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the virtual machine data backup method of any one of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a computer to perform the virtual machine data backup method of any one of claims 1 to 6.
CN202211560664.4A 2022-12-07 2022-12-07 Virtual machine data backup method, device, system, electronic equipment and storage medium Active CN115562911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211560664.4A CN115562911B (en) 2022-12-07 2022-12-07 Virtual machine data backup method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211560664.4A CN115562911B (en) 2022-12-07 2022-12-07 Virtual machine data backup method, device, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115562911A CN115562911A (en) 2023-01-03
CN115562911B true CN115562911B (en) 2023-04-25

Family

ID=84770526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211560664.4A Active CN115562911B (en) 2022-12-07 2022-12-07 Virtual machine data backup method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115562911B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881052B (en) * 2023-09-07 2023-11-24 上海凯翔信息科技有限公司 Data restoration system for distributed storage
CN116991562B (en) * 2023-09-28 2023-12-26 宁波银行股份有限公司 Data processing method and device, electronic equipment and storage medium
CN117608494B (en) * 2023-12-06 2024-06-07 太极计算机股份有限公司 Storage method and system of cloud computing cluster

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015096500A1 (en) * 2013-12-24 2015-07-02 华为技术有限公司 Service migration method and device and disaster tolerance system
CN108287747A (en) * 2017-01-09 2018-07-17 中国移动通信集团贵州有限公司 Method and apparatus for virtual machine backup
CN113127258A (en) * 2019-12-30 2021-07-16 华为技术有限公司 Data backup method, device, equipment and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120072685A1 (en) * 2010-09-16 2012-03-22 Hitachi, Ltd. Method and apparatus for backup of virtual machine data
CN105245565A (en) * 2015-08-28 2016-01-13 浪潮集团有限公司 Cloud system, management node and data obtaining method
CN110058959B (en) * 2018-01-18 2023-06-16 伊姆西Ip控股有限责任公司 Data backup method, apparatus and computer program product
CN109669644A (en) * 2019-01-02 2019-04-23 浪潮商用机器有限公司 A kind of method and apparatus of data storage
CN112311568B (en) * 2019-07-26 2022-06-03 中移(苏州)软件技术有限公司 Virtual network creating method and device and computer storage medium
CN111651305B (en) * 2020-08-05 2020-11-03 腾讯科技(深圳)有限公司 Virtual machine backup method, virtual machine backup assembly and cloud computing system
CN113986450A (en) * 2021-09-28 2022-01-28 新华三大数据技术有限公司 Virtual machine backup method and device
CN114995958A (en) * 2022-06-24 2022-09-02 济南浪潮数据技术有限公司 Virtualization platform information consistency control method, device and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015096500A1 (en) * 2013-12-24 2015-07-02 华为技术有限公司 Service migration method and device and disaster tolerance system
CN108287747A (en) * 2017-01-09 2018-07-17 中国移动通信集团贵州有限公司 Method and apparatus for virtual machine backup
CN113127258A (en) * 2019-12-30 2021-07-16 华为技术有限公司 Data backup method, device, equipment and medium

Also Published As

Publication number Publication date
CN115562911A (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN115562911B (en) Virtual machine data backup method, device, system, electronic equipment and storage medium
US9870291B2 (en) Snapshotting shared disk resources for checkpointing a virtual machine cluster
CN106662983B (en) The methods, devices and systems of data reconstruction in distributed memory system
CN107844386B (en) Data backup and recovery method and device
US9098439B2 (en) Providing a fault tolerant system in a loosely-coupled cluster environment using application checkpoints and logs
CN109656742B (en) Node exception handling method and device and storage medium
WO2017067484A1 (en) Virtualization data center scheduling system and method
CN105229613A (en) Coordinate the fault recovery in distributed system
US9052833B2 (en) Protection of former primary volumes in a synchronous replication relationship
US20140059199A1 (en) Transaction-level health monitoring of online services
CN110795503A (en) Multi-cluster data synchronization method and related device of distributed storage system
CN103562904A (en) Replaying jobs at a secondary location of a service
US20140068620A1 (en) Task execution & management in a clustered computing environment
CN104750573A (en) Whole-consistency back-up and restoration methods for data nodes of distributed data system
CN109254876A (en) The management method and device of database in cloud computing system
CN114138732A (en) Data processing method and device
CN115658390A (en) Container disaster tolerance method, system, device, equipment and computer readable storage medium
US11042454B1 (en) Restoration of a data source
CN112600690B (en) Configuration data synchronization method, device, equipment and storage medium
WO2024041363A1 (en) Serverless-architecture-based distributed fault-tolerant system, method and apparatus, and device and medium
CN113986450A (en) Virtual machine backup method and device
CN107943615B (en) Data processing method and system based on distributed cluster
CN116389233B (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN112269693B (en) Node self-coordination method, device and computer readable storage medium
CN111208949B (en) Method for determining data rollback time period in distributed storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant