CN111913832A - Data backup method and data backup equipment - Google Patents
Data backup method and data backup equipment Download PDFInfo
- Publication number
- CN111913832A CN111913832A CN201910388995.6A CN201910388995A CN111913832A CN 111913832 A CN111913832 A CN 111913832A CN 201910388995 A CN201910388995 A CN 201910388995A CN 111913832 A CN111913832 A CN 111913832A
- Authority
- CN
- China
- Prior art keywords
- data
- backup
- snapshot
- block
- mapping configuration
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000011084 recovery Methods 0.000 claims abstract description 63
- 238000013507 mapping Methods 0.000 claims description 102
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data backup method and data backup equipment. The data backup method is applied to a second backup device, wherein the second backup device is a virtual block device, and comprises the following steps: receiving first backup data sent by first backup equipment, wherein the first backup data is obtained by the first backup equipment through backup of data in first target equipment by block-level continuous data protection CDP (continuous data protection), and the first backup data comprises at least one data block; and backing up the first backup data to an object storage to obtain second backup data, wherein the second backup data comprises at least one data object, and each data block corresponds to one data object. The data needing to be backed up in the electronic equipment is stored in the first backup equipment in a block-level CDP backup mode, and then the backup data is backed up in the virtual block equipment, so that the storage expansibility is high, the performance is high, the recovery speed is high when the recovery is needed, and meanwhile, the cost is favorably reduced.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data backup method and a data backup device.
Background
The disaster recovery system is characterized in that two or more sets of data backup centers are established in remote places at a distance, and when one data backup center stops working due to accidents (such as fire, earthquake and the like), data can be recovered through other data backup systems, so that data loss is avoided.
In current backup and disaster recovery markets, data backup schemes are usually stored and backed up by block storage. Block storage provides high performance random I/O (input/output port) and data throughput under certain network conditions. However, the method for disaster recovery based on storage of the block storage device has high cost and is not easy to expand.
Disclosure of Invention
The embodiment of the invention provides a data backup method and data backup equipment, and aims to solve the problems that existing disaster recovery backup equipment is high in success and not easy to expand.
In a first aspect, an embodiment of the present invention provides a data backup method, which is applied to a second backup device, where the second backup device is a virtual block device, and the data backup method includes the following steps:
receiving first backup data sent by first backup equipment, wherein the first backup data is obtained by the first backup equipment through backing up data in first target equipment through block-level continuous data protection CDP backup, and the first backup data comprises at least one data block;
and backing up the first backup data to an object storage to obtain second backup data, wherein the second backup data comprises at least one data object, and each data block corresponds to one data object.
Optionally, the backing up the first backup data to the object storage includes:
saving each data block in the first backup data to the snapshot bucket;
recording the corresponding relation between each data block saved in the snapshot bucket and each data object and the position of each data block as a snapshot mapping item corresponding to each data block;
recording each snapshot mapping item to a snapshot mapping configuration, and inserting an identification code of the snapshot mapping configuration into a snapshot history;
saving the snapshot mapping configuration and the snapshot history to the configuration bucket.
Optionally, after saving the snapshot mapping configuration and the snapshot history to the configuration bucket, the method further includes:
under the condition that a first recovery instruction is received, sending the snapshot mapping configuration to second target equipment according to the first recovery instruction, wherein the second target equipment is the same equipment as the first target equipment or different equipment, and the first recovery instruction comprises a snapshot mapping configuration selection instruction of the first target equipment;
under the condition that a second recovery instruction is received, sending the snapshot history corresponding to the first target equipment to the second target equipment, wherein the second recovery instruction comprises a selection instruction of the snapshot history of the first target equipment;
under the condition that a third recovery instruction is received, sending the snapshot mapping configuration to the second target equipment, wherein the third recovery instruction comprises a selection instruction of the snapshot mapping configuration in the snapshot history;
removing the duplicate of the snapshot mapping configuration determined by the third recovery instruction according to the identification code of the snapshot mapping configuration;
and sending the corresponding data object to the second target equipment according to the deduplicated snapshot mapping configuration so that the second target equipment can write the data object into a data block.
In a second aspect, an embodiment of the present invention provides a data backup method, which is applied to a first backup device, where the data backup method includes the following steps:
the first backup device backs up data in a first target device through block-level CDP backup to obtain first backup data, wherein the first backup data comprises at least one data block;
and sending the first backup data to a second backup device so that the second backup device backs up the first backup data to an object for storage and obtains second backup data, wherein the second backup data comprises at least one data object, each data block corresponds to one data object, and the second backup device is a virtual block device.
In a third aspect, an embodiment of the present invention provides a data backup device, where the backup device is a second backup device, and the second backup device is a virtual block device, and the second backup device includes:
a receiving module, configured to receive first backup data sent by a first backup device, where the first backup data is obtained by the first backup device backing up data in a first target device through block-level CDP backup, and the first backup data includes at least one data block;
and the backup module is used for backing up the first backup data to an object for storage so as to obtain second backup data, the second backup data comprises at least one data object, and each data block corresponds to one data object.
Optionally, the second backup device includes a snapshot bucket and a configuration bucket, and the backup module includes:
the first saving submodule is used for saving each data block in the first backup data to the snapshot bucket;
a recording submodule, configured to record a correspondence between each data block saved in the snapshot bucket and each data object, and a position of each data block as a snapshot mapping item corresponding to each data block;
the inserting module is used for recording each snapshot mapping item to a snapshot mapping configuration and inserting the identification code of the snapshot mapping configuration into snapshot history;
a second saving submodule, configured to save the snapshot mapping configuration and the snapshot history to the configuration bucket.
Optionally, the method further includes: a first sending module, configured to send the snapshot mapping configuration to a second target device according to a first recovery instruction when the first recovery instruction is received, where the second target device is the same device as or different from the first target device, and the first recovery instruction includes a snapshot mapping configuration selection instruction for the first target device;
a second sending module, configured to send, when a second recovery instruction is received, the snapshot history corresponding to the first target device to the second target device, where the second recovery instruction includes a selection instruction of the snapshot history of the first target device;
a third sending module, configured to send the snapshot mapping configuration to the second target device when a third recovery instruction is received, where the third recovery instruction includes a selection instruction of the snapshot mapping configuration in the snapshot history;
the duplication removing module is used for removing the duplication of the snapshot mapping configuration determined by the third recovery instruction according to the identification code of the snapshot mapping configuration;
and the fourth sending module is used for sending the corresponding data object to the second target equipment according to the snapshot mapping configuration after the duplication is removed so that the second target equipment can write the data object into a data block.
In a fourth aspect, an embodiment of the present invention provides a data backup device, where the data backup device is a first backup device, and the data backup device includes:
the first backup device is used for backing up data in the first target device through block-level CDP backup to obtain first backup data, and the first backup data comprises at least one data block;
the sending module is configured to send the first backup data to a second backup device, so that the second backup device backs up the first backup data to an object for storage, and obtains second backup data, where the second backup data includes at least one data object, and each data block corresponds to one data object, where the second backup device is a virtual block device.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the message push display method according to any one of the above.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the data backup method according to any one of the preceding claims.
The data needing to be backed up in the electronic equipment is stored in the first backup equipment in a block-level CDP backup mode, and then the backup data is backed up in the virtual block equipment, so that the storage expansibility is high, the performance is high, the recovery speed is high when the recovery is needed, and meanwhile, the cost is favorably reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flow chart of a data backup method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a data block in a block store;
FIG. 3 is a schematic diagram of a bucket in object store;
FIG. 4 is a flowchart of a data backup method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a snapshot file in one embodiment of the invention;
FIG. 6 is a flowchart of a data backup method according to an embodiment of the present invention;
FIG. 7 is a flowchart of a data backup method according to an embodiment of the present invention;
FIG. 8 is a flowchart of a data backup method according to an embodiment of the present invention;
fig. 9 is a structural diagram of a second backup device according to an embodiment of the present invention;
fig. 10 is another structural diagram of a second backup device according to an embodiment of the present invention;
fig. 11 is another structural diagram of a second backup device according to an embodiment of the present invention;
fig. 12 is a block diagram of a first backup device according to an embodiment of the present invention;
fig. 13 is a block diagram of a data backup system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data backup method which is applied to second backup equipment.
The second backup device is a virtual block device, that is, the second backup device itself is not a block device but an object storage, and is virtualized as the block device by a virtualization means, and the second backup device may use an existing object storage server and then virtualizes the second backup device as the block device, or may directly use an object storage service provided by an existing cloud service provider and then virtualizes the second backup device as the block device used in data backup.
As shown in fig. 1, the data backup method includes the following steps:
step 101: first backup data sent by first backup equipment is received.
The first backup data in this embodiment is obtained by the first backup device backing up data in the first target device through block level CDP (continuous data Protection).
Here, the first target device refers to a device where original data to be backed up is located, and after the data is backed up in the first target device through the block level CDP, the data is sent to the second backup device so as to back up the first backup data again through the second backup device.
The CDP backup in this embodiment is a block-level CDP backup, so the first backup data obtained by backup is composed of one or more data blocks.
As shown in fig. 2, fig. 2 represents a segment of data in a block storage, each small box in fig. 2 represents a data block 201, and the data on the block storage is divided into equal-sized blocks, referred to as data blocks 201, by a fixed value.
Step 102: and backing up the first backup data to an object storage to obtain second backup data, wherein the second backup data comprises at least one data object, and each data block corresponds to one data object.
The first backup data is stored in the second backup device in the form of object storage (or object-based storage), as shown in fig. 3, the object storage is composed of two levels, namely, a bucket 300 and an object 301 (or data object), and each bucket includes a plurality of objects 301. The first backup data is in the process of backing up to the object storage, that is, the data in each data block is moved to each data object.
Thus, there are actually two backups of the original data in the first target device, where one backup is the first backup data located in the first backup device and the other is the second backup data located in the second backup device.
The existing block equipment has high cost, poor expandability and relatively complex technology.
The data needing to be backed up in the electronic equipment is stored in the first backup equipment in a block level CDP backup mode, and then the backup data is backed up to the object storage in the virtual block equipment.
Because the object storage has a unified standard, for example, the existing object storage is based on a restful api (Representational State Transfer; Application Programming Interface, Application Programming Interface) unified standard, so that the support functions of different manufacturers for the object storage are basically the same, and on the basis, the object storage can be used as a unified object storage backup gateway, and can support almost all the object storage in the market as second backup storage for disaster recovery backup. Therefore, the method has high universality and expandability.
Meanwhile, the object storage service is provided by a cloud manufacturer, for example, the cloud service provided by the existing supplier is selected, the object storage service has the characteristics of almost infinite capacity and pay-per-volume, the object storage service is more flexible to use, the expandability is stronger, and the cost is relatively lower.
In addition, the object storage of the second backup device is a virtual block-level device, and the first backup device is also a block-level device, so that the first backup data can be backed up in the second backup data without greatly adjusting the backup architecture of the first backup data, which is more convenient and faster.
Optionally, in a specific embodiment, as shown in fig. 4, the step 102 includes:
step 1021: and saving each data block in the first backup data to the snapshot bucket.
When each data block in the first backup data is saved in the snapshot bucket, it is necessary to ensure that the data in each data block is all saved in the snapshot bucket. If the backup is the first backup, the data (or called full data) in all the data blocks needs to be saved in the snapshot bucket, and if the backup is not the first backup, the data blocks corresponding to the data increment between the backup and the previous backup in the time period only need to be saved in the snapshot bucket.
As shown in fig. 5, the left side in fig. 5 represents data that needs to be backed up at different times, and the right side represents data that needs to be saved into the snapshot bucket at the time of backup. If the data at the time t0 are a0, B0, C0, D0, E0, F0, G0 and H0, the data to be backed up for the first time are a0, B0, C0, D0, E0, F0, G0 and H0; at time t1, if the data change is data a1, B1, C1, D1, E0, F0, G0, and H0, at time t1, only the data a1, B1, C1, and D1 that need to be backed up are changed, and the data E0, F0, G0, and H0 that do not change need to be restored in the snapshot bucket, and so on.
Step 1022: and recording the corresponding relation between each data block saved in the snapshot bucket and each data object and the position of each data block as a snapshot mapping item corresponding to each data block.
The snapshot mapping items are used for indexing the corresponding relation between the data blocks and the data objects, so that the unique mapping relation among the positions of the data blocks, the data objects and the database can be determined according to each snapshot mapping item, and the directory and the positions of the data can be determined in the second backup device. In this way, the delta data in the data block can be determined from a snapshot map entry.
Step 1023: recording each snapshot mapping item to a snapshot mapping configuration, and inserting an Identification (ID) of the snapshot mapping configuration into a snapshot history.
The data increment at each backup may include one or more data blocks, and thus, multiple snapshot map entries may be generated for each backup. Thus, a snapshot map configuration that includes all snapshot map entries generated in a backup includes virtually all data increments in the backup.
Step 1024: saving the snapshot mapping configuration and the snapshot history to the configuration bucket.
The object storage of the second backup device includes two buckets, a configuration bucket and a snapshot bucket, wherein the configuration bucket is used for storing the configuration file object, and the snapshot bucket is used for storing the snapshot data object.
The number of snapshot data objects is typically very large and may affect the read and write performance of the profile object. The configuration file object and the snapshot data object are respectively stored in different buckets, and the read-write performance of object storage is improved.
As shown in fig. 6, after receiving the backup instruction, first searching for a virtual block device, that is, the second backup device, creating a snapshot if the virtual block device is not found, and directly storing the backup data in the object storage if the virtual block device is not found.
In the process of creating the snapshot, if the file is copied for the first time, the latest data, that is, all the data, which is backed up is determined, and if the file is not copied for the first time, that is, the previously created snapshot already exists, only the newly added data, or incremental data, from the time point of the latest snapshot to the current time point is copied. After the snapshot is created, a data block and related information are received, where the data block and related information refer to a data block and related information where the data to be backed up is located.
Furthermore, the API is called to upload the data object, that is, the data in each data block is backed up to the data object. And then recorded as a snapshot map entry based on the data block and the corresponding data object. And repeating the steps until snapshot mapping items corresponding to all the data blocks are recorded, then storing all the snapshot mapping items in a mapping configuration, adding the mapping configuration into the history snapshot, and uploading snapshot history and snapshot mapping files in the calling API, namely completing data backup in the second backup device.
Optionally, after the step 1024, the method further includes:
and under the condition of receiving a first recovery instruction, sending the snapshot mapping configuration to a second target device according to the first recovery instruction.
In some cases, it may be desirable to restore data to a second target device, where the second target device is the same device or a different device than the first target device. It should be understood that if the data in the original first target device is lost, the backup data may be directly restored to the original first target device, in which case, the first target device and the second target device are the same device.
If the first target device is not available, for example, because of physical damage due to fire or the like, or if the device is upgraded and replaced with a new one, the second target device and the first target device are different devices.
The first restore instruction includes a snapshot mapping configuration selection instruction for the first target device, that is, the first restore instruction is used to determine the original device of the data that needs to be restored.
For example, the second backup device backs up a plurality of devices, including a first server, a second server, a third server, and the like, where the second server needs to restore original data in the second server to a fourth server due to device update, the second server is the first target device, that is, the original device, and the fourth server is the second target device, and the first restore instruction includes a selection instruction actually including a snapshot mapping configuration for selecting the second server from the three servers.
And under the condition of receiving a second recovery instruction, sending the snapshot history corresponding to the first target equipment to the second target equipment.
The second restore instruction includes a selection instruction for the snapshot history of the first target device, which may be understood as the second restore instruction for selecting a snapshot to be restored.
For example, the snapshots related to the second server in the second backup device include three snapshots, namely a first snapshot, a second snapshot, and a third snapshot, which correspond to different time points, respectively, and the third snapshot of the latest backup needs to be restored in the restoration process, and the selection instruction included in the second restoration instruction is actually an instruction for selecting the third snapshot from the three snapshots.
And under the condition that a third recovery instruction is received, sending the snapshot mapping configuration to the second target equipment.
The third recovery instruction includes a selection instruction for the snapshot mapping configuration in the snapshot history, where the snapshot mapping configuration refers to the snapshot mapping configuration generated in step 1023, and according to the determined snapshot mapping configuration, the corresponding snapshot mapping file can be acquired, so as to implement call of the snapshot to recover the data.
And removing the duplicate of the snapshot mapping configuration determined by the third recovery instruction according to the identification code of the snapshot mapping configuration.
There is a high probability that multiple data objects from snapshots at different times exist in the same data block position of a range of snapshots, so that the data objects need to be deduplicated.
The deduplication process may be deduplicated by retrieving whether the same snapshot map item exists.
In one embodiment, deduplication is implemented through a B + tree.
Specifically, the implementation uses the index of the data block as a key, and uses the snapshot map entry and the snapshot ID as values to construct a B + tree. And traversing all snapshots of the selected range and traversing each snapshot mapping item in the snapshot mapping configuration corresponding to each snapshot, and inserting each snapshot mapping item into the B + tree.
There may be two situations during insertion: first, if the index of the current data block does not exist in the B + tree, the index of the data block is used as a key, and the snapshot map entry and the snapshot ID are used as values and inserted into the B + tree. Secondly, if the index of the current data block exists in the B + tree, comparing the snapshot ID of the snapshot mapping item to be inserted with the snapshot ID in the value in the B + tree, and if the snapshot ID of the snapshot mapping item to be inserted is newer, replacing the value of the same key, otherwise, not needing to be inserted.
And sending the corresponding data object to the second target equipment according to the deduplicated snapshot mapping configuration so that the second target equipment can write the data object into a data block.
After the construction of the B + tree is completed, the snapshot mapping items in the leaf nodes correspond to the data objects of the data blocks at different positions in the object storage, and the data objects are the latest data at the creation time of the specified snapshot. Traversing snapshot mapping items in the leaf nodes, acquiring a data object corresponding to the data object ID through an object storage API, forwarding data through an IO service (Input/Output, Input/Output service), and finally completing recovery operation.
As shown in fig. 7, it can be summarized that, after receiving the recovery instruction, the API is first called to download a device list in the object storage server, where the device list includes devices that can perform data reply. After receiving a command for executing the device for restoring, calling the API to download the snapshot history of the device to be restored, and further, after receiving a command for specifying the snapshot for restoring, calling the API to download a snapshot mapping file from the first snapshot to a specified snapshot range, that is, a snapshot mapping file corresponding to all data backed up before the time node corresponding to the specified snapshot.
After the snapshot mapping file is obtained, the snapshot mapping file is deduplicated, taking B + tree deduplication as an example, snapshot mapping items (or mapping items) in the snapshot mapping file are continuously added into a B + tree, after all mapping items are processed, a leaf node is obtained, then an API is called to download a data object associated with the mapping items in the leaf node, the data object is written into a data block, the leaf node is continuously obtained, and after all nodes are processed, data recovery is completed.
The embodiment of the invention also provides a data backup method which is applied to the first backup device.
The first backup device may be the first backup device in the above embodiment, and as shown in fig. 8, the data backup method includes the following steps:
step 801: the first backup device backs up data in a first target device through block-level CDP backup to obtain first backup data, wherein the first backup data comprises at least one data block;
step 802: and sending the first backup data to a second backup device so that the second backup device backs up the first backup data to an object for storage and obtains second backup data, wherein the second backup data comprises at least one data object, each data block corresponds to one data object, and the second backup device is a virtual block device.
In this embodiment, the block-level CDP backup process may refer to the existing and possible block-level CDP backup process, and after the first backup data is sent to the second backup data in step 802, the above-described embodiment may be referred to, and various technical effects described in the above-described embodiment may be achieved, which is not described herein again.
An embodiment of the present invention provides a data backup device, where the backup device is a second backup device 900, and the second backup device 900 is a virtual block device, as shown in fig. 9, where the second backup device 900 includes:
a receiving module 901, configured to receive first backup data sent by a first backup device, where the first backup data is obtained by the first backup device backing up data in a first target device through block-level CDP backup, and the first backup data includes at least one data block;
a backup module 902, configured to backup the first backup data to an object storage to obtain second backup data, where the second backup data includes at least one data object, and each data block corresponds to one data object.
Optionally, as shown in fig. 10, the second backup device 900 includes a snapshot bucket and a configuration bucket, and the backup module 902 includes:
a first saving submodule 9021, configured to save each data block in the first backup data to the snapshot bucket;
a recording submodule 9022, configured to record, as a snapshot mapping item corresponding to each data block, a correspondence between each data block stored in the snapshot bucket and each data object, and a position of each data block;
an inserting module 9023, configured to record each snapshot mapping item to a snapshot mapping configuration, and insert an identifier of the snapshot mapping configuration into a snapshot history;
a second saving submodule 9024, configured to save the snapshot mapping configuration and the snapshot history to the configuration bucket.
Optionally, as shown in fig. 11, the method further includes: a first sending module 903, configured to send the snapshot mapping configuration to a second target device according to a first recovery instruction when the first recovery instruction is received, where the second target device is the same device as the first target device or a different device, and the first recovery instruction includes a snapshot mapping configuration selection instruction for the first target device;
a second sending module 904, configured to send, when a second recovery instruction is received, the snapshot history corresponding to the first target device to the second target device, where the second recovery instruction includes a selection instruction of the snapshot history of the first target device;
a third sending module 905, configured to send the snapshot mapping configuration to the second target device when a third recovery instruction is received, where the third recovery instruction includes a selection instruction of the snapshot mapping configuration in the snapshot history;
a deduplication module 906, configured to deduplicate, according to the identifier of the snapshot mapping configuration, the snapshot mapping configuration determined by the third recovery instruction;
a fourth sending module 907, configured to send a corresponding data object to the second target device according to the snapshot mapping configuration after the duplication removal, so that the second target device writes the data object in a data block.
The data needing to be backed up in the electronic equipment is stored in the first backup equipment in a block-level CDP backup mode, and then the backup data is backed up in the virtual block equipment, so that the storage expansibility is high, the performance is high, the recovery speed is high when the recovery is needed, and meanwhile, the cost is favorably reduced.
An embodiment of the present invention provides a data backup device, where the data backup device is a first backup device 1200, and as shown in fig. 12, the first backup device 1200 includes:
a backup module 1201, configured to backup, by the first backup device through a block-level CDP backup, data in a first target device to obtain first backup data, where the first backup data includes at least one data block;
a sending module 1202, configured to send the first backup data to a second backup device, so that the second backup device backs up the first backup data to an object for storage, and obtains second backup data, where the second backup data includes at least one data object, and each data block corresponds to one data object, where the second backup device is a virtual block device.
The data needing to be backed up in the electronic equipment is stored in the first backup equipment in a block-level CDP backup mode, and then the backup data is backed up in the virtual block equipment, so that the storage expansibility is high, the performance is high, the recovery speed is high when the recovery is needed, and meanwhile, the cost is favorably reduced.
As shown in fig. 13, the data backup system in this embodiment includes an IO module, a CDP module, a virtual block-level device, and an API calling module, where the IO module provides data writing and reading services, the CDP module is equivalent to the first backup device, the virtual block-level device is actually equivalent to the second backup device, and the API calling module is used to call an API interface of the object storage service.
The data backup method comprises the steps of executing the data backup method in the embodiment, and realizing the backup and recovery of the data.
An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the data backup method according to any one of the above.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the data backup method according to any one of the preceding claims.
Since the technical solution in this embodiment can implement all technical solutions of the above data backup method embodiment, at least all technical effects can be achieved, and details are not described here.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (11)
1. A data backup method is applied to a second backup device, and is characterized in that the second backup device is a virtual block device, and the data backup method comprises the following steps:
receiving first backup data sent by first backup equipment, wherein the first backup data is obtained by the first backup equipment through backing up data in first target equipment through block-level continuous data protection CDP backup, and the first backup data comprises at least one data block;
and backing up the first backup data to an object storage to obtain second backup data, wherein the second backup data comprises at least one data object, and each data block corresponds to one data object.
2. The data backup method of claim 1, wherein the second backup device comprises a snapshot bucket and a configuration bucket, and wherein backing up the first backup data to an object store comprises:
saving each data block in the first backup data to the snapshot bucket;
recording the corresponding relation between each data block saved in the snapshot bucket and each data object and the position of each data block as a snapshot mapping item corresponding to each data block;
recording each snapshot mapping item to a snapshot mapping configuration, and inserting an identification code of the snapshot mapping configuration into a snapshot history;
saving the snapshot mapping configuration and the snapshot history to the configuration bucket.
3. The data backup method of claim 2, wherein after saving the snapshot map configuration and the snapshot history to the configuration bucket, the method further comprises:
under the condition that a first recovery instruction is received, sending the snapshot mapping configuration to second target equipment according to the first recovery instruction, wherein the second target equipment is the same equipment as the first target equipment or different equipment, and the first recovery instruction comprises a snapshot mapping configuration selection instruction of the first target equipment;
under the condition that a second recovery instruction is received, sending the snapshot history corresponding to the first target equipment to the second target equipment, wherein the second recovery instruction comprises a selection instruction of the snapshot history of the first target equipment;
under the condition that a third recovery instruction is received, sending the snapshot mapping configuration to the second target equipment, wherein the third recovery instruction comprises a selection instruction of the snapshot mapping configuration in the snapshot history;
removing the duplicate of the snapshot mapping configuration determined by the third recovery instruction according to the identification code of the snapshot mapping configuration;
and sending the corresponding data object to the second target equipment according to the deduplicated snapshot mapping configuration so that the second target equipment can write the data object into a data block.
4. A data backup method is applied to a first backup device, and is characterized by comprising the following steps:
the first backup device backs up data in a first target device through block-level CDP backup to obtain first backup data, wherein the first backup data comprises at least one data block;
and sending the first backup data to a second backup device so that the second backup device backs up the first backup data to an object for storage and obtains second backup data, wherein the second backup data comprises at least one data object, each data block corresponds to one data object, and the second backup device is a virtual block device.
5. A data backup device, wherein the backup device is a second backup device, and the second backup device is a virtual block device, the second backup device comprising:
a receiving module, configured to receive first backup data sent by a first backup device, where the first backup data is obtained by the first backup device backing up data in a first target device through block-level CDP backup, and the first backup data includes at least one data block;
and the backup module is used for backing up the first backup data to an object for storage so as to obtain second backup data, the second backup data comprises at least one data object, and each data block corresponds to one data object.
6. The data backup device of claim 5 wherein the second backup device comprises a snapshot bucket and a configuration bucket, the backup module comprising:
the first saving submodule is used for saving each data block in the first backup data to the snapshot bucket;
a recording submodule, configured to record a correspondence between each data block saved in the snapshot bucket and each data object, and a position of each data block as a snapshot mapping item corresponding to each data block;
the inserting module is used for recording each snapshot mapping item to a snapshot mapping configuration and inserting the identification code of the snapshot mapping configuration into snapshot history;
a second saving submodule, configured to save the snapshot mapping configuration and the snapshot history to the configuration bucket.
7. The data backup device of claim 6, further comprising:
a first sending module, configured to send the snapshot mapping configuration to a second target device according to a first recovery instruction when the first recovery instruction is received, where the second target device is the same device as or different from the first target device, and the first recovery instruction includes a snapshot mapping configuration selection instruction for the first target device;
a second sending module, configured to send, when a second recovery instruction is received, the snapshot history corresponding to the first target device to the second target device, where the second recovery instruction includes a selection instruction of the snapshot history of the first target device;
a third sending module, configured to send the snapshot mapping configuration to the second target device when a third recovery instruction is received, where the third recovery instruction includes a selection instruction of the snapshot mapping configuration in the snapshot history;
the duplication removing module is used for removing the duplication of the snapshot mapping configuration determined by the third recovery instruction according to the identification code of the snapshot mapping configuration;
and the fourth sending module is used for sending the corresponding data object to the second target equipment according to the snapshot mapping configuration after the duplication is removed so that the second target equipment can write the data object into a data block.
8. A data backup device, wherein the data backup device is a first backup device, the data backup device comprising:
the first backup device is used for backing up data in the first target device through block-level CDP backup to obtain first backup data, and the first backup data comprises at least one data block;
the sending module is configured to send the first backup data to a second backup device, so that the second backup device backs up the first backup data to an object for storage, and obtains second backup data, where the second backup data includes at least one data object, and each data block corresponds to one data object, where the second backup device is a virtual block device.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data backup method according to any one of claims 1 to 3.
10. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data backup method of claim 4.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the data backup method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910388995.6A CN111913832B (en) | 2019-05-10 | 2019-05-10 | Block-level CDP data storage disaster recovery method and device based on object storage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910388995.6A CN111913832B (en) | 2019-05-10 | 2019-05-10 | Block-level CDP data storage disaster recovery method and device based on object storage |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111913832A true CN111913832A (en) | 2020-11-10 |
CN111913832B CN111913832B (en) | 2024-07-09 |
Family
ID=73241748
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910388995.6A Active CN111913832B (en) | 2019-05-10 | 2019-05-10 | Block-level CDP data storage disaster recovery method and device based on object storage |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111913832B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609419A (en) * | 2009-06-29 | 2009-12-23 | 北京航空航天大学 | The data back up method and the device of the migration of virtual machine consistently online |
CN103140842A (en) * | 2010-09-28 | 2013-06-05 | 亚马逊科技公司 | System and method for providing flexible storage and retrieval of snapshot archives |
CN105162869A (en) * | 2015-09-18 | 2015-12-16 | 久盈世纪(北京)科技有限公司 | Data backup management method and equipment |
CN105302668A (en) * | 2015-10-21 | 2016-02-03 | 上海爱数信息技术股份有限公司 | Method for optimizing block device data access performance in object-based storage system |
US9317375B1 (en) * | 2012-03-30 | 2016-04-19 | Lenovoemc Limited | Managing cache backup and restore for continuous data replication and protection |
CN107092538A (en) * | 2017-03-14 | 2017-08-25 | 平安科技(深圳)有限公司 | Virtual-machine data backup method and system |
CN108513657A (en) * | 2016-12-26 | 2018-09-07 | 华为技术有限公司 | Data transfer device and backup server |
CN109445909A (en) * | 2018-10-31 | 2019-03-08 | 深信服科技股份有限公司 | Backup method, system, terminal and the storage medium of virtual-machine data |
-
2019
- 2019-05-10 CN CN201910388995.6A patent/CN111913832B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609419A (en) * | 2009-06-29 | 2009-12-23 | 北京航空航天大学 | The data back up method and the device of the migration of virtual machine consistently online |
CN103140842A (en) * | 2010-09-28 | 2013-06-05 | 亚马逊科技公司 | System and method for providing flexible storage and retrieval of snapshot archives |
US9317375B1 (en) * | 2012-03-30 | 2016-04-19 | Lenovoemc Limited | Managing cache backup and restore for continuous data replication and protection |
CN105162869A (en) * | 2015-09-18 | 2015-12-16 | 久盈世纪(北京)科技有限公司 | Data backup management method and equipment |
CN105302668A (en) * | 2015-10-21 | 2016-02-03 | 上海爱数信息技术股份有限公司 | Method for optimizing block device data access performance in object-based storage system |
CN108513657A (en) * | 2016-12-26 | 2018-09-07 | 华为技术有限公司 | Data transfer device and backup server |
CN107092538A (en) * | 2017-03-14 | 2017-08-25 | 平安科技(深圳)有限公司 | Virtual-machine data backup method and system |
CN109445909A (en) * | 2018-10-31 | 2019-03-08 | 深信服科技股份有限公司 | Backup method, system, terminal and the storage medium of virtual-machine data |
Non-Patent Citations (1)
Title |
---|
张也;刘晓洁;邓健;: "一种远程备份数据虚拟重构方法", 四川大学学报(自然科学版), no. 05, pages 84 - 90 * |
Also Published As
Publication number | Publication date |
---|---|
CN111913832B (en) | 2024-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10795788B2 (en) | Remote data replication method and system | |
US11372824B2 (en) | Remotely mounted file system with stubs | |
US9910620B1 (en) | Method and system for leveraging secondary storage for primary storage snapshots | |
US11249940B2 (en) | Snapshot archive management | |
JP6309103B2 (en) | Snapshot and clone replication | |
US11907078B2 (en) | Data backup method, apparatus, and system | |
CN110998537B (en) | Expired backup processing method and backup server | |
CN113918385B (en) | Method, device, electronic equipment and medium for online incremental backup and recovery of virtual machine | |
CN109144416B (en) | Method and device for querying data | |
CN103034592B (en) | Data processing method and device | |
US10628298B1 (en) | Resumable garbage collection | |
CN112800019A (en) | Data backup method and system based on Hadoop distributed file system | |
CN110865903B (en) | Node abnormal reconnection multiplexing method and system based on erasure code distributed storage | |
CN109753381B (en) | Continuous data protection method based on object storage | |
CN110187834B (en) | Data processing method and device for duplicate copies and electronic equipment | |
CN107704208B (en) | Method, device and medium for repairing metadata | |
US20210081431A1 (en) | Any point in time replication to the cloud | |
US11620056B2 (en) | Snapshots for any point in time replication | |
CN113419897A (en) | File processing method and device, electronic equipment and storage medium thereof | |
CN111913832B (en) | Block-level CDP data storage disaster recovery method and device based on object storage | |
CN113821476B (en) | Data processing method and device | |
CN111858145A (en) | Method, apparatus and computer program product for data backup and recovery | |
EP3451141B1 (en) | Snapshot archive management | |
CN106250264A (en) | Data reconstruction method and system for distributed storage | |
CN110688258A (en) | Snapshot creating method and device |
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 |