CN111913832A - A data backup method and data backup device - Google Patents

A data backup method and data backup device Download PDF

Info

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
Application number
CN201910388995.6A
Other languages
Chinese (zh)
Other versions
CN111913832B (en
Inventor
沈智强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HANGZHOU XINHE DATA TECHNOLOGY CO LTD
Original Assignee
HANGZHOU XINHE DATA 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 HANGZHOU XINHE DATA TECHNOLOGY CO LTD filed Critical HANGZHOU XINHE DATA TECHNOLOGY CO LTD
Priority to CN201910388995.6A priority Critical patent/CN111913832B/en
Publication of CN111913832A publication Critical patent/CN111913832A/en
Application granted granted Critical
Publication of CN111913832B publication Critical patent/CN111913832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

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

本发明提供一种数据备份方法和数据备份设备。该数据备份方法,应用于第二备份设备,第二备份设备为虚拟的块设备,包括:接收第一备份设备发送的第一备份数据,其中,第一备份数据是第一备份设备通过块级持续数据保护CDP备份对第一目标设备中的数据进行备份得到的,第一备份数据包括至少一个数据块;将第一备份数据备份到对象存储,以获得第二备份数据,第二备份数据包括至少一个数据对象,每一数据块与一个数据对象相对应。本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中,存储扩展性高,性能强,在需要进行恢复时,恢复速度快,同时,有助于降低成本。

Figure 201910388995

The invention provides a data backup method and a data backup device. The data backup method, applied to a second backup device, where the second backup device is a virtual block device, includes: receiving first backup data sent by the first backup device, wherein the first backup data is the first backup device through the block level Continuous data protection CDP backup is obtained by backing up data in the first target device, where the first backup data includes at least one data block; the first backup data is backed up to object storage to obtain second backup data, and the second backup data includes At least one data object, and each data block corresponds to one data object. The invention saves the data that needs to be backed up in the electronic device in the first backup device in the form of block-level CDP backup, and then backs up the backup data to the virtual block device, which has high storage expansibility and strong performance. When recovery occurs, recovery is fast and at the same time, it helps to reduce costs.

Figure 201910388995

Description

一种数据备份方法和数据备份设备A data backup method and data backup device

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种数据备份方法和数据备份设备。The invention relates to the technical field of computers, and in particular, to a data backup method and a data backup device.

背景技术Background technique

容灾系统是指在相隔较远的异地,建立两套或多套数据备份中心,当一处数据备份中心因意外(如火灾、地震等)停止工作时,可以通过其他数据备份系统进行数据恢复,避免数据丢失。Disaster recovery system refers to the establishment of two or more sets of data backup centers in distant places. When a data backup center stops working due to an accident (such as fire, earthquake, etc.), data recovery can be performed through other data backup systems. , to avoid data loss.

当前的备份和容灾市场,数据的备份方案通常都是通过块存储进行存储和备份。块存储在一定网络条件下提供高性能的随即I/O(输入/输出端口)和数据吞吐率。但是基于块存储设备的存储进行容灾的方法,成本较高且不容易扩展。In the current backup and disaster recovery market, data backup solutions are usually stored and backed up through block storage. Block storage provides high-performance random I/O (input/output ports) and data throughput under certain network conditions. However, the method for disaster recovery based on the storage of block storage devices is expensive and not easy to expand.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种数据备份方法和数据备份设备,以解决现有容灾备份设备成功较高且不容易扩展的问题。Embodiments of the present invention provide a data backup method and a data backup device, so as to solve the problem that the existing disaster recovery backup device has high success and is 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:

接收第一备份设备发送的第一备份数据,其中,所述第一备份数据是所述第一备份设备通过块级持续数据保护CDP备份对第一目标设备中的数据进行备份得到的,所述第一备份数据包括至少一个数据块;Receive the first backup data sent by the first backup device, where the first backup data is obtained by the first backup device backing up the data in the first target device through block-level continuous data protection CDP backup, and the The first backup data includes at least one data block;

将所述第一备份数据备份到对象存储,以获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应。The first backup data is backed up to an object storage to obtain second backup data, the second backup data includes at least one data object, and each of the data blocks corresponds to one of the data objects.

可选的,所述第二备份设备包括快照桶和配置桶,所述将所述第一备份数据备份到对象存储,包括:Optionally, the second backup device includes a snapshot bucket and a configuration bucket, and the backup of the first backup data to the object storage includes:

将第一备份数据中的各所述数据块保存到所述快照桶;saving each of the data blocks in the first backup data to the snapshot bucket;

将保存到所述快照桶中的每一所述数据块与各所述数据对象的对应关系,以及各所述数据块的位置记录为各所述数据块对应的快照映射项;Recording the correspondence between each of the data blocks saved in the snapshot bucket and each of the data objects, and the location of each of the data blocks as a snapshot mapping item corresponding to each of the data blocks;

将各所述快照映射项记录到一个快照映射配置,并将所述快照映射配置的识别码插入快照历史;recording each of the snapshot mapping items into a snapshot mapping configuration, and inserting the identification code of the snapshot mapping configuration into the snapshot history;

将所述快照映射配置和所述快照历史保存到所述配置桶。Save the snapshot mapping configuration and the snapshot history to the configuration bucket.

可选的,所述将所述快照映射配置和所述快照历史保存到所述配置桶之后,所述方法还包括:Optionally, after the snapshot mapping configuration and the snapshot history are saved in the configuration bucket, the method further includes:

在接收到第一恢复指令的情况下,根据所述第一恢复指令将所述快照映射配置发送至第二目标设备,其中,所述第二目标设备为与所述第一目标设备相同的设备或不同的设备,所述第一恢复指令包括对所述第一目标设备的快照映射配置选择指令;In the case of receiving a first restore instruction, send the snapshot mapping configuration to a second target device according to the first restore instruction, where the second target device is the same device as the first target device or a different device, the first restoration instruction includes a snapshot mapping configuration selection instruction for the first target device;

在接收到第二恢复指令的情况下,将所述第一目标设备对应的快照历史发送至所述第二目标设备,其中,所述第二恢复指令包括对所述第一目标设备快照历史的选择指令;In the case of receiving a second restoration instruction, the snapshot history corresponding to the first target device is sent to the second target device, wherein the second restoration instruction includes a snapshot history of the first target device select command;

在接收到第三恢复指令的情况下,将所述快照映射配置发送至所述第二目标设备,其中,所述第三恢复指令包括对所述快照历史中的快照映射配置的选择指令;sending the snapshot mapping configuration to the second target device in the case of receiving a third restoration instruction, wherein the third restoration instruction includes a selection instruction for a snapshot mapping configuration in the snapshot history;

根据所述快照映射配置的识别码对所述第三恢复指令确定的快照映射配置去重;Deduplication of the snapshot mapping configuration determined by the third restoration instruction according to the identification code of the snapshot mapping configuration;

根据去重后的所述快照映射配置将相应的数据对象发送至所述第二目标设备,以供所述第二目标设备将所述数据对象写入数据块中。The corresponding data object is sent to the second target device according to the deduplicated snapshot mapping configuration, so that the second target device writes 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, and the data backup method includes the following steps:

所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份,以得到第一备份数据,所述第一备份数据包括至少一个数据块;The first backup device backs up data in the first target device through block-level CDP backup to obtain first backup data, where the first backup data includes at least one data block;

将所述第一备份数据发送至第二备份设备,以供所述第二备份设备将所述第一备份数据备份到对象存储,并获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应,其中,所述第二备份设备为虚拟的块设备。Send the first backup data to a second backup device, so that the second backup device backs up the first backup data to object storage and obtains second backup data, where the second backup data includes at least one A data object, each of the data blocks corresponds to one of the data objects, wherein the second backup device is a virtual block device.

第三方面,本发明实施例提供了一种数据备份设备,所述备份设备为第二备份设备,且所述第二备份设备为虚拟的块设备,所述第二备份设备包括:In a third aspect, an embodiment of the present invention provides a data backup device, the backup device is a second backup device, and the second backup device is a virtual block device, and the second backup device includes:

接收模块,用于接收第一备份设备发送的第一备份数据,其中,所述第一备份数据是所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份得到的,所述第一备份数据包括至少一个数据块;a receiving module, configured to receive the first backup data sent by the first backup device, wherein the first backup data is obtained by the first backup device backing up the data in the first target device through block-level CDP backup, The first backup data includes at least one data block;

备份模块,用于将所述第一备份数据备份到对象存储,以获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应。A backup module, configured to back up the first backup data to the object storage to obtain second backup data, where the second backup data includes at least one data object, and each of the data blocks corresponds to one of the data objects .

可选的,所述第二备份设备包括快照桶和配置桶,所述备份模块,包括:Optionally, the second backup device includes a snapshot bucket and a configuration bucket, and the backup module includes:

第一保存子模块,用于将第一备份数据中的各所述数据块保存到所述快照桶;a first saving submodule, configured to save each of the data blocks in the first backup data to the snapshot bucket;

记录子模块,用于将保存到所述快照桶中的每一所述数据块与各所述数据对象的对应关系,以及各所述数据块的位置记录为各所述数据块对应的快照映射项;A recording submodule, configured to record the correspondence between each of the data blocks saved in the snapshot bucket and each of the data objects, and the location of each of the data blocks as a snapshot map corresponding to each of the data blocks item;

插入模块,用于将各所述快照映射项记录到一个快照映射配置,并将所述快照映射配置的识别码插入快照历史;an inserting module for recording each of the snapshot mapping items into a snapshot mapping configuration, and inserting the identification code of the snapshot mapping configuration into the snapshot history;

第二保存子模块,用于将所述快照映射配置和所述快照历史保存到所述配置桶。The second saving sub-module is configured to save the snapshot mapping configuration and the snapshot history to the configuration bucket.

可选的,还包括:第一发送模块,用于在接收到第一恢复指令的情况下,根据所述第一恢复指令将所述快照映射配置发送至第二目标设备,其中,所述第二目标设备为与所述第一目标设备相同的设备或不同的设备,所述第一恢复指令包括对所述第一目标设备的快照映射配置选择指令;Optionally, it further includes: a first sending module, configured to send the snapshot mapping configuration to the second target device according to the first restoration instruction in the case of receiving the first restoration instruction, wherein the first restoration instruction The second target device is the same device as the first target device or a different device, and the first restoration instruction includes a snapshot mapping configuration selection instruction for the first target device;

第二发送模块,用于在接收到第二恢复指令的情况下,将所述第一目标设备对应的快照历史发送至所述第二目标设备,其中,所述第二恢复指令包括对所述第一目标设备快照历史的选择指令;A second sending module, configured to send the snapshot history corresponding to the first target device to the second target device when a second restoration instruction is received, wherein the second restoration instruction includes The 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 restoration instruction is received, wherein the third restoration instruction includes a snapshot of the snapshot in the snapshot history Mapping configuration selection directive;

去重模块,用于根据所述快照映射配置的识别码对所述第三恢复指令确定的快照映射配置去重;A deduplication module, configured to deduplicate the snapshot mapping configuration determined by the third restoration instruction according to the identification code of the snapshot mapping configuration;

第四发送模块,用于根据去重后的所述快照映射配置将相应的数据对象发送至所述第二目标设备,以供所述第二目标设备将所述数据对象写入数据块中。The fourth sending module is configured to send the corresponding data object to the second target device according to the deduplicated snapshot mapping configuration, so that the second target device can write the data object into a data block.

第四方面,本发明实施例提供了一种一种数据备份设备,所述数据备份设备为第一备份设备,所述数据备份设备包括:In a fourth aspect, an embodiment of the present invention provides a data backup device, the data backup device is a first backup device, and the data backup device includes:

备份模块,用于所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份,以得到第一备份数据,所述第一备份数据包括至少一个数据块;a backup module, used for the first backup device to back up data in the first target device through block-level CDP backup to obtain first backup data, where the first backup data includes at least one data block;

发送模块,用于将所述第一备份数据发送至第二备份设备,以供所述第二备份设备将所述第一备份数据备份到对象存储,并获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应,其中,所述第二备份设备为虚拟的块设备。A sending module, configured to send the first backup data to a second backup device, so that the second backup device can back up the first backup data to object storage and obtain second backup data, the second backup data The backup data includes at least one data object, each of the data blocks corresponds to one of the data objects, wherein 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 is executed by the processor When implementing the steps of the message push display method described in any 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, and when the computer program is executed by a processor, implements the steps of the data backup method described in any one of the preceding claims.

本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中,存储扩展性高,性能强,在需要进行恢复时,恢复速度快,同时,有助于降低成本。The invention saves the data that needs to be backed up in the electronic device in the first backup device in the form of block-level CDP backup, and then backs up the backup data to the virtual block device, which has high storage expansibility and strong performance. When recovery occurs, recovery is fast and at the same time, it helps to reduce costs.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获取其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本发明一实施例提供的数据备份方法的流程图;1 is a flowchart of a data backup method provided by an embodiment of the present invention;

图2是块存储中数据块的示意图;Fig. 2 is the schematic diagram of data block in block storage;

图3是对象存储中桶的示意图;Figure 3 is a schematic diagram of a bucket in object storage;

图4是本发明一实施例提供的数据备份方法的又一流程图;4 is another flowchart of a data backup method provided by an embodiment of the present invention;

图5是本发明一实施例中快照文件的示意图;5 is a schematic diagram of a snapshot file in an embodiment of the present invention;

图6是本发明一实施例提供的数据备份方法的又一流程图;6 is another flowchart of a data backup method provided by an embodiment of the present invention;

图7是本发明一实施例提供的数据备份方法的又一流程图;7 is another flowchart of a data backup method provided by an embodiment of the present invention;

图8是本发明一实施例提供的数据备份方法的又一流程图;8 is another flowchart of a data backup method provided by an embodiment of the present invention;

图9是本发明一实施例提供的第二备份设备的结构图;9 is a structural diagram of a second backup device provided by an embodiment of the present invention;

图10是本发明一实施例提供的第二备份设备的又一结构图;10 is another structural diagram of a second backup device provided by an embodiment of the present invention;

图11是本发明一实施例提供的第二备份设备的又一结构图;11 is another structural diagram of a second backup device provided by an embodiment of the present invention;

图12是本发明一实施例提供的第一备份设备的结构图;12 is a structural diagram of a first backup device provided by an embodiment of the present invention;

图13是本发明一实施例提供的数据备份系统的结构图。FIG. 13 is a structural diagram of a data backup system provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获取的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供了一种数据备份方法,应用于第二备份设备。An embodiment of the present invention provides a data backup method, which is applied to a second backup device.

该第二备份设备为虚拟的块设备,也就是说,该第二备份设备本身并不是块设备而是对象存储,并通过虚拟化手段将其虚拟为块设备,该第二备份设备可以采用现有的对象存储服务器,然后将其虚拟的为块设备,也可以直接利用现有的云服务供应商提供的对象存储服务,然后将其虚拟的为块设备作为数据备份中使用的第二备份设备。The second backup device is a virtual block device, that is to say, the second backup device itself is not a block device but an object storage, and virtualized as a block device by means of virtualization, and the second backup device can use existing Some object storage servers, and then virtualize them as block devices, or directly use the object storage services provided by existing cloud service providers, and then virtualize them as block devices as the second backup device used in data backup .

如图1所示,该数据备份方法包括以下步骤:As shown in Figure 1, the data backup method includes the following steps:

步骤101:接收第一备份设备发送的第一备份数据。Step 101: Receive first backup data sent by a first backup device.

本实施例中的第一备份数据是第一备份设备通过块级CDP(ContinuousDataProtection,持续数据保护)备份对第一目标设备中的数据进行备份得到的。The first backup data in this embodiment is obtained by the first backup device backing up the data in the first target device through block-level CDP (Continuous Data Protection, continuous data protection) backup.

这里,第一目标设备指的是需要备份的原始数据所在的设备,数据在第一目标设备中通过块级CDP备份之后,发送至第二备份设备,以通过第二备份设备对第一备份数据再次备份。Here, the first target device refers to the device where the original data to be backed up is located. After the data is backed up by the block-level CDP in the first target device, the data is sent to the second backup device, so that the first backup data can be backed up by the second backup device. Backup again.

本实施例中的CDP备份为块级CDP备份,所以备份得到的第一备份数据是由一个或多个数据块构成的。The CDP backup in this embodiment is a block-level CDP backup, so the first backup data obtained from the backup is composed of one or more data blocks.

如图2所示,图2代表块存储中的一段数据,图2中每一个小方框代表一个数据块201,块存储上的数据以一个固定值来划分成大小相等的块,称之为数据块201。As shown in Figure 2, Figure 2 represents a piece of data in the block storage, each small box in Figure 2 represents a data block 201, and the data on the block storage is divided into equal-sized blocks with a fixed value, called Data block 201.

步骤102:将所述第一备份数据备份到对象存储,以获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应。Step 102: Back up 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 of the data blocks corresponds to one of the data objects.

第一备份数据在第二备份设备中是以对象存储(或称基于对象的存储)的形式存储的,如图3所示,对象储存由桶300和对象301(或称数据对象)两级构成,每一个桶中,包括多个对象301。第一备份数据在备份到对象存储中的过程,也就是将各数据块中的数据移动至各数据对象中。The first backup data is stored in the form of object storage (or called object-based storage) in the second backup device. As shown in Figure 3, the object storage is composed of two levels: bucket 300 and object 301 (or called data object). , and each bucket includes multiple objects 301 . The process of backing up the first backup data to the object storage, that is, moving the data in each data block to each data object.

这样,第一目标设备中的原始数据实际上就有了两个备份,其中,一个备份为位于第一备份设备中的第一备份数据,另一个则是位于第二备份设备中的第二备份数据。In this way, the original data in the first target device actually has two backups, one of which is the first backup data located in the first backup device, and the other is the second backup located in the second backup device data.

现有块设备成本较高,且可扩展性较差,技术相对复杂。Existing block devices have high cost, poor scalability, and relatively complex technology.

本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中的对象存储。The invention saves the data to be backed up in the electronic device in the first backup device in the form of block-level CDP backup, and then backs up the backup data to the object storage in the virtual block device.

由于对象存储具有统一的标准,例如,现有的对象存储均是基于RESTfulAPI(Representational State Transfer,表征;Application Programming Interface,应用程序编程接口)统一标准,所以不同厂商对于对象存储的支持功能基本相同,在此基础上,可作为统一的对象存储备份网关,可以支持几乎市面上所有的对象存储作为第二备份存储进行容灾备份。所以本方案的通用性和可扩展性较高。Since object storage has a unified standard, for example, the existing object storage is based on the unified standard of RESTful API (Representational State Transfer, characterization; Application Programming Interface, application programming interface), so the support functions of different manufacturers for object storage are basically the same, On this basis, it can be used as a unified object storage backup gateway, and can support almost all object storages on the market as the second backup storage for disaster recovery backup. Therefore, this scheme has high versatility and scalability.

同时,对象存储服务来自于云厂商提供,例如选用现有的供应商提供的云服务,其具有近乎无限容量以及按量付费的特性,使用更加灵活,可扩展性更强,成本也相对较低。At the same time, object storage services are provided by cloud vendors. For example, cloud services provided by existing vendors are selected. They have nearly unlimited capacity and pay-as-you-go features, which are more flexible in use, more scalable, and relatively low in cost. .

此外,第二备份设备的对象存储是一个虚拟的块级设备,而第一备份设备同样为块级设备,所以无需对第一备份数据的备份架构进行较大调整即可将第一备份数据备份到第二备份数据中,更加方便快捷。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 the first backup data can be backed up without major adjustments to the backup architecture of the first backup data To the second backup data, it is more convenient and quick.

可选的,在一个具体实施方式中,如图4所示,上述步骤102包括:Optionally, in a specific implementation manner, as shown in FIG. 4 , the foregoing step 102 includes:

步骤1021:将第一备份数据中的各所述数据块保存到所述快照桶。Step 1021: Save each of the data blocks in the first backup data to the snapshot bucket.

在将第一备份数据中的各数据块保存到快照桶中时,需要保证各数据块中的数据均被保存在快照桶中。如果是首次备份,则需要将全部数据块中的数据(或称全量数据)保存到快照桶中,如果不是首次备份,只需要将此次备份与前一次备份之间这一时间段的数据增量对应的数据块保存到快照桶中即可。When saving each data block in the first backup data in the snapshot bucket, it needs to ensure that the data in each data block is saved in the snapshot bucket. If it is the first backup, you need to save the data in all data blocks (or the full amount of data) into the snapshot bucket. If it is not the first backup, you only need to increase the data in the period between this backup and the previous backup. You can save the corresponding data blocks to the snapshot bucket.

如图5所示,图5中左侧代表不同时刻需要备份的数据,右侧代表在备份时需要保存到快照桶中的数据。在t0时刻的数据为A0、B0、C0、D0、E0、F0、G0、H0,则首次备份的数据为A0、B0、C0、D0、E0、F0、G0、H0;在t1时刻,数据变化为数据为A1、B1、C1、D1、E0、F0、G0、H0,那么在t1时刻,需要备份的仅为变化的数据A1、B1、C1、D1,而未发生变化的数据E0、F0、G0、H0,不需要重新保存到快照桶中,依次类推。As shown in Figure 5, the left side of Figure 5 represents the data that needs to be backed up at different times, and the right side represents the data that needs to be saved to the snapshot bucket during backup. The data at time t0 is A0, B0, C0, D0, E0, F0, G0, H0, then the data to be backed up for the first time is A0, B0, C0, D0, E0, F0, G0, H0; at time t1, the data changes If the data is A1, B1, C1, D1, E0, F0, G0, H0, then at t1, only the changed data A1, B1, C1, D1 needs to be backed up, while the unchanged data E0, F0, G0, H0, do not need to be re-saved to the snapshot bucket, and so on.

步骤1022:将保存到所述快照桶中的每一所述数据块与各所述数据对象的对应关系,以及各所述数据块的位置记录为各所述数据块对应的快照映射项。Step 1022: Record the correspondence between each of the data blocks saved in the snapshot bucket and each of the data objects, and the location of each of the data blocks as a snapshot map item corresponding to each of the data blocks.

快照映射项用于索引数据块与数据对象之间的对应关系,因此根据每一快照映射项,能够确定数据块、数据对象以及数据库的位置之间的唯一映射关系,从而实现在第二备份设备中确定数据的目录及位置。这样,根据一个快照映射项就能够确定该数据块中的增量数据。Snapshot mapping items are used to index the correspondence between data blocks and data objects. Therefore, according to each snapshot mapping item, the unique mapping relationship between data blocks, data objects and the location of the database can be determined, so as to achieve the second backup device. Determine the directory and location of the data. In this way, the incremental data in the data block can be determined according to a snapshot map entry.

步骤1023:将各所述快照映射项记录到一个快照映射配置,并将所述快照映射配置的识别码(ID,identification)插入快照历史。Step 1023: Record each of the snapshot mapping items into a snapshot mapping configuration, and insert the identification code (ID, identification) of the snapshot mapping configuration into the snapshot history.

每一次备份时的数据增量可能包括一个或多个数据块,因此,每一次备份时会相应的生成多个快照映射项。这样,包括一次备份中生成的全部快照映射项的一个快照映射配置实际上也就包括了此次备份中所有的数据增量。The data increment during each backup may include one or more data blocks, therefore, multiple snapshot mapping items will be generated correspondingly during each backup. In this way, a snapshot mapping configuration including all snapshot mapping items generated in a backup actually includes all data increments in this backup.

步骤1024:将所述快照映射配置和所述快照历史保存到所述配置桶。Step 1024: Save 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 configuration file objects, and the snapshot bucket is used for storing snapshot data objects.

快照数据对象的数量通常非常多,所以可能会影响配置文件对象的读写性能。将配置文件对象和快照数据对象分别存放在不同的桶中,有助于提高对象存储的读写性能。The number of snapshot data objects is usually very large, so it may affect the read and write performance of the configuration file objects. Storing configuration file objects and snapshot data objects in different buckets helps improve the read and write performance of object storage.

如图6所示,可以概括为,在接收到备份指令后,首先查找虚拟的块设备,即上述第二备份设备,如果未查找到该虚拟的块设备,则创建快照,若未查找到虚拟的块设备,则直接将备份数据保存到对象存储中。As shown in FIG. 6 , it can be summarized as follows: after receiving the backup instruction, first search for a virtual block device, that is, the above-mentioned second backup device, if the virtual block device is not found, create a snapshot, if no virtual block device is found. block device, then directly save the backup data to the object storage.

创建快照过程中,如果是第一次复制文件,则确定备份的最新数据,也就是全部数据,如果不是第一次复制文件,即已存在在先创建的快照,那么只复制最近一次快照的时间点到当前时间点新增加的数据,或称增量数据。在创建了快照之后,接收数据块及相关信息,这里,数据块及相关信息指的是需要备份的数据所在的数据块及相关的信息。In the process of creating a snapshot, if the file is copied for the first time, the latest data of the backup is determined, that is, all data. If the file is not copied for the first time, that is, there is a previously created snapshot, only the time of the latest snapshot is copied. The newly added data from the point to the current time point, or incremental data. After the snapshot is created, the data block and related information are received. Here, the data block and related information refer to the data block and related information where the data to be backed up is located.

进一步的,调用API上传数据对象,也就是将各数据块中的数据备份到数据对象。然后根据数据块和相应的数据对象记录为一个快照映射项。重复该步骤,直至全部数据块对应的快照映射项被记录,然后将全部快照映射项保存到一个映射配置中,并加入历史快照中,在调用API上传快照历史和快照映射文件,即完成了在第二备份设备中进行数据备份。Further, calling the API to upload the data object, that is, backing up the data in each data block to the data object. Then, it is recorded as a snapshot mapping item according to the data block and the corresponding data object. Repeat this step until the snapshot mapping items corresponding to all data blocks are recorded, and then save all snapshot mapping items into a mapping configuration and add them to the historical snapshots. After calling the API to upload the snapshot history and snapshot mapping files, the process of Data backup is performed in the second backup device.

可选的,在上述步骤1024之后,该方法还包括:Optionally, after the above step 1024, the method further includes:

在接收到第一恢复指令的情况下,根据所述第一恢复指令将所述快照映射配置发送至第二目标设备。The snapshot map configuration is sent to the second target device according to the first restoration instruction in the case of receiving the first restoration instruction.

在某些情况下,可能需要将数据恢复至第二目标设备,这里第二目标设备为与第一目标设备相同的设备或不同的设备。应当理解的是,如果是原第一目标设备中的数据丢失,可以将备份数据直接恢复到原第一目标设备中,这种情况下,第一目标设备和第二目标设备为同一设备。In some cases, it may be necessary to restore data to a second target device, where the second target device is the same device as the first target device or a different device. It should be understood that if the data in the original first target device is lost, the backup data can be directly restored to the original first target device. In this case, the first target device and the second target device are the same device.

如果第一目标设备不可用,例如因火灾等因素造成不可挽救的物理损坏,或着因设备升级而更换新的设备,这种情况下,第二目标设备和第一目标设备则为不同的设备。If the first target device is unavailable, such as irreparable physical damage caused by fire or other factors, or a new device is replaced due to equipment upgrade, in this case, the second target device and the first target device are different devices .

该第一恢复指令包括对第一目标设备的快照映射配置选择指令,也就是说,该第一恢复指令用于确定需要恢复的数据的原始设备。The first restoration instruction includes a snapshot mapping configuration selection instruction for the first target device, that is, the first restoration instruction is used to determine the original device of the data to be restored.

例如,第二备份设备中备份了多个设备,包括第一服务器、第二服务器和第三服务器等,第二服务器由于设备更新,则需要将第二服务器中的原有数据恢复至第四服务器,则第二服务器为上述第一目标设备,即原始设备,第四服务器则为第二目标设备,该第一恢复指令包括实际上包括从这三个服务器中选择第二服务器的快照映射配置的选择指令。For example, multiple devices are backed up in the second backup device, including the first server, the second server, and the third server. Due to the device update of the second server, the original data in the second server needs to be restored to the fourth server. , then the second server is the above-mentioned first target device, that is, the original device, and the fourth server is the second target device, and the first restoration instruction includes actually selecting the snapshot mapping configuration of the second server from these three servers. Select the command.

在接收到第二恢复指令的情况下,将所述第一目标设备对应的快照历史发送至所述第二目标设备。In the case of receiving the second restoration instruction, the snapshot history corresponding to the first target device is sent to the second target device.

该第二恢复指令包括对第一目标设备快照历史的选择指令,可以理解为该第二恢复指令用于选择进行恢复的快照。The second restoration instruction includes a selection instruction for the snapshot history of the first target device, which can be understood as the second restoration instruction is used to select a snapshot for restoration.

例如,第二备份设备中和第二服务器相关的快照包括第一快照、第二快照和第三快照三个快照,分别对应不同的时间点,此次恢复过程中需要恢复最新备份的第三快照,该第二恢复指令包括的选择指令实际上是从这三个快照中选择第三快照的指令。For example, the snapshots related to the second server in the second backup device include three snapshots: the first snapshot, the second snapshot and the third snapshot, which correspond to different time points respectively. In this recovery process, the third snapshot of the latest backup needs to be recovered , the selection instruction included in the second restoration instruction is actually an instruction to select the third snapshot from the three snapshots.

在接收到第三恢复指令的情况下,将所述快照映射配置发送至所述第二目标设备。The snapshot map configuration is sent to the second target device upon receipt of a third restore instruction.

第三恢复指令包括对快照历史中的快照映射配置的选择指令,该快照映射配置指的是上述步骤1023中所生成的快照映射配置,根据所确定的快照映射配置,能够获取相应的快照映射文件,从而实现对快照的调用以进行数据恢复。The third restoration instruction includes an instruction for selecting a snapshot mapping configuration in the snapshot history, where the snapshot mapping configuration refers to the snapshot mapping configuration generated in the above step 1023, and a corresponding snapshot mapping file can be obtained according to the determined snapshot mapping configuration , which implements a call to the snapshot for data recovery.

根据所述快照映射配置的识别码对所述第三恢复指令确定的快照映射配置去重。The snapshot mapping configuration determined by the third restoration instruction is deduplicated according to the identification code of the snapshot mapping configuration.

一段范围内的快照同一个数据块位置很有可能存在多个来自于不同时刻的快照中的数据对象,所以需要对数据对象进行去重。In a range of snapshots, there may be multiple data objects in the same data block location from snapshots at different times, so the data objects need to be deduplicated.

该去重过程可以通过检索是否存在相同快照映射项的方式来去重。The deduplication process can deduplicate by retrieving whether the same snapshot map entry exists.

在一个具体实施方式中,则是通过B+树来实现去重的。In a specific implementation manner, deduplication is achieved through a B+ tree.

具体的,实施时以数据块的索引作为key(键),以快照映射项和快照ID作为value(值)来构成一棵B+树。遍历所选范围的所有快照以及遍历每一个快照对应的快照映射配置的中每一个快照映射项,把每一个快照映射项插入到B+树中。Specifically, during implementation, the index of the data block is used as the key (key), and the snapshot mapping item and the snapshot ID are used as the value (value) to form a B+ tree. Traverse all snapshots in the selected range and traverse each snapshot map entry in the snapshot map configuration corresponding to each snapshot, and insert each snapshot map entry into the B+ tree.

插入的过程中可能存在两种情况:第一种,当前数据块的索引不存在于B+树中,那么以该数据块的索引为key,以该快照映射项和快照ID为value插入B+树中。第二种,当前数据块的索引存在于B+树中,那么比较待插入的快照映射项的快照ID和B+树中value中的快照ID,如果待插入的快照映射项的快照ID较新,则替换相同key的value,否则不需要插入。There may be two situations in the insertion process: first, the index of the current data block does not exist in the B+ tree, then the index of the data block is used as the key, and the snapshot mapping item and the snapshot ID are used as the value to insert into the B+ tree. . Second, the index of the current data block exists in the B+ tree, then compare the snapshot ID of the snapshot mapping item to be inserted and the snapshot ID in the value in the B+ tree. If the snapshot ID of the snapshot mapping item to be inserted is newer, then Replace the value of the same key, otherwise no need to insert.

根据去重后的所述快照映射配置将相应的数据对象发送至所述第二目标设备,以供所述第二目标设备将所述数据对象写入数据块中。The corresponding data object is sent to the second target device according to the deduplicated snapshot mapping configuration, so that the second target device writes the data object into a data block.

完成B+树的构建后,叶子节点中的快照映射项对应不同位置的数据块在对象存储中的数据对象,这些数据对象是指定的快照的创建时刻的最新状态的数据。遍历叶子节点中的快照映射项,通过对象存储API获取与其中数据对象ID对应的数据对象,通过IO服务(Input/Output,输入输出服务)转发数据,最终完成恢复操作。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 in different positions in the object storage, and these data objects are the data of the latest state at the time of creation of the specified snapshot. Traverse the snapshot map items in the leaf node, obtain the data object corresponding to the data object ID through the object storage API, forward the data through the IO service (Input/Output, input and output service), and finally complete the recovery operation.

如图7所示,可以概括为,在接收到恢复指令后,首先调用API下载对象存储服务器中的设备列表,该列表中包括了可进行数据回复的设备。在接收到执行用于恢复的设备的命令后,调用API下载待恢复设备的快照历史,进一步的,接收到指定用于恢复的快照的命令后,调用API下载第一次快照到指定的快照范围内的快照映射文件,也就是指定快照对应的时间节点之前备份的全部数据对应的快照映射文件。As shown in FIG. 7 , it can be summarized that, after receiving the recovery instruction, the API is firstly called to download the device list in the object storage server, and the list includes devices that can perform data recovery. After receiving the command to execute the device for restoration, call the API to download the snapshot history of the device to be restored. Further, after receiving the command to specify the snapshot for restoration, call the API to download the first snapshot to the specified snapshot range The snapshot mapping file in the specified snapshot mapping file, that is, the snapshot mapping file corresponding to all the data backed up before the time node corresponding to the specified snapshot.

在获取了快照映射文件之后,对快照映射文件进行去重,以通过B+树去重为例,将快照映射文件中的快照映射项(或称映射项)不断添加到B+树中,当处理完全部映射项之后,获取一个叶子节点,然后调用API下载叶子节点中映射项关联的数据对象,把数据对象写入数据块中,不断获取叶子节点,当全部节点被处理完之后,则完成了数据的恢复。After obtaining the snapshot mapping file, deduplicate the snapshot mapping file. Taking the B+ tree deduplication as an example, the snapshot mapping items (or mapping items) in the snapshot mapping file are continuously added to the B+ tree. After all the mapping items, get a leaf node, then call the API to download the data object associated with the mapping item in the leaf node, write the data object into the data block, and continuously obtain the leaf node. When all the nodes are processed, the data is completed. recovery.

本发明实施例还提供了一种数据备份方法,应用于第一备份设备。The embodiment of the present invention also provides a data backup method, which is applied to the first backup device.

该第一备份设备可以是上述实施例中的第一备份设备,如图8所示,该数据备份方法包括以下步骤:The first backup device may be the first backup device in the above embodiment. As shown in FIG. 8 , the data backup method includes the following steps:

步骤801:所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份,以得到第一备份数据,所述第一备份数据包括至少一个数据块;Step 801: the first backup device backs up data in the first target device through block-level CDP backup to obtain first backup data, where the first backup data includes at least one data block;

步骤802:将所述第一备份数据发送至第二备份设备,以供所述第二备份设备将所述第一备份数据备份到对象存储,并获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应,其中,所述第二备份设备为虚拟的块设备。Step 802: Send the first backup data to a second backup device, so that the second backup device backs up the first backup data to object storage and obtains second backup data, the second backup data It includes at least one data object, each of the data blocks corresponds to one of the data objects, wherein the second backup device is a virtual block device.

本实施例中,块级CDP备份的过程可参考现有的及可能的块级CDP备份过程,而步骤802中,将第一备份数据发送至第二备份数据后,则可参考上述实施例,并能实现上述实施例中记载的各种技术效果,此处不再赘述。In this embodiment, for the block-level CDP backup process, reference may be made to the existing and possible block-level CDP backup process, and in step 802, after the first backup data is sent to the second backup data, reference may be made to the above-mentioned embodiment, Various technical effects described in the above embodiments can be achieved, and details are not repeated here.

本发明实施例提供了一种数据备份设备,所述备份设备为第二备份设备900,且所述第二备份设备900为虚拟的块设备,如图9所示,所述第二备份设备900包括:An embodiment of the present invention provides a data backup device. 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, the second backup device 900 include:

接收模块901,用于接收第一备份设备发送的第一备份数据,其中,所述第一备份数据是所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份得到的,所述第一备份数据包括至少一个数据块;A receiving module 901, configured to receive first backup data sent by a first backup device, wherein the first backup data is obtained by the first backup device backing up data in a first target device through block-level CDP backup , the first backup data includes at least one data block;

备份模块902,用于将所述第一备份数据备份到对象存储,以获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应。The backup module 902 is configured to back up the first backup data to object storage to obtain second backup data, where the second backup data includes at least one data object, and each of the data blocks is associated with one of the data objects. correspond.

可选的,如图10所示,所述第二备份设备900包括快照桶和配置桶,所述备份模块902,包括: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:

第一保存子模块9021,用于将第一备份数据中的各所述数据块保存到所述快照桶;a first saving submodule 9021, configured to save each of the data blocks in the first backup data to the snapshot bucket;

记录子模块9022,用于将保存到所述快照桶中的每一所述数据块与各所述数据对象的对应关系,以及各所述数据块的位置记录为各所述数据块对应的快照映射项;Recording sub-module 9022, configured to record the correspondence between each of the data blocks saved in the snapshot bucket and each of the data objects, and the position of each of the data blocks as a snapshot corresponding to each of the data blocks mapping item;

插入模块9023,用于将各所述快照映射项记录到一个快照映射配置,并将所述快照映射配置的识别码插入快照历史;an inserting module 9023, configured to record each of the snapshot mapping items into a snapshot mapping configuration, and insert the identification code of the snapshot mapping configuration into the snapshot history;

第二保存子模块9024,用于将所述快照映射配置和所述快照历史保存到所述配置桶。The second saving sub-module 9024 is configured to save the snapshot mapping configuration and the snapshot history to the configuration bucket.

可选的,如图11所示,还包括:第一发送模块903,用于在接收到第一恢复指令的情况下,根据所述第一恢复指令将所述快照映射配置发送至第二目标设备,其中,所述第二目标设备为与所述第一目标设备相同的设备或不同的设备,所述第一恢复指令包括对所述第一目标设备的快照映射配置选择指令;Optionally, as shown in FIG. 11 , it further includes: a first sending module 903, configured to send the snapshot mapping configuration to the second target according to the first restoration instruction in the case of receiving the first restoration instruction device, wherein the second target device is the same device as the first target device or a different device, and the first restoration instruction includes a snapshot mapping configuration selection instruction for the first target device;

第二发送模块904,用于在接收到第二恢复指令的情况下,将所述第一目标设备对应的快照历史发送至所述第二目标设备,其中,所述第二恢复指令包括对所述第一目标设备快照历史的选择指令;The second sending module 904 is configured to send the snapshot history corresponding to the first target device to the second target device when a second restoration instruction is received, wherein the second restoration instruction includes Describe the selection instruction of the snapshot history of the first target device;

第三发送模块905,用于在接收到第三恢复指令的情况下,将所述快照映射配置发送至所述第二目标设备,其中,所述第三恢复指令包括对所述快照历史中的快照映射配置的选择指令;The third sending module 905 is configured to send the snapshot mapping configuration to the second target device in the case of receiving a third restoration instruction, wherein the third restoration instruction includes Selection directive for snapshot mapping configuration;

去重模块906,用于根据所述快照映射配置的识别码对所述第三恢复指令确定的快照映射配置去重;A deduplication module 906, configured to deduplicate the snapshot mapping configuration determined by the third restoration instruction according to the identification code of the snapshot mapping configuration;

第四发送模块907,用于根据去重后的所述快照映射配置将相应的数据对象发送至所述第二目标设备,以供所述第二目标设备将所述数据对象写入数据块中。The fourth sending module 907 is configured to send the corresponding data object to the second target device according to the deduplicated snapshot mapping configuration, so that the second target device can write the data object into a data block .

本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中,存储扩展性高,性能强,在需要进行恢复时,恢复速度快,同时,有助于降低成本。The invention saves the data that needs to be backed up in the electronic device in the first backup device in the form of block-level CDP backup, and then backs up the backup data to the virtual block device, which has high storage expansibility and strong performance. When recovery occurs, recovery is fast and at the same time, it helps to reduce costs.

本发明实施例提供了一种数据备份设备,所述数据备份设备为第一备份设备1200,如图12所示,所述第一备份设备1200包括:An embodiment of the present invention provides a data backup device. The data backup device is a first backup device 1200. As shown in FIG. 12, the first backup device 1200 includes:

备份模块1201,用于所述第一备份设备通过块级CDP备份对第一目标设备中的数据进行备份,以得到第一备份数据,所述第一备份数据包括至少一个数据块;The backup module 1201 is used for the first backup device to back up data in the first target device through block-level CDP backup to obtain first backup data, where the first backup data includes at least one data block;

发送模块1202,用于将所述第一备份数据发送至第二备份设备,以供所述第二备份设备将所述第一备份数据备份到对象存储,并获得第二备份数据,所述第二备份数据包括至少一个数据对象,每一所述数据块与一个所述数据对象相对应,其中,所述第二备份设备为虚拟的块设备。The sending module 1202 is configured to send the first backup data to a second backup device, so that the second backup device can back up the first backup data to object storage and obtain second backup data, and the first backup data can be obtained by the second backup device. The second backup data includes at least one data object, each of the data blocks corresponds to one of the data objects, wherein the second backup device is a virtual block device.

本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中,存储扩展性高,性能强,在需要进行恢复时,恢复速度快,同时,有助于降低成本。The invention saves the data that needs to be backed up in the electronic device in the first backup device in the form of block-level CDP backup, and then backs up the backup data to the virtual block device, which has high storage expansibility and strong performance. When recovery occurs, recovery is fast and at the same time, it helps to reduce costs.

如图13所示,本实施例中的数据备份系统包括IO模块、CDP模块和虚拟的块级设备和API调用模块,其中IO模块提供数据的写入和读出服务,CDP模块相当于上述第一备份设备,虚拟的块级设备实际上相当于上述第二备份设备,API调用模块用于调用对象存储服务的API接口。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, wherein the IO module provides data writing and reading services, and the CDP module is equivalent to the above-mentioned first A backup device, the virtual block-level device is actually equivalent to the above-mentioned second backup device, and the API calling module is used to call the API interface of the object storage service.

通过执行上述实施例中的数据备份方法的步骤,能够实现对于数据的备份和恢复,本发明通过将电子设备中的需要备份的数据以块级CDP备份的形式保存在第一备份设备中,然后再将备份数据备份到虚拟的块设备中,存储扩展性高,性能强,在需要进行恢复时,恢复速度快,同时,有助于降低成本。By performing the steps of the data backup method in the above embodiment, data backup and recovery can be realized. In the present invention, the data that needs to be backed up in the electronic device is stored in the first backup device in the form of block-level CDP backup, and then The backup data is then backed up to a virtual block device, which has high storage scalability and high performance. When recovery is required, the recovery speed is fast, and at the same time, it helps to reduce costs.

本发明实施例提供了一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如以上任一项所述的数据备份方法的步骤。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 is executed by the processor to achieve the above The steps of any one of the data backup methods.

本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求以上任一项所述的数据备份方法的步骤。An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the data backup method described in any one of the preceding claims.

由于本实施例中的技术方案能够实现上述数据备份方法实施例的全部技术方案,因此至少能实现上述全部技术效果,此处不再赘述。Since the technical solutions in this embodiment can implement all the technical solutions of the above data backup method embodiments, at least all the above technical effects can be achieved, which will not be repeated here.

以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art who is familiar with the technical scope disclosed by the present invention can easily think of changes or replacements, which should cover within the protection scope of the present invention. Therefore, the protection scope of the present invention should 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.
CN201910388995.6A 2019-05-10 2019-05-10 Block-level CDP data storage disaster recovery method and device based on object storage Active CN111913832B (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609419A (en) * 2009-06-29 2009-12-23 北京航空航天大学 Data backup method and device for continuous online migration of virtual machine
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609419A (en) * 2009-06-29 2009-12-23 北京航空航天大学 Data backup method and device for continuous online migration of virtual machine
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)

* Cited by examiner, † Cited by third party
Title
张也;刘晓洁;邓健;: "一种远程备份数据虚拟重构方法", 四川大学学报(自然科学版), no. 05, pages 84 - 90 *

Also Published As

Publication number Publication date
CN111913832B (en) 2024-07-09

Similar Documents

Publication Publication Date Title
US11741048B2 (en) Distributed write journals that support fast snapshotting for a distributed file system
US9910620B1 (en) Method and system for leveraging secondary storage for primary storage snapshots
US8683156B2 (en) Format-preserving deduplication of data
US9436720B2 (en) Safety for volume operations
US9122692B1 (en) Systems and methods for reducing file-system fragmentation when restoring block-level backups utilizing an identification module, an optimization module, and a restore module
US20160110262A1 (en) Restoring a file system object
US11327924B2 (en) Archiving data sets in a volume in a primary storage in a volume image copy of the volume in a secondary storage
US9311242B1 (en) Systems and methods for enabling write-back-cache aware snapshot creation
CN109144416B (en) Method and device for querying data
CN103034592B (en) Data processing method and device
CN113918385A (en) Method and application for online incremental backup and recovery of local storage virtual machine
CN110187834B (en) Data processing method and device for duplicate copies and electronic equipment
CN112256400A (en) Virtual machine snapshot management method and device
US20150261465A1 (en) Systems and methods for storage aggregates and infinite storage volumes
EP3991045B1 (en) Snapshots for any point in time replication
US11669545B2 (en) Any point in time replication to the cloud
US9367457B1 (en) Systems and methods for enabling write-back caching and replication at different abstraction layers
US8738571B1 (en) Extended recycle bin
CN111913832B (en) Block-level CDP data storage disaster recovery method and device based on object storage
US10235086B1 (en) Heirarchical storage for virtual tapes
US11256716B2 (en) Verifying mirroring of source data units to target data units
US10152492B1 (en) Extended recycle bin for versioning
CN106250264A (en) Data reconstruction method and system for distributed storage
US11221786B2 (en) Fast recovery in recoverpoint using direct storage access
US20210232318A1 (en) System and method to achieve an uninterrupted file level backup using a pass-through snapshot engine

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 311215 2nd Floor, Building 2, No. 371 Mingxing Road, Xiaoshan Economic and Technological Development Zone, Xiaoshan District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Xinhe Data Technology Co.,Ltd.

Country or region after: China

Address before: Room 2102, Building 1, North District, United Center, No. 501, Minhe Road, Ningwei Town, Xiaoshan District, Hangzhou City, Zhejiang Province, 311200

Patentee before: Hangzhou Xinhe Data Technology Co.,Ltd.

Country or region before: China