CN114281600A - Disaster recovery backup and recovery method, device, equipment and storage medium - Google Patents

Disaster recovery backup and recovery method, device, equipment and storage medium Download PDF

Info

Publication number
CN114281600A
CN114281600A CN202111440465.5A CN202111440465A CN114281600A CN 114281600 A CN114281600 A CN 114281600A CN 202111440465 A CN202111440465 A CN 202111440465A CN 114281600 A CN114281600 A CN 114281600A
Authority
CN
China
Prior art keywords
virtual machine
target virtual
snapshot
host
source
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.)
Pending
Application number
CN202111440465.5A
Other languages
Chinese (zh)
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.)
Beijing Qingyun Science And Technology Co ltd
Original Assignee
Beijing Qingyun Science And Technology 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 Beijing Qingyun Science And Technology Co ltd filed Critical Beijing Qingyun Science And Technology Co ltd
Priority to CN202111440465.5A priority Critical patent/CN114281600A/en
Publication of CN114281600A publication Critical patent/CN114281600A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a disaster recovery backup and recovery method, a disaster recovery backup and recovery device, equipment and a storage medium. The method comprises the following steps: reading configuration information contained in the configuration file; creating a snapshot corresponding to the service data of the data source based on the configuration information, wherein the data source has a snapshot function; and sending the snapshot to a target virtual machine of a cloud platform so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, wherein the target virtual machine is a virtual machine which finally stores the service data of a data source. By the technical scheme, disaster recovery backup based on the cloud platform can be carried out on the service data according to the requirements of users, and the disaster recovery management of heterogeneous cloud can be realized without establishing the environment with the same topological structure on the cloud platform.

Description

Disaster recovery backup and recovery method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data storage, in particular to a disaster recovery backup and recovery method, a disaster recovery backup and recovery device, equipment and a storage medium.
Background
Modern information technology is rapidly advanced and widely used, and the accompanying information security problem also poses a serious threat to normal business and data security. When the system is disabled due to the ineffectiveness, in order to enable the business system to provide a service continuously and stably, a reliable disaster tolerance service based on the host needs to be provided. The cloud platform has the characteristics of an elastic and agile scheduling system, professional infrastructure maintenance, charging on demand and the like, so that the host disaster tolerance based on the cloud platform becomes a necessary trend.
The existing disaster recovery method based on the cloud platform mainly comprises the following three methods: the first method is to copy the mirror image file of the service data to the cloud platform, which requires the cloud platform to support the data format of the service data, and has the disadvantages of complexity in implementation, difficulty in operation and maintenance, and great limitation. The second is that the user builds an environment with the same topological structure on the cloud platform to synchronize the service data, and the disadvantage is that the cloud platform needs to build the same topological structure, which causes large resource consumption, high cost and certain limitation. And the third method is to utilize the capacity of the storage cluster to carry out data synchronization, and the method requires a spare area to deploy a corresponding storage cluster, and is not suitable for heterogeneous multi-cloud scenes.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for disaster recovery backup and disaster recovery, so as to implement cloud platform-based disaster recovery backup on service data according to a user's requirement, and implement disaster recovery management of heterogeneous clouds without establishing an environment with the same topology structure on a cloud platform.
In a first aspect, an embodiment of the present invention provides a disaster recovery backup method, where the method includes:
reading configuration information contained in the configuration file;
creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function;
and sending the snapshot to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, wherein the target virtual machine is a virtual machine which finally receives the service data of the data source.
In a second aspect, an embodiment of the present invention further provides a disaster recovery method, where the method includes:
reading the configuration information stored in the metadata management module when a disaster occurs to the source host;
and creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and connecting the virtual host with the virtual hard disk so that the virtual hard disk provides service data for the virtual host.
In a third aspect, an embodiment of the present invention further provides a disaster recovery backup device, where the device includes:
the reading module is used for reading the configuration information contained in the configuration file;
the creating module is used for creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function;
the sending module is used for sending the snapshot to a target virtual machine of a cloud platform so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, and the target virtual machine is a virtual machine which finally receives the service data of the data source.
In a fourth aspect, an embodiment of the present invention further provides a disaster recovery device, where the disaster recovery device includes:
the reading module is used for reading the configuration information stored in the metadata management module when a disaster occurs to the source host;
and the creating module is used for creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and the virtual host is connected with the virtual hard disk so that the virtual hard disk provides service data for the virtual host.
In a fifth aspect, an embodiment of the present invention further provides a computer device, where the computer device is a source host or a target virtual machine, the computer device includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, and when the processor executes the computer program, the disaster recovery backup method or the disaster recovery method according to any one of the embodiments of the present invention is implemented.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the disaster recovery backup method or the disaster recovery method according to any of the embodiments of the present invention.
The embodiment of the invention reads the configuration information contained in the configuration file; creating a snapshot corresponding to the service data of the data source based on the configuration information, wherein the data source has a snapshot function; the snapshot is sent to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, the virtual machine of the target virtual machine, which finally stores the service data of a data source, can perform cloud platform-based disaster recovery backup on the service data according to the requirements of users, and the disaster recovery management of the heterogeneous cloud can be realized without establishing an environment with the same topological structure on the cloud platform.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a disaster recovery backup method according to a first embodiment of the present invention;
FIG. 2A is a schematic diagram of a direct connection mode of a source host and a target virtual machine;
FIG. 2B is a diagram of a transfer proxy mode for a source host and a target virtual machine;
FIG. 2C is a schematic diagram of yet another source host and target virtual machine staging proxy mode;
FIG. 2D is a schematic diagram of yet another source host and target virtual machine staging proxy mode;
FIG. 2E is a schematic diagram of yet another transfer agent mode of a source host and a target virtual machine;
fig. 3 is a flowchart of a disaster recovery method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a disaster recovery backup device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a disaster recovery apparatus in a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device in the sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example one
Fig. 1 is a flowchart of a disaster recovery backup method according to an embodiment of the present invention, where the embodiment is applicable to a situation where service data is backed up to a cloud platform, and the method may be executed by a disaster recovery backup device according to an embodiment of the present invention, and the device may be implemented in a software and/or hardware manner. The disaster recovery backup device is integrated in a source host, and the source host is a host generating a data source. The host refers to a computer which is connected in a network and can independently run; in the embodiment of the present invention, the data source refers to a file system for storing the service data.
As shown in fig. 1, the method specifically includes the following steps:
s110, reading the configuration information contained in the configuration file.
The configuration file can be written by a user, and is used for automatically setting information such as a source configuration item, a target configuration item, a network topology, a cloud platform interface protocol, resource configuration and the like corresponding to a data source based on the service requirement of the user, wherein the source configuration item is used for configuring an acquisition path of the data source, and the target configuration item is used for configuring a virtual machine for storing backup data of the data source.
Wherein the configuration information may include: the data source name or the data source directory path, the virtual machine name, the network topology among the hosts, the cloud platform interface protocol or the mapping relation among the nodes and other information needing to be configured by the user.
Specifically, the host computer obtains the configuration file through the input device, and reads and analyzes the configuration information in the configuration file by adopting an analysis tool.
S120, creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function.
The data source refers to a file system for storing business data. In the embodiment of the present invention, the data source has a snapshot function, the snapshot is one of hardware programming technologies, a fast reading technology is performed for the memory, and the file systems having the snapshot function are basically some dedicated systems or file systems that are implemented specifically for a certain specific function. The number of data sources may be one or more.
Specifically, the configuration information is checked and a data source is determined, and a snapshot corresponding to the service data included in the data source is created based on a snapshot technology by using a snapshot function of the data source. Any existing technology may be used to create the snapshot corresponding to the service data included in the data source, which is not limited in this embodiment of the present invention.
When disaster recovery backup is carried out on a data source to a cloud platform for the first time, a file system which is the same as the data source needs to be established in the cloud platform, and then a snapshot can be created; when disaster recovery backup is performed on a later data source, if a file system which is the same as the data source is established in the cloud platform, a snapshot can be created. If there are multiple data sources, creating snapshots corresponding to the service data of the data sources can be executed in parallel.
Optionally, the data source includes: a logical volume lvm for storing service data or a dynamic file system zfs for storing service data.
S130, the snapshot is sent to a target virtual machine of the cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, and the target virtual machine is a virtual machine which finally stores the service data of the data source.
The method comprises the steps of creating a target virtual machine in a platform, and mounting at least one virtual hard disk on the target virtual machine for storing service data of a data source.
Specifically, a source host where the data source is located sends service data of the data source to a target virtual machine of the cloud platform in a snapshot manner, and the target virtual machine receives the service data and stores the service data in the virtual hard disk. Because the target virtual machine is mounted with a plurality of virtual machine hard disks, an environment with the same topological structure does not need to be established on the cloud platform in the synchronization stage of the snapshot data, for example, the source host includes: the system comprises a source host 1 and a source host 2, wherein a target virtual machine is a virtual machine 1, and 2 hard disks are mounted on the virtual machine 1. The service data of the data source corresponding to the host 1 is stored in the corresponding hard disk 1, and the service data of the data source corresponding to the host 2 is stored in the hard disk 2, but the virtual machine in the cloud platform does not need to establish an environment with the same topological structure as the host, so that the computing resources, the memory and the cost can be saved.
According to the technical scheme of the embodiment, the configuration information contained in the configuration file is read; creating a snapshot corresponding to the service data of the data source based on the configuration information, wherein the data source has a snapshot function; the snapshot is sent to a target virtual machine of the cloud platform, so that the target virtual machine receives service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, the virtual machine of the target virtual machine, which finally stores the service data of the data source, can perform disaster recovery backup on the service data based on the cloud platform according to the requirements of users, and the disaster recovery management of the heterogeneous cloud can be realized without establishing an environment with the same topological structure on the cloud platform.
Example two
The present embodiment is optimized based on the above embodiments. Optionally, at least one virtual machine is pre-created in the cloud platform, and the virtual machine includes a target virtual machine; the metadata management module of each virtual machine stores a configuration file and a deployment mode between the source host and the target virtual machine.
Specifically, only one or more target virtual machines may be created in the cloud platform according to user requirements, where the target virtual machines are used to receive service data of source data sent by the source host, and multiple virtual machines may also be created, where one or some of the target virtual machines are designated to be used to finally receive service data of the data source, and other virtual machines are used to transfer the service data of the data source, and each virtual machine is provided with a metadata management module for storing a written configuration file.
Because the metadata management module records all source data information, the cloud platform can only start one or more virtual machines for receiving the service data of the source data, and each virtual machine mounts a plurality of hard disks to store the service data, so that the consumption of computing resources is greatly reduced, and the disaster recovery service cost is effectively reduced.
On the basis of the above embodiment, the deployment mode between the source host and the target virtual machine can be set by the user.
Optionally, the deployment mode includes: a direct connection mode and a transfer proxy mode; the direct connection mode is that the source host is respectively connected with at least one target virtual machine; in the transfer agent mode, a source host is respectively connected with at least one transfer agent node, and each transfer agent node is respectively connected with at least one target virtual machine; the transit proxy node is a host except a source host or a virtual machine except a target virtual machine in the cloud platform.
Specifically, in the direct connection mode, a source host corresponding to the data source is directly connected to at least one target virtual machine, and the source host may send service data corresponding to the data source to one or more target virtual machines to implement one or more backups.
If the network connection between the source host and the target virtual machine cannot be directly carried out, the transfer proxy node is required to send the service data corresponding to the data source of the source host to the target virtual machine. In the transit proxy mode, the transit proxy node is at least one host except for the source host, and may also be at least one virtual machine except for the target virtual machine in the cloud platform. The source host is connected with the transfer agent nodes respectively, and the transfer agent nodes are connected with at least one target virtual machine respectively.
In one specific example, as shown in fig. 2A, the target virtual machine includes: and under the direct connection mode of the first target virtual machine and the second target virtual machine, a source host corresponding to the data source is respectively connected with the first target virtual machine and the second target virtual machine, so that double backup of the data source is realized.
In another specific example, in the transfer agent mode, as shown in fig. 2B, the transfer agent node is the first host. And the source host corresponding to the data source is connected with the first host, and the first host is connected with the first target virtual machine. In fig. 2C and 2D, the transit proxy node is a first virtual machine and a second virtual machine in the cloud platform. As shown in fig. 2C, the source host corresponding to the data source is connected to the first virtual machine and the second virtual machine, respectively, the first virtual machine is connected to the first target virtual machine, and the second virtual machine is connected to the second target virtual machine. As shown in fig. 2D, the source host corresponding to the data source is connected to the first virtual machine, the first virtual machine is connected to the second virtual machine, the first virtual machine is connected to the first target virtual machine, and the second virtual machine is connected to the second target virtual machine. That is, the source host is connected to the first target virtual machine through the first virtual machine, and the source host is connected to the second target virtual machine through the first virtual machine and the second virtual machine.
It should be noted that the above deployment modes are relatively common scenarios, the optimal mode should be decided by combining network conditions, operation complexity, and other factors, and in reality, there may be a more complex network structure, and the deployment modes can be flexibly adjusted as needed.
Optionally, the file for storing the service data in the transit proxy node includes: logical volume lvm, dynamic file system zfs, or folder.
As shown in fig. 2E, the method of this embodiment specifically includes the following steps:
s210, reading configuration information contained in the configuration file.
Optionally, the configuration information included in the configuration file includes at least one of the following:
a source configuration item corresponding to the data source, a target configuration item corresponding to the data source, a network topology, a resource configuration, a resource mapping table and a cloud platform interface protocol;
wherein the source configuration item comprises: the data source name or the data source directory path, and the target configuration item comprises: the virtual machine name, the network topology is used for representing the topological relation among a plurality of hosts, and the resource configuration is used for representing the configuration information of a sending node and a receiving node; the resource mapping table is used for representing the mapping relation between the sending node and the receiving node; the cloud platform interface protocol includes a protocol, an address, a port, and an authentication access key.
In the direct connection mode, a source host serves as a sending node, and a target virtual machine serves as a receiving node; in the transfer agent mode, when a source host transmits service data to a transfer agent node, the source host is used as a sending node, and the transfer agent node is used as a receiving node; when the transfer agent node transmits the service data to the target virtual machine, the transfer agent node is used as a sending node, and the target virtual machine is used as a receiving node.
S220, creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function.
S230, based on the deployment mode, sending synchronization request information to the target virtual machine, and sending a snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information, so that the target virtual machine receives service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine; if the snapshot is the first snapshot, the target virtual machine receives the full service data in the snapshot; and if the snapshot is not the first snapshot, the target virtual machine receives the delta service data in the snapshot.
Specifically, if the deployment mode is the direct connection mode, the source host and the target virtual machine can be directly connected, and the source host directly sends the synchronization request information and the snapshot to the target virtual machine; if the deployment mode is a transfer agent mode, the source host and the target virtual machine need to be connected through a transfer agent node, and the source host can send synchronization request information and a snapshot to the target virtual machine through the transfer agent node, so that the target virtual machine receives service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine.
If the snapshot is the first snapshot, the target virtual machine receives the full service data in the snapshot; and if the snapshot is not the first snapshot, the target virtual machine receives the delta service data in the snapshot. The benefits of this are: and after the service data are stored to the virtual hard disk as much as possible, the difference of the incremental data is within an allowable range, the service is closed, and the rest incremental data are synchronized. Therefore, the service downtime can be reduced, and the convenience of service migration can be realized.
According to the technical scheme of the embodiment, the configuration information contained in the configuration file is read; creating a snapshot corresponding to the service data of the data source based on the configuration information, wherein the data source has a snapshot function; the snapshot is sent to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, the virtual machine of the target virtual machine, which finally stores the service data of a data source, can perform cloud platform-based disaster recovery backup on the service data according to the requirements of users, and the disaster recovery management of the heterogeneous cloud can be realized without establishing the same topological structure environment on the cloud platform.
Optionally, if the deployment mode is a direct connection mode, directly sending synchronization request information to the target virtual machine, and directly sending the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information;
and if the deployment mode is a transfer agent mode, sending synchronization request information to a target virtual machine through the transfer agent node, and sending the snapshot to the target virtual machine through the transfer agent node when the target virtual machine responds to the synchronization request information.
For example, in the transit proxy mode, as shown in fig. 2B, if the transit proxy node is the first host, the source host sends synchronization request information to the first host, and when the first host responds to the synchronization request information, the source host sends the snapshot to the first host; and the first host sends synchronization request information to the target virtual machine, and when the target virtual machine responds to the synchronization request information, the first host sends the snapshot to the target virtual machine.
EXAMPLE III
Fig. 3 is a flowchart of a disaster recovery method according to a third embodiment of the present invention, where this embodiment is applicable to a situation where a data service is recovered by creating a virtual host when a disaster occurs in a source host, and the method may be executed by a disaster recovery device according to the third embodiment of the present invention, where the disaster recovery device may be implemented in a software and/or hardware manner, and the disaster recovery device may be integrated in a target virtual machine. When a disaster occurs to the source host, the virtual host is used for replacing the source host to acquire service data from the virtual hard disk, so that data recovery service is realized.
As shown in fig. 3, the method specifically includes the following steps:
s310, when a disaster occurs in the source host, the configuration information stored in the metadata management module is read.
Specifically, when a disaster occurs in the source host, the target virtual machine acquires configuration information from the metadata management module.
The system comprises a data source, a network topology, a resource configuration, a resource mapping table and a cloud platform interface protocol, wherein a source configuration item corresponding to the data source, a target configuration item corresponding to the data source, the network topology, the resource configuration, the resource mapping table and the cloud platform interface protocol are arranged;
wherein the source configuration item includes: a data source name or a data source directory path, the target configuration item comprising: a virtual machine name, the network topology being configured to represent a topological relationship between the plurality of hosts, the resource configuration being configured to represent configuration information of the sending node and the receiving node; the resource mapping table is used for representing the mapping relation between the sending node and the receiving node.
In the direct connection mode, the source host serves as a sending node, and the target virtual machine serves as a receiving node; in the transit proxy mode, when the source host transmits service data to the transit proxy node, the source host is used as a sending node, and the transit proxy node is used as a receiving node; and when the transfer agent node transmits the service data to the target virtual machine, the transfer agent node is used as a sending node, and the target virtual machine is used as a receiving node.
S320, creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and connecting the virtual host with the virtual hard disk to enable the virtual hard disk to provide service data for the virtual host.
Specifically, based on the network topology and resource configuration of the source host in the configuration information, a virtual host with the same network topology and resource configuration as the source host is created in the cloud platform, and the virtual hard disk is unbound from the target virtual machine and connected with the virtual host, so that the virtual host can obtain service data from the virtual hard disk.
For example, a resource orchestration task may be issued by a target virtual machine, and a cloud platform API interface may be invoked to create a virtual host having the same resource configuration and network topology as the source host.
According to the technical scheme of the embodiment, when a disaster occurs to a source host, the configuration information stored in the metadata management module is read; and creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, wherein the virtual host is connected with the virtual hard disk, so that the virtual hard disk provides service data for the virtual host, and when a disaster occurs in the source host, the virtual host can acquire the service data from the virtual hard disk, recover the data and continue to provide services.
Example four
Fig. 4 is a schematic structural diagram of a disaster recovery backup device according to a fourth embodiment of the present invention. The embodiment may be applicable to a case of backing up service data to a cloud platform, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in a source host that generates a data source, as shown in fig. 4, where the disaster recovery backup apparatus specifically includes: a read module 410, a create module 420, and a send module 430.
The reading module 410 is configured to read configuration information included in the configuration file;
a creating module 420, configured to create a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function;
a sending module 430, configured to send the snapshot to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, where the target virtual machine is a virtual machine that finally receives the service data of the data source.
Optionally, at least one virtual machine is pre-created in the cloud platform, where the virtual machine includes a target virtual machine; the configuration file and the deployment mode between the source host and the target virtual machine are stored in the metadata management module of each virtual machine.
Optionally, the deployment mode includes: a direct connection mode and a transfer proxy mode; the direct connection mode is that the source host is respectively connected with at least one target virtual machine; the transfer agent mode is that the source host is connected with a transfer agent node, and the transfer agent node is connected with at least one target virtual machine; the transit proxy node is at least one host except a source host or at least one virtual machine except a target virtual machine in the cloud platform.
Optionally, the file in the transit agent node for storing the service data includes: logical volume lvm, dynamic file system zfs, or folder.
Optionally, the data source includes: a logical volume lvm for storing service data or a dynamic file system zfs for storing service data.
Optionally, the configuration information included in the configuration file includes at least one of the following:
a source configuration item corresponding to the data source, a target configuration item corresponding to the data source, a network topology, a resource configuration, a resource mapping table and a cloud platform interface protocol;
wherein the source configuration item includes: a data source name or a data source directory path, the target configuration item comprising: a virtual machine name, the network topology being configured to represent a topological relationship between the plurality of hosts, the resource configuration being configured to represent configuration information of the sending node and the receiving node; the resource mapping table is used for representing the mapping relation between the sending node and the receiving node;
in the direct connection mode, the source host serves as a sending node, and the target virtual machine serves as a receiving node; in the transit proxy mode, when the source host transmits service data to the transit proxy node, the source host is used as a sending node, and the transit proxy node is used as a receiving node; and when the transfer agent node transmits the service data to the target virtual machine, the transfer agent node is used as a sending node, and the target virtual machine is used as a receiving node.
Optionally, the sending module 430 is specifically configured to:
based on a deployment mode, sending synchronization request information to the target virtual machine, and sending the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information; if the snapshot is a first snapshot, the target virtual machine receives full service data in the snapshot; and if the snapshot is not the first snapshot, the target virtual machine receives the delta service data in the snapshot.
Optionally, the sending module 430 includes:
a first sending unit, configured to directly send synchronization request information to the target virtual machine if the deployment mode is a direct connection mode, and directly send the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information;
a second sending unit, configured to send, if the deployment mode is a transit proxy mode, synchronization request information to a target virtual machine through the transit proxy node, and send, when the target virtual machine responds to the synchronization request information, the snapshot to the target virtual machine through the transit proxy node.
The product can execute the disaster recovery backup method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a disaster recovery device according to a fifth embodiment of the present invention. The embodiment may be applicable to a case where a data service is restored by creating a virtual host when a disaster occurs in a source host, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in a target virtual machine, as shown in fig. 5, where the disaster recovery backup apparatus specifically includes: a read module 510 and a create module 520.
A reading module 510, configured to read configuration information stored in the metadata management module when a disaster occurs in the source host;
a creating module 520, configured to create, based on the configuration information, a virtual host having the same resource configuration and network topology as the source host, and the virtual host is connected to the virtual hard disk, so that the virtual hard disk provides service data to the virtual host.
The product can execute the disaster recovery method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a block diagram of a computer device according to a sixth embodiment of the present invention, where the computer device may be a source host or a target virtual machine, as shown in fig. 6, and the computer device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of processors 610 in the computer device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630 and the output device 640 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 6.
The memory 620 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the disaster recovery backup method in the embodiment of the present invention (for example, the reading module 410, the creating module 420, and the sending module 430 in the disaster recovery backup apparatus), or program instructions/modules corresponding to the disaster recovery method in the embodiment of the present invention (for example, the reading module 510 and the creating module 520 in the disaster recovery backup apparatus). The processor 610 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 620, so as to implement the disaster recovery backup method described above.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 may further include memory located remotely from the processor 610, which may be connected to a computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 640 may include a display device such as a display screen.
EXAMPLE seven
The seventh embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the disaster recovery backup method provided in all embodiments of the present invention: reading configuration information contained in the configuration file; creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function; sending the snapshot to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, wherein the target virtual machine is a virtual machine which finally receives the service data of the data source;
or implementing the disaster recovery method provided by all the inventive embodiments of the present application: reading the configuration information stored in the metadata management module when a disaster occurs to the source host; and creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and connecting the virtual host with the virtual hard disk so that the virtual hard disk provides service data for the virtual host.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (13)

1. A disaster recovery backup method is applied to a source host, wherein the source host is a host generating a data source, and the method comprises the following steps:
reading configuration information contained in the configuration file;
creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function;
and sending the snapshot to a target virtual machine of a cloud platform, so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, wherein the target virtual machine is a virtual machine which finally receives the service data of the data source.
2. The method according to claim 1, wherein at least one virtual machine is pre-created in the cloud platform, the virtual machine comprising a target virtual machine; the configuration file and the deployment mode between the source host and the target virtual machine are stored in the metadata management module of each virtual machine.
3. The method of claim 2, wherein the deployment mode comprises: a direct connection mode and a transfer proxy mode; the direct connection mode is that the source host is respectively connected with at least one target virtual machine; the transfer agent mode is that the source host is connected with a transfer agent node, and the transfer agent node is connected with at least one target virtual machine; the transit proxy node is at least one host except a source host or at least one virtual machine except a target virtual machine in the cloud platform.
4. The method of claim 3, wherein the file in the transit proxy node for storing the traffic data comprises: logical volume lvm, dynamic file system zfs, or folder.
5. The method of claim 1, wherein the data source comprises: a logical volume lvm for storing service data or a dynamic file system zfs for storing service data.
6. The method of claim 3, wherein the configuration information contained in the configuration file comprises at least one of:
a source configuration item corresponding to the data source, a target configuration item corresponding to the data source, a network topology, a resource configuration, a resource mapping table and a cloud platform interface protocol;
wherein the source configuration item includes: a data source name or a data source directory path, the target configuration item comprising: a virtual machine name, the network topology being configured to represent a topological relationship between the plurality of hosts, the resource configuration being configured to represent configuration information of the sending node and the receiving node; the resource mapping table is used for representing the mapping relation between the sending node and the receiving node;
in the direct connection mode, the source host serves as a sending node, and the target virtual machine serves as a receiving node; in a transit proxy mode, when the source host transmits service data to the transit proxy node, the source host is used as a sending node, and the transit proxy node is used as a receiving node; and when the transfer agent node transmits the service data to the target virtual machine, the transfer agent node is used as a sending node, and the target virtual machine is used as a receiving node.
7. The method of claim 3, wherein sending the snapshot to a target virtual machine of a cloud platform to enable the target virtual machine to receive the business data in the snapshot comprises:
based on a deployment mode, sending synchronization request information to the target virtual machine, and sending the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information; if the snapshot is a first snapshot, the target virtual machine receives full service data in the snapshot; and if the snapshot is not the first snapshot, the target virtual machine receives the delta service data in the snapshot.
8. The method of claim 7, wherein sending synchronization request information to the target virtual machine based on a deployment mode and sending the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information comprises:
if the deployment mode is a direct connection mode, directly sending synchronization request information to the target virtual machine, and directly sending the snapshot to the target virtual machine when the target virtual machine responds to the synchronization request information;
and if the deployment mode is a transfer agent mode, sending synchronization request information to a target virtual machine through the transfer agent node, and sending the snapshot to the target virtual machine through the transfer agent node when the target virtual machine responds to the synchronization request information.
9. A disaster recovery method is applied to a target virtual machine, and the method comprises the following steps:
reading the configuration information stored in the metadata management module when a disaster occurs to the source host;
and creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and connecting the virtual host with the virtual hard disk so that the virtual hard disk provides service data for the virtual host.
10. A disaster recovery backup device integrated into a source host, the source host being a host that generates a data source, the device comprising:
the reading module is used for reading the configuration information contained in the configuration file;
the creating module is used for creating a snapshot corresponding to the service data of the data source based on the configuration information; the data source has a snapshot function;
the sending module is used for sending the snapshot to a target virtual machine of a cloud platform so that the target virtual machine receives the service data in the snapshot and stores the service data in at least one virtual hard disk mounted on the target virtual machine, and the target virtual machine is a virtual machine which finally receives the service data of the data source.
11. A disaster recovery apparatus integrated into a target virtual machine, where the target virtual machine is a virtual machine that ultimately stores service data of a data source, the apparatus comprising:
the reading module is used for reading the configuration information stored in the metadata management module when a disaster occurs to the source host;
and the creating module is used for creating a virtual host which has the same resource configuration and network topology as the source host based on the configuration information, and the virtual host is connected with the virtual hard disk so that the virtual hard disk provides service data for the virtual host.
12. A computer device, which is a source host or a target virtual machine, and which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein if the computer device is the source host, the processor executes the computer program to implement the disaster recovery backup method according to any one of claims 1 to 8; if the computer device is a target virtual machine, the processor implements the disaster recovery method according to claim 9 when executing the program.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the disaster recovery backup method according to any one of claims 1 to 8, or carries out the disaster recovery method according to claim 9.
CN202111440465.5A 2021-11-30 2021-11-30 Disaster recovery backup and recovery method, device, equipment and storage medium Pending CN114281600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111440465.5A CN114281600A (en) 2021-11-30 2021-11-30 Disaster recovery backup and recovery method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111440465.5A CN114281600A (en) 2021-11-30 2021-11-30 Disaster recovery backup and recovery method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114281600A true CN114281600A (en) 2022-04-05

Family

ID=80870326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111440465.5A Pending CN114281600A (en) 2021-11-30 2021-11-30 Disaster recovery backup and recovery method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114281600A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900532A (en) * 2022-05-09 2022-08-12 南方电网大数据服务有限公司 Power data disaster tolerance method, system, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900532A (en) * 2022-05-09 2022-08-12 南方电网大数据服务有限公司 Power data disaster tolerance method, system, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10073747B2 (en) Reducing recovery time in disaster recovery/replication setup with multitier backend storage
US8949182B2 (en) Continuous and asynchronous replication of a consistent dataset
US9235594B2 (en) Synchronizing updates across cluster filesystems
WO2017049828A1 (en) Method, device and system for data processing based on linux
CN101808127B (en) Data backup method, system and server
US11947429B2 (en) Data disaster recovery method and site
JP2008511924A (en) Automated failover in a cluster of geographically distributed server nodes using data replication over long-distance communication links
CN105242990A (en) Cloud platform based data backup method and apparatus
CN111651275A (en) MySQL cluster automatic deployment system and method
CN105446831A (en) Server-Free backup method in conjunction with SAN
CN110633046A (en) Storage method and device of distributed system, storage equipment and storage medium
CN106873902B (en) File storage system, data scheduling method and data node
CN112256477A (en) Virtualization fault-tolerant method and device
US10318385B2 (en) Service recovery using snapshots and interservice messages
CN112612939A (en) Crawler deployment method, system, device, equipment and storage medium
CN111225003B (en) NFS node configuration method and device
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN114281600A (en) Disaster recovery backup and recovery method, device, equipment and storage medium
CN108352995B (en) SMB service fault processing method and storage device
CN113608691A (en) High-availability method and device for NFS (network file system) of storage array
CN114661420A (en) Application protection method, device and system based on Kubernetes container platform
CN115658390A (en) Container disaster tolerance method, system, device, equipment and computer readable storage medium
CN117643015A (en) Snapshot-based client-side key modification of log records manages keys across a series of nodes
CN113934575A (en) Big data backup system and method based on distributed copy
CN114546725A (en) Cross-cluster backup method, system, medium and electronic device for stateful application

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing

Applicant after: Beijing Qingyun Science and Technology Co.,Ltd.

Address before: 100020 601, 6 floor, 16 building, No. 36 Chuang Yuan Road, Chaoyang District, Beijing.

Applicant before: Beijing Qingyun Science and Technology Co.,Ltd.