Block device data backup method

By dividing the block device into a data storage area and a reservation area, and using data segmentation identifiers and ring buffer design, the problems of low incremental backup efficiency and great performance impact of block device are solved, and efficient incremental backup is achieved.

CN120448188AInactive Publication Date: 2025-08-08GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510940881.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is inefficient and has a great impact on system performance when incremental backup of block devices, especially the performance problems caused by full disk scanning, IO locking, and IO preemption operations have not been effectively solved.

Method used

Divide the block device into a data storage area and a reserved area, use the reserved area to write and backup pointers, and optimize the data backup process by adding data segmentation identifiers and ring buffer design, avoiding full disk scanning, and reducing IO locking and preemption operations.

Benefits of technology

It improves backup efficiency, reduces the impact on system performance, optimizes the use of storage space, and realizes rapid incremental backup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448188A_ABST
    Figure CN120448188A_ABST
Patent Text Reader

Abstract

The invention discloses a block device data backup method, which is characterized by comprising the following steps of: 1, dividing a block device into a data storage area and a reserved area, the data storage area is used for storing data of an application program, and the reserved area is used for storing written data since the last backup; 2, setting a reserved area write-in pointer and a reserved area backup pointer, and initializing the reserved area write-in pointer and the reserved area backup pointer to be zero; 3, a fixed data segmentation identifier is set, and compared with the prior art, full-disk scanning can be avoided, and the backup efficiency is improved; iO locking and IO preemption operations are reduced, and the influence on system performance is reduced; and through the design of the annular buffer area, the use of the storage space is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data backup, and in particular to a method for backing up block device data. Background Art

[0002] Currently, there are few solutions for incremental backup of block devices on the market. Most incremental backup solutions require a full disk scan during each backup, which is inefficient. The present invention creates a method for incremental backup of block devices, which can achieve fast incremental backup and eliminate the need for complex IO locking and IO preemption during the incremental backup, thereby significantly reducing the impact of incremental backup on system performance. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for backing up block device data, which can solve at least one of the above technical problems. The technical solution of the present invention is as follows: A method for backing up block device data, comprising the following steps: Step 1: Divide the block device into a data storage area and a reserved area. The data storage area is used for application data storage, and the reserved area is used to save data written since the last backup. Step 2: Set up the reserved area write pointer and the reserved area backup pointer and initialize them to zero; Step 3: Establish a fixed data segmentation identifier; Step 4: When the application writes a data block to the data storage area, it performs the following operations: Copying the written data block, adding header information before copying the data, wherein the header information includes a data segmentation identifier and a target address of the data block in the data storage area; writing the processed copied data to the reserved area write pointer position, updating the reserved area write pointer, moving the pointer by the length of the processed copied data; if the reserved area write pointer exceeds the reserved area size, setting it to the difference between the current value and the reserved area size; if the reserved area write pointer exceeds the reserved area backup pointer, triggering a warning and stopping writing to the reserved area; Step 5: When the backup process is triggered, perform the following operations: Data is read starting from the reserved area backup pointer until the read position is equal to the reserved area write pointer position, the read data is saved to the backup device, and the reserved area backup pointer is updated to the end of the last read data.

[0004] Furthermore, the reserved area is a ring buffer. When the pointer written into the reserved area exceeds the size of the reserved area, the pointer wraps around through a modulo operation.

[0005] Furthermore, the header information also includes a timestamp or a sequence number for identifying the writing order of the data blocks.

[0006] Furthermore, the backup program is time-triggered or event-triggered.

[0007] Preferably, the data segmentation identifier is a binary code of fixed length, used to identify the starting position of the data block.

[0008] In summary, the present invention has the following beneficial effects compared to the prior art: The present invention provides a block device data backup method, which can avoid full disk scanning and improve backup efficiency; reduce IO locking and IO preemption operations and reduce the impact on system performance; and optimize the use of storage space through a ring buffer design. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0010] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: like Figure 1 A block device data backup method shown includes the following steps: Step 1: Divide the block device into a data storage area and a reserved area. The data storage area is used for application data storage, and the reserved area is used to save data written since the last backup. Step 2: Set up the reserved area write pointer and the reserved area backup pointer and initialize them to zero; Step 3: Establish a fixed data segmentation identifier; Step 4: When the application writes a data block to the data storage area, it performs the following operations: Copying the written data block, adding header information before copying the data, wherein the header information includes a data segmentation identifier and a target address of the data block in the data storage area; writing the processed copied data to the reserved area write pointer position, updating the reserved area write pointer, moving the pointer by the length of the processed copied data; if the reserved area write pointer exceeds the reserved area size, setting it to the difference between the current value and the reserved area size; if the reserved area write pointer exceeds the reserved area backup pointer, triggering a warning and stopping writing to the reserved area; Step 5: When the backup process is triggered, perform the following operations: Data is read starting from the reserved area backup pointer until the read position is equal to the reserved area write pointer position, the read data is saved to the backup device, and the reserved area backup pointer is updated to the end of the last read data.

[0011] The reserved area is a ring buffer. When the pointer written into the reserved area exceeds the size of the reserved area, the pointer wraps around through a modulo operation.

[0012] The header information also includes a timestamp or a sequence number, which is used to identify the writing order of the data blocks.

[0013] The backup program is time-triggered or event-triggered.

[0014] The data segmentation identifier is a binary code of fixed length, and is used to identify the starting position of a data block.

[0015] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for backing up block device data, characterized in that: The following steps are involved: Step 1: Divide the block device into a data storage area and a reserved area. The data storage area is used for application data storage, and the reserved area is used to save data written since the last backup. Step 2: Set up the reserved area write pointer and the reserved area backup pointer and initialize them to zero; Step 3: Establish a fixed data segmentation identifier; Step 4: When the application writes a data block to the data storage area, it performs the following operations: Copying the written data block, adding header information before copying the data, wherein the header information includes a data segmentation identifier and a target address of the data block in the data storage area; writing the processed copied data to the reserved area write pointer position, updating the reserved area write pointer, moving the pointer by the length of the processed copied data; if the reserved area write pointer exceeds the reserved area size, setting it to the difference between the current value and the reserved area size; if the reserved area write pointer exceeds the reserved area backup pointer, triggering a warning and stopping writing to the reserved area; Step 5: When the backup process is triggered, perform the following operations: Data is read starting from the reserved area backup pointer until the read position is equal to the reserved area write pointer position, the read data is saved to the backup device, and the reserved area backup pointer is updated to the end of the last read data.

2. A method for backing up block device data according to claim 1, characterized in that The reserved area is a ring buffer. When the pointer written into the reserved area exceeds the size of the reserved area, the pointer wraps around through a modulo operation.

3. A method for backing up block device data according to claim 2, characterized in that The header information also includes a timestamp or a sequence number, which is used to identify the writing order of the data blocks.

4. A method for backing up block device data according to claim 3, characterized in that The backup program is time-triggered or event-triggered.

5. A method for backing up block device data according to claim 4, characterized in that The data segmentation identifier is a binary code of fixed length, and is used to identify the starting position of a data block.

Citation Information

Patent Citations

  • Data information backup method and data backup method and device

    CN106484313A

  • Incremental data backup method and device, computer equipment and storage medium

    CN116955004A

  • Circular buffer partitions

    US20230297516A1