Data recovery method and device, computer equipment, readable storage medium and program product
By adopting standard format objects and a unified data organization format and protocol, data is backed up from a block storage system to a cloud object storage system and then restored. This solves the limitations of existing data recovery product vendors when they are replaced, achieving the universality and portability of data recovery, and supporting complete recovery at the logical volume level and rapid business startup.
Patent Information
- Application Number
- CN202511815596.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-04
- Filing Date
- 2025-12-04
- Publication Date
- 2026-02-27
AI Technical Summary
In the field of cloud data backup and recovery technology, existing technologies have limitations when data recovery product suppliers or cloud service providers are changed, and lack universality and portability.
Data backup and recovery are performed using standard format objects (including data objects, index objects, and fence objects). Through a unified data organization format and backup/recovery protocol, data is backed up from the block storage system to the cloud object storage system and restored from the cloud object storage system to the block storage system, thus realizing data parsing and storage.
It improves the versatility and portability of data backup/recovery, facilitates flexible selection of backup/recovery product vendors and cloud service providers, and supports full recovery at the logical volume level and rapid business startup.
Smart Images

Figure CN121579277A_ABST
Abstract
Description
[0001] This application refers to the Chinese Patent Application No. 2024117698866 entitled "Object Storage Management Method, Device, Gateway Equipment and Storage System" filed on December 04, 2024, which is incorporated by reference in its entirety into this application. TECHNICAL FIELD
[0002] The present application relates to the technical field of cloud data recovery, in particular to a data recovery method and device, computer equipment, readable storage medium and program product. BACKGROUND
[0003] In the field of cloud data backup and recovery technology, in the scene of realizing backup or recovery in local and cloud, there are limitations in selecting or replacing data recovery product suppliers or cloud service providers due to different data organization methods, backup or recovery protocols.
[0004] There is an urgent need for a data recovery method with universality and portability to facilitate the flexible selection of data recovery product suppliers and cloud service providers. SUMMARY
[0005] Therefore, it is necessary to provide a data recovery method, device, computer equipment, readable storage medium and program product with universality and portability to solve the above technical problems.
[0006] In a first aspect, the present application provides a data recovery method, comprising:
[0007] downloading a standard format object that has been backed up to a cloud object storage system;
[0008] processing the standard format object according to a preset data parsing method to obtain recovery data;
[0009] storing the recovery data into a block storage system;
[0010] The standard format object includes at least one of a data object, an index object and a fence object.
[0011] In a second aspect, the present application further provides a data recovery device, comprising:
[0012] a downloading module configured to download a standard format object that has been backed up to a cloud object storage system;
[0013] a recovery module configured to process the standard format object according to a preset data parsing method to obtain recovery data;
[0014] a storage module configured to store the recovery data into a block storage system;
[0015] The standard format object includes at least one of a data object, an index object, and a fence object.
[0016] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0017] downloading a standard format object which has been backed up to a cloud object storage system;
[0018] processing the standard format object according to a preset data parsing mode to obtain recovery data;
[0019] storing the recovery data into a block storage system;
[0020] The standard format object includes at least one of a data object, an index object, and a fence object.
[0021] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the following steps when executed by a processor:
[0022] downloading a standard format object which has been backed up to a cloud object storage system;
[0023] processing the standard format object according to a preset data parsing mode to obtain recovery data;
[0024] storing the recovery data into a block storage system;
[0025] The standard format object includes at least one of a data object, an index object, and a fence object.
[0026] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program implements the following steps when executed by a processor:
[0027] downloading a standard format object which has been backed up to a cloud object storage system;
[0028] processing the standard format object according to a preset data parsing mode to obtain recovery data;
[0029] storing the recovery data into a block storage system;
[0030] The standard format object includes at least one of a data object, an index object, and a fence object.
[0031] The data recovery method, device, computer device, computer readable storage medium and computer program product download a standard format object that has been backed up to a cloud object storage system; process the standard format object according to a preset data analysis manner to obtain recovery data; and store the recovery data into a block storage system; wherein the standard format object comprises at least one of a data object, an index object and a fence object. According to the scheme, the standard format object comprising at least one of a data object, an index object and a fence object is downloaded from the cloud object storage system, and the standard format object is processed according to the preset data analysis manner, so that the data analysis has universality, and the method has universality and portability when selecting or replacing a data recovery product supplier or a cloud service provider, thereby facilitating flexible selection of the data recovery product supplier and the cloud service provider. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0033] Figure 1 An architecture diagram for realizing data backup and recovery in a related art;
[0034] Figure 2 An architecture diagram for realizing data backup and recovery in some embodiments;
[0035] Figure 3 A technical architecture diagram of a data backup / recovery system in some embodiments;
[0036] Figure 4 A flowchart of a data backup method in some embodiments;
[0037] Figure 5 A data object encapsulation diagram in some embodiments;
[0038] Figure 6 An index area diagram;
[0039] Figure 7 A flowchart of a data recovery method in some embodiments;
[0040] Figure 8 A structural block diagram of a data recovery device in some embodiments;
[0041] Figure 9 An internal structure diagram of a computer device in some embodiments. DETAILED DESCRIPTION
[0042] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.
[0043] It should be noted that the terms "first", "second" and the like used in the present application can be used to describe different objects, but these objects are not limited by these terms. These terms are only used to distinguish two different objects, such as the first check field and the second check field are used to distinguish two check fields. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "a plurality of" used in the present application refers to two or more. The term "and / or" used in the present application refers to one of the options or any combination of a plurality of options.
[0044] The following describes the technical terms involved in the embodiments of the present application.
[0045] (1) Volume, also referred to as logical volume in the embodiments of the present application. The logical volume is a logical partition of physical space in a block storage system, which provides a virtual machine (VM) or a physical machine with a bare device for data access. It can be created, deleted, extended, etc.
[0046] (2) Volume Identifier (ID). The volume identifier is the unique identifier of the logical volume in the block storage system.
[0047] (3) Block, wherein the Block identifies a collection of data information stored in a computer. From the user's perspective, the data exists in the form of blocks.
[0048] (4) Object-based cloud storage, wherein the object-based cloud storage refers to a cloud storage that takes objects as storage units and provides object-level access interfaces.
[0049] (5) Bucket, also referred to as storage bucket in the embodiments of the present application. The bucket is a container for managing data in a cloud object storage system. One volume corresponds to one Bucket, which is used to store the block data in one volume.
[0050] (6) Object, wherein the object refers to a data unit recording user data. The object is composed of an object name, an object identifier, metadata, and user data. The object can be uniquely located by the object identifier. The object is a basic unit of data storage in the cloud object storage system, and the block data of the volume is stored in the object storage bucket in the form of an object.
[0051] (7) Entry Tag (ETag), wherein the ETag is a unique identifier generated for each object. For example, it can be an MD5 hexadecimal hash value of the object content, used to verify the integrity of the object content.
[0052] (8) Version, wherein the Version is used to identify the state of data, files, or systems, and each version has a unique version number.
[0053] (9) version number (version_num), wherein the version number is used to uniquely identify different versions.
[0054] For example, the version number can be a strictly increasing number at the volume level. In practice, it can also be in other forms, as long as it can uniquely identify different versions.
[0055] For example, the default size of the version number is 8 bytes.
[0056] (10) Barrier, wherein the Barrier is used to represent a version number of data written to a certain volume before the backup time, which is backed up to the object storage in the selected backup type.
[0057] (11) Data Address Segment, which divides the volume into a plurality of address-continuous and mutually exclusive logical address segments in a fixed length.
[0058] (12) Index Address Segment, wherein the data address segments in the volume are combined into index address segments in a fixed number, and the index address segment and the data address segment are in a one-to-many mapping relationship. An index address segment covers a fixed number of address-continuous data address segments.
[0059] (13) Full Backup, which refers to the process of backing up all data of a specified data object.
[0060] (14) Incremental Backup, which refers to the process of only backing up data objects that have been changed since the last backup.
[0061] (15) Differential Backup, wherein the differential backup refers to a process of backing up data objects changed since the last full backup.
[0062] Figure 1 For a related technology architecture diagram for implementing data backup and recovery, in the related technology, data is backed up and restored in a local and cloud backup / restoration scenario. Due to different data organization formats and backup / restoration protocols, there are limitations when selecting or replacing backup product suppliers or cloud service providers. That is, as shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 1 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 1 The architecture shown in the related technology is illustrated by taking data backup / restoration system A and data backup / restoration system B as examples. Data backup / restoration system A and data backup / restoration system B can backup local storage content to cloud storage (i.e., cloud storage 11, cloud storage 12, and cloud storage 13 as shown in the related technology) through different data organization formats and different backup / restoration protocols. Figure 1 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability.
[0063] In the embodiments of the present application, by specifying the universal technology of the data backup / restoration system, including consistent data organization formats and standardized backup / restoration protocols, the universality and portability of data backup / restoration in the scene from local block storage to cloud object storage can be improved, and users can flexibly select and switch backup / restoration product suppliers and cloud service providers. As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 2 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 2 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 2 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability.
[0064] In the embodiments of the present application, local storage can refer to a block storage system, and cloud storage can refer to a cloud object storage system. Figure 3 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 3 As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability.
[0065] As shown in the related technology, a data backup / restoration system includes multiple different data organization formats and backup / restoration protocols, and these data backup / restoration systems lack universality and portability. Figure 3As shown, the core elements of the data backup / restoration system include:
[0066] a) Data organization: including the organization logic and data organization format of cloud data. The organization logic of cloud data is to organize data in the manner of data partition, index partition, and fence partition; the data organization format includes dividing into data objects, index objects, and fence objects, organizing the block data of the volume in the block storage system into different types of objects, and storing in different partitions in the bucket of the cloud object storage.
[0067] b) Data backup protocol: the protocol process of organizing the block data of the volume in the local block storage into objects in a standard format and uploading to the cloud object storage.
[0068] c) Data recovery protocol: the protocol process of discovering the content to be recovered from the bucket of the cloud object storage system, and downloading, parsing, and restoring data to the block storage system.
[0069] The embodiments of the present application provide a data backup method and a data recovery method. The generality and portability can be realized to facilitate the flexible selection of backup / restoration product suppliers and cloud service providers.
[0070] The execution subject of the data backup method provided by the embodiments of the present application can be a data backup device or a computer device. The data backup device can be a functional module or a functional entity for realizing the above-mentioned data backup method in the computer device. In some embodiments, the computer device can be a local device or a cloud device. For example, the computer device can be a local computer, a tablet computer, or a server of a cloud device.
[0071] In the embodiments of the present application, the backup process can be realized through a pre-device backup protocol. The backup process realized in different cases will be introduced in the following embodiments.
[0072] In an exemplary embodiment, Figure 4 The flowchart of the data backup method in some embodiments is shown in FIG. 4. The method includes the following steps:
[0073] 401. Processing the data to be backed up in the block storage system according to a preset data organization manner to obtain a standard format object.
[0074] The standard format object includes at least one of a data object, an index object, and a fence object.
[0075] In the embodiments of the present application, in order to realize backup of the to-be-backed-up data in the block storage system to the cloud object storage system, the to-be-backed-up data needs to be organized according to a preset data organization manner: each logical volume needs to be mapped to an independent storage bucket in the cloud object storage system, and the data organization manner can correspond to logical partitions and objects in the storage bucket. In the storage bucket, logical partitions can be divided, including at least one of a data partition, an index partition and a fence partition, the data partition, the index partition and the fence partition being respectively used for identifying data objects, index objects and fence objects. That is, the logical partition can include one of the data partition, the index partition and the fence partition, or the logical partition can include two or more of the data partition, the index partition and the fence partition.
[0076] In some embodiments, the block storage system includes at least one logical volume, the logical volume includes at least one index address segment, the index address segment includes at least one data address segment, and the data address segment includes at least one block data address segment, the block data address segment being used for storing block data.
[0077] In some embodiments, the cloud object storage system includes at least one storage bucket, each storage bucket corresponding to a different logical volume, and the logical partitions in the storage bucket include at least one of a data partition, an index partition and a fence partition.
[0078] In some embodiments, the data objects in the same storage bucket are all identified by the data partition name of the data partition therein.
[0079] In some embodiments, the index objects in the same storage bucket are all identified by the index partition name of the index partition therein.
[0080] In some embodiments, the fence objects in the same storage bucket are all identified by the fence partition name of the fence partition therein.
[0081] In some embodiments, the number of index address segments included in different logical volumes is the same, or the number of index address segments included in different logical volumes can be different.
[0082] In some embodiments, the number of data address segments included in different index address segments is the same, or the number of data address segments included in different index address segments can be different.
[0083] In some embodiments, the number of block data address segments included in different data address segments is the same, or the number of block data address segments included in different data address segments can be different.
[0084] In some embodiments, the lengths of different block data address segments are the same, or the lengths of different block data address segments can be different.
[0085] In some embodiments, the naming format of the data partition comprises: a prefix, a volume identifier corresponding to the storage bucket, and a data partition identifier.
[0086] For example, the naming format of the data partition is shown in Table 1 as follows:
[0087] Table 1
[0088]
[0089] In some embodiments, the naming format of the index partition comprises: a prefix, a volume identifier corresponding to the storage bucket, and an index partition identifier.
[0090] For example, the naming format of the index partition is shown in Table 2 as follows:
[0091] Table 2
[0092]
[0093] In some embodiments, the naming format of the fence partition comprises: a prefix, a volume identifier corresponding to the storage bucket, and an index partition identifier.
[0094] For example, the naming format of the fence partition is shown in Table 3 as follows:
[0095] Table 3
[0096]
[0097] In some embodiments, the above data object is obtained by encapsulating data in a data address segment in the logical volume in address order, and the content format of the data object comprises at least one of a complete data object, an incremental data object, and a differential data object.
[0098] For a complete data object: in some embodiments, when a complete backup is performed, all data written in a data address segment in the logical volume before the backup time is encapsulated as an independent object. In some optional embodiments, in the case where no new data is written before the backup time, there is no new data at this time, and no object is generated.
[0099] For an incremental data object: in some embodiments, when an incremental backup is performed, data written in a data address segment in the logical volume after the last arbitrary backup before the backup time is encapsulated as an independent object. In some optional embodiments, in the case where no new data is written before the backup time, there is no new data at this time, and no object is generated.
[0100] For the differential data object: in some embodiments, at the time of differential backup, the data written in a data address segment of the logical volume since the last full backup is encapsulated as an independent object before the backup time. In some optional embodiments, in the case where no new data is written before the backup time, no object is generated at this time.
[0101] Exemplary, Figure 5 The schematic diagram of data object encapsulation in some embodiments is shown in Figure 5 As shown in the figure, the data object is encapsulated by the data in the data address segment in address order according to the backup requirements. Figure 5 The blocks a, b, c, i, j in the figure represent the block data in the data address segment.
[0102] In some embodiments, the naming format of the data object includes the data partition name, the starting address of the data address segment corresponding to the data object in the logical volume, and the version number of the data object.
[0103] Exemplary, the naming rules of the data object include:
[0104] a) The data object name is unique in the volume.
[0105] b) The data object name should contain the data partition name, the volume address information corresponding to the data object, and the version number.
[0106] Exemplary, the naming format of the data object is shown in Table 4 as follows:
[0107] Table 4
[0108]
[0109] In some embodiments, each index object stores the index of the backup data in an index address segment in the logical volume, and the index object is one-to-one mapped to the index address segment. The index object and the data object are in a one-to-many mapping relationship, that is, one index object stores the index of the data in multiple data objects.
[0110] In some embodiments, the naming format of the index object includes the index partition name, the starting address of the index address segment corresponding to the index object in the logical volume, and the version number of the index object.
[0111] Exemplary, the naming rules of the data object include:
[0112] a) The index object name is unique in the volume.
[0113] b) The index object name should contain the index partition name, the volume address information corresponding to the index object, and the version number.
[0114] Exemplary, the naming format of the index object is shown in Table 5 as follows:
[0115] Table 5
[0116]
[0117] In some embodiments, the content format of the index object comprises: a header metadata area and an index area. Exemplarily, the content format of the index object is shown in Table 6 as follows:
[0118] Table 6
[0119]
[0120] The header metadata area comprises metadata of the index object, and the index area comprises: position indexes of data in the index address segment in respective data objects, and the position indexes in respective data objects are stored in the index area in address order.
[0121] In some embodiments, the header metadata area comprises at least one of the following fields:
[0122] A file information field, the file information field being used to identify at least one of a use and an owner of the index object;
[0123] A software version field, the software version field being used to identify a backup software version;
[0124] A start address field, the start address field being used to identify a start address of the index address segment corresponding to the index object in a logical volume where the index object is located;
[0125] An address length field, the address length field being used to identify an address length of the index address segment corresponding to the index object in the logical volume where the index object is located;
[0126] A data amount field, the data amount field being used to identify a data amount of valid data written in the target index address segment;
[0127] An index number field, the index number field being used to identify a number of data segment indexes included in the index object;
[0128] A data object name length field, the index number field being used to identify a length of a data object name in the index area;
[0129] A first check field;
[0130] A reserved field.
[0131] Exemplarily, the header metadata area is located at a first 4 kilobyte (KiB) address of a header of the index object. The format of the header metadata area can be shown in Table 7 as follows:
[0132] Table 7
[0133]
[0134] In some embodiments, the position index of the data in the index address segment in the index area in the respective data object includes at least one of the following fields:
[0135] a data object name field;
[0136] a start address field, the start address field being used to identify the start address of the data in the data object;
[0137] a data length field;
[0138] a fence partition identification field;
[0139] a second check field.
[0140] Exemplarily, before the backup time, the position information of the data written in the index address segment in the respective data object is stored in the index area of the index object in address order as an index. Figure 6 FIG. 1 is a schematic diagram of an index area, Figure 6 CRC in the table 1 denotes a check field of cyclic redundancy check (Cyclic Redundancy Check).
[0141] Exemplarily, the specific form of the position index of the data in the index address segment in the index area in the respective data object is shown in the table 8 as follows:
[0142] Table 8
[0143]
[0144] In some embodiments, the fence object indicates that the backup of the volume has been completed completely and consistently.
[0145] The content format of the fence object is empty;
[0146] The naming format of the fence object includes: a fence partition name, and a version number of the completed backup.
[0147] Exemplarily, the naming format of the fence object is shown in the table 9 as follows:
[0148] Table 9
[0149]
[0150] Case 1: the standard format object includes: a data object.
[0151] In some embodiments, the process of processing the data to be backed up in the block storage system according to the preset data organization mode to obtain the standard format object can include but is not limited to the following steps:
[0152] 401a, determine the data to be backed up in the target index address segment in the target logical volume in the block storage system.
[0153] The target logical volume can be any logical volume in the block storage system, and the target index address segment can be any index address segment in the target logical volume.
[0154] For example, in the data preparation phase, the logical volume to be backed up can be determined first, and the data in the logical volume can be grouped according to the data address segments divided in the logical volume. Subsequently, a data object can be generated for each data address segment, and a volume-level incremental version number can be generated for each data object, and a data object name can be generated according to the naming format of the data object.
[0155] 401b, generate a data object for each data address segment in the data to be backed up according to the content format of the data object.
[0156] After generating the data object, a volume-level incremental version number can be generated for each data object.
[0157] 401c, generate a data object name for each data object according to the naming format of the data object.
[0158] In some embodiments, after generating the above data object, a compression algorithm and an encryption algorithm can be selected, the data object can be compressed first, and then the compressed data object can be encrypted. The compressed and encrypted data object can be used as the data object to be uploaded.
[0159] Case 2: The standard format object also includes an index object, that is, it includes a data object and an index object.
[0160] The above process of processing the target data to be backed up in the block storage system according to the preset data organization mode to obtain the standard format object can further include the following steps for the index object:
[0161] 401d, when all data address segments in the target index address segment have generated data objects and have been backed up to the cloud object storage system, generate an index object for the target index address segment according to the content format of the index object.
[0162] The prerequisite for generating the index object includes: when all data address segments in a certain index address segment have generated data objects and have been backed up to the object storage, the index object corresponding to the index address segment can be backed up.
[0163] Specifically, based on the content format requirements of the index object mentioned above, an index object can be generated for the index address range that meets the above prerequisites, and a volume-level incrementing version number can be generated for the index object.
[0164] 401e. Generate the index object name according to the index object naming format.
[0165] After generating the index object, you can select a compression algorithm and an encryption algorithm to compress the index object first, and then encrypt the compressed index object. Use the compressed and encrypted index objects as the index objects to be uploaded.
[0166] Case 3: Standard format objects also include fence objects, that is, data objects, index objects and fence objects.
[0167] In some embodiments, the process of processing the data to be backed up in the block storage system according to a preset data organization method to obtain a standard format object may include, but is not limited to, the following steps:
[0168] 401f: If all indexed address ranges in the target logical volume have been indexed and backed up to a cloud object storage system, generate a fence object according to the content format requirements of the fence object.
[0169] The fence object is used to indicate that a backup of the target logical volume has been completed.
[0170] In some embodiments, when all index address ranges in a logical volume have generated index objects and have been backed up to a cloud object storage system, a fence object representing the backup status of the logical volume can be backed up.
[0171] 401g. Generate fence object names according to the naming format of fence objects.
[0172] First, a volume-level incrementing version number can be generated as a fence. This version number should be greater than the version numbers corresponding to all index objects in the volume. Second, a fence object can be generated based on the content format of the fence object.
[0173] 402. Back up standard format objects to a cloud object storage system.
[0174] Backing up standard format objects to a cloud object storage system may include, but is not limited to, transferring standard format objects to a cloud object storage system based on a preset backup protocol.
[0175] Regarding situation 1 above:
[0176] The aforementioned process of transferring standard format objects to a cloud object storage system based on a preset backup protocol may include:
[0177] a) constructing a PUT request, wherein the request header of the PUT request needs to include a Bucket corresponding to the logical volume, a data object name, and a compression algorithm and an encryption algorithm specified by custom metadata (meta).
[0178] b) uploading the data object to be uploaded to the Bucket corresponding to the logical volume in the cloud object storage system through the PUT interface of the cloud object storage system.
[0179] In some embodiments, the above transmission of a standard format object to the cloud object storage system based on the pre-device copy protocol can include but is not limited to: transmitting a first PUT request through the PUT interface of the cloud object storage system to upload the generated data object to the target storage bucket corresponding to the target logical volume.
[0180] The request body of the first PUT request includes a data object, and the request header of the first PUT request includes first indication information, which is used to indicate at least one of the target storage bucket, the data object name, the compression algorithm, and the encryption algorithm.
[0181] For the above case 2:
[0182] The above transmission of a standard format object to the cloud object storage system based on the pre-device copy protocol can further include:
[0183] a) constructing a PUT request, wherein the request header of the PUT request needs to include a Bucket corresponding to the logical volume, a data object name, and a compression algorithm and an encryption algorithm specified by custom meta.
[0184] b) uploading the data object to be uploaded to the Bucket corresponding to the logical volume in the cloud object storage system through the PUT interface of the cloud object storage system.
[0185] In some embodiments, the above transmission of a standard format object to the cloud object storage system based on the pre-device copy protocol can further include but is not limited to: transmitting a second PUT request through the PUT interface of the cloud object storage system to upload the generated at least one index object to the target storage bucket corresponding to the target logical volume.
[0186] The request body of the second PUT request includes the generated index object, and the second indication information is included in the request header of the second PUT request, and the second indication information is used to indicate at least one of the target storage bucket, the index object name, the compression algorithm, and the encryption algorithm.
[0187] For the above case 3:
[0188] The method of transmitting the standard format object into the cloud object storage system based on the pre-device backup protocol can further include:
[0189] a) constructing a PUT request, and the PUT request needs to include the Bucket corresponding to the logical volume and the fence object name in the request header;
[0190] b) uploading the fence object to the Bucket corresponding to the logical volume in the cloud object storage system through the PUT interface of the cloud object storage system.
[0191] In some embodiments, the method of transmitting the standard format object into the cloud object storage system based on the pre-device backup protocol can include but is not limited to: transmitting a third PUT request through the PUT interface of the cloud object storage system to upload the generated fence object to the target storage bucket corresponding to the target logical volume.
[0192] The third indication information is included in the request header of the third PUT request, and the third indication information is used to indicate at least one of the target storage bucket and the fence object name.
[0193] In some embodiments, after the backup of the target logical volume is completed, the method further includes: deleting the to-be-cleaned object through the DELETE interface of the cloud object storage system, and the to-be-cleaned object includes at least one of the data object, the index object, and the fence object.
[0194] The DELETE is a request method for deleting a specified resource in the hypertext transfer protocol, and after the method is used to send a deletion request to a target address, the server removes the corresponding identified resource, and is commonly used for cleaning operations of resources such as data, files, or service nodes.
[0195] In some embodiments, the DELETE interface can be used to batch clean the data object, the index object, and the fence object.
[0196] When a complete backup or a differential backup is completed, the to-be-cleaned object in the cloud object storage that meets the condition can be cleaned.
[0197] The determination method of the to-be-cleaned object includes at least one of the following:
[0198] 1) For each data address segment, if the data object is newly generated and backed up by the completed full backup this time, the data object backed up to the cloud object storage system before is the data object to be cleaned up.
[0199] 2) For each data address segment, if the data object is newly generated and backed up by the completed differential backup this time, the data object backed up to the cloud object storage system after the last full backup and before the differential backup this time is the data object to be cleaned up.
[0200] 3) For each index data segment, if the index object is newly generated and backed up by the completed full backup this time, the index object backed up to the cloud object storage system before is the index object to be cleaned up.
[0201] 4) For each index data segment, if the index object is newly generated and backed up by the completed differential backup this time, the index object backed up to the cloud object storage system before is the index object to be cleaned up.
[0202] 5) For each logical volume, the barrier object backed up before is the barrier object to be cleaned up.
[0203] It should be noted that, in the embodiments of the present application, each process in the backup process can be implemented based on a preset backup protocol. For example, the generation, compression, encryption and uploading of the data object, the index object and the barrier object described above can be implemented based on the preset backup protocol.
[0204] In the data backup method described above, the data backup process is implemented based on a preset communication protocol and a preset data organization manner, so that the communication protocol and the data organization manner in the data backup process are unified, which improves the universality and portability of the data backup method, thereby facilitating the flexible selection of backup product suppliers and cloud service providers.
[0205] The execution subject of the data recovery method provided in the embodiments of the present application can be a data recovery device or a computer device. The data recovery device can be a functional module or a functional entity in the computer device for implementing the data recovery method described above. In some embodiments, the computer device can be a local device or a cloud device. For example, the computer device can be a local computer, a tablet computer, or a server of a cloud device.
[0206] It should be noted that the same concepts (such as the related concepts of the data object, the index object and the barrier object) involved in the data recovery method described above can be understood similarly as in the data backup process, which will not be described here.
[0207] In the embodiments of the present application, the recovery process can be implemented through a preset recovery protocol, which will be described in detail in the following embodiments.
[0208] In one example embodiment, Figure 7 A flowchart of a data recovery method in some embodiments is shown. The method includes the following steps:
[0209] 701. Downloading a standard format object that has been backed up to a cloud object storage system.
[0210] The standard format object includes at least one of a data object, an index object, and a fence object.
[0211] In some embodiments, the standard format object that has been backed up to the cloud object storage system can be downloaded based on a preset recovery protocol.
[0212] 702. Processing the standard format object according to a preset data parsing manner to obtain recovery data.
[0213] The preset recovery protocol can support a recovery process for part of data or all data in a logical volume.
[0214] In the present embodiment, the block storage system can still provide normal services during the process of recovering part of data of a certain logical volume that has been backed up to the cloud object storage system from the cloud object storage system to the block storage system.
[0215] In the present embodiment, complete recovery at the logical volume level (i.e., recovery for all data in a logical volume) is supported, that is, the latest version of backup data of a logical volume in the cloud object storage system before a certain time point is completely recovered to the block storage system. The block storage system can be the original block storage system that performs backup, or a local block storage system of other third parties. The block storage system after recovery can continue to provide read and write services and data backup for the logical volume.
[0216] In the present embodiment, cloud direct recovery mode can be supported during recovery, that is, data can be directly read on demand from the cloud object storage system without downloading complete volume data to the local to support fast business startup and data access.
[0217] In some embodiments, the recovery data includes part of data in a target logical volume, and all data in the target logical volume.
[0218] Case a1: the recovery data includes part of data in a target logical volume, and the standard format object includes an index object.
[0219] In some embodiments, a data index of the data to be recovered can be obtained. When the data index of the data to be recovered is not in the block storage system, it can be obtained from the cloud object storage system.
[0220] In some embodiments, the process of downloading the standard format objects backed up to the cloud object storage system based on the preset recovery protocol can include but is not limited to the following steps:
[0221] 701a. Determine the target index address segment where the data to be recovered is located according to the starting address and address length of the data to be recovered in the target logical volume.
[0222] Wherein, the index address segment where the data to be recovered is located can be calculated according to the volume starting address (lv_offset) and length (length) of the data to be recovered.
[0223] 701b. Download the index object name list corresponding to the target index address segment.
[0224] In some embodiments, the process of downloading the index object name list corresponding to the target index address segment can include but is not limited to: transmitting a first LIST request through the LIST interface of the cloud object storage system to download the index object name list corresponding to the target index address segment.
[0225] Wherein, LIST is a request method in the Hypertext Transfer Protocol for querying associated resource information under a specified resource address, through which the resource name, identifier, etc. list data corresponding to the target address can be obtained, and it is commonly used for resource enumeration query in cloud storage, file service, etc. scenarios.
[0226] Wherein, the first indication information is included in the request header of the first LIST request, and the first indication information is used to indicate at least one of the following: the target storage bucket corresponding to the target logical volume, the index partition name as the index object prefix, the starting position of the LIST, and the maximum number of objects returned at one time.
[0227] For example, a LIST request can be constructed, which includes in the request header of the LIST request: the Bucket corresponding to the volume, the index partition name as the object prefix, the starting position marker of the LIST, and the maximum number of objects returned at one time max-keys; then through the LIST interface of the object storage, all index object name lists corresponding to the index address segment are downloaded from the Bucket.
[0228] 701c. Parse the index object name in the index object name list according to the naming format of the index object to determine the version number in the index object name.
[0229] Wherein, the version number in the index object name can be parsed one by one according to the naming rule of the index object.
[0230] 701d. Download the corresponding index object based on the version number in the index object name.
[0231] The process of downloading the corresponding index object based on the version number in the index object name can include but is not limited to: downloading the index object corresponding to the index object name from the target storage bucket through the GET interface of the cloud object storage system.
[0232] The process of processing the standard format object according to the preset data analysis manner to obtain the recovery data can include but is not limited to: parsing the downloaded index object according to the content format of the index object to obtain the data index in the index object, wherein the data index includes a list of data object names.
[0233] Exemplarily, the index object name corresponding to the largest version number is the latest index object name. The latest index object name is specified through the GET interface of the object storage, and the corresponding index object is downloaded.
[0234] In some embodiments, after downloading the corresponding index object through the GET interface, the corresponding GET response header can be parsed, the encryption algorithm and the compression algorithm can be obtained through the custom metadata (meta), the downloaded object can be decrypted first, and the decrypted index object can be decompressed to obtain the original index object.
[0235] In some embodiments, the process of processing the standard format object according to the preset data analysis manner to obtain the recovery data can include but is not limited to: parsing the downloaded index object according to the content format of the index object to obtain the data index in the index object, wherein the data index includes a list of data object names.
[0236] The index object can be parsed according to the content format of the index object, and the corresponding data index can be obtained according to the starting address and the length of the logical volume of the data to be recovered. Exemplarily, the form of the data index can be as follows: <data_object_name, object_offset, lv_offset, length>.
[0237] Case a2: The recovery data includes part of the data in the target logical volume, and the standard format object further includes a data object, that is, includes an index object and a data object.
[0238] In some embodiments, based on the preset recovery protocol, the process of downloading the standard format object backed up to the cloud object storage system can include but is not limited to: downloading the data object corresponding to the data object name from the target storage bucket through the GET interface of the cloud object storage system according to the data object name in the data index.
[0239] Exemplarily, the corresponding data object can be downloaded from the Bucket through a GET interface of the cloud object storage system according to a data object name (data_object_name) in the data index.
[0240] In some embodiments, after the data object is downloaded through the GET interface of the cloud object storage system, the corresponding GET response header can be parsed, a custom meta acquisition encryption algorithm and a compression algorithm are obtained, the downloaded data object is decrypted first, and then the decrypted data object is decompressed to obtain the original data object.
[0241] In some embodiments, the process of processing the standard format object according to the preset data parsing manner to obtain the recovered data can include but is not limited to: parsing the downloaded data object according to a data segment index in the data index and a content format of the data object to obtain a parsing result. The parsing result can be data written in a data address segment corresponding to the data object.
[0242] Exemplarily, the data object can be parsed through the content format of the data object, and the data to be recovered can be read from the data object according to a data index of the data to be recovered. The data index of the data to be recovered can be, for example, <lv_offset, length>.
[0243] Case b1: the recovered data includes all data in the target logical volume; and the standard format object includes a fence object.
[0244] In some embodiments, based on the preset recovery protocol, the process of downloading the standard format object backed up to the cloud object storage system can include but is not limited to: transmitting a second LIST request through a LIST interface of the cloud object storage system to download a list of fence object names backed up to the cloud object storage system.
[0245] The second indication information in the request header of the second LIST request is used to indicate at least one of the following: a target storage bucket corresponding to the target logical volume, a fence partition name as a fence object prefix, a start position of the LIST, and a maximum number of objects returned at one time.
[0246] Exemplarily, a LIST request can be constructed first. The request header of the LIST request can include a specified Bucket corresponding to the volume, a specified fence partition name as an object prefix, a specified start position marker of the LIST, and a specified maximum number of objects returned at one time max-keys. Then, all the lists of fence object names can be downloaded from the Bucket through the LIST interface of the cloud object storage system.
[0247] In some embodiments, the process of processing the standard format objects according to the preset data parsing manner to obtain the restored data can include but is not limited to: according to the naming format of the fence object, parsing the fence object name in the fence object name list to obtain the corresponding fence.
[0248] For example, according to the naming rule of the fence object (see section 6.2.3.1), the fences in the fence object name are parsed one by one, and the largest fence (the largest version number) is the latest fence.
[0249] Case b2: The restored data includes all the data in the target logical volume; the standard format objects further include index objects, i.e., include fence objects and index objects.
[0250] In some embodiments, based on the preset restoration protocol, the process of downloading the standard format objects backed up to the cloud object storage system can further include but is not limited to the following steps:
[0251] 711、Download all index object name lists in the target logical volume.
[0252] Wherein, the LIST request can be constructed first, and the request header of the LIST request can include the Bucket corresponding to the volume, the index partition name as the object prefix, the start position marker of the LIST, and the maximum number of objects returned at one time max-keys; then all index object name lists are downloaded from the Bucket through the LIST interface of the cloud object storage system.
[0253] 712、According to the naming format of the index object, parse the index object name in the index object name list to determine the version number in the index object name.
[0254] Wherein, the index object name list can be classified according to the index address segment first, and each index address segment can correspond to multiple index object names, and then the version number in the index object name is parsed one by one according to the naming format of the index object.
[0255] In some embodiments, after parsing the version number in the index object name, for each index address segment, the largest version number is selected from all version numbers less than or equal to the latest fence, and the index object name corresponding to the version number is the latest index object name of the index address segment.
[0256] In some embodiments, after parsing the version number in the index object name, for each index address segment, the index object name with a version number greater than the latest fence can also be recorded in the to-be-cleaned list.
[0257] 713、Download the corresponding index object based on the version number in the index object name.
[0258] The latest index object corresponding to the index object name can be downloaded from the bucket through a GET interface of the cloud object storage system.
[0259] The GET is a request method in the hypertext transfer protocol for retrieving data from a specified resource address. Through this method, the resource content such as a file or a data list corresponding to the target address can be obtained. It is a commonly used basic method for obtaining resources in network communication.
[0260] In some embodiments, the process of processing the standard format object according to the preset data parsing manner to obtain the restored data further includes but is not limited to: parsing the downloaded index object according to the content format of the index object to obtain the data index in the index object. The data index includes a list of data object names. The list of data object names refers to a list of all data object names recorded in the index object.
[0261] It should be noted that the process of obtaining the restored data in case b2 is similar to the process in case a1 described above. For details, please refer to the description of case a1, which will not be repeated here.
[0262] Case b3: The restored data includes all the data in the target logical volume; the standard format object further includes a data object, i.e., a fence object, an index object, and a data object.
[0263] In case b3, the process of obtaining the data object is similar to the process of obtaining the data object in case a2 described above. For details, please refer to the description of case a2, which will not be repeated here.
[0264] In some embodiments, after downloading the index object through the GET interface of the cloud object storage system, the corresponding GET response header can be parsed, and a custom meta encryption algorithm and a compression algorithm can be obtained to decrypt the downloaded object first, and then decompress the decrypted index object to obtain the original index object.
[0265] 703, store the restored data into the block storage system.
[0266] The data written in the data address segment corresponding to the data object can be transmitted to the block storage system for storage.
[0267] In some embodiments, when the restoration of all the data in the logical volume is completed, the index objects to be cleaned in the cloud object storage can be cleaned up.
[0268] The index objects to be cleaned can include the index object names saved in the cleaning queue.
[0269] In some embodiments, the index objects to be cleaned up can be deleted from the cloud object storage system in batches through a DELETE interface of the cloud object storage system.
[0270] It should be noted that in the embodiments of the present application, each process in the recovery process can be implemented based on a preset recovery protocol. For example, the downloading, parsing, decompression, decryption, and transmission and storage processes of the data objects, index objects and barrier objects described above can be implemented based on the preset recovery protocol.
[0271] In the data recovery method described above, the data backup process is implemented based on a preset recovery protocol and a preset data recovery method, so that the communication protocol and the recovery method in the data backup process are unified, which improves the universality and portability of the data recovery method, thereby facilitating the flexible selection of recovery product suppliers and cloud service providers.
[0272] In the embodiments of the present application, in order to meet the compatibility requirements, the cloud object storage system meets at least one of the following requirements:
[0273] Possessing at least one of the PUT interface, the GET interface, the DELETE interface and the LIST interface of the object level;
[0274] The PUT interface supports user-defined metadata;
[0275] The response header returned by the GET interface contains user-defined metadata;
[0276] The LIST interface supports specifying the prefix of the LIST to obtain a list of object names with the same prefix;
[0277] The LIST interface supports specifying the starting position of the LIST;
[0278] The LIST interface supports specifying the maximum number of objects returned by one LIST request;
[0279] After the standard format object is uploaded to the cloud object storage system through the PUT interface, the LIST operation and / or the GET operation on the standard format object is supported.
[0280] In some embodiments, in order to meet the integrity requirement during data backup: the entity tag of the standard format object stored in the block storage system is compared with the entity tag of the standard format object returned by the cloud object storage system after the standard format object is backed up to the cloud object storage system, to perform integrity verification.
[0281] In some embodiments, in order to meet the integrity requirement at the time of data recovery: the entity tag of the standard format object downloaded in the block storage system is compared with the entity tag of the standard format object returned by the cloud object storage system, to perform integrity check.
[0282] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.
[0283] Based on the same inventive concept, the embodiments of the present application also provide a data recovery device for implementing the above-mentioned data recovery method. The implementation scheme of the problem solving provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more data recovery device embodiments provided below can refer to the limitations of the data backup method in the above text, which will not be repeated here.
[0284] In an exemplary embodiment, as shown in Figure 8 a data recovery device is provided, comprising:
[0285] The download module 801 downloads the standard format object that has been backed up to the cloud object storage system.
[0286] The recovery module 802 processes the standard format object according to a preset data parsing manner to obtain recovery data.
[0287] The storage module 803 stores the recovery data into the block storage system.
[0288] The standard format object includes at least one of a data object, an index object, and a fence object.
[0289] In some embodiments, the download module 801 is specifically configured to download the standard format object that has been backed up to the cloud object storage system based on a preset recovery protocol.
[0290] In some embodiments, the block storage system comprises at least one logical volume, the logical volume comprises at least one index address segment, the index address segment comprises at least one data address segment, the data address segment comprises at least one block data address segment, and the block data address segment is used to store the block data.
[0291] In some embodiments, the cloud object storage system comprises at least one storage bucket, each of the storage buckets corresponds to a different logical volume, and the logical partition in the storage bucket comprises at least one of a data partition, an index partition, and a fence partition.
[0292] The data objects in the same storage bucket are all identified by the data partition name of the data partition therein.
[0293] The index objects in the same storage bucket are all identified by the index partition name of the index partition therein.
[0294] The fence objects in the same storage bucket are all identified by the fence partition name of the fence partition therein.
[0295] In some embodiments,
[0296] The naming format of the data partition comprises a prefix, a logical volume identifier corresponding to the storage bucket, and a data partition identifier.
[0297] And / or,
[0298] The naming format of the index partition comprises a prefix, a logical volume identifier corresponding to the storage bucket, and an index partition identifier.
[0299] And / or,
[0300] The naming format of the fence partition comprises a prefix, a logical volume identifier corresponding to the storage bucket, and an index partition identifier.
[0301] In some embodiments, the recovery data comprises part of the data in the target logical volume, and the standard format object comprises an index object; and the downloading module 801 is specifically configured to: determine a target index address segment in which the to-be-recovered data is located according to a starting address and an address length of the to-be-recovered data in the target logical volume; download a list of index object names corresponding to the target index address segment; parse the index object names in the list of index object names according to the naming format of the index object to determine the version number in the index object name; and download the corresponding index object based on the version number in the index object name.
[0302] In some embodiments, the downloading module 801 is specifically configured to: transmit a first LIST request through a LIST interface of the cloud object storage system, to download a list of index object names corresponding to the target index address segment;
[0303] The first indication information in the request header of the first LIST request is used to indicate at least one of the following: a target storage bucket corresponding to the target logical volume, an index partition name as an index object prefix, a start position of LIST, and a maximum number of objects returned at one time.
[0304] In some embodiments, the downloading module 801 is specifically configured to: download, through a GET interface of the cloud object storage system, an index object corresponding to the index object name from the target storage bucket.
[0305] In some embodiments, the recovery data includes all data in the target logical volume; the standard format object includes a fence object; and the downloading module 801 is specifically configured to:
[0306] transmit a second LIST request through a LIST interface of the cloud object storage system, to download a list of fence object names that have been backed up to the cloud object storage system;
[0307] The second indication information in the request header of the second LIST request is used to indicate at least one of the following: a target storage bucket corresponding to the target logical volume, a fence partition name as a fence object prefix, a start position of LIST, and a maximum number of objects returned at one time.
[0308] In some embodiments, the recovery module 802 is specifically configured to:
[0309] According to a naming format of the fence object, the fence object name in the list of fence object names is parsed to obtain a corresponding fence.
[0310] In some embodiments, the fence object is used to represent that a backup of the target logical volume has been completed; and a content format of the fence object is empty.
[0311] The naming format of the fence object includes a fence partition name and a version number of a current backup completion.
[0312] In some embodiments, the standard format object further includes an index object; and the downloading module 801 is specifically configured to: download a list of all index object names in the target logical volume;
[0313] According to a naming format of the index object, the index object name in the list of index object names is parsed to determine a version number in the index object name.
[0314] download the corresponding index object based on the version number in the index object name.
[0315] In some embodiments, the naming format of the index object comprises:
[0316] an index partition name, a start address of the index address segment corresponding to the index object in a logical volume, a version number of the index object.
[0317] In some embodiments, the recovery module 802 is specifically configured to:
[0318] parse the downloaded index object according to a content format of the index object to obtain data indexes in the index object, wherein the data indexes comprise a list of data object names.
[0319] In some embodiments, the content format of the index object comprises a header metadata area and an index area.
[0320] The header metadata area comprises metadata of the index object, and the index area comprises position indexes of data in the index address segment in respective data objects, wherein the position indexes in the respective data objects are stored in the index area in address order.
[0321] In some embodiments, the header metadata area comprises at least one of the following fields:
[0322] a file information field, which is used to identify at least one of a use and an owner of the index object;
[0323] a software version field, which is used to identify a backup software version;
[0324] a start address field, which is used to identify a start address of the index address segment corresponding to the index object in a logical volume;
[0325] an address length field, which is used to identify an address length of the index address segment corresponding to the index object in the logical volume;
[0326] a data amount field, which is used to identify a data amount of valid data written in the target index address segment;
[0327] an index number field, which is used to identify a number of data segment indexes included in the index object;
[0328] a data object name length field, which is used to identify a length of a data object name in the index area;
[0329] a first check field;
[0330] a reserved field.
[0331] In some embodiments, the position index of the data in the index address segment in each data object comprises at least one of the following fields:
[0332] a data object name field;
[0333] a start address field, used for identifying a start address of the data in the data object;
[0334] a data length field;
[0335] a fence partition identification field;
[0336] a second check field.
[0337] In some embodiments, the standard format object further comprises: a data object, and the downloading module 801 is specifically configured to:
[0338] download, according to a data object name in the data index, a data object corresponding to the data object name from the target storage bucket through a GET interface of the cloud object storage system.
[0339] In some embodiments, the restoring module 802 is specifically configured to:
[0340] parse the downloaded data object according to a data segment index in the data index and a content format of the data object, to obtain a parsing result.
[0341] In some embodiments, the data object is obtained by encapsulating data in a data address segment in a logical volume in address order;
[0342] The content format of the data object comprises at least one of the following:
[0343] a complete data object, for which, when a complete backup is performed, all data written in a data address segment in a logical volume before a backup time is encapsulated as an independent object;
[0344] an incremental data object, for which, when an incremental backup is performed, data written in a data address segment in a logical volume before a backup time and after a last arbitrary backup is encapsulated as an independent object;
[0345] a differential data object, for which, when a differential backup is performed, data written in a data address segment in a logical volume before a backup time and after a last complete backup is encapsulated as an independent object.
[0346] In some embodiments, the naming format of the data object comprises:
[0347] a data partition name, a start address of a data address segment corresponding to the data object in a logical volume, and a version number of the data object.
[0348] In some embodiments, the requirements met by the cloud object storage system comprise at least one of the following:
[0349] at least one of a PUT interface, a GET interface, a DELETE interface, and a LIST interface at an object level;
[0350] the PUT interface supports user-defined metadata;
[0351] the GET interface returns user-defined metadata in a response header;
[0352] the LIST interface supports specifying a prefix of a LIST to obtain a list of object names with the same prefix;
[0353] the LIST interface supports specifying a start position of a LIST;
[0354] the LIST interface supports specifying a maximum number of objects returned by a LIST request;
[0355] after a standard format object is uploaded to the cloud object storage system through the PUT interface, the standard format object is supported to be executed with a GET operation and / or a LIST operation.
[0356] In some embodiments, the apparatus further comprises a verification module configured to:
[0357] compare an entity tag of the standard format object downloaded in the block storage system with an entity tag of the standard format object returned by the cloud object storage system to perform integrity verification.
[0358] Each of the above data recovery apparatuses can be realized by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each of the above modules.
[0359] In an exemplary embodiment, a computer device, which can be a terminal or a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement the data recovery method in the above method embodiment.
[0360] Those skilled in the art can understand that, Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0361] In one exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:
[0362] Downloading a standard format object that has been backed up to a cloud object storage system;
[0363] Processing the standard format object according to a preset data parsing manner to obtain recovery data;
[0364] Storing the recovery data into a block storage system;
[0365] Among them, the standard format object includes at least one of: a data object, an index object and a fence object.
[0366] In some embodiments, the processor executing the computer program further implements the following steps:
[0367] Downloading a standard format object that has been backed up to a cloud object storage system based on a preset recovery protocol.
[0368] In some embodiments, the block storage system comprises at least one logical volume, the logical volume comprises at least one index address segment, the index address segment comprises at least one data address segment, the data address segment comprises at least one block data address segment, the block data address segment is used to store the block data.
[0369] In some embodiments, the cloud object storage system comprises at least one bucket, each of the buckets corresponds to a different logical volume, and the logical partition in the bucket comprises at least one of a data partition, an index partition, and a fence partition.
[0370] The data objects in the same bucket are identified by the data partition name of the data partition therein.
[0371] The index objects in the same bucket are identified by the index partition name of the index partition therein.
[0372] The fence objects in the same bucket are identified by the fence partition name of the fence partition therein.
[0373] In some embodiments, the naming format of the data partition comprises a prefix, a logical volume identifier corresponding to the bucket, and a data partition identifier.
[0374] and / or,
[0375] The naming format of the index partition comprises a prefix, a logical volume identifier corresponding to the bucket, and an index partition identifier.
[0376] and / or,
[0377] The naming format of the fence partition comprises a prefix, a logical volume identifier corresponding to the bucket, and an index partition identifier.
[0378] In some embodiments, the recovery data comprises part of the data in the target logical volume, and the standard format object comprises an index object; when the processor executes the computer program, the following steps are further implemented:
[0379] According to the starting address and the address length of the data to be recovered in the target logical volume, a target index address segment in which the data to be recovered is located is determined.
[0380] A list of index object names corresponding to the target index address segment is downloaded.
[0381] According to the naming format of the index object, the version number in the index object name in the list of index object names is parsed to determine the version number in the index object name.
[0382] Based on the version number in the index object name, the corresponding index object is downloaded.
[0383] In some embodiments, the processor, when executing the computer program, also implements the following steps: transmitting a first LIST request through a LIST interface of the cloud object storage system to download a list of index object names corresponding to the target index address segment;
[0384] The first indication information in the request header of the first LIST request is used to indicate at least one of the following: a target storage bucket corresponding to the target logical volume, an index partition name as an index object prefix, a start position of LIST, and a maximum number of objects returned at one time.
[0385] In some embodiments, the processor, when executing the computer program, also implements the following steps: downloading, through a GET interface of the cloud object storage system, an index object corresponding to the index object name from the target storage bucket.
[0386] In some embodiments, the recovery data includes all data in the target logical volume; the standard format object includes a fence object; and the processor, when executing the computer program, also implements the following steps:
[0387] transmitting a second LIST request through a LIST interface of the cloud object storage system to download a list of fence object names that have been backed up to the cloud object storage system;
[0388] The second indication information in the request header of the second LIST request is used to indicate at least one of the following: a target storage bucket corresponding to the target logical volume, a fence partition name as a fence object prefix, a start position of LIST, and a maximum number of objects returned at one time.
[0389] In some embodiments, the processor, when executing the computer program, also implements the following steps:
[0390] According to the naming format of the fence object, the fence object name in the list of fence object names is parsed to obtain the corresponding fence.
[0391] In some embodiments, the fence object is used to represent that a backup of the target logical volume has been completed; the content format of the fence object is empty; and the naming format of the fence object includes a fence partition name and a version number of the completed backup.
[0392] In some embodiments, the standard format object also includes an index object; and the processor, when executing the computer program, also implements the following steps:
[0393] download all index object names in the target logical volume;
[0394] parsing the index object names in the index object name list according to a naming format of the index object to determine a version number in the index object name;
[0395] downloading a corresponding index object based on the version number in the index object name.
[0396] In some embodiments, the naming format of the index object comprises:
[0397] an index partition name, a start address of an index address segment corresponding to the index object in a logical volume, and a version number of the index object.
[0398] In some embodiments, the processor, when executing the computer program, further implements the following steps:
[0399] parsing the downloaded index object according to a content format of the index object to obtain data indexes in the index object, the data indexes comprising a data object name list.
[0400] In some embodiments, the content format of the index object comprises a header metadata area and an index area.
[0401] The header metadata area comprises metadata of the index object, and the index area comprises position indexes of data in the index address segment in respective data objects, the position indexes in the respective data objects being stored in the index area in address order.
[0402] In some embodiments, the header metadata area comprises at least one of the following fields:
[0403] a file information field for identifying at least one of a use and an owner of the index object;
[0404] a software version field for identifying a backup software version;
[0405] a start address field for identifying a start address of an index address segment corresponding to the index object in a logical volume;
[0406] an address length field for identifying an address length of the index address segment corresponding to the index object in the logical volume;
[0407] a data amount field for identifying a data amount of valid data written in the target index address segment;
[0408] an index number field for identifying a number of data segment indexes included in the index object;
[0409] a data object name length field, the index number field being used to identify the length of the data object name in the index area;
[0410] a first check field;
[0411] a reserved field.
[0412] In some embodiments, the position index of the data in the index address segment in each data object comprises at least one of the following fields:
[0413] a data object name field;
[0414] a start address field, the start address field being used to identify the start address of the data in the data object;
[0415] a data length field;
[0416] a fence partition identification field;
[0417] a second check field.
[0418] In some embodiments, the standard format object further comprises: a data object, and the processor, when executing the computer program, further implements the following steps:
[0419] According to the data object name in the data index, the data object corresponding to the data object name is downloaded from the target storage bucket through a GET interface of the cloud object storage system.
[0420] In some embodiments, the processor, when executing the computer program, further implements the following steps:
[0421] According to the data segment index in the data index and the content format of the data object, the downloaded data object is parsed to obtain a parsing result.
[0422] In some embodiments, the processor, when executing the computer program, further implements the following steps:
[0423] The data object is encapsulated by the data in one data address segment in the logical volume in address order;
[0424] The content format of the data object comprises at least one of the following:
[0425] a complete data object, for the complete data object, all the data written in one data address segment in the logical volume before the backup time is encapsulated as an independent object at the time of complete backup;
[0426] an incremental data object, for the incremental data object, the data written in one data address segment in the logical volume after the last arbitrary backup before the backup time is encapsulated as an independent object at the time of incremental backup;
[0427] A differential data object, for which, at the time of differential backup, data written into a data address segment in a volume since the last full backup is encapsulated as an independent object.
[0428] In some embodiments, the naming format of the data object comprises:
[0429] a data partition name, a start address of the data address segment corresponding to the data object in a logical volume, and a version number of the data object.
[0430] In some embodiments, the cloud object storage system meets at least one of the following requirements:
[0431] at least one of a PUT interface, a GET interface, a DELETE interface, and a LIST interface at the object level;
[0432] The PUT interface supports user-defined metadata;
[0433] The GET interface returns user-defined metadata in the response header;
[0434] The LIST interface supports specifying a prefix of the LIST to obtain a list of object names with the same prefix;
[0435] The LIST interface supports specifying a start position;
[0436] The LIST interface supports specifying the maximum number of objects returned by a LIST request;
[0437] After a standard format object is uploaded to the cloud object storage system through the PUT interface, the standard format object is supported to be executed with the GET operation and / or the LIST operation.
[0438] In some embodiments, the processor further implements the following steps when executing the computer program:
[0439] The entity tag of the standard format object downloaded in the block storage system is compared with the entity tag of the standard format object returned by the cloud object storage system for integrity verification.
[0440] In some embodiments, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement each process shown in the above method embodiments.
[0441] In some embodiments, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement each process shown in the above method embodiments.
[0442] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0443] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0444] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent of the present application. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A data recovery method, characterized in that, The method includes: Download the standard format object that has been backed up to the cloud object storage system; The standard format object is processed according to a preset data parsing method to obtain the recovered data; The recovered data is stored in a block storage system; The standard format object includes at least one of the following: a data object, an index object, and a fence object.
2. The method according to claim 1, characterized in that, The downloaded standard format objects that have been backed up to the cloud object storage system include: Based on the preset recovery protocol, download standard format objects that have been backed up to the cloud object storage system.
3. The method according to claim 1 or 2, characterized in that, The block storage system includes at least one logical volume, the logical volume includes at least one index address segment, the index address segment includes at least one data address segment, the data address segment includes at least one block data address segment, and the block data address segment is used to store the block data.
4. The method according to any one of claims 1 to 3, characterized in that, The cloud object storage system includes at least one storage bucket, each storage bucket corresponding to a different logical volume, and the logical partitions in the storage bucket include at least one of the following: data partition, index partition, and fence partition. The data objects in the same storage bucket are all identified by the data partition name of the data partition mentioned therein; The index objects in the same storage bucket are all identified by the index partition name of the index partition mentioned therein; The fence objects in the same storage bucket are all identified by the fence partition name of the fence partition.
5. The method according to claim 4, characterized in that, The naming format of the data partition includes: a prefix, the logical volume identifier corresponding to the storage bucket, and the data partition identifier; And / or, The naming format of the index partition includes: a prefix, the logical volume identifier corresponding to the storage bucket, and the index partition identifier; And / or, The naming format of the fence partition includes: a prefix, the logical volume identifier corresponding to the storage bucket, and the index partition identifier.
6. The method according to any one of claims 1 to 5, characterized in that, The recovered data includes a portion of the data in the target logical volume, and the standard format object includes an index object; The downloaded standard format objects that have been backed up to the cloud object storage system include: Based on the starting address and address length of the data to be recovered in the target logical volume, determine the target index address segment where the data to be recovered is located; Download the list of index object names corresponding to the target index address range; The index object names in the index object name list are parsed according to the naming format of the index objects to determine the version number in the index object name; Download the corresponding index object based on the version number in the index object name.
7. The method according to claim 6, characterized in that, The download of the list of index object names corresponding to the target index address range includes: The first LIST request is transmitted through the LIST interface of the cloud object storage system to download the list of index object names corresponding to the target index address range; The request header of the first LIST request includes first indication information, which indicates at least one of the following: the target bucket corresponding to the target logical volume, the index partition name as the prefix of the index object, the starting position of the LIST, and the maximum number of objects that can be returned in one LIST.
8. The method according to claim 6 or 7, characterized in that, The downloading of the corresponding index object based on the version number in the index object name includes: The index object corresponding to the index object name is downloaded from the target storage bucket through the GET interface of the cloud object storage system.
9. The method according to any one of claims 1 to 5, characterized in that, The recovered data includes all data in the target logical volume; the standard format object includes a fence object; The downloaded standard format objects that have been backed up to the cloud object storage system include: A second LIST request is transmitted through the LIST interface of the cloud object storage system to download the list of fence object names that have been backed up to the cloud object storage system. The request header of the second LIST request includes second indication information, which indicates at least one of the following: the target bucket corresponding to the target logical volume, the fence partition name as a prefix of the fence object, the starting position of the LIST, and the maximum number of objects that can be returned in one LIST.
10. The method according to claim 9, characterized in that, The step of processing the standard format object according to a preset data parsing method to obtain the recovered data includes: Based on the naming format of the fence objects, the fence object names in the fence object name list are parsed to obtain the corresponding fences.
11. The method according to claim 10, characterized in that, The fence object is used to indicate that a backup of the target logical volume has been completed; The content format of the fence object is empty; The naming format of the fence object includes: fence partition name and version number of this backup.
12. The method according to any one of claims 9 to 11, characterized in that, The standard format object also includes an index object; the standard format object that has been downloaded and backed up to the cloud object storage system includes: Download the list of all index object names in the target logical volume; The index object names in the index object name list are parsed according to the naming format of the index objects to determine the version number in the index object name; Download the corresponding index object based on the version number in the index object name.
13. The method according to any one of claims 6 to 12, characterized in that, The naming format for the index object includes: The index partition name, the starting address of the index address range corresponding to the index object in the logical volume, and the version number of the index object.
14. The method according to any one of claims 6 to 13, characterized in that, The step of processing the standard format object according to a preset data parsing method to obtain the recovered data includes: The downloaded index object is parsed according to its content format to obtain the data index in the index object, which includes a list of data object names.
15. The method according to claim 14, characterized in that, The content format of the index object includes: a header metadata area and an index area; The header metadata area includes the metadata of the index object, and the index area includes: the position index of the data in each data object in the index address segment, and the position index of each data object is stored in the index area in address order.
16. The method according to claim 15, characterized in that, The header metadata area includes at least one of the following fields: A file information field, wherein the file information field is used to identify at least one of the purpose and owner of the indexed object; A software version field, which is used to identify the backup software version; A start address field, wherein the start address field is used to identify the starting address of the index address segment corresponding to the index object in the logical volume; The address length field is used to identify the address length of the index address segment corresponding to the index object in the logical volume. A data volume field, which is used to identify the amount of valid data written into the target index address segment; An index number field is used to identify the number of data segment indexes included in the index object; The data object name length field, wherein the index number segment is used to identify the length of the data object name in the index area; First verification field; Reserved fields.
17. The method according to claim 15 or 16, characterized in that, The location index of data in each data object in the index address segment includes at least one of the following fields: Data object name field; A start address field, which is used to identify the starting address of the data in the data object; Data length field; Fence partition identifier field; The second verification field.
18. The method according to any one of claims 6 to 17, characterized in that, The standard format object also includes: a data object, wherein the standard format object downloaded and backed up to the cloud object storage system includes: Based on the data object name in the data index, the data object corresponding to the data object name is downloaded from the target storage bucket through the GET interface of the cloud object storage system.
19. The method according to claim 18, characterized in that, The step of processing the standard format object according to a preset data parsing method to obtain the recovered data includes: Based on the data segment index in the data index and the content format of the data object, the downloaded data object is parsed to obtain the parsing result.
20. The method according to claim 19, characterized in that, The data object is obtained by encapsulating data in address order within a data address segment within a logical volume; The content format of the data object includes at least one of the following: A complete data object, for which, during a full backup, all data written to a data address segment within the logical volume before the backup time is encapsulated into an independent object; Incremental data object: During incremental backup, data newly written to a data address segment in the logical volume before the backup time and after the last arbitrary backup is encapsulated into an independent object. Differential data object: During differential backup, data newly written to a data address range within the volume before the backup time and after the most recent full backup is encapsulated into an independent object.
21. The method according to any one of claims 18 to 20, characterized in that, The naming format for the data objects includes: The data partition name, the starting address of the data address range corresponding to the data object in the logical volume, and the version number of the data object.
22. The method according to any one of claims 1 to 21, characterized in that, The cloud-based object storage system must meet at least one of the following requirements: It has at least one of the following interfaces at the object level: PUT, GET, DELETE, and LIST. The PUT interface supports user-defined metadata; The response header returned by the GET interface contains user-defined metadata; The LIST interface supports specifying a prefix for the LIST and retrieving a list of all object names with the same prefix. The LIST interface supports specifying the starting position of the LIST; The LIST interface allows specifying the maximum number of objects that can be returned in a single LIST request; After a standard format object is uploaded to the cloud object storage system via the PUT interface, it supports performing GET operations and / or LIST operations on the standard format object.
23. The method according to any one of claims 1 to 22, characterized in that, The method further includes: The entity tags of the standard format objects downloaded in the block storage system are compared with the entity tags of the standard format objects returned by the cloud object storage system to perform integrity verification.
24. A data recovery device, characterized in that, The device includes: The download module is used to download standard format objects that have been backed up to the cloud object storage system; The recovery module is used to process the standard format object according to a preset data parsing method to obtain the recovered data; A storage module is used to store the recovery data in a block storage system; The standard format object includes at least one of the following: a data object, an index object, and a fence object.
25. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 23.
26. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 23.
27. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 23.