Multi-version backup and recovery method and system based on disk block, medium and product

By deploying disk network synchronization modules and snapshot volume modules on the application side and the backup side, and using incremental backup technology, the problem of wasted storage space and low backup efficiency in multi-version backup and recovery in the existing technology is solved, and efficient multi-version backup and recovery is achieved.

CN120050290APending Publication Date: 2025-05-27HUNAN KYLIN XINAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411954492.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing multi-version backup and recovery technology based on disk blocks has problems such as wasting storage space and low backup efficiency during the backup process.

Method used

By deploying disk network synchronization modules on the application side and the backup side, and deploying snapshot volume modules on the backup side, incremental backup technology is used to generate backup data, reducing storage space requirements and improving backup efficiency.

Benefits of technology

This achieves the purpose of retaining multiple versions of data while avoiding waste of storage space and improving backup efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050290A_ABST
    Figure CN120050290A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-version backup and recovery method and system based on a disk block, a medium and a product. The method comprises the steps that a disk network synchronization module is deployed at an application end and a backup end, and a snapshot volume module is deployed at the backup end; two independent logic block disks, namely a data volume and a metadata volume, are created locally through disk network synchronization modules of the application end and the backup end and are finally written to a bottom disk through a bottom disk storage module; when backup and recovery are needed, the disk network synchronization modules are deployed through the application end and the backup end to cooperate with each other to complete the data synchronization ratio between the application end and the backup end, and multi-version data storage is generated through the snapshot volume module by adopting an incremental backup technology so as to achieve data backup and recovery. The invention aims to improve the backup efficiency of multi-version backup and recovery based on disk blocks and reduce space occupation, and not only does not cause large waste of storage space but also can improve the backup efficiency while retaining multi-version data during block backup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer data backup and recovery, and particularly relates to a multi-version backup and recovery method, system, medium and product based on disk blocks. Background Art

[0002] At present, with the rapid development of the Internet, a large amount of data is generated every moment. Therefore, how to ensure the security of this data is particularly important. As a core part of data protection and disaster recovery, backup technology ensures the rapid recovery of data in case of data loss or damage. Common backup technologies include file-level backup and block-level backup. Block backup performs backup at the disk block level rather than at the file level. In this technology, logical or physical blocks of the storage device are directly read and written during the backup process, without paying attention to the file information in the upper-layer file system of the disk. Block backup has higher efficiency than file backup in many cases. Currently, common block backup methods such as cloning create a complete copy based on an existing storage device. Multi-version is a commonly used mechanism in data backup, which means that multiple versions of backup data are retained according to conditions such as date and capacity during the backup process, so that multiple options can be provided when performing data recovery. The most common way of multi-version backup is to set multiple backup copies according to the date, and each copy fixedly stores the backup data of the specified date. The advantage of this method is that it can retain complete backup data for multiple dates, but the disadvantage is also obvious. A storage space of the same size needs to be prepared for each backup version to store the backup data, and the total required storage space increases in proportion to the set number of versions. At the same time, since each repository stores a complete copy of the backup data, the overall backup efficiency will also be greatly reduced. Therefore, how to improve the backup efficiency of multi-version backup and recovery based on disk blocks and reduce space occupation has become a key technical problem to be solved urgently. Summary of the Invention

[0003] The technical problem to be solved by the present invention is: aiming at the above problems of the prior art, to provide a multi-version backup and recovery method, system, medium and product based on disk blocks. The present invention aims to improve the backup efficiency of multi-version backup and recovery based on disk blocks and reduce space occupation, and while retaining multiple versions of data during block backup, it will neither cause a large waste of storage space nor reduce the backup efficiency.

[0004] To solve the above technical problems, the technical solution adopted by the present invention is as follows: A multi-version backup and recovery method based on disk blocks, comprising the following steps: Deploy disk network synchronization modules on two independent hosts at the application side and the backup side respectively, and deploy a snapshot volume module at the backup side. The disk network synchronization modules are both located at the lower layer of the file system. Create two independent logical block disks, namely a data volume and a metadata volume, locally through the disk network synchronization modules at the application side and the backup side respectively, and finally write them to the underlying disk through the underlying disk storage module; When data backup is required, the disk network synchronization module at the application side copies the entire data volume or incrementally copies it through the TCP / IP network protocol and sends it to the disk network synchronization module at the backup side. The disk network synchronization module at the backup side uses the incremental backup technology through the snapshot volume module to generate backup data and writes it to the underlying disk through the underlying disk storage module; When data recovery is required, the backup side first generates a virtual volume for rehearsal of the specified version of the backup data and mounts it to the application side, and then generates the final virtual volume only after confirmation at the application side and sends the virtual volume to the disk network synchronization module at the application side through the TCP / IP network protocol by the disk network synchronization module at the backup side. The disk network synchronization module at the application side uses the received virtual volume to complete the replacement recovery of the data volume.

[0005] Optionally, when the disk network synchronization module at the application side sends the data volume to the disk network synchronization module at the backup side through the TCP / IP network protocol, the disk network synchronization module returns a write result to the upper-layer application at the application side based on the asynchronous replication protocol when sending the data volume to be sent to the buffer, so as to improve the read and write performance of the data at the application side; When the disk network synchronization module at the backup side sends the data volume to the disk network synchronization module at the application side through the TCP / IP network protocol, the disk network synchronization module returns a write result to the upper-layer application at the backup side when sending the data volume to be sent to the buffer, so as to improve the read and write performance of the data at the application side.

[0006] Optionally, the disk network synchronization module at the backup side uses the incremental backup technology through the snapshot volume module to generate backup data and write it to the underlying disk through the underlying disk storage module, including: S101, The backup side sequentially creates two linear volumes, namely linear volume two and linear volume one, on the upper layer of the data volume, and performs full data synchronization to synchronize the data volume data at the application side to the data volume at the backup side to obtain a full data volume; S102, The backup side inserts an incremental snapshot volume one between linear volume one and linear volume two, so that the new data transmitted during subsequent synchronization at the application side will be written to the incremental snapshot volume one; S103, The backup side judges whether the incremental snapshot volume one reaches a preset dump condition. If the incremental snapshot volume one does not reach the preset dump condition, jump to step S102 to continue; Otherwise, jump to step S104; S104. The backup end inserts the incremental snapshot volume two between the linear volume one and the linear volume two, so that the new data transmitted during the subsequent synchronization of the application end will be written to the incremental snapshot volume two; the incremental snapshot volume one is promoted between the linear volume two and the full - volume data volume; S105. The backup end creates a temporary volume at the bottom layer of the linear volume two, merges the incremental snapshot volume one and the original full - volume data volume into the temporary volume to form a new full - volume data volume, and generates a decremental snapshot volume as a historical version for retention.

[0007] Optionally, the disk network synchronization module of the backup end uses the snapshot volume module to generate backup data by using the incremental backup technology and writes it to the underlying disk through the underlying disk storage module, including: S201. The backup end creates two linear volumes, namely the linear volume two and the linear volume one, on the upper layer of the data volume, and performs full - volume data synchronization to synchronize the data volume data of the application end to the data volume of the backup end to obtain a full - volume data volume; S202. The backup end inserts the incremental snapshot volume one between the linear volume one and the linear volume two, so that the new data transmitted during the subsequent synchronization of the application end will be written to the incremental snapshot volume one; S203. The backup end determines whether the incremental snapshot volume one reaches the preset dump condition. If the incremental snapshot volume one does not reach the preset dump condition, it jumps to step S202 to continue; otherwise, the backup end creates a temporary volume at the bottom layer of the linear volume two, and merges the incremental snapshot volume one and the original full - volume data volume into the temporary volume to form a new full - volume data volume.

[0008] Optionally, when the backup end first generates a virtual volume for drill of the backup data of a specified version and mounts it to the application end, it means generating a virtual volume for drill of the backup data of a specified version and mapping it to the application end through the iscsi protocol. If the application - end user discovers and mounts the virtual volume for drill generated by the backup end through the iscsi protocol, it is determined that the application - end confirmation is received.

[0009] Optionally, before the data recovery is required, when the application end cannot immediately provide the underlying disk available for data recovery, it first uses the replacement incremental virtual volume to carry the write operations of the user, and performs data recovery when there is an underlying disk available for data recovery at the application end. After the disk network synchronization module of the application end completes the replacement recovery of the data volume by using the received virtual volume, it also includes merging the replacement incremental virtual volume into the recovered data volume and using the recovered data volume to carry the write operations of the user.

[0010] Optionally, when data backup is required, the disk network synchronization module at the application side is configured as the master node, and the disk network synchronization module at the backup side becomes the slave node, so that the slave node automatically receives the backup data after full or incremental replication of the data volume sent by the master node through the TCP / IP network protocol; when data recovery is required, the disk network synchronization module at the backup side is configured as the master node, and the disk network synchronization module at the application side becomes the slave node, so that the slave node automatically receives the recovery data of the final virtual volume sent by the master node through the TCP / IP network protocol.

[0011] In addition, the present invention also provides a multi-version backup and recovery system based on disk blocks, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the multi-version backup and recovery method based on disk blocks.

[0012] In addition, the present invention also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0013] In addition, the present invention also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0014] Compared with the prior art, the present invention mainly has the following advantages: The multi-version backup and recovery method based on disk blocks of the present invention includes deploying disk network synchronization modules at the application side and the backup side respectively, and deploying a snapshot volume module at the backup side. Two independent logical block disks, namely a data volume and a metadata volume, are created locally through the disk network synchronization modules at the application side and the backup side respectively, and finally written to the underlying disk through the underlying disk storage module; when backup and recovery are required, the disk network synchronization modules deployed at the application side and the backup side cooperate to complete data synchronization between the application side and the backup side. Different from using the incremental backup technology by the snapshot volume module to generate multi-version data storage to achieve data backup and recovery, the multi-version backup and recovery method based on disk blocks of the present invention can improve the backup efficiency of multi-version backup and recovery based on disk blocks and reduce space occupation. While retaining multiple versions of data during block backup, it will neither cause a large waste of storage space nor reduce the backup efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the basic process of the method in Embodiment 1 of the present invention.

[0016] Figure 2 It is a schematic diagram of the overall system structure in Embodiment 1 of the present invention.

[0017] Figure 3 This is a schematic diagram of the hierarchical structure of the disk network synchronization module between the application end and the backup end in the first embodiment of the present invention.

[0018] Figure 4 This is a schematic diagram of the backup process in the first embodiment of the present invention.

[0019] Figure 5 This is a schematic diagram of the snapshot volume created by the snapshot volume module during the backup process in the first embodiment of the present invention. Detailed implementation manners

[0020] In order to enable those skilled in the art of the present technology to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0021] Embodiment 1: As Figure 1 shown, the multi-version backup and recovery method based on disk blocks in this embodiment includes the following steps: Deploy the disk network synchronization module on two sets of independent hosts at the application end and the backup end respectively, and deploy the snapshot volume module at the backup end. The disk network synchronization modules are both located at the lower layer of the file system. Two independent logical block disks, namely a data volume (for storing data) and a metadata volume (for storing metadata), are created locally through the disk network synchronization modules at the application end and the backup end respectively, and finally written to the underlying disk through the underlying disk storage module. When data backup is required, the disk network synchronization module at the application end copies the data volume in full or incrementally through the TCP / IP network protocol and sends it to the disk network synchronization module at the backup end. The disk network synchronization module at the backup end uses the incremental backup technology through the snapshot volume module to generate backup data and writes it to the underlying disk through the underlying disk storage module. When data recovery is required, the backup end first generates a virtual volume for rehearsal of the specified version of the backup data and mounts it to the application end, and then generates the final virtual volume only after confirmation at the application end and sends the virtual volume to the disk network synchronization module at the application end through the TCP / IP network protocol by the disk network synchronization module at the backup end. The disk network synchronization module at the application end uses the received virtual volume to complete the replacement recovery of the data volume.

[0022] As Figure 2As shown in the figure, in this embodiment, the two host systems of the application side and the backup side are independent of each other. The reading and writing of the application-side user data are both through the logical block device created by accessing the disk network synchronization module, and finally written to the underlying disk. The data synchronization between the application side and the backup side is carried out by the disk network synchronization module through the TCP / IP network protocol. Metadata will be generated during data synchronization. To ensure data integrity, the metadata and the synchronized data are separated and stored independently on different underlying disks. The backup side stores multiple versions of the backup data through the snapshot volume module.

[0023] As Figure 3 shown in the figure, in this embodiment, the disk network synchronization module is located below the file system. When the user accesses the data, there are two types of logical block disks, namely the data volume and the metadata volume, created by accessing the disk network synchronization module. The application-side user accesses the upper-layer file system, and the generated data passes through the logical block device constructed by the disk network synchronization to form the final data written to the underlying disk. Data backup means that the application side transfers the data to the backup side through the network in an incremental replication manner according to the information in the metadata and stores it as backup data at the backup side. Data recovery is the reverse operation. At the backup side, the selected backup version for recovery is used to form the final data disk in the way of first rehearsing and confirming and then replacing. Finally, the data at the backup side is transferred to the application side through the network to achieve the effect of data recovery. Among them, incremental replication means that after a full-scale replication or an incremental replication, data that has changed since the last replication is copied only in units of a certain transaction (which can be a fixed time, a fixed time interval, a fixed capacity, etc.).

[0024] To improve the performance of the application side, when the disk network synchronization module of the application side sends the data volume to the disk network synchronization module of the backup side through the TCP / IP network protocol in this embodiment, the disk network synchronization module returns the write result to the upper-layer application of the application side based on the asynchronous replication protocol when sending the data volume that needs to be sent to the buffer, so as to improve the reading and writing performance of the application-side data; when the disk network synchronization module of the backup side sends the data volume to the disk network synchronization module of the application side through the TCP / IP network protocol, the disk network synchronization module returns the write result to the upper-layer application of the backup side when sending the data volume that needs to be sent to the buffer, so as to improve the reading and writing performance of the application-side data. Through the above method, an asynchronous replication protocol is implemented in the disk network synchronization module to control that after the upper-layer data is written to the disk and sent to the buffer, it returns without waiting for the data writing at the backup side to complete. In this way, the application side is not affected by the backup network bandwidth and can greatly improve the reading and writing performance of the application-side data.

[0025] In this embodiment, incremental backup is adopted. After the first full synchronization is completed, only the changed points on the application side need to be synchronized each time thereafter. Also, by using this method, after the first full synchronization of the backup side is completed, an incremental snapshot volume is inserted in front of the full volume (full version). All subsequent synchronized data is written to the incremental snapshot volume. Then, it is determined whether the status of the incremental snapshot volume meets the dump condition. The incremental snapshot volume that meets the dump condition is merged into the full volume to generate a decremental snapshot volume. This process is cycled sequentially to finally retain a specified number of decremental volumes to achieve the purpose of retaining multiple historical versions. Specifically, as shown in Figure 4 shown in (a) of S101, the backup side sequentially creates two linear volumes, linear volume two and linear volume one, on the upper layer of the data volume, and performs a full data synchronization to synchronize the data volume data of the application side to the data volume of the backup side to obtain a full data volume, as shown in Figure 4 shown in (b) of S102, the backup side inserts incremental snapshot volume one between linear volume one and linear volume two, so that the new data transmitted during subsequent synchronization of the application side will be written to incremental snapshot volume one, as shown in Figure 4 shown in (c) of S103, the backup side determines whether incremental snapshot volume one meets the preset dump condition (for example, the size or time exceeds the preset threshold). If incremental snapshot volume one does not meet the preset dump condition, it jumps to step S102 to continue; otherwise, it jumps to step S104; S104, the backup side inserts incremental snapshot volume two between linear volume one and linear volume two, so that the new data transmitted during subsequent synchronization of the application side will be written to incremental snapshot volume two; incremental snapshot volume one is moved to between linear volume two and the full data volume; as shown in Figure 4 shown in (d) of S105, the backup side creates a temporary volume at the bottom layer of linear volume two, merges incremental snapshot volume one and the original full data volume into the temporary volume to form a new full data volume, and generates a decremental snapshot volume (decremental volume) to be retained as a historical version, as shown in Figure 4 shown in (e) of Figure 4As shown in (f). To improve the disk utilization rate at the backup end, for multiple versions at the backup end, except that the full version requires the same disk space as the application end, the incremental version only requires a very small disk space, which can be one-fifth or one-tenth or even smaller than the full version. Each decremental version requires even less disk space, only the size of the disk space used during each incremental version dump. In this way, it is possible to use less than twice the disk space of the application end at the backup end, but store 5 or 6 or even more backup copies.

[0026] As Figure 5 shown, in this embodiment, the snapshot volume module constructs snapshot volumes of types such as linear volumes (including linear volume one and linear volume two), incremental snapshot volumes (including incremental volume one and incremental volume two), decremental snapshot volumes, and full data volumes. Among them, two snapshot technologies, namely row (redirect-on-write) and cow (copy-on-write), are used. Linear volume: A virtual device generated by linearly mapping a continuous area on a physical device. Each logical block on the virtual device directly corresponds to each physical block on the physical device; in this embodiment, multiple linear mappings are performed on the full data volume. Row: When new data is first written to a certain storage location on the source volume, it will be redirected and written to the snapshot volume. When the data is rewritten again, the system will select a new storage location for the updated data in the snapshot volume. The data written by the previous redirect in the snapshot volume is retained but not referenced again; in this embodiment, row is used as the snapshot volume for collecting incremental data. Cow: When new data is first written to the source volume, the snapshot system will first copy the original data to the corresponding data block on the snapshot volume, and then rewrite the source volume; in this embodiment, cow is used as the decremental snapshot volume for storing historical data.

[0027] In this embodiment, when the backup end first generates a rehearsal virtual volume for the backup data of the specified version and mounts it to the application end, it means that the backup data of the specified version generates a rehearsal virtual volume and maps it to the application end through the iscsi protocol. If the application end user discovers and mounts the rehearsal virtual volume generated by the backup end through the iscsi protocol, it is determined that the application end confirmation has been received. The rehearsal of the virtual volume is realized by using the iscsi protocol, and a composite mechanism of rehearsal and replacement is formed in combination with replacement recovery, wherein both rehearsal and replacement combine the backup version selected for recovery with other versions to form a virtual volume. This virtual volume has the data state when the selected version was generated, thereby achieving the purpose of restoring the selected version of data. The difference between rehearsal and replacement is that rehearsal only temporarily combines the data of each version together, and the data between the versions is not affected after the rehearsal ends; replacement combines the data of each version together and rewrites the real data on each version, which is an irreversible operation. The role of the drill operation provided by the backup end during recovery is that if the replacement operation is performed directly during recovery, the underlying snapshot disks need to be combined to roll back the data to the specified time node, which takes a long time and is irreversible. If the replacement is completed and it is found that the version you want to restore is not the one you want to restore, you cannot roll back. The drill avoids the shortcomings of replacement and only temporarily combines the underlying snapshot disks. The time cost is very small, and it can be cancelled at any time to reselect another version for drill, which is convenient for confirming data accuracy. However, since the drill is only a temporary combination of the underlying disks and is not stable, after the user confirms that the selected version data is correct, the drill needs to be cancelled for replacement recovery.

[0028] As an optional implementation, the data flow of the disk network synchronization module in this embodiment can only be synchronized from the master node to the backup node; based on this, when performing backup, the application end is used as the master node, and the data flow is transmitted from the application end to the backup end; when restoring data, the backup end is used as the master node, and the data flow is transmitted from the backup end to the application end. Specifically, when data backup is required, the disk network synchronization module of the application end is configured as the master node, and the disk network synchronization module of the backup end becomes a slave node, so that the slave node automatically receives the backup data after the full copy or incremental copy of the data volume sent by the master node through the TCP / IP network protocol; when data recovery is required, the disk network synchronization module of the backup end is configured as the master node, and the disk network synchronization module of the application end becomes a slave node, so that the slave node automatically receives the final virtual volume recovery data sent by the master node through the TCP / IP network protocol. Through the master node and slave node method, on the one hand, the communication and configuration of the master node and the slave node can be simplified, and on the other hand, it is also convenient to realize the one-to-many expansion of the master node and the slave node.

[0029] In summary, in the method of this embodiment for backup, when the application side creates a disk network synchronization device using a specified disk device for backup, sets the application side as the master node, provides the logical disk device on the node for user use, and the data generated during the user's use is finally stored on the underlying disk device through the logical disk device. The backup side also creates a disk network synchronization device using the specified disk device for backup, sets it as the standby node, and synchronizes the data of the application side to the backup side through the network; for the first full synchronization, after the full synchronization is completed; insert an incremental snapshot volume. After the incremental snapshot volume reaches the dump condition, use the new incremental snapshot volume to rotate the incremental snapshot volume that needs to be dumped, and finally merge the rotated incremental snapshot volume into the full volume and generate a decremental snapshot volume, and then cycle through the backup process in sequence. In the method of this embodiment for recovery, when the application side needs to recover data due to reasons such as a fault, the backup side first maps the specified backup version to be recovered to the application side through a rehearsal method, and the application side confirms the accuracy of the version data through methods such as mounting; after ensuring the data, end the rehearsal operation, use the same version for replacement operation, use the logical virtual device generated by the replacement as the data disk of the disk network synchronization of the backup side, perform the creation operation and set the backup side as the master node; the application side selects the disk device for data recovery as the data disk of the disk network synchronization, performs the creation operation and sets the application side as the standby node, and synchronizes the data of the backup side to the application side through the network. The method of this embodiment can improve the backup efficiency of multi-version backup and recovery based on disk blocks and reduce space occupancy. While retaining multiple versions of data during block backup, it will neither cause a large waste of storage space nor improve the backup efficiency.

[0030] In addition, this embodiment also provides a multi-version backup and recovery system based on disk blocks, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the multi-version backup and recovery method based on disk blocks. In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor. In addition, this embodiment also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0031] Embodiment 2: This embodiment is basically the same as Embodiment 1, and the main difference is that: in this embodiment, the disk network synchronization module of the backup side uses the incremental backup technology through the snapshot volume module to generate backup data and writes it to the underlying disk through the underlying disk storage module, including: S201. The backup end creates two linear volumes, i.e., linear volume two and linear volume one, on the upper layer of the data volume, and performs a full data synchronization to synchronize the data volume data of the application end to the data volume of the backup end to obtain a full data volume; S202. The backup end inserts an incremental snapshot volume one between linear volume one and linear volume two, so that the new data transmitted during subsequent synchronization by the application end will be written to the incremental snapshot volume one; S203. The backup end determines whether the incremental snapshot volume one reaches a preset dump condition. If the incremental snapshot volume one does not reach the preset dump condition, it jumps to step S202 to continue; otherwise, the backup end creates a temporary volume at the bottom layer of the linear volume two, and merges the incremental snapshot volume one and the original full data volume into the temporary volume to become a new full data volume.

[0032] The method of this embodiment is aimed at the situation where the storage space of the backup end is insufficient. Only one full version is retained at the backup end. During the process, incremental backup is still adopted, but each incremental data is written into this one version, ensuring the need for data backup under extreme conditions.

[0033] In addition, this embodiment also provides a multi-version backup and recovery system based on disk blocks, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the multi-version backup and recovery method based on disk blocks. In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor. In addition, this embodiment also provides a computer program product, including a computer program or instruction, which is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0034] Embodiment Three: This embodiment is basically the same as Embodiment 1, and the main difference lies in that: before data recovery is required in this embodiment, when the application end cannot immediately provide the underlying disk for data recovery, the replacement incremental virtual volume is first used to carry out the write operation of the user, and data recovery is performed when there is an underlying disk available for data recovery at the application end. After the disk network synchronization module at the application end completes the replacement recovery of the data volume using the received virtual volume, it further includes merging the replacement incremental virtual volume into the recovered data volume and using the recovered data volume to carry out the write operation of the user. The method of this embodiment is aimed at the situation where the application end cannot provide the disk device for recovery in a short time but is eager to obtain data. In the above situation, the method of this embodiment inserts a replacement incremental version (replacement incremental virtual volume) during replacement, maps the virtual disk device generated by replacement to the application end, and directly mounts and uses it at the application end; thus, the application end can normally read the data on the virtual device, and all write operations during the process will be recorded on the replacement incremental version, ensuring that the data generated during replacement is saved.

[0035] In addition, this embodiment also provides a multi-version backup and recovery system based on disk blocks, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the multi-version backup and recovery method based on disk blocks. In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor. In addition, this embodiment also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0036] Embodiment 4: This embodiment is basically the same as Embodiment 1, and the main difference lies in that in this embodiment, for the execution of the backup task, scheduled backup is adopted. When setting the backup task at the backup end, the execution period of each day is specified, and the backup operation is only performed when the system is idle, without occupying too much system resources.

[0037] In addition, this embodiment also provides a multi-version backup and recovery system based on disk blocks, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the multi-version backup and recovery method based on disk blocks. In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor. In addition, this embodiment also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the multi-version backup and recovery method based on disk blocks through a processor.

[0038] Those skilled in the art should understand that the technical solutions provided by the embodiments of this application can be in the form of a method, a system, or a computer program product. Therefore, this application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes. This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the function specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the function specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for realizing the function specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0039] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

Claims

1. A multi-version backup and recovery method based on disk blocks, characterized in that: The method comprises the following steps: deploying a disk network synchronization module on two independent hosts, an application end and a backup end, respectively, and deploying a snapshot volume module on the backup end, wherein the disk network synchronization modules are both located at the lower layer of the file system, and creating two independent logical block disks, a data volume and a metadata volume, locally through the disk network synchronization modules on the application end and the backup end respectively, and finally writing the data to the underlying disk through the underlying disk storage module; when data backup is required, the disk network synchronization module on the application end fully copies or incrementally copies the data volume through the TCP / IP network protocol and sends the data to the disk network synchronization module on the backup end, and the disk network synchronization module on the backup end generates backup data by using the incremental backup technology through the snapshot volume module and writes the data to the underlying disk through the underlying disk storage module; when data recovery is required, the backup end first generates a virtual volume for the specified version of the backup data and mounts it to the application end, and then generates the final virtual volume only after the application end confirms it, and sends the virtual volume to the disk network synchronization module on the application end through the disk network synchronization module on the backup end through the TCP / IP network protocol, and the disk network synchronization module on the application end uses the received virtual volume to complete the replacement recovery of the data volume.

2. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: When the disk network synchronization module on the application side sends the data volume to the disk network synchronization module on the backup side through the TCP / IP network protocol, the disk network synchronization module sends the data volume to be sent to the buffer zone based on the asynchronous replication protocol and returns the write result to the upper-layer application on the application side to improve the read and write performance of the application-side data; the disk network synchronization module on the backup side sends the data volume to the disk network synchronization module on the application side through the TCP / IP network protocol, and the disk network synchronization module sends the data volume to be sent to the buffer zone and returns the write result to the upper-layer application on the backup side to improve the read and write performance of the application-side data.

3. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: The disk network synchronization module of the backup end generates backup data by using the incremental backup technology through the snapshot volume module and writes it to the underlying disk through the underlying disk storage module, including: S101, the backup end creates two linear volumes, linear volume 2 and linear volume 1, in the upper layer of the data volume, and performs full data synchronization to synchronize the data of the data volume of the application end to the data volume of the backup end to obtain a full data volume; S102, the backup end inserts the incremental snapshot volume 1 between the physical volume 1 and the linear volume 2, so that the new data transmitted by the application end during subsequent synchronization will be written to the incremental snapshot volume 1; S103, the backup end determines whether the incremental snapshot volume 1 meets the preset dump condition. If the incremental snapshot volume 1 does not meet the preset dump condition, the backup end jumps to step S102 to continue; otherwise, the backup end jumps to step S104; S104, the backup end inserts the incremental snapshot volume 2 between the linear volume 1 and the full data volume, so that new data transmitted by the application end during subsequent synchronization will be written to the incremental snapshot volume 2; the incremental snapshot volume 1 is moved between the linear volume 2 and the full data volume; S105, the backup end creates a temporary volume at the bottom layer of the linear volume 2, merges the incremental snapshot volume 1 and the original full data volume into the temporary volume to form a new full data volume, and generates a reduced snapshot volume to be retained as a historical version.

4. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: The disk network synchronization module of the backup end generates backup data by using the incremental backup technology through the snapshot volume module and writes it to the underlying disk through the underlying disk storage module, including: S201, the backup end creates two linear volumes, linear volume 2 and linear volume 1, on the upper layer of the data volume, and performs full data synchronization to synchronize the data of the data volume of the application end to the data volume of the backup end to obtain a full data volume; S202, the backup end inserts the incremental snapshot volume 1 between the physical volume 1 and the linear volume 2, so that the new data transmitted during the subsequent synchronization of the application end will be written to the incremental snapshot volume 1; S203, the backup end determines whether the incremental snapshot volume 1 meets the preset dump condition. If the incremental snapshot volume 1 does not meet the preset dump condition, jump to step S202 to continue; otherwise, the backup end creates a temporary volume at the bottom layer of linear volume 2, and merges the incremental snapshot volume 1 and the original full data volume into the temporary volume to form a new full data volume.

5. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: When the backup end first generates a rehearsal virtual volume for the specified version of the backup data and mounts it to the application end, it means that the specified version of the backup data is generated into a rehearsal virtual volume and mapped to the application end through the iscsi protocol. If the application end user discovers and mounts the rehearsal virtual volume generated by the backup end through the iscsi protocol, it is determined that the application end confirmation has been received.

6. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: Before the need for data recovery is performed, when the application side cannot immediately provide an underlying disk that can be used to recover data, the application side first uses the replacement incremental virtual volume to carry the user's write operation, and executes data recovery when the application side has an underlying disk that can be used to recover data. After the disk network synchronization module on the application side completes the replacement recovery of the data volume using the received virtual volume, it also includes merging the replacement incremental virtual volume into the recovered data volume, and using the recovered data volume to carry the user's write operation.

7. The disk block-based multi-version backup and recovery method according to claim 1, characterized in that: When data backup is required, the disk network synchronization module on the application side is configured as a master node, and the disk network synchronization module on the backup side becomes a slave node, so that the slave node automatically receives the backup data after full copy or incremental copy of the data volume sent by the master node through the TCP / IP network protocol; When data recovery is required, the disk network synchronization module on the backup end is configured as a master node and the disk network synchronization module on the application end becomes a slave node, so that the slave node automatically receives the final virtual volume recovery data sent by the master node through the TCP / IP network protocol.

8. A disk block-based multi-version backup and recovery system, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the disk block-based multi-version backup and recovery method described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the disk block-based multi-version backup and recovery method described in any one of claims 1 to 7 through a processor.

10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the disk block-based multi-version backup and recovery method described in any one of claims 1 to 7 through a processor.