Data backup method, device, equipment and medium in distributed block storage system

Through the virtual block service VBS, snapshot instructions and bitmap difference information are used in the distributed block storage system to realize data block change tracking, solve the problem of low data backup efficiency in the existing technology, improve backup efficiency and save system resources. .

CN117421159BActive Publication Date: 2024-10-29GUANGZHOU DINGJIA COMPUTER TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311442388.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2024-10-29
Estimated Expiration
2043-11-01

AI Technical Summary

Technical Problem

The existing data backup methods are inefficient in distributed block storage systems, mainly due to the long backup process due to data replication technology.

Method used

Send snapshot instructions to the distributed block storage system through the virtual block service VBS, receive the bitmap difference information carried by the target snapshot volume, and then read and back up the data in the way of data block change tracking (CBT) to improve backup efficiency.

Benefits of technology

It realizes the tracking and recording of modified data blocks in the distributed block storage system since the last backup, significantly improves the efficiency of data backup and saves installation space in the system architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117421159B_ABST
    Figure CN117421159B_ABST
Patent Text Reader

Abstract

The present application relates to a data backup method, device, computer equipment, storage medium and computer program product in a distributed block storage system. The method comprises: sending a snapshot instruction to a distributed block storage system through a virtual block service VBS; receiving a target snapshot volume returned by the distributed block storage system based on the snapshot instruction through VBS; the target snapshot volume carries bitmap difference information; based on the bitmap difference information, reading backup data from the target snapshot volume and writing the backup data to a local device. The use of this method can improve data backup efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data backup method, apparatus, computer equipment, storage medium and computer program product in a distributed block storage system. Background Art

[0002] With the development of computer technology, distributed block storage OceanStor Pacific has emerged. OceanStorPacific has a large market share and many application scenarios, which has also generated a large number of data backup needs.

[0003] The current backup method uses data replication technology to replicate and copy the data to be backed up. By replicating the backup data for data backup, the backup efficiency is greatly affected. Summary of the invention

[0004] Based on this, it is necessary to provide a data backup method, apparatus, computer device, computer-readable storage medium and computer program product in a distributed block storage system that can improve backup efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for backing up data in a distributed block storage system, the method comprising:

[0006] Send snapshot instructions to the distributed block storage system through the virtual block service VBS;

[0007] Receiving, through the VBS, a target snapshot volume returned by the distributed block storage system based on the snapshot instruction; the target snapshot volume carries bitmap difference information;

[0008] Based on the bitmap difference information, backup data is read from the target snapshot volume, and the backup data is written to a local device.

[0009] In one embodiment, sending a snapshot instruction to a distributed block storage system through a virtual block service VBS includes:

[0010] Sending the snapshot instruction to VBS through the backup system;

[0011] The snapshot instruction is forwarded to the distributed block storage system through VBS.

[0012] In one of the embodiments, the receiving, by the VBS, a target snapshot volume returned by the distributed block storage system based on the snapshot instruction, the target snapshot volume carrying bitmap difference information includes:

[0013] The target snapshot volume returned by the distributed block storage system based on the snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries bitmap difference information.

[0014] In one embodiment, mapping the target snapshot volume returned by the distributed block storage system based on the snapshot instruction to a local device through VBS; the target snapshot volume carries bitmap difference information, including:

[0015] When the snapshot instruction is a first snapshot instruction, the target snapshot volume returned by the distributed block storage system based on the first snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries bitmap difference information generated based on the first snapshot instruction;

[0016] Reading backup data from the target snapshot volume based on the bitmap difference information includes:

[0017] sequentially reading all data blocks in the target snapshot volume based on the bitmap difference information generated by the first snapshot instruction;

[0018] Download all the read data blocks as backup data.

[0019] In one embodiment, a target snapshot volume returned by a distributed block storage system based on a snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries bitmap difference information, including:

[0020] When the snapshot instruction is a second snapshot instruction, mapping the target snapshot volume returned by the distributed block storage system based on the second snapshot instruction to the local device through VBS; the target snapshot volume carries the bitmap difference information generated based on the second snapshot instruction;

[0021] Reading backup data from the target snapshot volume based on the bitmap difference information includes:

[0022] sequentially reading all data blocks in the target snapshot volume based on the bitmap difference information generated by the second snapshot instruction; the data blocks include identical data blocks and different data blocks;

[0023] The different data blocks are downloaded as backup data.

[0024] In one embodiment, writing the backup data to the local device includes:

[0025] The backup data is written to a target path of the local device.

[0026] In a second aspect, the present application provides a data backup device in a distributed block storage system, the device comprising:

[0027] An instruction sending module, used for sending snapshot instructions to the distributed block storage system through the virtual block service VBS;

[0028] An information receiving module, configured to receive, through a virtual block service VBS, a target snapshot volume returned by the distributed block storage system based on the snapshot instruction; the target snapshot volume carries bitmap difference information;

[0029] The data reading and writing module is used to read the backup data based on the target snapshot volume and write the backup data into the local device.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Send snapshot instructions to the distributed block storage system through the virtual block service VBS;

[0032] Receiving, through VBS, a target snapshot volume returned by a distributed block storage system based on a snapshot instruction; the target snapshot volume carries bitmap difference information;

[0033] Based on the bitmap difference information, the backup data is read from the target snapshot volume and written to the local device.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0035] Send snapshot instructions to the distributed block storage system through the virtual block service VBS;

[0036] Receiving, through VBS, a target snapshot volume returned by a distributed block storage system based on a snapshot instruction; the target snapshot volume carries bitmap difference information;

[0037] Based on the bitmap difference information, the backup data is read from the target snapshot volume and written to the local device.

[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0039] Send snapshot instructions to the distributed block storage system through the virtual block service VBS;

[0040] Receiving, through VBS, a target snapshot volume returned by a distributed block storage system based on a snapshot instruction; the target snapshot volume carries bitmap difference information;

[0041] Based on the bitmap difference information, the backup data is read from the target snapshot volume and written to the local device.

[0042] The data backup method, device, computer equipment, storage medium and computer program product in the above-mentioned distributed block storage system send snapshot instructions to the distributed block storage system through the virtual block service VBS; receive the target snapshot volume returned by the distributed block storage system based on the snapshot instruction through the VBS; the target snapshot volume carries bitmap difference information; based on the bitmap difference information, read the backup data from the target snapshot volume and write the backup data to the local device. The virtual block service VBS installed in the backup server receives the snapshot volume returned by the distributed block storage system based on the snapshot instruction to realize the data backup in the form of data block change tracking (CBT, Changing Block Tracing), thereby realizing the tracking and recording of the data blocks modified by the distributed block storage system since the last backup, greatly improving the data backup efficiency; at the same time, the virtual block service VBS is deployed in a server, so that the communication between the server and the distributed block storage system can be realized, saving the installation space in the system architecture. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 An application environment diagram of a data backup method in a distributed block storage system in one embodiment;

[0045] Figure 2 A schematic diagram of a flow chart of a data backup method in a distributed block storage system in one embodiment;

[0046] Figure 3 A schematic diagram of a process of sending a snapshot instruction to a distributed block storage system through a virtual block service VBS in one embodiment;

[0047] Figure 4 A schematic diagram of a process of mapping a target snapshot volume returned by a distributed block storage system based on a first snapshot instruction to a local device through VBS in one embodiment;

[0048] Figure 5 A schematic diagram of a process of mapping a target snapshot volume returned by a distributed block storage system based on a first snapshot instruction to a local device through VBS in one embodiment;

[0049] Figure 6 A structural block diagram of a data backup device in a distributed block storage system in one embodiment;

[0050] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The data backup method in the distributed block storage system provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the backup server 102 is connected to the distributed storage system 104. The distributed storage system 104 can store the data that the backup server 102 needs to process. The distributed storage system 104 can be integrated on the backup server 104, or it can be placed on the cloud or other network servers. The backup server 102 sends a snapshot instruction to the distributed block storage system through the virtual block service VBS; receives the target snapshot volume returned by the distributed block storage system based on the snapshot instruction through VBS; the target snapshot volume carries bitmap difference information; based on the bitmap difference information, reads the backup data from the target snapshot volume, and writes the backup data to the local device.

[0053] In an exemplary embodiment, Figure 2 As shown, a data backup method in a distributed block storage system is provided, and the method is applied to Figure 1 The backup server in the example is used to illustrate, including the following steps S202 to S206. Among them:

[0054] Step S202: Send a snapshot instruction to the distributed block storage system through the virtual block service VBS.

[0055] Among them, distributed block storage is to store data in a distributed manner on multiple storage servers, and these distributed storage resources form a virtual storage device. Distributed storage improves the reliability, availability and access efficiency of the system, and is also easy to expand. VBS is a virtual block service, which is a business read and write (IO) process of distributed block storage. It is responsible for the management of volume metadata and provides storage access point services. By selecting multiple servers to enable the VBS process, a VBS cluster is formed. Snapshot instructions are commands for reading and writing data in a distributed block storage system, which can include read instructions or write instructions. Snapshot instructions can be full snapshot instructions or incomplete snapshot instructions.

[0056] Optionally, the backup server can send snapshot instructions instantly through the virtual block service VBS, or can send snapshot instructions in advance through the virtual block service VBS. The shortest interval between snapshot instructions can be set, and the interval is not limited. The unit can be seconds or milliseconds. The snapshot instruction can also be a periodic snapshot instruction issued by the backup server. The distributed storage system receives the snapshot instruction, parses the backup command, and performs data reading and writing operations from the distributed storage system according to the command carried in the snapshot instruction. The distributed storage system creates a snapshot of the data to be backed up according to the snapshot instruction; at the same time, it obtains the snapshot created by the last snapshot instruction of the same data block; compares the backup snapshot with the last backup snapshot, calculates the bitmap difference, and obtains the changed bitmap difference block data; merges the bitmap difference block data to generate a snapshot volume. The distributed storage system returns the snapshot volume to the backup server through VBS. Among them, a snapshot refers to a fully available copy of a specified data set, which contains a static image of the source data at the copy time point. A snapshot can be a copy or replication of data reproduction. A snapshot is a one-time use. Once the snapshot is restored, the snapshot becomes invalid.

[0057] Step S204: receiving, through VBS, a target snapshot volume returned by the distributed block storage system based on the snapshot instruction, where the target snapshot volume carries bitmap difference information.

[0058] Among them, a volume is equivalent to a hard disk and is the smallest allocation unit of distributed block storage. A snapshot volume is a carrier for storing snapshots. A bitmap records the location of data blocks and is suitable for processing massive amounts of data without duplication. It is usually used to determine whether a certain data exists. Bitmap difference information is generated based on the comparison between different snapshots.

[0059] Optionally, the backup server receives the snapshot volume returned by the distributed block storage system based on the snapshot instruction through VBS. The snapshot instruction corresponds to the snapshot volume returned based on the snapshot instruction one by one; the distributed block storage system receives the snapshot instruction, creates a snapshot of the data to be backed up based on the command carried by the snapshot instruction; obtains the snapshot created by the last snapshot instruction of the same data block at the same time; compares the backup snapshot with the last backup snapshot, calculates the bitmap difference, and obtains the changed bitmap difference block data; merges the bitmap difference block data to generate a snapshot volume, and sends the snapshot volume to the VBS in the backup server, and the backup server receives the snapshot volume returned by the distributed block storage system based on the snapshot instruction through VBS. The time required to create a snapshot and the input and output I / O do not increase with the size of the data set; in contrast, the time and I / O required for direct backup are proportional to the size of the data set. Get the initial snapshot of the data set, and the subsequent snapshots only copy the changed data and refer to the initial snapshot. Compared with repeatedly cloning the data set, the snapshot method consumes less disk capacity.

[0060] Step S206: Read the backup data from the target snapshot volume based on the bitmap difference information, and write the backup data to the local device.

[0061] Optionally, the backup server reads the backup data from the target snapshot volume based on the bitmap difference information, writes the backup data to the local device, and completes the data backup of the distributed block storage system to the backup server. The backup data can be full data or partial data.

[0062] In the data backup method in the above-mentioned distributed block storage system, the backup server sends a snapshot instruction to the distributed block storage system through the virtual block service VBS; receives the target snapshot volume returned by the distributed block storage system based on the snapshot instruction through the VBS; the target snapshot volume carries bitmap difference information; based on the bitmap difference information, the backup data is read from the target snapshot volume and written to the local device. The virtual block service VBS installed in the backup server receives the snapshot volume returned by the distributed block storage system based on the snapshot instruction to realize the data backup in the form of data block change tracking (CBT, Changing Block Tracing), thereby realizing block-level backup of the data of the block storage system, greatly improving the data backup efficiency; the virtual block service VBS is deployed in a server, so that the communication between the server and the distributed block storage system can be realized, saving installation space.

[0063] In an exemplary embodiment, Figure 3 As shown, sending a snapshot instruction to a distributed block storage system through a virtual block service VBS includes steps S302 to S304. Among them:

[0064] Step S302: Send a snapshot instruction to the VBS through the backup application.

[0065] Optionally, the backup server is loaded with a backup application and a VBS, and the backup application in the backup server is the initiator of the snapshot instruction; the backup application can send the snapshot instruction to the VBS immediately or periodically, and the VBS that receives the snapshot instruction sends the snapshot instruction again to the distributed block storage system.

[0066] Step S304: forwarding the snapshot instruction to the distributed block storage system through VBS.

[0067] Optionally, the VBS that receives the snapshot instruction sends the snapshot instruction again to the distributed block storage system, and the distributed block storage system performs data read and write operations according to the snapshot instruction.

[0068] In this embodiment, the snapshot instruction is forwarded by the VBS loaded on the backup server, so that the communication between the backup server and the distributed storage system can be realized.

[0069] In an exemplary embodiment, based on the snapshot volume, the backup data is read and written to the local device, including: mapping the target snapshot volume returned by the distributed block storage system based on the snapshot instruction to the local device through VBS; the target snapshot volume carries bitmap difference information.

[0070] Optionally, the backup server maps the target snapshot volume returned by the distributed block storage system based on the snapshot instruction to the local computer through VBS, wherein mapping refers to connecting the top-level directory in the snapshot volume to a directory on the backup server, and accessing this directory is equivalent to accessing the snapshot volume file. After the backup server maps the target snapshot volume, it can access the snapshot volume and read and copy the contents in the snapshot.

[0071] During the mapping process, the backup server uses the lsblk command and the udevadm command to identify the target snapshot volume's globally unique name WWN and the target snapshot volume's name information, thereby identifying the corresponding target snapshot volume. The backup server can access the target snapshot volume based on the volume information of the target snapshot volume, and can read and copy the contents of the target snapshot volume. The backup server's access operation to the target snapshot volume is realized. The backup server identifies the corresponding target snapshot volume based on the volume information of the target snapshot volume, so as to access the target snapshot volume, read the corresponding backup data and copy the backup data, and the snapshot is automatically deleted after the copying is completed. The backup server writes the read backup data to the local target path of the backup server. Among them, the volume information includes the globally unique name WWN, the name information of the target snapshot volume, and the volume's memory and other related information.

[0072] In this embodiment, the snapshot volume is mapped to the backup server, thereby implementing block-level backup of data in the distributed block storage system.

[0073] In an exemplary embodiment, Figure 4 As shown, the target snapshot volume returned by the distributed block storage system based on the snapshot instruction is mapped to the local device through VBS; the target snapshot volume carries the bitmap difference information, including steps S402 to S406. Among them:

[0074] Step S402, when the snapshot instruction is a first snapshot instruction, the target snapshot volume returned by the distributed block storage system based on the first snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries bitmap difference information generated based on the first snapshot instruction.

[0075] The first snapshot instruction may be a snapshot instruction obtained by parsing the full backup request.

[0076] Optionally, when the snapshot instruction is a first snapshot instruction, the backup server maps the target snapshot volume returned by the first snapshot instruction obtained by parsing the distributed block storage system based on the full backup request to a local device through VBS. The target snapshot volume carries the bitmap difference information generated based on the first snapshot instruction; the bitmap difference information may be generated by comparing the current snapshot with the previous snapshot, the previous snapshot may be regarded as a blank snapshot, and the bitmap difference information is generated by comparing the current snapshot with the previous blank snapshot.

[0077] Read backup data from the target snapshot volume based on the bitmap difference information, including:

[0078] Step S404: read all data blocks in the target snapshot volume in sequence based on the bitmap difference information generated by the first snapshot instruction.

[0079] Optionally, the backup server sequentially reads all data blocks in the target snapshot volume based on the bitmap difference information generated by the first snapshot instruction.

[0080] Step S406: download all data blocks as backup data.

[0081] Optionally, the backup server downloads all data blocks to obtain the backup data.

[0082] In this embodiment, based on the first snapshot instruction, the snapshot volume is returned. The target snapshot volume of the data to be backed up is returned by the distributed block storage system, so that permanent full backup of the data to be backed up can be achieved, thereby improving the efficiency of backing up data and also improving the read and write performance of the snapshot volume.

[0083] In an exemplary embodiment, Figure 5 As shown, the target snapshot volume returned by the distributed block storage system based on the snapshot instruction is mapped to the local device through VBS; the target snapshot volume carries the bitmap difference information, including steps S502 to S506. Among them:

[0084] Step S502, when the snapshot instruction is a second snapshot instruction, the target snapshot volume returned by the distributed block storage system based on the second snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries bitmap difference information generated based on the second snapshot instruction.

[0085] Optionally, when the snapshot instruction is a second snapshot instruction, the backup server maps the target snapshot volume returned by the second snapshot instruction obtained by the distributed block storage system parsing the non-full backup request to a local device through VBS. The target snapshot volume carries the bitmap difference information generated based on the second snapshot instruction; the bitmap difference information can be generated by comparing the current snapshot with the previous snapshot, the previous snapshot can be an incremental data snapshot or a full data snapshot, and the bitmap difference information is generated by comparing the current snapshot with the previous snapshot.

[0086] Read backup data from the target snapshot volume based on the bitmap difference information, including:

[0087] Step S504: read all data blocks in the target snapshot volume in sequence based on the bitmap difference information generated by the second snapshot instruction; the data blocks include identical data blocks and different data blocks.

[0088] The same data blocks are compared between the current snapshot and the previous snapshot, and the same data blocks are marked as 0; the different data blocks are compared between the current snapshot and the previous snapshot, and the different data blocks are marked as 1.

[0089] Optionally, the backup server sequentially reads all data blocks in the target snapshot volume based on the bitmap difference information generated by the second snapshot instruction, where the data blocks include identical data blocks and different data blocks.

[0090] Step S506: download different data blocks as backup data.

[0091] Optionally, the bitmap difference information contains binary data of 0 and 1, one bit represents an 8KB data block, and a mark of 1 represents a hit. The backup server only downloads the database marked as 1. That is, the backup server reads the snapshot volume block by block according to this binary information, and downloads the data blocks marked as 1. These data frames are incomplete backup data. Incomplete backup data can be incremental data or differential data; if the current snapshot is compared with the last incremental snapshot, the bitmap difference information generated, and the data read according to the bitmap difference is incremental data; if the current snapshot is compared with the last full backup snapshot, the bitmap difference information generated, and the data read according to the bitmap difference is differential data.

[0092] In this embodiment, based on the second snapshot instruction, that is, the differential snapshot instruction and the incremental snapshot instruction obtained by parsing the non-full backup request, the distributed block storage system can implement incremental backup and differential backup of the data to be backed up based on the target snapshot volume returned by the second snapshot instruction and through the bitmap difference information of the data to be backed up returned by the distributed block storage system, thereby improving the efficiency of data backup.

[0093] In an exemplary embodiment, writing backup data to a local device includes:

[0094] The backup data is written to a target path of the local device.

[0095] Optionally, the backup server writes the downloaded data as backup data into the target path of the local device to complete the data backup process.

[0096] In this embodiment, the backup data is written into the target path of the local device, thereby improving the flexibility of the backup data storage.

[0097] In an exemplary embodiment, a backup application and a VBS are loaded in the backup server, and the backup application in the backup server is the initiator of the snapshot instruction; the backup application can send the snapshot instruction to the VBS immediately or periodically, and the VBS that receives the snapshot instruction sends the snapshot instruction again to the distributed block storage system. The distributed block storage system performs data read and write operations according to the snapshot instruction. At time t0, the distributed block storage system receives the first snapshot instruction for the first time, that is, the full snapshot instruction, and creates a snapshot according to the full snapshot instruction. Since it is the first backup, there is no last backup snapshot, or there is a last snapshot with empty content, and the snapshot created this time is used as the result of calculating the snapshot bitmap difference, and the block data in this snapshot is used as the changed bitmap difference block data; a snapshot volume is generated based on the changed bitmap difference block data, and the snapshot volume is sent to the VBS in the backup server. The backup server receives the valid data snapshot volume returned by the distributed block storage system based on the first snapshot instruction through the VBS. The backup server maps the target snapshot volume returned by the distributed block storage system based on the snapshot instruction to the local computer through VBS. The backup server identifies the target snapshot volume's globally unique name WWN and the name information of the target snapshot volume through the lsblk command and the udevadm command, thereby identifying the corresponding target snapshot volume. The backup server can access the target snapshot volume based on the volume information of the target snapshot volume, and can read and copy the contents of the target snapshot volume. The backup server's access operation to the target snapshot volume is realized, so that the contents in the snapshot can be read and copied. The corresponding backup data is read and copied, and the snapshot is automatically deleted after the copy is completed. The backup server writes the read backup data to the local target path of the backup server.

[0098] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages 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 to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0099] Based on the same inventive concept, the embodiment of the present application also provides a data backup device in a distributed block storage system for implementing the data backup method in the above-mentioned distributed block storage system. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of the data backup device in one or more distributed block storage systems provided below can refer to the limitations of the data backup method in the distributed block storage system above, and will not be repeated here.

[0100] In an exemplary embodiment, Figure 6 As shown, a data backup device in a distributed block storage system is provided, including: an instruction sending module 601, an information receiving module 602 and a data reading and writing module 603, wherein:

[0101] The instruction sending module 601 is used to send a snapshot instruction to the distributed block storage system through the virtual block service VBS.

[0102] The information receiving module 602 is used to receive, through VBS, a target snapshot volume returned by the distributed block storage system based on the snapshot instruction; the target snapshot volume carries bitmap difference information.

[0103] The data reading and writing module 603 is used to read the backup data from the target snapshot volume and write the backup data to the local device.

[0104] In an exemplary embodiment, the instruction sending module 601 includes:

[0105] The instruction sending unit is used to send snapshot instructions to the VBS through the backup application.

[0106] The instruction forwarding unit is used to forward the snapshot instruction to the distributed block storage system through VBS.

[0107] In an exemplary embodiment, the receiving information module 602 includes:

[0108] The mapping unit is used to map the target snapshot volume returned by the distributed block storage system based on the snapshot instruction to the local device through VBS; the target snapshot volume carries bitmap difference information.

[0109] The identification unit is used to identify volume information of the target snapshot volume.

[0110] The access unit is used to access the target snapshot volume according to the volume information.

[0111] In an exemplary embodiment, the mapping unit includes:

[0112] The first mapping subunit is used to map the target snapshot volume returned by the distributed block storage system based on the first snapshot instruction to the local device through VBS when the snapshot instruction is the first snapshot instruction; the target snapshot volume carries the bitmap difference information generated based on the first snapshot instruction.

[0113] The first reading subunit is used to sequentially read all data blocks in the target snapshot volume based on the bitmap difference information generated by the first snapshot instruction.

[0114] The first downloading subunit is used to download all data blocks as backup data.

[0115] In an exemplary embodiment, the mapping unit includes:

[0116] The second mapping subunit is used to map the target snapshot volume returned by the distributed block storage system based on the second snapshot instruction to the local device through VBS when the snapshot instruction is the second snapshot instruction; the target snapshot volume carries the bitmap difference information generated based on the second snapshot instruction.

[0117] The second reading sub-unit is used to sequentially read all data blocks in the target snapshot volume based on the bitmap difference information generated by the second snapshot instruction; the data blocks include identical data blocks and different data blocks.

[0118] The second downloading subunit is used to download different data blocks as backup data.

[0119] In an exemplary embodiment, the data reading and writing module 603 includes:

[0120] A writing module is used to write the backup data into a target path of the local device.

[0121] Each module in the data backup device in the above distributed block storage system can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0122] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. 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 backup data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data backup method in a distributed block storage system is implemented.

[0123] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0125] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0126] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0127] 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, 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. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0128] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations 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 shall be subject to the attached claims.

Claims

1. A data backup method in a distributed block storage system, characterized in that: Applied to a backup server, the method comprises: Sending a snapshot instruction to the VBS through the backup system; forwarding the snapshot instruction to the distributed block storage system through the VBS, wherein the distributed block storage system stores data in a dispersed manner on multiple storage servers and forms a virtual storage device with these dispersed storage resources; the VBS is a virtual block service; When the snapshot instruction is a first snapshot instruction, the target snapshot volume returned by the distributed block storage system based on the first snapshot instruction is mapped to a local device through VBS; the target snapshot volume carries the bitmap difference information generated based on the first snapshot instruction; all data blocks in the target snapshot volume are read in sequence based on the bitmap difference information generated by the first snapshot instruction; all the read data blocks are downloaded as backup data; wherein the first snapshot instruction is obtained by parsing the full backup request; When the snapshot instruction is a second snapshot instruction, the target snapshot volume returned by the distributed block storage system based on the second snapshot instruction is mapped to the local device through VBS; the target snapshot volume carries the bitmap difference information generated based on the second snapshot instruction; all data blocks in the target snapshot volume are read in sequence based on the bitmap difference information generated by the second snapshot instruction; the data blocks include the same data blocks and different data blocks; the different data blocks are downloaded as backup data; wherein the second snapshot instruction is obtained by parsing based on the non-full backup request; the bitmap difference information generated based on the second snapshot instruction includes incremental data information or differential data information; The backup data is written to the local device.

2. The method according to claim 1, characterized in that Write the backup data to the local device, including: The backup data is written to a target path of the local device.

3. The method according to claim 1, characterized in that The incremental data information is obtained based on bitmap difference information generated by comparing the current snapshot with the previous incremental snapshot.

4. The method according to claim 1, characterized in that The differential data information is obtained based on bitmap difference information generated by comparing the current snapshot with the last full backup snapshot.

5. The method according to claim 1, characterized in that The snapshot instruction and the target snapshot volume returned based on the snapshot instruction are in one-to-one correspondence.

6. A data backup device in a distributed block storage system, characterized in that: The device comprises: The instruction sending module is used to send a snapshot instruction to the VBS through the backup system; forward the snapshot instruction to the distributed block storage system through the VBS, wherein the distributed block storage system stores data in a dispersed manner on multiple storage servers and forms a virtual storage device with these dispersed storage resources; the VBS is a virtual block service; an information receiving module, configured to, when the snapshot instruction is a first snapshot instruction, map the target snapshot volume returned by the distributed block storage system based on the first snapshot instruction to a local device through VBS; the target snapshot volume carries the bitmap difference information generated based on the first snapshot instruction; wherein the first snapshot instruction is obtained by parsing the full backup request; Also used for, when the snapshot instruction is a second snapshot instruction, mapping the target snapshot volume returned by the distributed block storage system based on the second snapshot instruction to the local device through VBS; the target snapshot volume carries the bitmap difference information generated based on the second snapshot instruction; wherein the second snapshot instruction is obtained by parsing the non-full backup request; the bitmap difference information generated based on the second snapshot instruction includes incremental data information or differential data information; A data reading and writing module, configured to sequentially read all data blocks in the target snapshot volume based on the bitmap difference information generated by the first snapshot instruction; and download all the read data blocks as backup data; further configured to sequentially read all data blocks in the target snapshot volume based on the bitmap difference information generated by the second snapshot instruction; the data blocks include identical data blocks and different data blocks; and download the different data blocks as backup data; It is also used to write the backup data into the local device.

7. The device according to claim 6, characterized in that The data reading and writing module is further configured to write the backup data into a target path of the local device.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • System and method for making snapshots of storage devices

    CN103814359A