Data backup method and device, storage medium and program product

By distributing the source and target volumes of snapshots across different clusters and using bitmaps to manage data replication status, the problem of data recovery in cluster-level failures is solved, and the cluster's disaster recovery capability is improved.

CN119988101AInactive Publication Date: 2025-05-13INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510447389.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when clusters face cluster-level failures such as network and resources, data recovery cannot be achieved, resulting in poor disaster recovery capabilities.

Method used

By distributing the source volume and target volume of the snapshot on different clusters, and retaining a bitmap for the cluster where the source volume and target volume are located, it is used to identify the data replication status and the first write status, thus realizing data replication and recovery across clusters.

Benefits of technology

In the case of cluster-level failure, the target volume can realize data recovery to ensure the recovered snapshot availability; in the case where the source volume or the target volume is located, the availability of the other party will not be affected, ensuring the availability of the snapshot, and improving the disaster recovery capability of the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988101A_ABST
    Figure CN119988101A_ABST
Patent Text Reader

Abstract

The invention discloses a data backup method and device, a storage medium and a program product, and relates to the technical field of cluster storage, and the data backup method comprises the following steps: in response to a snapshot creation request, sending a snapshot generation instruction to a first cluster; the snapshot generation instruction is used for indicating the first cluster to determine a target volume and creating a first bitmap for the target volume; the first bitmap is used for identifying the copy state of the data in the target volume; creating a second bitmap for the source volume; wherein the second bitmap is used for identifying the first write-in state of the data after the snapshot is created in the source volume; executing a snapshot creation operation on the source volume to obtain a snapshot corresponding to the source volume; according to the snapshot and the second bitmap, data backup is realized, and the first bitmap and the second bitmap are updated, the source volume and the target volume of the snapshot are isolated on different clusters, when a cluster-level fault occurs, data recovery of the clusters can be realized, availability of partial functions of the clusters is ensured, and disaster recovery capability of the clusters is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cluster storage technology, and in particular to a data backup method, device, storage medium and program product. Background Art

[0002] A cluster is a system composed of multiple nodes connected by a high-speed network. These nodes work together and appear to be a single high-performance, high-availability resource. However, clusters face multi-dimensional failure risks such as node, network, and resource failures. In related technologies, data recovery can only be performed for cluster node failures. When a cluster faces cluster-level failures such as network and resource failures, data recovery of the cluster cannot be achieved, and the cluster has poor disaster recovery capabilities.

[0003] Therefore, how to improve the disaster recovery capability of the cluster is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a data backup method, device, storage medium and program product to at least solve the problem of how to improve the disaster recovery capability of a cluster in the related art.

[0005] This application provides a data backup method, including:

[0006] In response to the snapshot creation request, a snapshot generation instruction is sent to the first cluster; the snapshot generation instruction is used to instruct the first cluster to determine the target volume and create a first bitmap for the target volume; wherein the snapshot creation request is used to identify the source volume in the second cluster for which the snapshot is to be created; the target volume is used to store the data in the copied source volume; the first bitmap is used to identify the replication status of the data in the target volume;

[0007] Creating a second bitmap for the source volume; wherein the second bitmap is used to identify the first write state of data after the snapshot is created on the source volume;

[0008] Perform a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume;

[0009] According to the snapshot and the second bitmap, the data is copied to the target volume, and the first bitmap and the second bitmap are updated.

[0010] The present application also provides a data backup method, including:

[0011] receiving a snapshot generation instruction sent by the second cluster; the snapshot generation instruction is generated by the second cluster in response to the snapshot creation request; the snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created;

[0012] Determine a target volume and create a first bitmap for the target volume; the target volume is used to store the data in the copied source volume; the first bitmap is used to identify the copy status of the data in the target volume;

[0013] Among them, the snapshot creation request is also used to instruct the second cluster to create a second bitmap for the source volume, perform a snapshot creation operation for the source volume, obtain a snapshot corresponding to the source volume, copy the data to the target volume according to the snapshot and the second bitmap, and update the first bitmap and the second bitmap; the second bitmap is used to identify the first write status of the data after the snapshot is created on the source volume.

[0014] The present application also provides a data backup method, including:

[0015] The second cluster sends a snapshot generation instruction to the first cluster in response to the snapshot creation request; wherein the snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created;

[0016] The first cluster determines a target volume and creates a first bitmap for the target volume; wherein the target volume is used to store data in the replicated source volume, and the first bitmap is used to identify the replication status of the data in the target volume;

[0017] The second cluster creates a second bitmap for the source volume; wherein the second bitmap is used to identify the first write state of data after the snapshot is created on the source volume;

[0018] The second cluster performs a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume;

[0019] The second cluster copies the data to the target volume according to the snapshot and the second bitmap, and updates the first bitmap and the second bitmap.

[0020] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned data backup methods when executing the computer program.

[0021] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned data backup methods are implemented.

[0022] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned data backup methods when executed by a processor.

[0023] Through the data backup method, device, storage medium and program product of the present application, the source volume and target volume of the snapshot are distributed on different clusters. Specifically, the cluster where the source volume is located coordinates the creation of the snapshot. During the process of creating the snapshot in the cluster where the source volume is located, the cluster where the source volume is located and the cluster where the target volume is located respectively retain a bitmap. The bitmap corresponding to the cluster where the source volume is located is used to identify the first write status of the data after the source volume creates the snapshot, providing a basis for snapshot backup. The bitmap corresponding to the cluster where the target volume is located is used to identify whether the replication of the corresponding data is completed. When a cluster-level failure occurs in the cluster where the source volume is located, the target volume can realize cluster data recovery, and the existence of the first bitmap can ensure the availability of the snapshot after the cluster is recovered. When a failure occurs in the cluster where the target volume is located, the source volume is not affected, and the second bitmap can ensure the availability of the snapshot. Through the above scheme, the source volume and target volume of the snapshot are isolated on different clusters. In the face of cluster-level failures, cluster data recovery can be realized, the availability of some functions of the cluster is guaranteed, and the disaster recovery capability of the cluster is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 A schematic diagram of the architecture of a data backup system provided in an embodiment of the present application;

[0026] Figure 2 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 1 ;

[0027] Figure 3 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 2 ;

[0028] Figure 4 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 3 ;

[0029] Figure 5 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 4 ;

[0030] Figure 6 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 5 ;

[0031] Figure 7 A schematic diagram of a process for creating a snapshot provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of the structure of a data backup device provided in an embodiment of the present application;

[0033] Fig. 9 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0036] First, the technical terms in the embodiments of the present application are explained:

[0037] Data block: When a snapshot performs data synchronization, it divides the volume into data blocks of equal size. This is the smallest granularity that a snapshot can manage.

[0038] Source volume: a production volume used for business processing, for which snapshots can be created.

[0039] Target volume: The volume generated after creating a snapshot, used to store snapshot data.

[0040] Cluster: In the storage data backup function, it refers to one or more storage devices that provide storage services to users as a whole.

[0041] Bitmap: In the storage data backup function, it refers to the bitmap that records data differences. In this document, it specifically refers to the bitmap used for data synchronization between the two volume copies of the volume mirror.

[0042] Bit: Represented by one binary digit, its value can only be 0 or 1.

[0043] Copy On First Write (COW): When the source volume receives input / output (IO) from the host, it checks whether the data block has completed data synchronization. If so, the source volume or target volume data is modified directly. Otherwise, the data of the data block is copied from the source volume to the target volume, and then the source volume or target volume data is modified.

[0044] In the related technology, a snapshot is a copy of a volume at a specific point in time, which is fully available once created and activated. If the source volume data is damaged, the snapshot can be used to quickly restore it to its previous state to prevent data loss. Snapshot technology divides the volume into data blocks of equal size. After a snapshot is generated for a volume, a bitmap is created. The size of the bitmap is equal to the number of data blocks in the snapshot. Each bit in the bitmap corresponds to a data block, which is used to mark whether the data block has completed data synchronization. When the source volume receives the host IO, it checks the bitmap corresponding to the data block to determine whether the data block has completed data synchronization. If so, the source volume data is modified directly. Otherwise, the data of the data block is copied from the source volume to the target volume, and then the source volume or target volume data is modified.

[0045] Since bitmaps are usually managed within a cluster, snapshots in each storage system are currently local to the cluster. If a cluster-level failure occurs, the snapshot and the source volume will fail together, and the meaning of data backup will be lost. Currently, cross-cluster replication services mainly include disaster recovery technologies such as remote replication and active-active. Unlike snapshots, the purpose of these technologies is to ensure real-time synchronization of data in two clusters. Every time IO is processed, data needs to be written in both clusters, which will cause greater performance loss. Snapshots guarantee data at a certain point in time. When processing IO, it is only necessary to trigger a copy from the source volume to the target volume before the first write of the data block. Subsequent writes to the data block will not be affected, and the read performance is completely unaffected. Therefore, snapshots have little impact on performance, and because it is incremental storage, the storage overhead is also smaller.

[0046] In order to solve the problem in the related art that snapshots can only perform data recovery for node failures of the cluster, and cannot achieve cluster data recovery when the cluster faces cluster-level failures such as network and resource failures, and the cluster has poor disaster recovery capabilities, the embodiments of the present application provide a data backup method, device, storage medium and program product, which distribute the source volume and target volume of the snapshot on different clusters, and reserve a bitmap for the cluster where the source volume is located and the cluster where the target volume is located, respectively, to identify the snapshot backup status, thereby improving the disaster recovery capabilities of the cluster.

[0047] Furthermore, the data backup method provided in the embodiment of the present application is implemented based on snapshots, which not only retains the advantages of snapshots, but also has lower storage overhead and performance impact. It also solves the problem in related technologies that the snapshot source volume and target volume can only be in one cluster, thereby improving its disaster recovery capability.

[0048] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0049] In combination with the specific application environment architecture or the specific hardware architecture on which the execution of the data backup method depends, the specific application environment architecture or the specific hardware architecture is described here. Figure 1 , demonstratively, Figure 1 This is a schematic diagram of the architecture of the data backup system provided in the embodiment of the present application. Figure 1 In the example, the data backup system includes a first cluster 101 and a second cluster 102 .

[0050] The first cluster 101 and the second cluster 102 can achieve communication connection.

[0051] Optionally, the first cluster 101 and the second cluster 102 can be each other's source volume cluster and target volume cluster. In the embodiment of the present application, the first cluster 101 is used as the source volume cluster and the second cluster 102 is used as the target volume cluster for example.

[0052] Figure 1 The first cluster 101 and the second cluster 102 are only schematic. In a specific implementation process, there may be more feasible ways for the nodes in the first cluster 101 and the second cluster 102.

[0053] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the data backup system architecture. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0054] Figure 2 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 1 ,like Figure 2 As shown, the embodiment of the present application provides a data backup method, and the execution subject of the embodiment of the present application can be Figure 1 The second cluster 102 in the embodiment, or the processing device in the second cluster 102, the specific execution subject can be determined according to the actual application scenario. The method is described in detail as follows:

[0055] S201: In response to a snapshot creation request, a snapshot generation instruction is sent to a first cluster.

[0056] The snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created.

[0057] Optionally, the snapshot creation request includes identification information of the source volume.

[0058] Optionally, the snapshot creation request is initiated by a user through a cloud console, a management interface, or a command line tool corresponding to the second cluster.

[0059] Optionally, the snapshot creation request may also be initiated by the second cluster in response to a predefined automation task.

[0060] Optionally, the snapshot creation request may also be initiated at a specific time when the second cluster detects expansion or a fault.

[0061] Optionally, the embodiments of the present application can proactively initiate fault detection, including node, network, and resource faults. When a fault is detected, a snapshot creation request is proactively initiated to complete data backup and improve the disaster recovery capability of the cluster.

[0062] Here, the unused snapshot creation request improves the flexibility of data backup and can implement automatic backup in response to failures, thereby improving the security and reliability of the cluster.

[0063] The snapshot generation instruction is used to instruct the first cluster to determine a target volume and create a first bitmap for the target volume.

[0064] Optionally, when creating the first bitmap, all bits of the first bitmap are initialized to 0.

[0065] The first cluster here is the cluster where the target volume is located, and is used to store the data in the replicated source volume. The first bitmap is used to identify the replication status of the data in the target volume.

[0066] Optionally, the first cluster may select an existing volume or create a new volume as the target volume, and create a bitmap corresponding to the first cluster, so that the source volume and the target volume corresponding to the snapshot are located in different clusters, thereby adapting to cluster failures.

[0067] S202: Create a second bitmap for the source volume.

[0068] The second bitmap is used to identify the first write state of data after the snapshot is created on the source volume.

[0069] In a specific implementation process, the second bitmap can identify whether the snapshot is copied through COW, and the copy status of the data corresponding to the snapshot can be identified through the second bitmap of the source volume.

[0070] Specifically, when the second bitmap is created, it is initialized to all 0s.

[0071] Optionally, the creation of the second bitmap is based on data blocks of the source volume.

[0072] The operations of creating the second bitmap for the source volume and the first bitmap for the target volume can be performed simultaneously, thereby reducing the performance consumption of creating the snapshot.

[0073] S203: Execute a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume.

[0074] Specifically, confirm that the status of the source volume is normal and ensure that there is enough storage space to save the snapshot; create the snapshot; and verify whether the snapshot is successfully created.

[0075] Optionally, performing a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume includes: suspending a write operation on the source volume and sending a freeze data instruction to the first cluster; the freeze data instruction is used to instruct the first cluster to suspend a write operation on the target volume and clear a cache of the target volume; performing a cache flush operation on the source volume and receiving a freeze completion instruction sent by the first cluster; and performing a snapshot creation operation based on the source volume after the cache is flushed to obtain a snapshot corresponding to the source volume.

[0076] Among them, pausing the write operation of the source volume and pausing the write operation of the target volume, and clearing the cache of the target volume can be performed simultaneously, thereby reducing the performance consumption of creating a snapshot.

[0077] Here, in the process of creating a snapshot, the embodiment of the present application first suspends the write operation of the source volume to ensure the consistency of the snapshot data, suspends the write operation of the target volume, and clears the cache of the target volume to avoid interference with the normal writing of the snapshot data, and determines the integrity of the snapshot data. After freezing the data, the source volume cache flush operation is executed to force the data in the cache that is not persisted to the disk to be written to the disk, ensuring that the snapshot or backup is based on the eventually consistent disk data. After performing the above operations, the snapshot is created, which can meet the requirements of data consistency, ensure the completeness of the data, and meet the requirements of data recovery and disaster recovery.

[0078] Optionally, after executing a snapshot creation operation according to the source volume after the cache is flushed to obtain a snapshot corresponding to the source volume, the method further includes: resuming a write operation of the source volume.

[0079] Optionally, after executing the snapshot creation operation for the source volume and obtaining the snapshot corresponding to the source volume, it also includes: generating a snapshot creation completion instruction; sending the snapshot creation completion instruction to the first cluster; the snapshot creation completion instruction is used to instruct the first cluster to resume the write operation of the target volume.

[0080] Based on the above steps, the embodiment of the present application realizes the creation of a snapshot, and after the snapshot is created, the write operation of the source volume and the target volume is restored to ensure business continuity, release resources, reduce delays, and improve system performance.

[0081] S204: According to the snapshot and the second bitmap, copy the data to the target volume, and update the first bitmap and the second bitmap.

[0082] In an embodiment of the present application, the source volume and target volume of the snapshot are distributed on different clusters. Specifically, the cluster where the source volume is located coordinates the creation of the snapshot. During the process of creating the snapshot in the cluster where the source volume is located, the cluster where the source volume is located and the cluster where the target volume is located respectively retain a bitmap. The bitmap corresponding to the cluster where the source volume is located is used to identify the first write status of the data after the snapshot is created in the source volume, providing a basis for snapshot backup. The bitmap corresponding to the cluster where the target volume is located is used to identify whether the replication of the corresponding data is completed. When a cluster-level failure occurs in the cluster where the source volume is located, the target volume can realize cluster data recovery, and the existence of the first bitmap can ensure the availability of the snapshot after the cluster is recovered. When a failure occurs in the cluster where the target volume is located, the source volume is not affected, and the second bitmap can ensure the availability of the snapshot, and can respond to various failures to realize cluster data recovery, ensure the availability of some functions of the cluster, and improve the disaster recovery capability of the cluster.

[0083] Optionally, the embodiment of the present application can implement data backup during the IO process of the snapshot. Accordingly, Figure 3 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, the method includes:

[0084] S301: In response to a snapshot creation request, a snapshot generation instruction is sent to a first cluster.

[0085] The snapshot generation instruction is used to instruct the first cluster to determine a target volume and create a first bitmap for the target volume.

[0086] The snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created.

[0087] The target volume is used to store the data in the copied source volume; the first bitmap is used to identify the copy status of the data in the target volume.

[0088] S302: Create a second bitmap for the source volume.

[0089] The second bitmap is used to identify the first write state of data after the snapshot is created on the source volume.

[0090] S303: Execute a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume.

[0091] Among them, the implementation method of steps S301-S303 is the same as the implementation method of steps S201-S203, and will not be repeated here.

[0092] S304: In response to the source volume write request, add a write lock to the first source volume data block corresponding to the source volume write request.

[0093] S305: Determine, according to the second bitmap, whether the source volume write request is the first write request after the snapshot is created.

[0094] S306: If yes, obtain the first source volume data block according to the snapshot.

[0095] S307: Send the first source volume data block to the first cluster, so that the first cluster copies the first source volume data block to the target volume, and updates the first bitmap.

[0096] S308: Receive the replication completion instruction sent by the first cluster, and update the second bitmap.

[0097] S309: According to the source volume write request, a write operation is performed on the first source volume data block, and a write lock of the first source volume data block is released.

[0098] The embodiment of the present application is an IO processing method for writing to the source volume. When there is IO writing to the source volume, the source volume corresponding data block is locked, and the bitmap is read. If the bitmap is 1, the source volume is directly written; otherwise, if the bitmap is 0, the source volume data is read and a message is sent to the target volume; after the target volume receives the message, the source volume data is written to the target volume, the bitmap of the target volume cluster is updated to 1, and then the message is returned to the source volume. The source volume updates the bitmap to 1, and then the data is written to the source volume, and the write lock is released.

[0099] Here, the embodiment of the present application adopts the COW mechanism to process data backup. When it is necessary to modify the shared data, that is, the source volume data write, the data backup is triggered, and the source volume data is first copied to the target volume and then modified, rather than directly modifying the original data. A balance between performance and space is achieved through delayed replication, avoiding the full data copy during traditional snapshot creation, thereby greatly improving performance.

[0100] The embodiment of the present application also provides an IO processing flow for reading a source volume. Specifically, when reading source volume data, a read lock is added to the corresponding data block of the source volume, and a bitmap is not involved, and the source volume is read directly.

[0101] After executing the snapshot creation operation for the source volume and obtaining the snapshot corresponding to the source volume, the method further includes: receiving a source volume data read instruction sent by the first cluster; wherein the source volume data read instruction is generated by the first cluster in response to the target volume read request, judging whether the second source volume data block corresponding to the target volume read request has been copied according to the first bitmap, and if not, adding a read lock to the second source volume data block; obtaining the second source volume data block according to the snapshot; releasing the read lock of the second source volume data block, and sending the second source volume data block corresponding to the target volume read request to the first cluster.

[0102] The embodiment of the present application also provides an IO processing flow for reading a target volume. Specifically, when reading target volume data, the target volume bitmap is read. If the bitmap is 1, it is read directly; otherwise, a message is sent to the source volume cluster, a read lock is added to the source volume, the source volume data is read, and then the read lock is released and the data is returned to the target volume.

[0103] The target volume bitmap refers to the first bitmap, and the source volume bitmap refers to the second bitmap.

[0104] Through the target volume reading mechanism of the embodiment of the present application, the lightweight and high-availability characteristics of the snapshot are achieved through bitmap marking and on-demand access policy, while minimizing the impact on the source volume business.

[0105] Optionally, the embodiment of the present application can handle cluster-level failures. Accordingly, Figure 4 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 3 ,like Figure 4 As shown, the method includes:

[0106] S401: In response to a snapshot creation request, a snapshot generation instruction is sent to a first cluster.

[0107] The snapshot generation instruction is used to instruct the first cluster to determine a target volume and create a first bitmap for the target volume.

[0108] The snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created.

[0109] The target volume is used to store the data in the copied source volume; the first bitmap is used to identify the copy status of the data in the target volume.

[0110] S402: Create a second bitmap for the source volume.

[0111] The second bitmap is used to identify the first write state of data after the snapshot is created on the source volume.

[0112] S403: Execute a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume.

[0113] S404: According to the snapshot and the second bitmap, copy the data to the target volume, and update the first bitmap and the second bitmap.

[0114] The implementation of steps S401-S404 is the same as that of steps S201-S204, and will not be described in detail here.

[0115] S405: If a cluster-level fault occurs in the second cluster, the fault is processed for the second cluster according to the first bitmap.

[0116] Optionally, the embodiment of the present application can automatically detect faults and automatically detect fault types, including node faults, network faults, storage faults, and software faults. The network faults, storage faults, and software faults here are all cluster-level faults.

[0117] Optionally, at least one of a heartbeat mechanism, a timeout and retry mechanism, indicator monitoring and threshold alarm, fault injection and drills may be used to achieve automatic fault detection, and after a cluster-level fault is detected, fault handling is performed to ensure the reliability of data backup.

[0118] Optionally, after a cluster-level fault is detected, a fault prompt can be initiated to prompt the user that a cluster-level fault has occurred, and determine whether to perform fault processing based on the user's instructions. This processing method provides users with flexible and varied choices, improves user experience, and increases the flexibility of data backup.

[0119] Based on the fault handling under the data backup method of the embodiment of the present application, the availability of the source volume is not affected when the cluster where the target volume is located fails. Regardless of whether the source volume or the cluster where the target volume is located fails, the snapshot can be restored after the failure is recovered, thereby improving the disaster recovery capabilities of the snapshot and the cluster.

[0120] According to the first bitmap, fault processing is performed on the second cluster, including: according to the first bitmap, determining the first snapshot backup status of the first cluster; wherein the first snapshot backup status includes completed backup and incomplete backup; if the first snapshot backup status is completed backup, sending a fault recovery instruction to the first cluster; wherein the fault recovery instruction is used to instruct the first cluster to provide access services and data recovery services based on the data that has been completed backed up; if the first snapshot backup status is incomplete backup, suspending the snapshot, and sending an offline instruction to the first cluster; the offline instruction is used to instruct the first cluster to configure the target volume to an offline and unavailable state; when the fault of the second cluster is resolved, restoring the snapshot, and sending an online instruction to the first cluster; the online instruction is used to instruct the first cluster to configure the target volume to an online and available state.

[0121] In a possible implementation, the source volume cluster failure and recovery process is as follows:

[0122] If the snapshot has been copied, no processing is done and the target volume can be accessed normally and used for data recovery. Otherwise, the snapshot is suspended and the target volume is temporarily offline and unavailable. After the source volume cluster is restored, restore the snapshot and notify the cluster where the target volume is located to bring the target volume online.

[0123] Here, in the embodiment of the present application, after a cluster-level failure occurs in the cluster where the source volume is located, the replication status of the snapshot can still be determined by the bitmap corresponding to the cluster where the target volume is located. The first bitmap can ensure the normal use of the snapshot after recovery after a failure occurs in the cluster where the source volume is located, thereby improving the disaster recovery capability of the snapshot, improving the disaster recovery capability of the cluster, and ensuring the reliability of the data in the cluster.

[0124] After executing the snapshot creation operation for the source volume and obtaining the snapshot corresponding to the source volume, the method further includes: if a cluster-level failure occurs in the first cluster, judging the second snapshot backup status of the first cluster according to the first bitmap; wherein the second snapshot backup status includes completed backup and incomplete backup; if the second snapshot backup status is incomplete backup, suspending the snapshot and applying for temporary space in the second cluster; wherein the temporary space is used to copy data, and the second bitmap is also used to identify the first write status of data in the temporary space; when the failure of the first cluster is resolved, sending a data synchronization instruction to the first cluster; the data synchronization instruction is used to instruct the first cluster to synchronize data according to the temporary space and the second bitmap; restoring the snapshot, and releasing the temporary space.

[0125] In a possible implementation, the process of handling a cluster failure and its recovery where the target volume resides is as follows:

[0126] If the snapshot has been copied, no processing is done and the source volume can be read and written normally. Otherwise, the snapshot is suspended, during which a temporary space is requested locally in the cluster where the source volume is located. If data needs to be copied when writing to the source volume, the data is first copied to the temporary space. After the cluster where the target volume is located is restored, the bitmap of the cluster where the source volume is located and the data in the temporary space are synchronized to the cluster where the target volume is located. After the synchronization is complete, the snapshot is restored to release the temporary space.

[0127] Here, in the embodiment of the present application, after a cluster-level failure occurs in the cluster where the target volume is located, a temporary space can be applied for the snapshot, thereby ensuring data consistency after the cluster where the target volume is located recovers from the failure, and improving the disaster recovery capability of the snapshot and the cluster.

[0128] Figure 5 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 4 ,like Figure 5 As shown, the embodiment of the present application provides a data backup method, and the execution subject of the embodiment of the present application can be Figure 1The first cluster 101 in the embodiment, or the processing device in the first cluster 101, the specific execution subject can be determined according to the actual application scenario. The method is described in detail as follows:

[0129] S501: Receive a snapshot generation instruction sent by a second cluster.

[0130] The snapshot generation instruction is generated by the second cluster in response to a snapshot creation request; the snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created.

[0131] S502: Determine a target volume, and create a first bitmap for the target volume.

[0132] The target volume is used to store the data in the copied source volume; the first bitmap is used to identify the copy status of the data in the target volume.

[0133] Among them, the snapshot creation request is also used to instruct the second cluster to create a second bitmap for the source volume, perform a snapshot creation operation for the source volume, obtain a snapshot corresponding to the source volume, copy the data to the target volume according to the snapshot and the second bitmap, and update the first bitmap and the second bitmap; the second bitmap is used to identify the first write status of the data after the snapshot is created on the source volume.

[0134] Determining the target volume includes: determining the data volume of the source volume; determining the data volume requirement based on the data volume of the source volume; generating the target volume based on the data volume requirement, or obtaining the capacity of multiple volumes in the first cluster, and generating the target volume from the multiple volumes based on the capacity and data volume requirement of the multiple volumes.

[0135] The embodiment of the present application can first determine the data volume of the source volume, and based on the data volume of the source volume, select an existing volume or create a new volume as the target volume, which can meet the data volume requirements, ensure normal data backup, meet the requirements of data integrity and consistency, and has strong flexibility.

[0136] In the embodiment of the present application, the processing method of the cluster where the target volume is located is corresponding to the processing method of the cluster where the source volume is located, and various optional methods of the data backup method of the cluster where the source volume is located can also be applied to the embodiment of the present application.

[0137] In the embodiment of the present application, the target volume and source volume are respectively set in different clusters, and a bitmap is reserved for the cluster where the source volume is located and the cluster where the target volume is located. The setting of the two bitmaps can ensure that even if a cluster-level failure occurs, the snapshot can still be used normally after the failure is recovered, thereby improving the disaster recovery capability of the snapshot.

[0138] Figure 6 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 5 ,like Figure 6As shown, the embodiment of the present application provides a data backup method, and the execution subject of the embodiment of the present application can be Figure 1 The specific execution subject of the data backup system can be determined according to the actual application scenario. The method is described in detail as follows:

[0139] S601: The second cluster sends a snapshot generation instruction to the first cluster in response to a snapshot creation request.

[0140] The snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created.

[0141] The first cluster determines a target volume and creates a first bitmap for the target volume.

[0142] The target volume is used to store the data in the copied source volume, and the first bitmap is used to identify the copy status of the data in the target volume.

[0143] S602: The second cluster creates a second bitmap for the source volume.

[0144] The second bitmap is used to identify the first write state of data after the snapshot is created on the source volume.

[0145] S603: The second cluster performs a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume.

[0146] S604: The second cluster copies the data to the target volume according to the snapshot and the second bitmap, and updates the first bitmap and the second bitmap.

[0147] Each step in the embodiments of the present application can be implemented by using the optional methods in the above embodiments, which will not be described in detail here.

[0148] The inter-cluster snapshot proposed in the embodiment of the present application can support the source and target volumes of the snapshot to be distributed in different clusters, including the creation of snapshots, IO processing, and the processing flow after the source or target volume fails, as well as the recovery flow. Compared with the traditional intra-cluster snapshot, it not only retains the advantages of snapshots, but also has lower storage overhead and performance impact, and solves the problem that the source and target volumes in the current snapshot technology can only be in one cluster, thereby improving its disaster recovery capability.

[0149] Optionally, Figure 7 A schematic diagram of a process flow of a snapshot creation method provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the snapshot creation method in the embodiment of the present application includes:

[0150] S701: In response to a request to create a snapshot, the cluster where the source volume is located notifies the cluster where the target volume is located to generate a snapshot.

[0151] S702: The cluster where the source volume is located creates a second bitmap and initializes all bits to zero.

[0152] S703: The cluster where the target volume is located creates or selects the target volume, and creates a first bitmap, all of which are initialized to zero.

[0153] S704: The cluster where the source volume is located freezes the input and output of the cluster where the source volume is located.

[0154] S705: The cluster where the source volume is located notifies the cluster where the target volume is located to freeze the input and output of the cluster where the target volume is located.

[0155] S706: The cluster where the target volume is located freezes the input and output of the cluster where the target volume is located, and clears the target volume cache.

[0156] S707. Refresh the source volume cache in the cluster where the source volume is located.

[0157] S708. The cluster where the source volume is located creates a snapshot and notifies the cluster where the target volume is located that the snapshot creation is complete.

[0158] S709: The cluster where the source volume is located resumes input and output.

[0159] S710. The cluster where the target volume is located resumes input and output.

[0160] Compared with traditional in-cluster snapshots, the snapshots created by the embodiments of the present application not only retain the advantages of snapshots, but also have lower storage overhead and less performance impact. They also solve the problem in current snapshot technology that source volumes and target volumes can only be in one cluster, thereby improving the disaster recovery capability of snapshots.

[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0162] Figure 8 This is a schematic diagram of the structure of the data backup device provided in the embodiment of the present application. Figure 8 As shown, the embodiment of the present application further provides a data backup device, which is applied to the second cluster, and includes a first notification module 801, a first bitmap creation module 802, a snapshot creation module 803, and a data backup module 804. It should be noted here that the division of the first notification module 801, the first bitmap creation module 802, the snapshot creation module 803, and the data backup module 804 is only a division of logical functions, and the two can be physically integrated or independent.

[0163] The first notification module is used to send a snapshot generation instruction to the first cluster in response to the snapshot creation request; the snapshot generation instruction is used to instruct the first cluster to determine the target volume and create a first bitmap for the target volume; the snapshot creation request is used to identify the source volume in the second cluster for which the snapshot is to be created; the target volume is used to store data in the copied source volume; the first bitmap is used to identify the replication status of the data in the target volume;

[0164] A first bitmap creation module is used to create a second bitmap for the source volume; wherein the second bitmap is used to identify the first write state of data after the snapshot is created in the source volume;

[0165] A snapshot creation module, used to perform a snapshot creation operation for a source volume to obtain a snapshot corresponding to the source volume;

[0166] The data backup module is used to copy the data to the target volume according to the snapshot and the second bitmap, and to update the first bitmap and the second bitmap.

[0167] Optionally, the snapshot creation module is specifically used to: suspend the write operation of the source volume and send a freeze data instruction to the first cluster; the freeze data instruction is used to instruct the first cluster to suspend the write operation of the target volume and clear the cache of the target volume; perform a flush cache operation on the source volume, and receive a freeze completion instruction sent by the first cluster; perform a snapshot creation operation based on the source volume after the cache is flushed, and obtain a snapshot corresponding to the source volume.

[0168] Optionally, after the snapshot creation module is used to perform a snapshot creation operation according to the source volume after the cache is flushed to obtain a snapshot corresponding to the source volume, the apparatus further includes a recovery module used to: recover the write operation of the source volume.

[0169] Optionally, after the snapshot creation module performs a snapshot creation operation for the source volume and obtains a snapshot corresponding to the source volume, the above-mentioned device also includes a second notification module, which is used to: generate a snapshot creation completion instruction; send the snapshot creation completion instruction to the first cluster; the snapshot creation completion instruction is used to instruct the first cluster to resume the write operation of the target volume.

[0170] Optionally, the data backup module is specifically used to: respond to a source volume write request, add a write lock to a first source volume data block corresponding to the source volume write request; determine, based on the second bitmap, whether the source volume write request is the first write request after the snapshot is created; if so, obtain the first source volume data block based on the snapshot; send the first source volume data block to the first cluster so that the first cluster copies the first source volume data block to the target volume and updates the first bitmap; receive a copy completion instruction sent by the first cluster and update the second bitmap; perform a write operation on the first source volume data block according to the source volume write request, and release the write lock of the first source volume data block.

[0171] Optionally, after the snapshot creation module is used to perform a snapshot creation operation for the source volume and obtain a snapshot corresponding to the source volume, the above-mentioned device also includes a reading processing module, which is used to: receive a source volume data reading instruction sent by the first cluster; wherein the source volume data reading instruction is generated by the first cluster in response to a target volume read request, judging whether the second source volume data block corresponding to the target volume read request has been copied according to the first bitmap, and if not, adding a read lock to the second source volume data block; obtaining the second source volume data block according to the snapshot; releasing the read lock of the second source volume data block, and sending the second source volume data block corresponding to the target volume read request to the first cluster.

[0172] Optionally, after the snapshot creation module performs a snapshot creation operation for the source volume and obtains a snapshot corresponding to the source volume, the apparatus further includes a fault processing module for: if a cluster-level fault occurs in the second cluster, performing fault processing on the second cluster according to the first bitmap.

[0173] Optionally, the fault handling module is specifically used to: determine the first snapshot backup status of the first cluster according to the first bitmap; wherein the first snapshot backup status includes completed backup and incomplete backup; if the first snapshot backup status is completed backup, send a fault recovery instruction to the first cluster; wherein the fault recovery instruction is used to instruct the first cluster to provide access services and data recovery services based on the completed backed up data; if the first snapshot backup status is incomplete backup, suspend the snapshot and send an offline instruction to the first cluster; the offline instruction is used to instruct the first cluster to configure the target volume to an offline and unavailable state; when the fault of the second cluster is resolved, restore the snapshot and send an online instruction to the first cluster; the online instruction is used to instruct the first cluster to configure the target volume to an online and available state.

[0174] Optionally, after the snapshot creation module performs a snapshot creation operation for the source volume and obtains a snapshot corresponding to the source volume, the above-mentioned device also includes a fault response module, which is used to: if a cluster-level fault occurs in the first cluster, then according to the first bitmap, determine the second snapshot backup status of the first cluster; wherein the second snapshot backup status includes completed backup and incomplete backup; if the second snapshot backup status is incomplete backup, suspend the snapshot and apply for temporary space in the second cluster; wherein the temporary space is used to copy data, and the second bitmap is also used to identify the first write status of data in the temporary space; when the fault of the first cluster is resolved, send a data synchronization instruction to the first cluster; the data synchronization instruction is used to instruct the first cluster to synchronize data according to the temporary space and the second bitmap; restore the snapshot, and release the temporary space.

[0175] The embodiment of the present application also provides a data backup device, applied to the second cluster, including a receiving module and a determining module. It should be noted that the division of the receiving module and the determining module is only a division of logical functions, and the two can be integrated or independent physically.

[0176] The receiving module is used to receive a snapshot generation instruction sent by the second cluster; the snapshot generation instruction is generated by the second cluster in response to the snapshot creation request; the snapshot creation request is used to identify the source volume in the second cluster to create the snapshot;

[0177] A determination module is used to determine a target volume and create a first bitmap for the target volume; the target volume is used to store the data in the copied source volume; the first bitmap is used to identify the copy status of the data in the target volume;

[0178] Among them, the snapshot creation request is also used to instruct the second cluster to create a second bitmap for the source volume, perform a snapshot creation operation for the source volume, obtain a snapshot corresponding to the source volume, copy the data to the target volume according to the snapshot and the second bitmap, and update the first bitmap and the second bitmap; the second bitmap is used to identify the first write status of the data after the snapshot is created on the source volume.

[0179] Optionally, the determination module is specifically used to: determine the data volume of the source volume; determine the data volume requirement based on the data volume of the source volume; generate a target volume based on the data volume requirement, or obtain the capacity of multiple volumes in the first cluster, and determine the target volume from the multiple volumes based on the capacity and data volume requirement of the multiple volumes.

[0180] The description of the features in the embodiment corresponding to the data backup device can refer to the relevant description of the embodiment corresponding to the data backup method, which will not be repeated here.

[0181] Fig. 9 This is a schematic diagram of the structure of the electronic device provided in this application. Fig. 9 As shown, the electronic device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 90 further includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus.

[0182] In the specific implementation process, at least one processor 901 executes the computer execution instructions stored in the memory 902, so that at least one processor 901 executes the above-mentioned data backup method embodiment.

[0183] The specific implementation process of the processor 901 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0184] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0185] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0186] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0187] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above data backup method embodiments when running.

[0188] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0189] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above data backup method embodiments are implemented.

[0190] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned data backup method embodiments are implemented.

[0191] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0192] The above is a detailed introduction to a data backup method, device, storage medium and program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A data backup method, characterized in that: include: In response to the snapshot creation request, sending a snapshot generation instruction to the first cluster; The snapshot generation instruction is used to instruct the first cluster to determine a target volume and create a first bitmap for the target volume; wherein the snapshot creation request is used to identify a source volume in the second cluster to which a snapshot is to be created; the target volume is used to store data in the replicated source volume; and the first bitmap is used to identify a replication status of the data in the target volume; Creating a second bitmap for the source volume; wherein the second bitmap is used to identify the first write state of the data after the snapshot is created on the source volume; Performing a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume; According to the snapshot and the second bitmap, the data is copied to the target volume, and the first bitmap and the second bitmap are updated.

2. The method according to claim 1, characterized in that The performing a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume includes: suspending the write operation of the source volume and sending a freeze data instruction to the first cluster; the freeze data instruction is used to instruct the first cluster to suspend the write operation of the target volume and clear the cache of the target volume; Performing a cache flush operation on the source volume, and receiving a freeze completion instruction sent by the first cluster; A snapshot creation operation is performed according to the source volume after the cache is flushed, to obtain a snapshot corresponding to the source volume.

3. The method according to claim 2, characterized in that After performing a snapshot creation operation according to the source volume after the cache is flushed to obtain a snapshot corresponding to the source volume, the method further includes: Resume the write operation of the source volume.

4. The method according to claim 3, characterized in that After performing the snapshot creation operation for the source volume to obtain the snapshot corresponding to the source volume, the method further includes: Generate snapshot creation completion instruction; The snapshot creation completion instruction is sent to the first cluster; the snapshot creation completion instruction is used to instruct the first cluster to resume the write operation of the target volume.

5. The method according to any one of claims 1 to 4, characterized in that: The step of copying the data to the target volume according to the snapshot and the second bitmap, and updating the first bitmap and the second bitmap, comprises: In response to a source volume write request, adding a write lock to a first source volume data block corresponding to the source volume write request; determining, according to the second bitmap, whether the source volume write request is a first write request after the snapshot is created; If yes, obtaining the first source volume data block according to the snapshot; Sending the first source volume data block to the first cluster so that the first cluster copies the first source volume data block to the target volume and updates the first bitmap; receiving a replication completion instruction sent by the first cluster, and updating the second bitmap; According to the source volume write request, a write operation is performed on the first source volume data block, and a write lock of the first source volume data block is released.

6. The method according to any one of claims 1 to 4, characterized in that: After performing the snapshot creation operation for the source volume to obtain the snapshot corresponding to the source volume, the method further includes: receiving a source volume data read instruction sent by the first cluster; wherein the source volume data read instruction is generated by the first cluster in response to a target volume read request, judging whether the second source volume data block corresponding to the target volume read request has been copied according to the first bitmap, and if not, generating the source volume data read instruction; Adding a read lock to the second source volume data block; According to the snapshot, obtaining a second source volume data block; The read lock of the second source volume data block is released, and the second source volume data block corresponding to the target volume read request is sent to the first cluster.

7. The method according to any one of claims 1 to 4, characterized in that: After performing the snapshot creation operation for the source volume to obtain the snapshot corresponding to the source volume, the method further includes: If a cluster-level fault occurs in the second cluster, the fault is processed for the second cluster according to the first bitmap.

8. The method according to claim 7, characterized in that The performing fault processing on the second cluster according to the first bitmap includes: According to the first bitmap, determining a first snapshot backup state of the first cluster; wherein the first snapshot backup state includes completed backup and incomplete backup; If the first snapshot backup state is that the backup has been completed, sending a fault recovery instruction to the first cluster; wherein the fault recovery instruction is used to instruct the first cluster to provide access services and data recovery services based on the data that has been backed up; If the backup status of the first snapshot is incomplete backup, the snapshot is suspended and an offline instruction is sent to the first cluster; the offline instruction is used to instruct the first cluster to configure the target volume to be offline and unavailable; when the fault of the second cluster is resolved, the snapshot is restored and an online instruction is sent to the first cluster; the online instruction is used to instruct the first cluster to configure the target volume to be online and available.

9. The method according to any one of claims 1 to 4, characterized in that: After performing the snapshot creation operation for the source volume to obtain the snapshot corresponding to the source volume, the method further includes: If a cluster-level failure occurs in the first cluster, a second snapshot backup state of the first cluster is determined according to the first bitmap; wherein the second snapshot backup state includes a completed backup and an incomplete backup; If the backup status of the second snapshot is incomplete backup, suspend the snapshot and apply for temporary space in the second cluster; wherein the temporary space is used to copy data, and the second bitmap is also used to identify the first write status of the data in the temporary space; When the failure of the first cluster is resolved, sending a data synchronization instruction to the first cluster; the data synchronization instruction is used to instruct the first cluster to synchronize data according to the temporary space and the second bitmap; The snapshot is restored, and the temporary space is released.

10. A data backup method, characterized in that: include: receiving a snapshot generation instruction sent by the second cluster; The snapshot generation instruction is generated by the second cluster in response to the snapshot creation request; The snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created; Determine a target volume, and create a first bitmap for the target volume; the target volume is used to store the copied data in the source volume; the first bitmap is used to identify the copy status of the data in the target volume; The snapshot creation request is also used to instruct the second cluster to create a second bitmap for the source volume, perform a snapshot creation operation for the source volume, obtain a snapshot corresponding to the source volume, copy the data to the target volume according to the snapshot and the second bitmap, and update the first bitmap and the second bitmap; the second bitmap is used to identify the first write status of the data after the snapshot is created in the source volume.

11. The method according to claim 10, characterized in that The determining of the target volume includes: Determining the data volume of the source volume; Determining data volume requirements according to the data volume of the source volume; A target volume is generated according to the data volume requirement, or the capacities of multiple volumes in the first cluster are obtained, and the target volume is generated from the multiple volumes according to the capacities of the multiple volumes and the data volume requirement.

12. A data backup method, characterized in that: include: The second cluster sends a snapshot generation instruction to the first cluster in response to the snapshot creation request; wherein the snapshot creation request is used to identify a source volume in the second cluster for which a snapshot is to be created; The first cluster determines a target volume and creates a first bitmap for the target volume; wherein the target volume is used to store the replicated data in the source volume, and the first bitmap is used to identify the replication status of the data in the target volume; The second cluster creates a second bitmap for the source volume; wherein the second bitmap is used to identify the first write state of the data after the snapshot is created on the source volume; The second cluster performs a snapshot creation operation for the source volume to obtain a snapshot corresponding to the source volume; The second cluster copies the data to the target volume according to the snapshot and the second bitmap, and updates the first bitmap and the second bitmap.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of any one of claims 1 to 9, or implement the steps of claim 10 or 11, or implement the method of claim 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any one of claims 1 to 9, or implements the steps of claim 10 or 11, or implements the method of claim 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of any one of claims 1 to 9, or implements the steps of claim 10 or 11, or implements the steps of the method according to claim 12.

Citation Information

Patent Citations

  • Snapshot method and device of storage system, electronic equipment and readable storage medium

    CN113868023A

  • Snapshot backup method and device

    CN118245282A

  • Remote data backup method and device

    CN118838756A

  • Snapshot backup method

    CN1704903A

  • Data backup method and device, and computer-readable storage medium

    WO2020207010A1

Cited By

  • Data migration method and device, electronic equipment, storage medium and program product

    CN120763145A

  • Data backup method, device, equipment, medium and computer program product

    CN121210216A

  • Data backup method, apparatus, device, medium, and computer program product

    CN121210216B