Data disaster recovery method, device, architecture, electronic equipment and readable storage medium

By employing a bidirectional bucket replication data synchronization method in the data disaster recovery architecture, the problem of high data disaster recovery costs is solved, achieving low-cost and highly practical data disaster recovery, and ensuring the security and flexibility of stored data.

CN118945176BActive Publication Date: 2025-11-21JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411123873.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-11-21
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In existing technologies, data disaster recovery methods are costly and impractical, making it difficult to achieve low-cost, highly practical data disaster recovery to ensure the security of stored data.

Method used

The data disaster recovery architecture adopts a bidirectional bucket replication relationship, including a first storage system and a second storage system. By switching between asynchronous and synchronous modes, data synchronization and backup between the two are achieved, avoiding the problem of double writing of data, and providing data status recording and failure handling mechanisms.

Benefits of technology

It achieves low-cost and highly practical data disaster recovery, ensures the security of stored data, provides flexible synchronization mode selection, avoids data loss and conflicts, and reduces implementation complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945176B_ABST
    Figure CN118945176B_ABST
Patent Text Reader

Abstract

The application discloses a data disaster recovery method and device, an architecture, electronic equipment, a computer readable storage medium and a computer program product. The data disaster recovery architecture is provided with a first storage system and a second storage system, which are mutual disaster recovery storage systems and are provided with a bidirectional bucket replication relationship. The data disaster recovery method is applied to the first storage system and comprises the following steps: receiving a target storage object and saving the target storage object to a local disk; determining a current working mode of the data disaster recovery architecture; if the working mode is an asynchronous mode, feeding back storage success information to a sending end of the target storage object and performing an operation of synchronizing the target storage object to the second storage system; and if the working mode is a synchronous mode, performing the operation of synchronizing the target storage object to the second storage system until a synchronization success message fed back by the second storage system is received, and then feeding back the storage success information to the sending end. The technical scheme can realize low-cost and high-practicality data disaster recovery and effectively guarantee storage data safety.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of storage, in particular to a data disaster recovery method, and further relates to a data disaster recovery device, architecture, electronic equipment, computer readable storage medium and computer program product. BACKGROUND

[0002] Disaster recovery is an important requirement scenario in cloud computing scenarios, especially large data center cloud scenarios and cloud scenarios carrying core business. Disaster recovery refers to a process of business recovery after a disaster occurs. A set or multiple sets of the same IT system are established in a remote place, and can be switched between each other or provide services at the same time, so as to maximize the continuity of business. When an unexpected failure occurs in a business system, the entire business system can be recovered in a remote place, so that the business can continue to provide services to the outside. In the current data disaster recovery implementation process, most of them are deployed in a single site, do not have disaster recovery capability, and then purchase a third-party storage system to realize the disaster recovery function. Obviously, this implementation method has high cost and poor practicability.

[0003] Therefore, how to realize low-cost and high-practicability data disaster recovery to effectively ensure the safety of stored data is a problem to be solved by those skilled in the art. SUMMARY

[0004] The purpose of the present application is to provide a data disaster recovery method which can realize low-cost and high-practicability data disaster recovery and effectively ensure the safety of stored data. Another purpose of the present application is to provide a data disaster recovery device, architecture, electronic equipment, computer readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.

[0005] In a first aspect, the present application provides a data disaster recovery method applied to a first storage system deployed in a data disaster recovery architecture, wherein the data disaster recovery architecture further deploys a second storage system, the first storage system and the second storage system are mutual disaster recovery storage systems, and a bidirectional bucket replication relationship is preset between the first storage system and the second storage system, and the method comprises the following steps:

[0006] When a target storage object is received, the target storage object is saved to a local disk;

[0007] A current working mode of the data disaster recovery architecture is determined, wherein the working mode of the data disaster recovery architecture comprises an asynchronous mode and a synchronous mode;

[0008] If the current working mode is the asynchronous mode, storage success information is fed back to a sending end of the target storage object, and an operation of synchronizing the target storage object to the second storage system is performed;

[0009] If the current working mode is the synchronization mode, an operation of synchronizing the target storage object to the second storage system is performed until a synchronization success message fed back by the second storage system is received, and the storage success message is fed back to a sending end of the target storage object.

[0010] Optionally, when the target storage object is received, the target storage object is saved to the local disk, including:

[0011] When the target storage object is received, data verification is performed on the target storage object to determine whether the target storage object has data block loss;

[0012] When the target storage object has data block loss, remaining data blocks and parity blocks in the target storage object are determined, and data restoration is performed on the target storage object by using the remaining data blocks and the parity blocks to obtain an original storage object, and the original storage object is saved to the local disk;

[0013] When the target storage object does not have data block loss, the target storage object is saved to the local disk.

[0014] Optionally, when the target storage object is received, the target storage object is saved to the local disk, including:

[0015] When the target storage object is received, encryption processing is performed on the target storage object by using a preset encryption algorithm to obtain an encrypted storage object;

[0016] Compression processing is performed on the encrypted storage object by using a preset compression algorithm to obtain a compressed storage object;

[0017] The compressed storage object is saved to the local disk.

[0018] Optionally, the operation of synchronizing the target storage object to the second storage system includes:

[0019] The target storage object is sent to a bucket replication queue;

[0020] According to an arrangement order of each target storage object in the bucket replication queue, each target storage object is synchronized to the second storage system.

[0021] Optionally, before each target storage object is synchronized to the second storage system according to the arrangement order of each target storage object in the bucket replication queue, the method further includes:

[0022] For each target storage object in the bucket replication queue, record the data state of the target storage object as a waiting state;

[0023] Accordingly, after synchronizing each target storage object in the bucket replication queue to the second storage system according to the arrangement order of the target storage objects, the method further comprises:

[0024] For each target storage object synchronized to the second storage system, determine whether a synchronization success message corresponding to the target storage object is received from the second storage system;

[0025] When the synchronization success message corresponding to the target storage object is received, record the data state of the target storage object as a completed state;

[0026] When the synchronization success message corresponding to the target storage object is not received, record the data state of the target storage object as a failed state;

[0027] The second storage system is further configured to, after saving a target storage object received by synchronization to a local disk, record the data state of the target storage object as a backup completed state, and notify the first storage system.

[0028] Optionally, the data disaster recovery method further comprises:

[0029] Poll all failed storage objects in the first storage system with a preset time interval, wherein the data state of each failed storage object is the failed state;

[0030] Resend each failed storage object to the bucket replication queue, so as to re-synchronize each failed storage object.

[0031] In a second aspect, the present application further provides a data disaster recovery architecture, wherein a first storage system and a second storage system are deployed in the data disaster recovery architecture, the first storage system and the second storage system are backup storage systems for each other, and a bidirectional bucket replication relationship is preset between the first storage system and the second storage system;

[0032] The first storage system is configured to save the target storage object to a local disk when the target storage object is received, determine a current working mode of the data disaster recovery architecture, the working mode of the data disaster recovery architecture including an asynchronous mode and a synchronous mode, feed back storage success information to a sending end of the target storage object if the current working mode is the asynchronous mode, and perform an operation of synchronizing the target storage object to the second storage system; and perform an operation of synchronizing the target storage object to the second storage system if the current working mode is the synchronous mode, until a synchronization success message fed back by the second storage system is received, and the storage success information is fed back to the sending end of the target storage object.

[0033] In a third aspect, the present application further provides a data disaster recovery apparatus applied to a first storage system deployed in a data disaster recovery architecture, the data disaster recovery architecture further deploying a second storage system, the first storage system and the second storage system being mutual disaster recovery storage systems, and a bidirectional bucket replication relationship being preset between the first storage system and the second storage system, the apparatus comprising:

[0034] A saving module configured to save the target storage object to a local disk when the target storage object is received;

[0035] A determining module configured to determine a current working mode of the data disaster recovery architecture, the working mode of the data disaster recovery architecture including an asynchronous mode and a synchronous mode;

[0036] A first synchronizing module configured to feed back storage success information to a sending end of the target storage object if the current working mode is the asynchronous mode, and perform an operation of synchronizing the target storage object to the second storage system;

[0037] A second synchronizing module configured to perform an operation of synchronizing the target storage object to the second storage system if the current working mode is the synchronous mode, until a synchronization success message fed back by the second storage system is received, and the storage success information is fed back to the sending end of the target storage object.

[0038] In a fourth aspect, the present application further discloses an electronic device, comprising:

[0039] A memory configured to store a computer program;

[0040] A processor configured to perform steps of any one of the data disaster recovery methods as described above when the computer program is executed.

[0041] In a fifth aspect, the present application also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the steps of any of the data disaster recovery methods.

[0042] In a sixth aspect, the present application also discloses a computer program product, comprising computer programs / instructions, which are executed by a processor to implement the steps of any of the data disaster recovery methods.

[0043] The present application provides a data disaster recovery method, which is applied to a first storage system deployed in a data disaster recovery architecture, wherein a second storage system is also deployed in the data disaster recovery architecture, the first storage system and the second storage system are backup storage systems, and a bidirectional bucket replication relationship is preset between the first storage system and the second storage system, and the method comprises the following steps: when a target storage object is received, the target storage object is saved to a local disk; a current working mode of the data disaster recovery architecture is determined, wherein the working mode of the data disaster recovery architecture comprises an asynchronous mode and a synchronous mode; if the current working mode is the asynchronous mode, storage success information is fed back to a sending end of the target storage object, and an operation of synchronizing the target storage object to the second storage system is performed; if the current working mode is the synchronous mode, the operation of synchronizing the target storage object to the second storage system is performed until a synchronization success message fed back by the second storage system is received, and the storage success information is fed back to the sending end of the target storage object.

[0044] By using the technical scheme provided in the present application, a data disaster recovery architecture is constructed, which comprises a first storage system and a second storage system, the two systems are backup disaster recovery systems, and a bidirectional bucket replication relationship is preset between the two systems, so that real-time data synchronization can be realized, and only one storage system (the first storage system or the second storage system) provides storage services at the same time, thereby avoiding the problem of double data writing. In the data disaster recovery architecture, after the first storage system receives a target storage object and saves the target storage object to a disk, the target storage object can be further synchronized to the second storage system, so as to realize data disaster recovery backup. It can be seen that this implementation does not need to purchase a third-party storage system, has low implementation cost, is simple and easy to implement, has high practicability, and effectively guarantees the safety of storage data. In addition, the data disaster recovery architecture in the present application provides two different data synchronization modes, so that a user can customize the working mode according to actual needs, thereby further improving the practicability.

[0045] In one embodiment of the present application, by establishing a bucket replication queue between the first storage system and the second storage system, the synchronization operation on each target storage object is performed according to the receiving order, which can effectively guarantee the data storage accuracy while effectively avoiding the data conflict problem.

[0046] The data disaster recovery device, the architecture, the electronic device, the computer readable storage medium and the computer program product provided by the present application also have the above technical effects, which will not be described herein again. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the prior art and the technical solutions in the embodiments of the present application, the drawings used in the description of the prior art and the embodiments of the present application will be briefly introduced. Of course, the drawings described below in the embodiments of the present application are only a part of the embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor, and the obtained drawings also belong to the protection scope of the present application.

[0048] Figure 1 A structural schematic diagram of a data disaster recovery architecture provided by the present application;

[0049] Figure 2 A flowchart of a data disaster recovery method provided by the present application;

[0050] Figure 3 A structural schematic diagram of another data disaster recovery architecture provided by the present application;

[0051] Figure 4 A flowchart of a pre-configuration data disaster recovery architecture method provided by the present application;

[0052] Figure 5 A principle schematic diagram of a data disaster recovery method provided by the present application;

[0053] Figure 6 A structural schematic diagram of a data disaster recovery device provided by the present application;

[0054] Figure 7 A structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0055] The core of the present application is to provide a data disaster recovery method, which can realize low-cost and high-practicality data disaster recovery and effectively guarantee the storage data security. Another core of the present application is to provide a data disaster recovery device, architecture, electronic device, computer readable storage medium and computer program product, which all have the above beneficial effects.

[0056] In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0057] The embodiments of the present application provide a data disaster recovery method.

[0058] First, please refer to Figure 1 , Figure 1 is a structural schematic diagram of a data disaster recovery architecture provided by the present application, the data disaster recovery architecture is deployed with a first storage system and a second storage system, which are mutual disaster recovery storage systems, that is, when the first storage system serves as a master storage system, the second storage system serves as a disaster recovery backup storage system, when the second storage system serves as a master storage system, the first storage system serves as a disaster recovery backup storage system, and a bidirectional bucket replication relationship is preset between the two, which can be used to realize real-time data synchronization and ensure that only one storage system (the first storage system or the second storage system) provides storage services at the same time. The data disaster recovery method provided by the embodiments of the present application is implemented based on the data disaster recovery architecture shown in Figure 1 .

[0059] It should be noted that the specific types of the first storage system and the second storage system do not affect the implementation of the technical solutions, and can be deployed by a technician according to actual needs, for example, in a possible implementation, to realize the disaster recovery backup of container metadata, the first storage system and the second storage system can both be object storage systems, that is, the to-be-stored data of the two is container metadata. Further, the object storage system can be minio, which is a high-performance, distributed object storage system specially designed for cloud-native applications. It realizes all the functions required for object storage in a simple and easy-to-use way, and performs well in performance.

[0060] Further, please refer to Figure 2 , Figure 2 is a flowchart of a data disaster recovery method provided by the present application, the data disaster recovery method is applied to the first storage system in the container management application architecture shown in Figure 1 , of course, it can also be applied to the second storage system, because the first storage system and the second storage system are mutual disaster recovery backup systems, and the implementation process can include the following S101-S104:

[0061] S101: When a target storage object is received, save the target storage object to a local disk.

[0062] The step is to achieve the receiving and saving of the target storage object. Specifically, a local disk is deployed in each of the first storage system and the second storage system, for storing data to be stored in the corresponding storage system, and the target storage object is the data to be stored received by the first storage system. For the first storage system, after receiving the target storage object, the target storage object can be first saved to the local disk, and then the target storage object is synchronized to the second storage system by continuing to perform subsequent S102-S104, to achieve disaster backup of the target storage object. Of course, after obtaining the target storage object, the second storage system also saves it to the local disk.

[0063] In an embodiment of the present application, when the target storage object is received, the target storage object is saved to the local disk, which can include:

[0064] When the target storage object is received, data verification is performed on the target storage object to determine whether the target storage object has data block loss;

[0065] When the target storage object has data block loss, the remaining data blocks and parity blocks in the target storage object are determined, and data restoration is performed on the target storage object using the remaining data blocks and parity blocks to obtain an original storage object, and the original storage object is saved to the local disk;

[0066] When the target storage object does not have data block loss, the target storage object is saved to the local disk.

[0067] The data disaster recovery method provided by the embodiments of the present application can further achieve more accurate data storage. Specifically, after receiving the target storage object, before saving it to the local disk, integrity verification can be performed on the target storage object to determine whether the target storage object is complete, that is, whether it has data block loss problems; further, when it is determined that the target storage object has data block loss, data block restoration can be performed using the remaining data blocks and parity blocks to obtain a complete original storage object, which is then saved to the local disk; when it is determined that the target storage object does not have data block loss, it can be directly saved to the local disk. In the implementation process, the integrity verification and data recovery operation of the target storage object can be implemented based on the Velero tool (an open source tool that can safely backup and restore, perform disaster recovery and migration).

[0068] It can be seen that the embodiments of the present application first perform integrity verification and data recovery before saving the target storage object, which guarantees the integrity of the stored data and achieves more accurate data storage.

[0069] In an embodiment of the present application, the saving of the target storage object to the local disk when the target storage object is received can comprise:

[0070] When the target storage object is received, the target storage object is encrypted by using a preset encryption algorithm to obtain an encrypted storage object;

[0071] The encrypted storage object is compressed by using a preset compression algorithm to obtain a compressed storage object;

[0072] The compressed storage object is saved to the local disk.

[0073] The data disaster recovery method provided by the embodiments of the present application can further realize more secure and effective data storage. Specifically, the encryption algorithm and the compression algorithm can be preset for calling. Then, after the target storage object is received, before it is saved to the local disk, the target storage object can be sequentially encrypted and compressed by using the preset encryption algorithm and the preset compression algorithm respectively to obtain a final compressed storage object, which is then saved to the local disk. It can be understood that the encryption processing can effectively ensure the security of the stored data, and the compression processing can effectively save the storage of the stored data on the storage resources.

[0074] S102: Determine the current working mode of the data disaster recovery architecture. The working mode of the data disaster recovery architecture includes an asynchronous mode and a synchronous mode.

[0075] This step aims to determine the current working mode of the data disaster recovery architecture, so as to perform different synchronization operations on the target storage object according to different working modes. Specifically, the working mode of the data disaster recovery architecture can include an asynchronous mode and a synchronous mode. The asynchronous mode refers to that after the storage of the target storage object in the local disk is completed, a storage response is directly sent to the sending end of the target storage data, i.e., the storage success information is fed back to the sending end of the target storage data, without waiting for the synchronization of the target storage object to be completed. The synchronous mode refers to that after the storage of the target storage object in the local disk is completed, the storage response is sent to the sending end of the target storage data, i.e., the storage success information is fed back to the sending end of the target storage data, only after the synchronization of the target storage object is completed. In addition, the setting of the working mode of the data disaster recovery architecture can be customized by the technical personnel according to the actual scene requirements.

[0076] S103: If the current working mode is the asynchronous mode, the storage success information is fed back to the sending end of the target storage object, and the operation of synchronizing the target storage object to the second storage system is performed.

[0077] The step is designed to complete the target storage object synchronization operation in the asynchronous mode. Specifically, when it is determined that the current working mode of the data disaster recovery architecture is the asynchronous mode, the storage success information can be directly fed back to the sending end of the target storage object, and at the same time, the operation of synchronizing the target storage object to the second storage system is performed, that is, the feedback of the storage success message to the sending end of the target storage object and the synchronization of the target storage object to the second storage system can be performed at the same time, or the feedback of the storage success message to the sending end of the target storage object is performed first, and the synchronization of the target storage object to the second storage system is performed later.

[0078] S104: If the current working mode is the synchronous mode, the operation of synchronizing the target storage object to the second storage system is performed until the synchronization success message fed back by the second storage system is received, and the storage success message is fed back to the sending end of the target storage object.

[0079] The step is designed to complete the target storage object synchronization operation in the synchronous mode. Specifically, when it is determined that the current working mode of the data disaster recovery architecture is the synchronous mode, the operation of synchronizing the target storage object to the second storage system can be directly performed, and the system enters a waiting state until the synchronization operation is completed, wherein the target storage object synchronization operation is determined to be completed in that the first storage system receives the synchronization success message fed back by the second storage system, and then feeds back the storage success message to the sending end of the target storage object.

[0080] It can be seen that the data disaster recovery method provided by the embodiment of the present application constructs a data disaster recovery architecture, which includes a first storage system and a second storage system, which are backup disaster recovery systems for each other and are provided with a bidirectional bucket replication relationship, can be used to realize real-time data synchronization and ensure that only one storage system (the first storage system or the second storage system) provides storage services at the same time, avoiding the problem of double data writing. In the data disaster recovery architecture, after the first storage system receives the target storage object saved to the disk itself, the target storage object can be further synchronized to the second storage system to realize data disaster recovery backup. It can be seen that this implementation does not require the purchase of an additional third-party storage system, has low implementation cost, is simple and easy to implement, has high practicability, and effectively ensures the safety of the stored data. In addition, the data disaster recovery architecture in the technical solution provides two different data synchronization modes, so that the user can customize the working mode according to the actual needs, further improving the practicability.

[0081] On the basis of the above embodiments:

[0082] In an embodiment of the present application, the operation of synchronizing the target storage object to the second storage system can include:

[0083] sending the target storage object to the bucket replication queue;

[0084] synchronizing each target storage object to the second storage system according to the arrangement order of each target storage object in the bucket replication queue.

[0085] The embodiment of the present application provides an implementation method of synchronizing a target storage object to a second storage system. It can be understood that in an actual business scenario, the data volume of the generated data to be stored is generally huge, that is, the number of target storage objects to be synchronized in the actual business scenario is not unique. In order to ensure that the data synchronization operation can be carried out in an orderly manner and avoid data synchronization conflict problems, a bucket replication queue can be established between the first storage system and the second storage system, which is used to store each target storage object to be synchronized between the two. It can be understood that the bucket replication queue follows the first-in-first-out principle. After the target storage object is sent to the bucket replication queue according to the receiving order, each target storage object can be synchronized to the second storage system in turn according to the arrangement order of each target storage object in the bucket replication queue. Obviously, the receiving order of the target storage object is the arrangement order of each target storage object in the bucket replication queue, that is, the synchronization order of each target storage object.

[0086] It can be seen that the data disaster recovery method provided by the embodiment of the present application establishes a bucket replication queue between the first storage system and the second storage system, realizes the synchronization operation of each target storage object according to the receiving order, and effectively avoids the data conflict problem while ensuring the accuracy of data storage.

[0087] In an embodiment of the present application, before the above-mentioned synchronizing each target storage object to the second storage system according to the arrangement order of each target storage object in the bucket replication queue, the method can further include:

[0088] for each target storage object in the bucket replication queue, recording the data state of the target storage object as a waiting state;

[0089] Correspondingly, after the above-mentioned synchronizing each target storage object to the second storage system according to the arrangement order of each target storage object in the bucket replication queue, the method can further include:

[0090] for each target storage object synchronized to the second storage system, judging whether a synchronization success message corresponding to the target storage object is received from the second storage system;

[0091] when the synchronization success message corresponding to the target storage object is received, recording the data state of the target storage object as a completed state;

[0092] When the synchronization success message corresponding to the target storage object is not received, the data state of the target storage object is recorded as a failure state;

[0093] The second storage system is further configured to record the data state of the target storage object as a backup completion state after saving the target storage object received by the synchronization to the local disk, and notify the first storage system.

[0094] The data disaster recovery method provided by the embodiments of the present application further realizes real-time recording of the data state of the target storage object, which helps the technical personnel to determine the real-time state of each target storage object by querying the data state record. Specifically, for each target storage object, after the target storage object is sent to the bucket replication queue, the data state of the target storage object can be recorded as a waiting state; after the target storage object is synchronized to the second storage system, the data state of the target storage object can be recorded according to the synchronization result, that is, when the synchronization of the target storage object is successful, the data state of the target storage object is recorded as a completion state, and when the synchronization of the target storage object fails, the data state of the target storage object is recorded as a failure state; and when the synchronization of the target storage object is successful, the second storage system further records the data state of the target storage object as a backup completion state after saving the target storage object to the local disk, and notifies the first storage system. Thus, the real-time recording of the data state of each target storage object is realized.

[0095] In an embodiment of the present application, the data disaster recovery method can further include:

[0096] polling all the failed storage objects in the first storage system in a preset time interval, the data state of the failed storage objects being a failure state;

[0097] re-sending each failed storage object to the bucket replication queue so as to re-synchronize each failed storage object.

[0098] The data disaster recovery method provided by the embodiments of the present application further realizes post-processing of the disaster recovery failed data, and avoids the problem of inaccurate synchronization caused by the loss of synchronized data. Specifically, the first storage system can poll data in a certain time interval to determine all target storage objects in a failure state, that is, the above-mentioned failed storage objects, that is, all target storage objects whose synchronization fails are polled, and the failed storage objects are re-sent to the bucket replication queue to re-execute the data synchronization operation. As can be seen, the embodiments of the present application can repeatedly execute the data synchronization operation for the target storage objects whose synchronization fails, which can effectively ensure the success rate of data synchronization, and thus avoid the problem of inaccurate data synchronization caused by the loss of synchronized data.

[0099] In an embodiment of the present application, the data disaster recovery method can further include:

[0100] For each failed storage object in the failed state, record the number of synchronization failures of the failed storage object;

[0101] Determine whether the number of synchronization failures of the failed storage object reaches a preset number;

[0102] If the number of synchronization failures of the failed storage object reaches the preset number, generate an alarm event.

[0103] The data disaster recovery method provided by the embodiments of the present application can further implement the alarm function of the failed synchronization data. It can be understood that, in addition to occasional reasons (such as communication abnormality between the first storage system and the second storage system), the data synchronization failure can also exist due to inevitable reasons (such as storage damage of the synchronization data itself). Obviously, the former can synchronize the failed storage object to the second storage system by re-executing the synchronization operation, but the latter will still have the problem of data synchronization failure no matter how many times the synchronization operation is repeated. Therefore, the maximum number of times of repeating the synchronization operation, i.e., the preset number, can be set, and the number of synchronization failures of each failed storage object can be counted. If the number of synchronization failures reaches the preset number, the corresponding alarm event can be generated. It should be noted that the specific value of the preset number and the specific alarm mode of the alarm event do not affect the implementation of the technical solution, which can be set by the technical personnel according to the actual scene requirement, and the present application does not limit the same.

[0104] On the basis of the above embodiments, the embodiments of the present application take the container metadata as an example to provide another data disaster recovery method, and the implementation process of the data disaster recovery method is as follows:

[0105] First, refer to Figure 3 and Figure 4 , Figure 3 is a structure diagram of another data disaster recovery architecture provided by the present application, Figure 4 is a flow diagram of a pre-configuration data disaster recovery architecture method provided by the present application.

[0106] As Figure 3As shown, the production site and the disaster recovery site each deploy a set of minio, and a bidirectional bucket replication relationship is set between the two minios, and only one minio provides services at the same time, and the data double-write problem does not occur. When the production site is normal, the veleros of the two sites are connected and access the production site minio, and data synchronization is performed between the two minios; when the production site fails, the veleros of the two sites are connected and access the disaster recovery site minio, and reverse data synchronization is performed between the two minios. That is: when protection is enabled, the production site velero generates backup data -> uploads to the production site minio -> pulls to the disaster recovery site minio; when the fault is switched, the disaster recovery site velero generates backup data -> uploads to the disaster recovery site minio -> pulls to the production site minio.

[0107] As shown in Figure 4 After the data disaster recovery architecture is built, it can be configured as follows:

[0108] 1. Deploy minio cluster in master and standby sites;

[0109] 2. Create a default disaster recovery bucket and set the name as disasterrecovery;

[0110] 3. Establish a bidirectional bucket replication relationship between the storage buckets of the master and standby sites;

[0111] 4. Set the object storage address as http: / / cr.ncloudos.com:26000, and select the storage bucket with the name disasterrecovery;

[0112] 5. Create a protection group, select the object storage and storage bucket set in step 4;

[0113] 6. Enable protection, fault switching, and back switching of the protection group.

[0114] Further, please refer to Figure 5 , Figure 5 for the principle diagram of a data disaster recovery method provided by the present application, and the implementation process is as follows:

[0115] 1. The client uploads object A and object B (target storage objects) to site 1;

[0116] 2. Object A and object B are respectively processed for erasure correction, encryption, compression, etc., which can be implemented by calling the corresponding algorithm;

[0117] 3. Site 1 stores object A and object B into site 1 disk (disk), and determines the current working mode: if it is asynchronous mode, it directly returns to the client success; if it is synchronous mode, it needs to wait for the object synchronization to be completed;

[0118] 4. Object A and object B are transmitted into the bucket replication queue according to the receiving order, and the object state is set to pending (waiting state);

[0119] 5. Object A is synchronized to site 2 for successful replication, and the object state is changed to completed (completed state);

[0120] 6. Site 2 changes the object state of object A synchronized to replica (replication success state), and writes it to the site 2 disk;

[0121] 7. Object B is synchronized to site 2 for failed replication, and the object state is changed to failed (failed state);

[0122] 8. The failure scanning task scans object B in the replication failure state at a frequency of 1 minute, and retransmits object B into the bucket replication queue;

[0123] 9. An alarm event can be generated after the bucket replication fails, and the alarm information can be notified to the relevant personnel through email, short message and the like, so as to timely process the problem.

[0124] As can be seen, the technical scheme provided by the embodiment of the application has the following advantages:

[0125] 1. High availability: through the distributed storage and site replication function of minio, the high availability of container metadata is realized;

[0126] 2. Data redundancy: the container metadata is subjected to erasure correction processing, realizing data redundancy and fault tolerance;

[0127] 3. High flexibility: supporting multi-node and multi-data center disaster recovery architecture, facilitating extension and upgrade;

[0128] 4. High ease of use: minio adopts a simple and easy-to-use design, reducing the complexity of implementation and maintenance;

[0129] 5. High security: through real-time synchronization and automatic fault detection, the risk of data loss is greatly reduced;

[0130] 6. Fast response: the disaster recovery module can quickly respond to minimize service interruption time.

[0131] The embodiment of the application provides a data disaster recovery architecture.

[0132] As shown in Figure 1 The data disaster recovery architecture is deployed with a first storage system and a second storage system, the first storage system and the second storage system are backup storage systems, and a bidirectional bucket replication relationship is preset between the first storage system and the second storage system;

[0133] The first storage system is configured to save the target storage object to a local disk when the target storage object is received, determine a current working mode of the data disaster recovery architecture, the working mode of the data disaster recovery architecture including an asynchronous mode and a synchronous mode, feed back storage success information to a sending end of the target storage object if the current working mode is the asynchronous mode, and perform an operation of synchronizing the target storage object to the second storage system; and perform the operation of synchronizing the target storage object to the second storage system if the current working mode is the synchronous mode, until a synchronization success message fed back by the second storage system is received, and the storage success information is fed back to the sending end of the target storage object.

[0134] It can be seen that the data disaster recovery architecture provided by the embodiment of the present application can build a data disaster recovery architecture, the data disaster recovery architecture including a first storage system and a second storage system, which are backup disaster recovery systems for each other and are provided with a bidirectional bucket replication relationship, and can be used to realize real-time data synchronization and ensure that only one storage system (the first storage system or the second storage system) provides storage services to the outside at the same time, thereby avoiding the data double-writing problem. In the data disaster recovery architecture, the first storage system can further synchronize the target storage object to the second storage system after saving the target storage object to the local disk, so as to realize data disaster recovery backup. It can be seen that this implementation does not need to purchase an additional third-party storage system, has low implementation cost, is simple and easy to implement, has high practicability, and effectively ensures the safety of the stored data. In addition, the data disaster recovery architecture in the technical solution provides two different data synchronization modes, so that a user can customize the working mode according to actual needs, thereby further improving the practicability.

[0135] For the architecture provided by the embodiment of the present application, please refer to the above method embodiment, which will not be described here.

[0136] The embodiment of the present application provides a data disaster recovery device.

[0137] Please refer to Figure 6 , Figure 6 FIG. 1 is a structural schematic diagram of a data disaster recovery device provided by the present application, which is applied to a first storage system deployed in a data disaster recovery architecture, the data disaster recovery architecture further deploying a second storage system, the first storage system and the second storage system being backup storage systems for each other, and the first storage system and the second storage system being provided with a bidirectional bucket replication relationship, the device can include:

[0138] The saving module 1 is configured to save the target storage object to a local disk when the target storage object is received;

[0139] The determining module 2 is configured to determine a current working mode of the data disaster recovery architecture, and the working mode of the data disaster recovery architecture includes an asynchronous mode and a synchronous mode.

[0140] The first synchronizing module 3 is configured to, if the current working mode is the asynchronous mode, feed back the storage success information to a sending end of the target storage object, and perform an operation of synchronizing the target storage object to the second storage system.

[0141] The second synchronizing module 4 is configured to, if the current working mode is the synchronous mode, perform the operation of synchronizing the target storage object to the second storage system until a synchronization success message fed back by the second storage system is received, and feed back the storage success information to the sending end of the target storage object.

[0142] It can be seen that the data disaster recovery device provided by the embodiment of the present application constructs a data disaster recovery architecture, the data disaster recovery architecture includes a first storage system and a second storage system, the two systems are backup disaster recovery systems for each other, and a bidirectional bucket replication relationship is preset, which can be used to realize real-time data synchronization and ensure that only one storage system (the first storage system or the second storage system) provides storage services at the same time, thereby avoiding the data double-writing problem. In the data disaster recovery architecture, after the first storage system receives the target storage object saved to the local disk, the target storage object can be further synchronized to the second storage system to realize data disaster recovery backup. It can be seen that this implementation does not need to purchase an additional third-party storage system, has low implementation cost, is simple and easy to implement, has high practicability, and effectively ensures the safety of the stored data. In addition, the data disaster recovery architecture in the technical solution provides two different data synchronization modes, so that the user can customize the working mode according to actual needs, thereby further improving the practicability.

[0143] In an embodiment of the present application, the saving module 1 can be specifically configured to, when the target storage object is received, perform data verification on the target storage object to determine whether the target storage object has data block loss; when the target storage object has data block loss, determine remaining data blocks and parity blocks in the target storage object, and restore the target storage object by using the remaining data blocks and the parity blocks to obtain an original storage object, and save the original storage object to the local disk; and when the target storage object does not have data block loss, save the target storage object to the local disk.

[0144] In an embodiment of the present application, the saving module 1 can be specifically configured to, when the target storage object is received, perform encryption processing on the target storage object by using a preset encryption algorithm to obtain an encrypted storage object; perform compression processing on the encrypted storage object by using a preset compression algorithm to obtain a compressed storage object; and save the compressed storage object to the local disk.

[0145] In an embodiment of the present application, the first synchronization module 3 can comprise:

[0146] a sending unit configured to send the target storage object to the bucket replication queue;

[0147] a synchronization unit configured to synchronize each target storage object to the second storage system according to the arrangement order of each target storage object in the bucket replication queue.

[0148] In an embodiment of the present application, the first synchronization module 3 can further comprise a recording unit configured to record the data state of each target storage object in the bucket replication queue as a waiting state before synchronizing each target storage object to the second storage system according to the arrangement order of each target storage object in the bucket replication queue; and configured to determine whether a synchronization success message corresponding to each target storage object is received from the second storage system after synchronizing each target storage object to the second storage system; and configured to record the data state of each target storage object as a completed state when the synchronization success message corresponding to the target storage object is received; and configured to record the data state of each target storage object as a failed state when the synchronization success message corresponding to the target storage object is not received; wherein the second storage system is further configured to record the data state of each target storage object as a backup completed state after saving the target storage object to the local disk, and notify the first storage system.

[0149] In an embodiment of the present application, the first synchronization module 3 can further comprise a re-synchronization unit configured to poll all failed storage objects with the data state as the failed state in the first storage system according to a preset time interval; and configured to resend each failed storage object to the bucket replication queue to re-synchronize each failed storage object.

[0150] The device provided in the embodiments of the present application is described above with reference to the method embodiments, and thus the description is not repeated here.

[0151] An electronic device is provided in the embodiments of the present application.

[0152] Please refer to Figure 7 , Figure 7 A structure diagram of an electronic device provided in the present application, which can comprise:

[0153] a memory 11 configured to store a computer program;

[0154] a processor 10 configured to execute the computer program to implement the steps of any one of the data disaster recovery methods described above.

[0155] AsFigure 7 As shown in FIG. 1, which is a schematic diagram of a constituent structure of an electronic device, the electronic device can include a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 can communicate with each other through the communication bus 13.

[0156] In embodiments of the present application, the processor 10 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.

[0157] The processor 10 can invoke a program stored in the memory 11. Specifically, the processor 10 can perform operations in embodiments of the data disaster recovery method.

[0158] The memory 11 can store one or more programs. The programs can include program codes including computer operation instructions. In embodiments of the present application, the memory 11 stores at least programs for implementing the following functions:

[0159] When the target storage object is received, the target storage object is saved to a local disk;

[0160] A current working mode of the data disaster recovery architecture is determined. The working mode of the data disaster recovery architecture includes an asynchronous mode and a synchronous mode.

[0161] If the current working mode is the asynchronous mode, a storage success message is fed back to a sending end of the target storage object, and an operation of synchronizing the target storage object to a second storage system is performed.

[0162] If the current working mode is the synchronous mode, an operation of synchronizing the target storage object to the second storage system is performed until a synchronization success message fed back by the second storage system is received, and a storage success message is fed back to the sending end of the target storage object.

[0163] In a possible implementation, the memory 11 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function, etc. The data storage area can store data created in a use process.

[0164] In addition, the memory 11 can include a high-speed random access memory and can also include a non-volatile memory, for example, at least one disk storage device or other volatile solid-state storage device.

[0165] The communication interface 12 can be an interface of a communication module, used for connecting with other devices or systems.

[0166] Of course, it should be noted that,Figure 7 The structures shown do not constitute a limitation on the electronic device in the embodiments of the present application, and in actual applications, the electronic device can include more or fewer components than those shown, or some components can be combined. Figure 7

[0167] The embodiments of the present application provide a computer readable storage medium.

[0168] The computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the data disaster recovery methods described above.

[0169] The computer readable storage medium can be any available medium that can be used to store computer programs that can be used by computers, or a data storage device such as a server, data center, etc. integrated with one or more available media sets, for example, it can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk) and various media that can store computer program codes.

[0170] For the computer readable storage medium provided by the embodiments of the present application, please refer to the above method embodiments, which will not be repeated here.

[0171] The embodiments of the present application provide a computer program product.

[0172] The computer program product provided by the embodiments of the present application includes computer programs / instructions, which can implement the steps of any one of the data disaster recovery methods described above when executed by a processor.

[0173] Specifically, in the above embodiments, all or part of them can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of them can be realized in the form of a computer program product.

[0174] The computer program product can include one or more computer programs / instructions, which when loaded and executed on a computer, can generate all or part of the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another, for example, computer instructions can be transferred from one website, computer, server or data center to another through wired (such as coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (such as infrared, wireless, microwave, etc.) mode.

[0175] ​The computer program product provided in the embodiments of the present application is introduced in the above method embodiments, and the present application will not be repeated here.

[0176] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0177] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0178] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs or any other form of storage medium known in the art.

[0179] The above describes the technical solutions provided by the present application in detail. The principles and implementation modes of the present application are described by applying specific examples. The above description of the embodiments is only to help understand the method and its core idea of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A data disaster recovery method, characterized in that, The method is applied to a first storage system deployed in a data disaster recovery architecture, wherein the data disaster recovery architecture also deploys a second storage system, the first storage system and the second storage system serve as disaster recovery storage systems for each other, and a bidirectional bucket replication relationship is pre-defined between the first storage system and the second storage system. When the target storage object is received, the target storage object is saved to the local disk; Determine the current operating mode of the data disaster recovery architecture, which includes asynchronous mode and synchronous mode; If the current working mode is the asynchronous mode, then the storage success information will be fed back to the sending end of the target storage object, and the operation of synchronizing the target storage object to the second storage system will be performed; If the current working mode is the synchronization mode, then the operation of synchronizing the target storage object to the second storage system is performed until a synchronization success message is received from the second storage system, and the storage success message is sent back to the sending end of the target storage object.

2. The data disaster recovery method according to claim 1, characterized in that, When the target storage object is received, saving the target storage object to the local disk includes: When the target storage object is received, data verification is performed on the target storage object to determine whether there are any missing data blocks in the target storage object; When data blocks of the target storage object are lost, the remaining data blocks and parity blocks in the target storage object are determined, and the data of the target storage object is restored using the remaining data blocks and the parity blocks to obtain the original storage object. The original storage object is then saved to the local disk. When no data blocks of the target storage object are missing, the target storage object is saved to the local disk.

3. The data disaster recovery method according to claim 1, characterized in that, When the target storage object is received, saving the target storage object to the local disk includes: When the target storage object is received, the target storage object is encrypted using a preset encryption algorithm to obtain an encrypted storage object; The encrypted storage object is compressed using a preset compression algorithm to obtain a compressed storage object; Save the compressed storage object to the local disk.

4. The data disaster recovery method according to any one of claims 1 to 3, characterized in that, Performing the operation of synchronizing the target storage object to the second storage system includes: Send the target storage object to the bucket replication queue; According to the order in which the target storage objects are arranged in the bucket replication queue, each target storage object is synchronized to the second storage system.

5. The data disaster recovery method according to claim 4, characterized in that, Before synchronizing each target storage object to the second storage system according to the order of the target storage objects in the bucket replication queue, the method further includes: For each target storage object in the bucket replication queue, the data status of the target storage object is recorded as a waiting state; Accordingly, after synchronizing each target storage object to the second storage system according to the order of the target storage objects in the bucket replication queue, the process further includes: For each target storage object synchronized to the second storage system, determine whether a synchronization success message corresponding to the target storage object has been received from the second storage system. When a synchronization success message corresponding to the target storage object is received, the data status of the target storage object is recorded as a completed state; When no synchronization success message is received for the target storage object, the data status of the target storage object is recorded as a failure status; The second storage system is further configured to, after saving the synchronously received target storage object to the local disk, record the data status of the target storage object as a backup complete status and notify the first storage system.

6. The data disaster recovery method according to claim 5, characterized in that, Also includes: Poll all failed storage objects in the first storage system whose data status is in the failed state at preset time intervals; Each of the failed storage objects is resent to the bucket replication queue in order to resynchronize each of the failed storage objects.

7. A data disaster recovery architecture, characterized in that, The data disaster recovery architecture deploys a first storage system and a second storage system, which serve as disaster recovery storage systems for each other, and a bidirectional bucket replication relationship is pre-defined between the first storage system and the second storage system. The first storage system is configured to, upon receiving a target storage object, save the target storage object to a local disk; determine the current operating mode of the data disaster recovery architecture, which includes asynchronous mode and synchronous mode; if the current operating mode is asynchronous mode, send a storage success message to the sender of the target storage object and perform an operation to synchronize the target storage object to the second storage system; if the current operating mode is synchronous mode, perform an operation to synchronize the target storage object to the second storage system until a synchronization success message is received from the second storage system, and then send the storage success message back to the sender of the target storage object.

8. A data disaster recovery device, characterized in that, An apparatus for use in a first storage system deployed in a data disaster recovery architecture, wherein the data disaster recovery architecture also deploys a second storage system, the first storage system and the second storage system serve as disaster recovery storage systems for each other, and a bidirectional bucket replication relationship is pre-defined between the first storage system and the second storage system; the apparatus includes: A save module is used to save the target storage object to the local disk when the target storage object is received; The determination module is used to determine the current working mode of the data disaster recovery architecture, which includes asynchronous mode and synchronous mode. The first synchronization module is used to send storage success information to the sending end of the target storage object if the current working mode is the asynchronous mode, and to perform the operation of synchronizing the target storage object to the second storage system. The second synchronization module is used to perform the operation of synchronizing the target storage object to the second storage system if the current working mode is the synchronization mode, until a synchronization success message is received from the second storage system, and then the storage success message is sent back to the sending end of the target storage object.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data disaster recovery method as described in any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data disaster recovery method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Disaster recovery storage system

    CN102710752A

  • Establishing method and device of IPSAN disaster tolerant system

    CN107391294A