Data backup method and apparatus, storage medium, and electronic device

By creating snapshots in storage volumes and setting IO operation flags, the problem of resource waste in traditional cloud backup is solved, achieving data backup with low resource consumption.

WO2026061107A1PCT designated stage Publication Date: 2026-03-26INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2026-03-26

AI Technical Summary

Technical Problem

Traditional snapshot technology requires the additional creation of target volumes and bitmaps during cloud backup, resulting in resource waste and significant impact on I/O operations, as well as space consumption and resource waste.

Method used

By creating snapshots in the storage volume and setting IO operation identifiers, each IO operation is recorded as belonging to a specific snapshot generation, avoiding the need to create additional target volumes. This allows for direct management of IO operation identifiers for data blocks within the storage volume, thus achieving data backup.

Benefits of technology

It solves the problem of resource waste, achieves low-resource and low-cost data backup, and improves the utilization efficiency of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025107750_26032026_PF_FP_ABST
    Figure CN2025107750_26032026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data backup method and apparatus, a storage medium, and an electronic device. The method comprises: receiving a first data backup request sent by a host server; when it is determined that the first data backup request is used for requesting to perform a data backup operation on data in a target storage volume, creating a first snapshot; in response to the first data backup request, reading first target data from a first target data block on the basis of a first snapshot identifier of the first snapshot; and performing a data backup operation on the first target data to back up the first target data to a cloud server. The present application can solve the problem in the related art of resource waste occurring during data backup, achieving data backup with low resource usage and low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Data backup method and device, storage medium, and electronic device

[0001] Cross-reference to related applications

[0002] The present application claims priority to the Chinese patent application No. 202411307879.4, filed on September 19, 2024, and entitled "Data backup method and device, storage medium, and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] Embodiments of the present application relate to the field of computers, and in particular, to a data backup method and device, a non-volatile readable storage medium, and an electronic device. BACKGROUND

[0004] Cloud backup is a time-point-based data protection technology that transmits data of a storage volume in a storage device to a public cloud or a private cloud for backup. When a local storage device fails, data can be downloaded from the cloud to the local device to realize data recovery and avoid data loss. Currently, cloud backup is mostly implemented through snapshot technology, but the traditional snapshot technology needs to create an additional target volume for the storage volume and manage the copy of snapshot data through a bitmap. Therefore, the more storage volumes that are backed up to the cloud, the more target volumes that are created, the more bitmaps that are created, and the greater the impact of copy operations on the input / output (IO) of the storage volume. There is a problem of occupying space and wasting resources. SUMMARY

[0005] Embodiments of the present application provide a data backup method and device, a non-volatile readable storage medium, and an electronic device to at least solve the problem of resource waste in related technologies when data backup is performed.

[0006] According to one embodiment of the present application, a data backup method is provided, which is applied to a storage server, the storage server is connected with a cloud server and a host server respectively, the storage server comprises a storage pool, and the storage pool comprises a plurality of storage volumes, the method comprises the following steps: receiving a first data backup request sent by the host server; in the case that it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume, creating a first snapshot, wherein the target storage volume is any one of the plurality of storage volumes, and the first snapshot is used to indicate that an input / output (IO) operation identifier is set for a data block in the target storage volume when an IO operation is performed; reading first target data from a first target data block based on a first snapshot identifier of the first snapshot in response to the first data backup request, wherein the first target data block is at least one data block in the target storage volume, and a target IO operation identifier of the first target data block is the same as the first snapshot identifier; and performing a data backup operation on the first target data to backup the first target data to the cloud server.

[0007] In one example embodiment, before the step of creating the first snapshot in the case that it is determined that the first data backup request is used to request to perform the data backup operation on the data in the target storage volume, the method further comprises the following steps: performing a mapping operation on the target storage volume to map the target storage volume to the host server, wherein the mapping operation comprises the following steps: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number to allow the host server to access the target storage volume; receiving a first IO operation request sent by the host server, wherein the first IO operation request comprises the following information: identification information of the target storage volume, address information of the first target data block, data information to be operated by the IO operation, and an IO operation identifier; and performing the IO operation on the first target data block by using the information comprised in the first IO operation request in response to the first IO operation request, and recording the target IO operation identifier of the first target data block.

[0008] In one example embodiment, after the step of performing the IO operation on the first target data block by using the information comprised in the first IO operation request in response to the first IO operation request, and recording the target IO operation identifier of the first target data block, the method further comprises the following step: in the case that it is determined that the IO operation performed on the first target data block is an initial IO operation, updating a first usage field of the first target data block to obtain a first target usage field, wherein the first usage field is set before the step of receiving the IO operation request sent by the host server, and a field value of the first usage field is used to identify whether the data in the first target data block is allowed to be deleted.

[0009] In one example embodiment, in a case where it is determined that the first data backup request is for requesting to perform a data backup operation on data in the target storage volume, creating the first snapshot comprises: sending a snapshot instruction to the host server to instruct the host server to perform the following operations: in response to the snapshot instruction, setting a first snapshot identifier into a second IO operation request and sending the second IO operation request to the target storage volume; and in response to the second IO operation request, after performing a second IO operation in the first target data block, determining an IO operation identifier based on the first snapshot identifier and setting the IO operation identifier into the first target data block to create the first snapshot.

[0010] In one example embodiment, in response to the first data backup request, reading the first target data from the first target data block based on the first snapshot identifier of the first snapshot comprises: receiving data acquisition indication information sent by the target storage volume; in a case where the data acquisition indication information includes first indication information, in response to the first data backup request, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the first indication information is used to indicate that only incremental data is allowed to be read from the first target data block; and reading the incremental data from the first target data block to obtain the first target data.

[0011] In one example embodiment, after receiving the data acquisition indication information sent by the target storage volume, the method further comprises: in a case where the data acquisition indication information includes second indication information, in response to the first data backup request, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the second indication information is used to indicate that all data included in the first target data block is allowed to be read; and reading all data from the first target data block to obtain the first target data.

[0012] In one example embodiment, reading the first target data from the first target data block based on the first snapshot identifier of the first snapshot comprises: in a case where the first data backup request is a first backup request, based on an initial snapshot identifier of the first snapshot, traversing the target storage volume to determine all data blocks performing IO operations included in the target storage volume as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; sending a first read instruction to the first target data block; and receiving first target data sent by the first target data block in response to the first read instruction.

[0013] In an example embodiment, in response to the first data backup request, reading the first target data from the first target data block based on the first snapshot identifier of the first snapshot comprises: in a case where the first data backup request is an other backup request, based on the first snapshot identifier, traversing the target storage volume, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block; sending a second read instruction to the first target data block; and receiving the first target data sent by the first target data block in response to the second read instruction.

[0014] In an example embodiment, performing the data backup operation on the first target data to backup the first target data into the cloud server comprises: calling a data backup interface in the cloud server, wherein the data backup interface only allows transmission of the first target data read from the first target data block; and uploading the first target data to the cloud server through the data backup interface to backup the first target data in the cloud server.

[0015] In an example embodiment, after performing the data backup operation on the first target data to backup the first target data into the cloud server, the method further comprises: updating a second usage field of the first target data block to obtain a second target usage field, wherein the second usage field is set when the IO operation is performed on the first target data block, and a field value of the second usage field is used to identify whether the data in the first target data block is allowed to be deleted; and in a case where the field value of the second target usage field is a target field value, deleting the first target data to release the storage space of the first target data block.

[0016] In an example embodiment, the updating the second usage field of the first target data block to obtain the second target usage field comprises: an initial value of the first usage field of the first target data block is set to 2, in a case where the host server first writes data in the first target data block, the field value of the first usage field is reduced by 1; and in a case where the data in the first target data block is backed up to the cloud server, the field value of the second usage field is reduced by 1 to obtain the second target usage field.

[0017] In an example embodiment, the storage server further comprises a data deletion service, and after performing the data backup operation on the first target data to backup the first target data into the cloud server, the method further comprises: traversing the target storage volume to search for second target data from the target storage volume, wherein the second target data is data in the target storage volume that is not backed up into the cloud server; and calling the data deletion service to perform a deletion operation on the second target data through the data deletion service.

[0018] In an example embodiment, the IO operation identifier is used to identify the first snapshot to which the IO operation belongs.

[0019] In one example embodiment, the first snapshot identifier is used to indicate a number of times that the target storage volume receives the first data backup request and creates the first snapshot.

[0020] In one example embodiment, the target IO operation identifier is used to identify the first snapshot to which the IO operation belongs, for identifying the first target data block.

[0021] According to another embodiment of the present application, a data backup apparatus is provided, which is applied to a storage server, the storage server being connected with a cloud server and a host server respectively, the storage server comprising a storage pool, and the storage pool comprising a plurality of storage volumes, the apparatus comprising: a first receiving module configured to receive a first data backup request sent by the host server; a first creating module configured to, in a case where it is determined that the first data backup request is used to request a data backup operation on data in a target storage volume, create a first snapshot, wherein the target storage volume is any one of the plurality of storage volumes, and the first snapshot is used to indicate that a data block in the target storage volume is set with an IO operation identifier when an input / output (IO) operation is performed; a first responding module configured to respond to the first data backup request, and read first target data from a first target data block based on a first snapshot identifier of the first snapshot, wherein the first target data block is at least one data block in the target storage volume, and a target IO operation identifier of the first target data block is the same as the first snapshot identifier; and a first backup module configured to perform the data backup operation on the first target data, so as to backup the first target data to the cloud server.

[0022] In one example embodiment, the apparatus further comprises: a first mapping module configured to, before the first creating module creates the first snapshot in the case where it is determined that the first data backup request is used to request the data backup operation on the data in the target storage volume, perform a mapping operation on the target storage volume, so as to map the target storage volume to the host server, wherein the mapping operation comprises: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number, so as to allow the host server to access the target storage volume; a second receiving module configured to receive a first IO operation request sent by the host server, wherein the first IO operation request comprises the following information: identification information of the target storage volume, address information of the first target data block, data information to be operated by the IO operation, and an IO operation identifier; and a second responding module configured to respond to the first IO operation request, and perform the IO operation on the first target data block by using the information comprised in the first IO operation request, and record the target IO operation identifier of the first target data block.

[0023] In an example embodiment, the apparatus further comprises a first updating module configured to, in response to the first IO operation request, perform an IO operation on the first target data block by using information included in the first IO operation request, and record the target IO operation identifier of the first target data block, and then, in a case where it is determined that the IO operation performed on the first target data block is an initial IO operation, update the first usage field of the first target data block to obtain a first target usage field, wherein the first usage field is set before the IO operation request sent by the host server is received, and the field value of the first usage field is used to identify whether the data in the first target data block is allowed to be deleted.

[0024] In an example embodiment, the first creating module comprises a first sending submodule configured to send a snapshot instruction to the host server to instruct the host server to perform the following operations: in response to the snapshot instruction, set a first snapshot identifier into a second IO operation request, and send the second IO operation request to the target storage volume; and a first response submodule configured to, in response to the second IO operation request, after performing a second IO operation in the first target data block, determine an IO operation identifier based on the first snapshot identifier, and set the IO operation identifier into the first target data block to create the first snapshot.

[0025] In an example embodiment, the first response module comprises a first receiving submodule configured to receive data acquisition indication information sent by the target storage volume; a second response submodule configured to, in a case where the data acquisition indication information includes first indication information, respond to the first data backup request, and find an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the first indication information is used to indicate that only incremental data is allowed to be read from the first target data block; and a first reading submodule configured to read the incremental data from the first target data block to obtain the first target data.

[0026] In an example embodiment, the first response module further comprises a third response submodule configured to, after the data acquisition indication information sent by the target storage volume, in a case where the data acquisition indication information includes second indication information, respond to the first data backup request, and find an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the second indication information is used to indicate that all data included in the first target data block is allowed to be read; and a second reading submodule configured to read all data from the first target data block to obtain the first target data.

[0027] In an example embodiment, the first response module comprises: a first traversal submodule configured to, in a case where the first data backup request is a first backup request, traverse the target storage volume based on an initial snapshot identifier of the first snapshot to determine each data block performing an IO operation included in the target storage volume as a first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; send a first read instruction to the first target data block; and a second receiving submodule configured to receive first target data sent by the first target data block in response to the first read instruction.

[0028] In an example embodiment, the first response module comprises: a second traversal submodule configured to, in a case where the first data backup request is a backup request other than the first backup request, traverse the target storage volume based on the first snapshot identifier to find an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block; send a second read instruction to the first target data block; and a third receiving submodule configured to receive first target data sent by the first target data block in response to the second read instruction.

[0029] In an example embodiment, the first backup module comprises: a first calling submodule configured to call a data backup interface in the cloud server, wherein the data backup interface only allows transmission of the first target data read from the first target data block; and a first uploading submodule configured to upload the first target data to the cloud server through the data backup interface to backup the first target data in the cloud server.

[0030] In an example embodiment, the apparatus further comprises: a second updating module configured to, after performing a data backup operation on the first target data to backup the first target data in the cloud server, update a second usage field of the first target data block to obtain a second target usage field, wherein the second usage field is set when the first target data block performs the IO operation, and a field value of the second usage field is used to identify whether the data in the first target data block is allowed to be deleted; and a first deleting module configured to, in a case where the field value of the second target usage field is a target field value, delete the first target data to release a storage space of the first target data block.

[0031] In an example embodiment, the storage server further comprises a data deletion service, and the apparatus further comprises: a second traversal module configured to, after performing a data backup operation on the first target data to backup the first target data in the cloud server, traverse the target storage volume to find second target data from the target storage volume, wherein the second target data is data in the target storage volume that is not backed up in the cloud server; and a first calling module configured to call the data deletion service to perform a deletion operation on the second target data through the data deletion service.

[0032] According to another embodiment of the present application, a storage server is also provided, the storage server is connected with the cloud server and the host server respectively, the storage server comprises a storage pool, and the storage pool comprises a plurality of storage volumes. The storage server is configured to execute the steps in any of the method embodiments.

[0033] According to another embodiment of the present application, a computer non-volatile readable storage medium is also provided, the computer non-volatile readable storage medium stores a computer program. The computer program is configured to execute the steps in any of the method embodiments when running.

[0034] According to another embodiment of the present application, an electronic device is also provided, which comprises a memory and a processor. The memory stores a computer program, and the processor is configured to execute the computer program to execute the steps in any of the method embodiments.

[0035] According to another embodiment of the present application, a computer program product is also provided, which comprises a computer program. The computer program is executed by a processor to implement the steps in any of the method embodiments.

[0036] According to the present application, in the case of determining that the first data backup request is used to request to perform a data backup operation on the data in the target storage volume, a first snapshot is created, and an IO operation identifier is set when a data block in the target storage volume performs an input / output (IO) operation. In response to the first data backup request, a first target data block is found from the target storage volume based on a first snapshot identifier of the first snapshot, and first target data in the first target data block is read, and a target IO operation identifier of the first target data block is the same as the first snapshot identifier. Finally, the data backup operation is performed on the first target data, and the first target data is backed up to the cloud server. According to the present application, when the target storage volume is backed up to the cloud, the IO operation identifier is set to record which snapshot relationship each IO operation belongs to, and a target volume for snapshot does not need to be created additionally, and all data exists in the target storage volume. Therefore, the problem of resource waste in the related art when performing data backup can be solved, and the effect of low resource and low cost for data backup is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0037] FIG. 1 is a hardware structure block diagram of a server device of a data backup method according to an embodiment of the present application;

[0038] FIG. 2 is a flowchart of a data backup method according to an embodiment of the present application;

[0039] FIG. 3 is an architecture diagram of a data backup method according to an embodiment of the present application;

[0040] FIG. 4 is a flowchart of a data backup method according to an embodiment of the present application;

[0041] FIG. 5 is a structural block diagram of a data backup apparatus according to an embodiment of the present application. DETAILED DESCRIPTION

[0042] Hereinafter, the embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.

[0043] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence.

[0044] The method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing device. Taking the case of running on a server device, FIG. 1 is a hardware structural block diagram of a server device of a data backup method according to an embodiment of the present application. As shown in FIG. 1, the server device can include one or more (only one is shown in FIG. 1) processors 102 (the processor 102 can include but is not limited to a processing device such as a microcontroller unit MCU or a field-programmable gate array FPGA) and a memory 104 configured to store data, wherein the server device can further include a transmission device 106 configured to have a communication function and an input and output device 108. Those skilled in the art can understand that the structure shown in FIG. 1 is only schematic, and does not limit the structure of the server device. For example, the server device can further include more or fewer components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.

[0045] The memory 104 can be configured to store computer programs, for example, software programs of application software and modules, such as a computer program corresponding to the method of controlling a redundant array of independent disks RAID card running in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0046] The transmission device 106 is configured to receive or send data via a network. The network instance described above can include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station so as to communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.

[0047] In the embodiment, a data backup method is provided, which is applied to a storage server connected with a cloud server and a host server, and includes a storage pool including a plurality of storage volumes. FIG. 2 is a flowchart of the data backup method according to the embodiment of the application. As shown in FIG. 2, the flow includes the following steps:

[0048] In step S202, a first data backup request sent by the host server is received.

[0049] In step S204, in a case where it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume, a first snapshot is created, wherein the target storage volume is any one of the plurality of storage volumes, and the first snapshot is used to indicate that an IO operation identifier is set when a data block in the target storage volume performs an input / output (IO) operation.

[0050] Optionally, the storage server is configured to store data in the host server, and there is an IO operation between the host server and the storage server. The storage volume includes one or more data blocks, and the data blocks are used to store data.

[0051] Optionally, the IO operation identifier is used to record which generation of snapshot the IO operation belongs to. For example, for a storage volume A, when no first snapshot is created, the IO operation identifier of all IO operations received by the storage volume A is 0. After the first snapshot is created, the snapshot is the 0th generation snapshot, and the corresponding data is the data in the data block of the storage volume A with the IO operation identifier of 0. After the snapshot is created, the IO operation identifier of all IO operations received by the storage volume A is increased by 1 and becomes 1. After the second first snapshot is created, the snapshot is the 1st generation snapshot, and the corresponding data is the data in the data block of the storage volume A with the IO operation identifier of 1. After the snapshot is created, the IO operation identifier of all IO operations received by the storage volume A is increased by 1 and becomes 2.

[0052] In response to the first data backup request, the first target data is read from the first target data block based on the first snapshot identifier of the first snapshot, wherein the first target data block is at least one data block in the target storage volume, and the target IO operation identifier of the first target data block is the same as the first snapshot identifier.

[0053] In step S208, the data backup operation is performed on the first target data to backup the first target data into the cloud server.

[0054] Optionally, in the data backup method, a typical application scenario can be envisaged, which involves an enterprise-level IT (internet Technology) infrastructure including a storage server, a cloud server and a host server. The following is a detailed description of the method in practical application: the host server is an internal server of the enterprise and is configured to run critical business applications. The storage server manages a large number of storage volumes and is configured to store business data. The cloud server is a remote storage facility used by the enterprise for backup and disaster recovery. The enterprise needs to regularly backup critical business data to prevent data loss or quickly recover in the event of system failure. The host server sends a first data backup request to the storage server at a predetermined time or under certain trigger conditions. After receiving the first data backup request, the storage server determines the purpose of the first data backup request and creates a first snapshot for a specific target storage volume. The storage server reads the first target data block from the target storage volume according to the first snapshot identifier of the first snapshot, which may include files, database records or other first target data of critical information. Finally, the storage server sends the read first target data to the cloud server for backup.

[0055] Through the present application, in the case of determining that the first data backup request is used to request to perform a data backup operation on the data in the target storage volume, a first snapshot is created, and the IO operation identifier is set when the data block in the target storage volume performs an input / output (IO) operation. In response to the first data backup request, the first target data block is found from the target storage volume based on the first snapshot identifier of the first snapshot, and the first target data in the first target data block is read, and the target IO operation identifier of the first target data block is the same as the first snapshot identifier. Finally, the data backup operation is performed on the first target data to backup the first target data into the cloud server. Due to the present application, when the target storage volume is backed up to the cloud, the IO operation identifier is set to record which snapshot relationship each IO operation belongs to, without creating an additional target volume for the snapshot. All data exists in the target storage volume, so the problem of resource waste in related technologies when performing data backup can be solved, and the effect of low resource and low cost data backup is achieved.

[0056] In one example embodiment, in the case of determining that the first data backup request is for requesting to perform a data backup operation on the data in the target storage volume, before creating the first snapshot, the method further comprises: performing a mapping operation on the target storage volume to map the target storage volume to the host server, wherein the mapping operation comprises: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number to allow the host server to access the target storage volume; receiving a first IO operation request sent by the host server, wherein the first IO operation request includes the following information: identification information of the target storage volume, address information of the first target data block, data information to be executed by the IO operation, and an IO operation identifier; in response to the first IO operation request, performing the IO operation on the first target data block using the information included in the first IO operation request, and recording the target IO operation identifier of the first target data block.

[0057] Optionally, the identification information of the storage volume is used to inform the storage server in which storage volume the data is stored, for example, the identification information of the storage volume is lun_id, which is used to indicate that the storage server stores data in the storage volume with the identification information of lun_id. The address information of the data block is used to specify the location of the data in the storage volume, for example, the address information of the data block is lba, which is used to indicate that the data is stored in the location with the address of lba in the storage volume. The data information of the IO operation is used to specify the data byte length of the IO operation, for example, length, which is used to indicate the data byte length of the IO operation. As shown in FIG. 3, assuming that there is a host server (for example, a physical server or a virtual machine running Windows or Linux operating system) that needs to be linked to a storage volume for data read and write operations, including: assuming that the logical unit number (LUN) of the target storage volume is 1234, first, the volume management module in the storage server sends this logical unit number to the host server, after the host server receives the logical unit number, a link is established with the target storage volume according to the logical unit number, and a storage access path is configured on the host server, for example, in Linux, a device file (such as ` / dev / sdX`) may need to be created to represent this target storage volume. After the link with the target storage volume is established, the host server sends a first IO operation request to the volume management module in the storage server, through the identification information of the target storage volume in the first IO operation request-target storage volume A, the address information of the first target data block-0x1000, the data information to be executed by the IO operation-write 8 bytes of data, the storage server is informed to write 8 bytes of data to the first target data block A with the address of `0x1000` in the target storage volume A in the storage pool, and then the snapshot module in the storage server records the target IO operation identifier 0 of the first target data block A of the target storage volume A.

[0058] The embodiment realizes the purpose of ensuring the smooth progress of the data backup operation, improving the performance of the storage host server and the security of the data by performing the mapping operation and processing the IO operation request before the data backup.

[0059] In one example embodiment, after responding to the first IO operation request, performing the IO operation on the first target data block by using the information included in the first IO operation request, and recording the target IO operation identifier of the first target data block, the method further comprises: in the case where it is determined that the IO operation performed on the first target data block is an initial IO operation, updating the first usage field of the first target data block to obtain a first target usage field, wherein the first usage field is set before the IO operation request sent by the host server is received, and the field value of the first usage field is used to identify whether the data in the first target data block is allowed to be deleted.

[0060] Optionally, as shown in FIG. 3, the cloud backup module in the storage server maintains a first usage field use_status for each data block in each storage volume, which is used to indicate whether the data in the database still needs to be stored in the storage pool in the storage server. The first usage field is used to delete the redundant data in the storage pool. For example, the initial value of the first usage field can be set to 2, and the value of the first usage field is reduced by 1 when the data in the first target data block is backed up to the cloud server. In addition, when the host server first writes data in the first target data block, the value of the first usage field is reduced by 1, and when the value is reduced to 0, it indicates that neither the cloud backup task nor the host server IO operation uses the data in the first target data block. At this time, the cloud backup module will notify the data deletion service to delete the data in the first target database.

[0061] The embodiment realizes the purpose of deleting the useless data in time during the cloud backup process and releasing the storage space by setting the first usage field to mark the usage of the data block, so that the additional storage space is not occupied for a long time.

[0062] In one example embodiment, in the case where it is determined that the first data backup request is used to request to perform the data backup operation on the data in the target storage volume, the first snapshot is created, including: sending a snapshot instruction to the host server to instruct the host server to perform the following operations: in response to the snapshot instruction, setting the first snapshot identifier to the second IO operation request, and sending the second IO operation request to the target storage volume; in response to the second IO operation request, after performing the second IO operation in the first target data block, determining the IO operation identifier based on the first snapshot identifier, and setting the IO operation identifier to the first target data block to create the first snapshot.

[0063] Optionally, assuming that cloud backup is to be performed on the target storage volume A, before the first cloud backup is performed, the storage server sends a snapshot instruction to the host server, the host server sets the first snapshot identifier 0 in the IO operation request, and the IO operation identifier of all IO operations received by the target storage volume A is 0. When the cloud backup is performed, the first snapshot is created, and the snapshot is the 0th generation snapshot, and the corresponding data is the data block data of the target storage volume A with the IO operation identifier 0. After the snapshot is created, the IO operation identifier of all IO operations received by the target storage volume A is incremented by 1 and becomes 1. After the first snapshot is created for the second time, the snapshot is the 1st generation snapshot, and the corresponding data is the data block data of the target storage volume A with the IO operation identifier 1. After the snapshot is created, the IO operation identifier of all IO operations received by the target storage volume A is incremented by 1 and becomes 2.

[0064] The embodiment provides a flexible data backup strategy by creating a snapshot, and compared with a traditional full backup, the snapshot technology reduces the demand for storage resources, and achieves the purpose of low resource consumption for data backup.

[0065] In one example embodiment, in response to the first data backup request, the first target data is read from the first target data block based on the first snapshot identifier of the first snapshot, including: receiving data acquisition instruction information sent by the target storage volume; in the case that the first indication information is included in the data acquisition instruction information, in response to the first data backup request, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the first indication information is used to indicate that only incremental data is allowed to be read from the first target data block; and reading the incremental data from the first target data block to obtain the first target data.

[0066] Optionally, the backup can be a full backup or an incremental backup, the first target data obtained can be incremental data or full data, and the data obtaining indication information force_this_gen can be used to determine whether the incremental data or the full data is obtained. If the value is true, the incremental data is obtained. For example, assuming that the third cloud backup is performed on the target storage volume A, the target storage volume A includes data block A that has performed three IO operations (the first time before the first cloud backup, and the second and third times after the first cloud backup), and data block B that has performed IO operations after the first cloud backup. Since the data block A has performed three IO operations, the IO operation identifier of the first IO operation is 0, the IO operation identifier of the second IO operation is 1, and the IO operation identifier of the third IO operation is 2. The IO operation identifier of the data block B is 1. Since it is the third cloud backup, the first snapshot identifier of the target storage volume A is 2. As shown in FIG. 3, before the snapshot module obtains the data in the target storage volume A from the storage pool, the first indication information true is included in the data obtaining indication information force_this_gen. The snapshot module traverses the IO operation identifier of each data block in the target storage volume A to find the first target data block A with the IO operation identifier 2. Then, the snapshot module reads the first target data (incremental data) of the third IO operation of the first target data block A from the storage pool.

[0067] The embodiment sets the data obtaining indication information to indicate whether the incremental data or the full data is obtained, so that only the data changed since the last backup (i.e., the incremental data) is backed up, instead of re-backing up all data, thereby achieving the purpose of greatly reducing the required storage space.

[0068] In one example embodiment, after receiving the data obtaining indication information sent by the target storage volume, the method further includes: in the case where the second indication information is included in the data obtaining indication information, responding to the first data backup request, finding the IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the second indication information is used to indicate that all data included in the first target data block is allowed to be read; and reading all data from the first target data block to obtain the first target data.

[0069] Optionally, the backup can be a full backup or an incremental backup, the first target data can be incremental data or full data, and the data acquisition instruction information force_this_gen can be used to determine whether the first target data is incremental data or full data. If the value of force_this_gen is false, the first target data is full data. For example, assume that the target storage volume A is to be backed up for the third time, the target storage volume A includes a data block A that has been operated three times (the first time before the first cloud backup, and the second and third times after the first cloud backup), and a data block B that has been operated after the first cloud backup. Since the data block A has been operated three times, the first IO operation identifier of the data block A is 0, the second IO operation identifier is 1, and the third IO operation identifier is 2. The IO operation identifier of the data block B is 1. Since it is the third cloud backup, the first snapshot identifier of the target storage volume A is 2. As shown in FIG. 3, before the snapshot module reads the data in the target storage volume A from the storage pool, the snapshot module receives the first indication information false in the data acquisition instruction information force_this_gen. The snapshot module traverses the IO operation identifier of each data block in the target storage volume A and finds the first target data block A with the IO operation identifier 2. Then, the snapshot module reads the first target data of the third IO operation of the first target data block A, the first target data of the second IO operation of the first target data block A, and the first target data of the first IO operation of the first target data block A (full data) from the storage pool in sequence.

[0070] The embodiment sets the data acquisition instruction information to indicate whether the incremental data or the full data is acquired, and achieves the purpose of backing up the full data.

[0071] In one example embodiment, the first target data is read from the first target data block based on the first snapshot identifier of the first snapshot, including: in the case that the first data backup request is a first backup request, based on an initial snapshot identifier of the first snapshot, traversing the target storage volume, determining each data block included in the target storage volume and operated as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; sending a first read instruction to the first target data block; and receiving the first target data sent by the first target data block in response to the first read instruction.

[0072] Optionally, assuming that the first cloud backup is to be performed on the target storage volume A, the target storage volume A includes data block A on which IO operation is performed and data block B on which IO operation is not performed. Since the IO operation is performed on data block A, the IO operation identifier is 0, and since the IO operation is not performed on data block B, the IO operation identifier is not present. Since it is the first cloud backup, the initial snapshot identifier of the target storage volume A is 0. Based on the initial snapshot identifier 0, the cloud backup module in the storage server sends a traversal instruction to the snapshot module in the storage server. The snapshot module traverses the IO operation identifier of each data block in the target storage volume and finds the first target data block A with the IO operation identifier 0. Then, the snapshot module sends a first read instruction to the first target data block A to obtain the first target data of the first target data block A from the storage pool and upload the data to the cloud backup module in the storage server.

[0073] The embodiment provides a flexible data backup strategy by obtaining backup data based on a snapshot identifier, and achieves the purpose of low resource consumption for data backup compared with traditional full backup.

[0074] In one example embodiment, in response to the first data backup request, the first target data is read from the first target data block based on the first snapshot identifier of the first snapshot, including: in the case that the first data backup request is other backup request, based on the first snapshot identifier, traversing the target storage volume to find the IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block; sending a second read instruction to the first target data block; and receiving the first target data sent by the first target data block in response to the second read instruction.

[0075] Optionally, assuming that the second cloud backup is to be performed on the target storage volume A, the target storage volume A includes data block A on which IO operation is performed twice (the first time before the first cloud backup and the second time after the first cloud backup) and data block B on which IO operation is performed after the first cloud backup. Since the IO operation is performed twice on data block A, the IO operation identifier of the first IO operation is 0 and the IO operation identifier of the second IO operation is 1, and the IO operation identifier of data block B is 1. Since it is the second cloud backup, the first snapshot identifier of the target storage volume A is 1. Based on the first snapshot identifier 1, the cloud backup module in the storage server sends a traversal instruction to the snapshot module in the storage server. The snapshot module traverses the IO operation identifier of each data block in the target storage volume and finds the first target data block A with the IO operation identifier 1 and the first target data block B. Then, the snapshot module sends a second read instruction to the first target data block A and the first target data block B to obtain the first target data of the second IO operation of the first target data block A and the first target data of the first IO operation of the first target data block B from the storage pool and upload the data to the cloud backup module in the storage server.

[0076] The embodiment provides a flexible data backup strategy by creating a snapshot, and achieves the purpose of low resource consumption for data backup.

[0077] In an example embodiment, the data backup operation is performed on the first target data to backup the first target data into the cloud server, including: calling a data backup interface in the cloud server, wherein the data backup interface only allows transmission of the first target data read from the first target data block; and uploading the first target data to the cloud server through the data backup interface to backup the first target data in the cloud server.

[0078] Optionally, as shown in FIG. 3, after the cloud backup module obtains the first target data, the first target data is backed up to the cloud server by calling the data backup interface provided by the cloud server. The embodiment realizes the purpose of ensuring the safety of data in the transmission process by calling the data backup interface in the cloud server.

[0079] In an example embodiment, after the data backup operation is performed on the first target data to backup the first target data into the cloud server, the method further includes: updating a second use field of the first target data block to obtain a second target use field, wherein the second use field is set when the IO operation is performed on the first target data block, and the field value of the second use field is used to identify whether the data in the first target data block is allowed to be deleted; and in a case where the field value of the second target use field is a target field value, deleting the first target data to release the storage space of the first target data block.

[0080] Optionally, as shown in FIG. 3, the cloud backup module in the storage server maintains a second use field use_status for each data block in each storage volume, which is used to indicate whether the data in the database still needs to be stored in the storage pool in the storage server, and the second use field is used to delete redundant data in the storage pool. For example, the initial value of the first use field of the first target data block A is 2, when the host server first writes data in the first target data block, the value of the first use field is reduced by 1 to obtain the value of the second use field as 1, when the data in the first target data block is backed up to the cloud server, the value of the second use field is reduced by 1, and the second use field becomes 0, indicating that neither the cloud backup task nor the host server IO operation uses the data of the first target data block A. At this time, the cloud backup module will notify the data recycling service to delete the data in the first target data block A. The embodiment realizes the purpose of deleting useless data in time in the cloud backup process, and does not occupy additional storage space for a long time, and releases the storage space, by setting the first use field to mark the use of the data block.

[0081] In an example embodiment, the storage server further comprises a data deletion service, after performing the data backup operation on the first target data to backup the first target data to the cloud server, the method further comprises: traversing the target storage volume to find second target data from the target storage volume, wherein the second target data is data in the target storage volume that is not backed up to the cloud server; and calling the data deletion service to perform a deletion operation on the second target data by the data deletion service.

[0082] Optionally, the storage server is prevented from having data that is not backed up to other devices by creating the first snapshot, so after cloud backup, the data backed up to other devices in the target storage volume is found in time and the expired data is deleted. For example, assume that the target storage volume A includes first target data A backed up to the cloud server and second target data B backed up to the backup server, after the first target data A is backed up to the cloud server, the storage server traverses the target storage volume to find the second target data B that is not backed up to the cloud server but is backed up to the backup server, and the storage service calls the data deletion service to delete the second target data B. This embodiment releases storage space by deleting data that is not backed up to the cloud server but is backed up to other servers, and achieves the purposes of optimizing the use of storage resources and reducing storage costs.

[0083] The present application will be described below in conjunction with embodiments:

[0084] In this embodiment, FIG. 4 is a flowchart of a data backup method according to an embodiment of the present application, as shown in FIG. 4, comprising the following steps:

[0085] S402, assuming that the logical unit number (LUN) of the target storage volume A is 1234, as shown in FIG. 3, the volume management module in the storage server first sends the logical unit number to the host server, and after the host server receives the logical unit number, establishes a link with the target storage volume according to the logical unit number, and configures a storage access path on the host server. After the link with the target storage volume A is established, the host server sends a first IO operation request to the volume management module in the storage server, and through the identification information of the target storage volume in the first IO operation request-target storage volume A, the address information of the first target data block-0x1000 and-0x2000, and the data information to be executed IO operation-write 8 bytes and write 4 bytes of data, the storage server is informed to write 8 bytes of data to the first target data block A with the address of `0x1000` on the target storage volume A in the storage pool and 4 bytes of data to the first target data block B with the address of `0x2000`, and then the snapshot module in the storage server records the target IO operation identification 0 of the first target data block A of the target storage volume A and the target IO operation identification 0 of the first target data block B, and then the cloud backup module in the storage server updates the first use field of the first target data block A from 2 to 1 to obtain the first target use field, and the first use field of the first target data block B from 2 to 1 to obtain the first target use field. Start cloud backup;

[0086] S404, as shown in FIG. 3, the cloud backup module responds to the first data backup request triggered by the host server or the user directly, and creates a first snapshot identification of the target storage volume A through the snapshot module. Since it is the first cloud backup, the first snapshot identification is 0.

[0087] In this process, the storage server receives the first IO operation request sent by the host server again, and through the identification information of the target storage volume in the first IO operation request-target storage volume A, the address information of the first target data block-0x1000, and the data information to be executed IO operation-write 1 byte of data, the storage server is informed to write 1 byte of data to the first target data block A with the address of `0x1000` on the target storage volume A in the storage pool, and then the snapshot module in the storage server records the target IO operation identification 1 of the first target data block A of the target storage volume A, and the first use field 1;

[0088] S406, before the snapshot module obtains the data in the target storage volume A from the storage pool, the snapshot module receives the first indication information true in the data obtaining indication information force_this_gen, the snapshot module traverses the IO operation identifier of each data block in the target storage volume and finds the first target data block A and the second target data block B with the IO operation identifier 0, and then the snapshot module reads the first target data in the first target data block A and B from the storage pool in sequence and uploads the first target data to the cloud backup module.

[0089] In this process, the cloud backup module again responds to the first data backup request triggered by the host server or the user directly, creates the first snapshot identifier of the target storage volume A through the snapshot module, and since it is the second time to perform cloud backup, the first snapshot identifier is 1. The snapshot module traverses the IO operation identifier of each data block in the target storage volume and finds the first target data block A with the IO operation identifier 1. Then the snapshot module reads the first target data of the second IO operation in the first target data block A from the storage pool and uploads the first target data to the cloud backup module.

[0090] S408, the cloud backup module backs up the first target data to the cloud server, updates the second use field of the first target data block A and the second target data block B from 1 to 0 to obtain the second target use field, and notifies the data deletion service to delete the first target data in the first target data block A and the second target data block B in the storage pool, and recycles the storage space.

[0091] S410, end the cloud backup.

[0092] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method described in each embodiment of the present application.

[0093] In the embodiment, a data backup apparatus is also provided, which is applied to a system on chip and a storage server. The storage server is connected with a cloud server and a host server respectively. The storage server comprises a storage pool, and the storage pool comprises a plurality of storage volumes. The apparatus is used to implement the embodiment and the preferred implementation, and the description has been made above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, the implementation of hardware or a combination of software and hardware is also possible and is conceived.

[0094] FIG. 5 is a structural block diagram of a data backup apparatus according to an embodiment of the present application. As shown in FIG. 5, the apparatus comprises:

[0095] A first receiving module 502 is configured to receive a first data backup request sent by the host server.

[0096] A first creating module 504 is configured to create a first snapshot in a case where it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume. The target storage volume is any one of the plurality of storage volumes. The first snapshot is used to indicate that a data block in the target storage volume sets an input / output (IO) operation identifier when performing an IO operation.

[0097] A first responding module 506 is configured to respond to the first data backup request, and read first target data from a first target data block based on a first snapshot identifier of the first snapshot. The first target data block is at least one data block in the target storage volume. A target IO operation identifier of the first target data block is the same as the first snapshot identifier.

[0098] A first backup module 508 is configured to perform a data backup operation on the first target data, so as to backup the first target data to the cloud server.

[0099] In one example embodiment, the apparatus further comprises: a first mapping module configured to, in a case where it is determined that the first data backup request is for requesting to perform a data backup operation on data in the target storage volume, perform a mapping operation on the target storage volume before creating the first snapshot, to map the target storage volume to the host server, wherein the mapping operation comprises: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number, to allow the host server to access the target storage volume; a second receiving module configured to receive a first IO operation request sent by the host server, wherein the first IO operation request comprises the following information: identification information of the target storage volume, address information of the first target data block, data information to be executed by the IO operation, and an IO operation identifier; and a second responding module configured to, in response to the first IO operation request, perform the IO operation on the first target data block using the information comprised in the first IO operation request, and record the target IO operation identifier of the first target data block.

[0100] In one example embodiment, the apparatus further comprises: a first updating module configured to, after performing the IO operation on the first target data block using the information comprised in the first IO operation request and recording the target IO operation identifier of the first target data block in response to the first IO operation request, update the first usage field of the first target data block to obtain a first target usage field in a case where it is determined that the IO operation performed on the first target data block is an initial IO operation, wherein the first usage field is set before receiving the IO operation request sent by the host server, and a field value of the first usage field is used to identify whether the data in the first target data block is allowed to be deleted.

[0101] In one example embodiment, the first creating module comprises: a first sending submodule configured to send a snapshot instruction to the host server, to instruct the host server to perform the following operation: in response to the snapshot instruction, set a first snapshot identifier to a second IO operation request, and send the second IO operation request to the target storage volume; and a first responding submodule configured to, in response to the second IO operation request, determine the IO operation identifier based on the first snapshot identifier after performing a second IO operation on the first target data block, and set the IO operation identifier to the first target data block, to create the first snapshot.

[0102] In one example embodiment, the first response module comprises: a first receiving submodule configured to receive data acquisition indication information sent by the target storage volume; a second response submodule configured to, in the case that the data acquisition indication information comprises first indication information, respond to the first data backup request, find the IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the first indication information is used to indicate that only incremental data in the first target data block is allowed to be read; and a first reading submodule configured to read the incremental data from the first target data block to obtain the first target data.

[0103] In one example embodiment, the first response module further comprises: a third response submodule configured to, after the data acquisition indication information sent by the target storage volume, in the case that the data acquisition indication information comprises second indication information, respond to the first data backup request, find the IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the second indication information is used to indicate that all data included in the first target data block is allowed to be read; and a second reading submodule configured to read all data from the first target data block to obtain the first target data.

[0104] In one example embodiment, the first response module comprises: a first traversal submodule configured to, in the case that the first data backup request is a first backup request, traverse the target storage volume based on an initial snapshot identifier of the first snapshot to determine all data blocks performing IO operations in the target storage volume as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; and send a first read instruction to the first target data block; and a second receiving submodule configured to receive the first target data sent by the first target data block in response to the first read instruction.

[0105] In one example embodiment, the first response module comprises: a second traversal submodule configured to, in the case that the first data backup request is a backup request other than the first backup request, traverse the target storage volume based on the first snapshot identifier to find the IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block; send a second read instruction to the first target data block; and a third receiving submodule configured to receive the first target data sent by the first target data block in response to the second read instruction.

[0106] In one example embodiment, the first backup module comprises: a first calling submodule configured to call a data backup interface in the cloud server, wherein the data backup interface only allows transmission of the first target data read from the first target data block; and a first uploading submodule configured to upload the first target data to the cloud server through the data backup interface to backup the first target data in the cloud server.

[0107] In an example embodiment, the apparatus further comprises a second updating module configured to update the second usage field of the first target data block to obtain a second target usage field after performing the data backup operation on the first target data to backup the first target data into the cloud server, wherein the second usage field is set when the IO operation is performed on the first target data block, and the field value of the second usage field is used to identify whether the data in the first target data block is allowed to be deleted; and a first deleting module configured to delete the first target data to release the storage space of the first target data block when the field value of the second target usage field is a target field value.

[0108] In an example embodiment, the storage server further comprises a data deletion service, and the apparatus further comprises a second traversing module configured to traverse the target storage volume to find second target data from the target storage volume after performing the data backup operation on the first target data to backup the first target data into the cloud server, wherein the second target data is the data in the target storage volume which is not backed up into the cloud server; and a first calling module configured to call the data deletion service to perform the deletion operation on the second target data by the data deletion service.

[0109] According to still another embodiment of the present application, a storage server is further provided, the storage server is connected with a cloud server and a host server respectively, the storage server comprises a storage pool, and the storage pool comprises a plurality of storage volumes, wherein the storage server is configured to execute the steps in any of the method embodiments.

[0110] According to still another embodiment of the present application, a computer non-volatile readable storage medium is further provided, and the computer non-volatile readable storage medium stores a computer program, wherein the computer program is configured to execute the steps in any of the method embodiments when running.

[0111] It should be noted that each module can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the modules are located in the same processor; or each module is located in different processors in any combination.

[0112] Embodiments of the present application further provide a computer non-volatile readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the method embodiments when running.

[0113] In an example embodiment, the computer nonvolatile readable storage medium described above can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various nonvolatile readable storage media that can store computer programs.

[0114] Embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the method embodiments described above.

[0115] In an example embodiment, the electronic device described above can further include a transmission device connected to the processor and an input / output device connected to the processor.

[0116] Embodiments of the present application also provide a computer program product including a computer program, the computer program being executed by a processor to implement the steps in any of the method embodiments described above.

[0117] Embodiments of the present application also provide another computer program product including a nonvolatile computer readable storage medium, the nonvolatile computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps in any of the method embodiments described above.

[0118] Embodiments of the present application also provide a computer program including computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and executes the computer instructions, so that the computer device performs the steps in any of the method embodiments described above.

[0119] The specific examples in the embodiments can refer to the examples described in the above embodiments and example embodiments, which will not be described here again.

[0120] It is apparent that those skilled in the art can modify and / or change the above-described modules or steps of the present application with general computing devices, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices, which can be implemented by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders, or they can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0121] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data backup method characterized by, The application is applied to a storage server connected with a cloud server and a host server respectively, the storage server comprises a storage pool, the storage pool comprises a plurality of storage volumes, and the method comprises: receiving a first data backup request sent by the host server; in a case where it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume, creating a first snapshot, wherein the target storage volume is any one of the plurality of storage volumes, and the first snapshot is used to indicate that an input / output (IO) operation identifier is set for a data block in the target storage volume when an IO operation is performed; in response to the first data backup request, reading first target data from a first target data block based on a first snapshot identifier of the first snapshot, wherein the first target data block is at least one data block in the target storage volume, and a target IO operation identifier of the first target data block is the same as the first snapshot identifier; performing the data backup operation on the first target data to backup the first target data to the cloud server.

2. The method of claim 1, wherein, Before creating the first snapshot in a case where it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume, the method further comprises: performing a mapping operation on the target storage volume to map the target storage volume to the host server, wherein the mapping operation comprises: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number to allow the host server to access the target storage volume; receiving a first IO operation request sent by the host server, wherein the first IO operation request comprises the following information: identification information of the target storage volume, address information of the first target data block, data information to be executed by the IO operation, and the IO operation identifier; in response to the first IO operation request, performing the IO operation on the first target data block by using the information included in the first IO operation request, and recording the target IO operation identifier of the first target data block.

3. The method of claim 2, wherein, After performing the IO operation on the first target data block by using the information included in the first IO operation request and recording the target IO operation identifier of the first target data block in response to the first IO operation request, the method further comprises: in a case where it is determined that the IO operation performed on the first target data block is an initial IO operation, updating a first use field of the first target data block to obtain a first target use field, wherein the first use field is set before receiving the IO operation request sent by the host server, and a field value of the first use field is used to identify whether data in the first target data block is allowed to be deleted.

4. The method of claim 1, wherein, in a case where it is determined that the first data backup request is used to request to perform a data backup operation on data in a target storage volume, creating a first snapshot, comprising: sending a snapshot instruction to the host server, to instruct the host server to perform the following operation: in response to the snapshot instruction, setting the first snapshot identifier into a second IO operation request, and sending the second IO operation request to the target storage volume; in response to the second IO operation request, after performing the second IO operation in the first target data block, determining the IO operation identifier based on the first snapshot identifier, and setting the IO operation identifier into the first target data block to create the first snapshot.

5. The method of claim 1, wherein, in response to the first data backup request, reading first target data from a first target data block based on a first snapshot identifier of the first snapshot, comprising: receiving data acquisition indication information sent by the target storage volume; in a case where the data acquisition indication information includes first indication information, in response to the first data backup request, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the first indication information is used to indicate that only incremental data is allowed to be read from the first target data block; reading the incremental data from the first target data block to obtain the first target data.

6. The method of claim 5, wherein, after receiving the data acquisition indication information sent by the target storage volume, the method further comprises: in a case where the data acquisition indication information includes second indication information, in response to the first data backup request, searching for an IO operation identifier matching the first snapshot identifier from the target storage volume to determine the first target data block, wherein the second indication information is used to indicate that all data included in the first target data block is allowed to be read; reading the all data from the first target data block to obtain the first target data.

7. The method according to claim 1 or 5, characterized in that, in response to the first data backup request, reading first target data from a first target data block based on a first snapshot identifier of the first snapshot, comprising: in a case where the first data backup request is a first backup request, based on an initial snapshot identifier of the first snapshot, traversing the target storage volume, and determining all data blocks in the target storage volume that perform the IO operation as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; sending a first read instruction to the first target data block; receiving the first target data sent by the first target data block in response to the first read instruction.

8. The method of claim 1 or 5, wherein, in response to the first data backup request, reading first target data from a first target data block based on a first snapshot identifier of the first snapshot, comprising: in a case where the first data backup request is a first backup request, based on an initial snapshot identifier of the first snapshot, traversing the target storage volume, and determining all data blocks in the target storage volume that perform the IO operation as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; sending a first read instruction to the first target data block; receiving the first target data sent by the first target data block in response to the first read instruction. in response to the first data backup request, reading first target data from a first target data block based on a first snapshot identifier of the first snapshot, comprising: in a case where the first data backup request is a first backup request, based on an initial snapshot identifier of the first snapshot, traversing the target storage volume, and determining all data blocks in the target storage volume that perform the IO operation as the first target data block, wherein the initial snapshot identifier is a snapshot identifier sent to the host server for the first time; sending a first read instruction to the first target data block; receiving the first target data sent by the first target data block in response to the first read instruction.

9. The method of claim 1, wherein, The data backup operation is performed on the first target data to backup the first target data into the cloud server, including: A data backup interface in the cloud server is called, wherein the data backup interface only allows transmission of the first target data read from the first target data block; The first target data is uploaded to the cloud server through the data backup interface to backup the first target data in the cloud server.

10. The method of claim 1, wherein, After the data backup operation is performed on the first target data to backup the first target data into the cloud server, the method further includes: A second use field of the first target data block is updated to obtain a second target use field, wherein the second use field is set when the IO operation is performed on the first target data block, and a field value of the second use field is used to identify whether the data in the first target data block is allowed to be deleted; In a case where a field value of the second target use field is a target field value, the first target data is deleted to release a storage space of the first target data block.

11. The method of claim 10, wherein The updating of the second use field of the first target data block to obtain the second target use field includes: An initial value of the first use field of the first target data block is set to 2, and in a case where the host server writes data into the first target data block for the first time, a field value of the first use field is reduced by 1; In a case where the data in the first target data block is backed up into the cloud server, a field value of the second use field is reduced by 1 to obtain the second target use field.

12. The method of claim 1, wherein, The storage server further includes a data deletion service, and after the data backup operation is performed on the first target data to backup the first target data into the cloud server, the method further includes: The target storage volume is traversed to find second target data from the target storage volume, wherein the second target data is data in the target storage volume that is not backed up into the cloud server; The data deletion service is called to perform a deletion operation on the second target data through the data deletion service.

13. The method of claim 1, wherein, The IO operation identifier is used to identify the first snapshot to which the IO operation belongs.

14. The method of claim 1, wherein, The first snapshot identifier is used to describe a number of times that the target storage volume receives the first data backup request to create the first snapshot.

15. The method of claim 1, wherein, The target IO operation identifier is used to identify the first snapshot to which the IO operation of the first target data block belongs.

16. A data backup apparatus characterized by comprising: The storage server is applied to, the storage server is connected with cloud server and host server respectively, the storage server includes storage pool, the storage pool includes multiple storage volumes, and the device includes: A first receiving module is configured to receive a first data backup request sent by the host server; The first creating module is configured to create a first snapshot in a case where it is determined that the first data backup request is used to request a data backup operation on data in a target storage volume, wherein the target storage volume is any one of the plurality of storage volumes, and the first snapshot is used to indicate that an input / output (IO) operation identifier is set when a data block in the target storage volume performs an IO operation. The first responding module is configured to read first target data from a first target data block in response to the first data backup request based on a first snapshot identifier of the first snapshot, wherein the first target data block is at least one data block in the target storage volume, and a target IO operation identifier of the first target data block is the same as the first snapshot identifier. The first backup module is configured to perform the data backup operation on the first target data to backup the first target data to the cloud server.

17. The apparatus of claim 16, wherein, The apparatus further comprises: The first mapping module is configured to perform a mapping operation on the target storage volume before creating the first snapshot in a case where it is determined that the first data backup request is used to request a data backup operation on data in the target storage volume, so as to map the target storage volume to the host server, wherein the mapping operation comprises: sending a logical unit number of the target storage volume to the host server, and instructing the host server to establish a connection with the target storage volume based on the logical unit number, so as to allow the host server to access the target storage volume. The second receiving module is configured to receive a first IO operation request sent by the host server, wherein the first IO operation request comprises the following information: identification information of the target storage volume, address information of the first target data block, data information to be operated, and the IO operation identifier. The second responding module is configured to perform the IO operation on the first target data block by using the information included in the first IO operation request in response to the first IO operation request, and record the target IO operation identifier of the first target data block.

18. A storage server, comprising: The storage server is connected with a cloud server and a host server, and comprises a storage pool and a plurality of storage volumes in the storage pool, wherein the storage server is configured to perform steps of the method in any one of claims 1 to 15.

19. A computer non-volatile readable storage medium characterized in that, The computer non-volatile readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement steps of the method in any one of claims 1 to 15.

20. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor executes the computer program to implement steps of the method in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Method and device for data backup in a storage system

    CN107027326A

  • Data processing method and device, computer equipment, storage medium and program product

    CN115344428A

  • Cloud host concurrent backup method and system based on snapshot

    CN118585378A

  • Data backup method and device, storage medium and electronic equipment

    CN118819967A

  • Distributing data for a distributed filesystem across multiple cloud storage systems

    US20130110778A1