Data disaster recovery method and device, computer device, and storage medium
By configuring a disaster recovery data center for the cloud unified management platform's data center and performing data synchronization and switching, the problem of cross-resource pool disaster recovery and backup was solved, achieving efficient data backup and switching, and improving user experience and operational flexibility.
Patent Information
- Application Number
- CN202410693562.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing cloud unified management platforms struggle to achieve effective disaster recovery and backup across resource pools in scenarios such as resource pool upgrades or hardware failures. In particular, metadata cannot be effectively backed up in containerized environments, leading to recovery failures.
By configuring a disaster recovery data center for the primary data center and synchronizing business data and metadata during this period, the cloud management platform enables cross-data center data backup and switching, sets tag parameters to avoid request conflicts, and controls the activation status of data centers to avoid data inconsistency.
It enables cross-data center data backup and switching, reduces user business interruption, improves user experience and operational flexibility, and ensures data consistency between data centers.
Smart Images

Figure CN118612047B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to data disaster recovery methods, apparatus, computer equipment, and storage media. Background Technology
[0002] A Cloud Management Platform (CMP) is a software tool for managing multiple cloud resources. CMP provides business systems with unified management capabilities, including accounts, costs, security, and resources. Specifically, CMP mainly includes core functional modules such as unified resource management, operations management, and intelligent operations and maintenance.
[0003] However, the design goal of the CMP platform is to provide a unified cloud resource management platform, rather than directly handling all advanced cloud-related functions. When business systems are undergoing resource pool upgrades, hardware failures, or other scenarios, how to perform disaster recovery backups across resource pools is a critical user need that urgently needs to be addressed. Summary of the Invention
[0004] In view of this, the present invention provides a data disaster recovery method, apparatus, computer equipment, and storage medium to solve the problem of how to perform data disaster recovery backup across resource pools.
[0005] In a first aspect, the present invention provides a data disaster recovery method, the method comprising:
[0006] In response to the configuration command, configure a second data center for the first data center, and the second data center serves as a disaster recovery data center for the first data center;
[0007] Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and the metadata corresponding to the business data.
[0008] Based on the synchronization results, a data switch is performed between the first data center and the second data center.
[0009] In one alternative implementation, in response to a configuration command, configuring a second data center for a first data center includes:
[0010] Set a first identifier for the first data center and determine a second identifier associated with the first identifier;
[0011] Locate the second data center indicated by the configuration command and set a second identifier for the second data center.
[0012] In this embodiment of the invention, a disaster recovery data center can be set up for the primary data center by setting tag parameters, thereby providing a technical basis for data disaster recovery based on the primary data center and the disaster recovery data center, so as to avoid request conflicts caused by triggering disaster recovery switching operations in the primary and backup environments at the same time, which would lead to disaster recovery failure.
[0013] In one alternative implementation, the method further includes:
[0014] After receiving a processing instruction for business data, determine whether the data center indicated by the processing instruction is in the target state;
[0015] If so, in response to processing instructions, process business data;
[0016] If not, the processing instruction will not be executed.
[0017] In this embodiment of the invention, the activation status of the data center can be set to determine whether a user has permission to operate the business data therein, so as to avoid the same business data being operated on in multiple data centers, which would lead to inconsistency of business data in the primary and backup data centers and thus cause data conflicts.
[0018] In one optional implementation, the data to be synchronized includes: full data and incremental data;
[0019] Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first and second data centers, including:
[0020] Set the activation status for the first data center and the second data center respectively, and determine the target data center with the activation status as the target status and the non-target data center with the activation status as the non-target status in the first data center and the second data center respectively;
[0021] Clear databases in non-target data centers using a cloud management platform;
[0022] Acquire all data from the target data center and synchronize the data to a database in a non-target data center using a cloud management platform;
[0023] Based on the preset query interval, query the new data in the target data center to obtain the incremental data corresponding to the full data.
[0024] Incremental data is synchronized to databases in non-target data centers using a cloud management platform.
[0025] In this embodiment of the invention, data synchronization can be performed based on the activation status of the data center, so as to realize data disaster recovery through the CMP configured in the primary and backup data centers, thereby providing a technical basis for subsequent disaster recovery switching between data centers.
[0026] In one optional implementation, data synchronization is performed between the cloud management platforms of the first data center and the second data center based on the acquired data to be synchronized, including:
[0027] When synchronizing the data to be synchronized from the first data center to the second data center, stop the data services associated with the business data in the second data center;
[0028] Metadata is synchronized to the memo storage device corresponding to the cloud management platform in the second data center, and business data is stored in the database of the second data center.
[0029] In this embodiment of the invention, corresponding processing mechanisms can be set for metadata and business data respectively. Here, a memo storage device for storing metadata can be connected to the first data center and the second data center, and the memo storage device can be managed by CMP. The business data is stored in the database of the data center, thereby realizing cross-data center data backup.
[0030] In one optional implementation, based on the synchronization result of data synchronization, a data switch is performed between the first data center and the second data center, including:
[0031] When a disaster recovery switchover command is detected, the third data center to be switched over is determined between the first data center and the second data center;
[0032] When the third data center is in the target state, enable the data services associated with the data to be synchronized in the third data center;
[0033] Based on data services, metadata is deployed in the data container of the third data center to enable the third data center according to the deployment results.
[0034] In this embodiment of the invention, cross-data center data backup can be achieved based on the CMP, thereby enabling data switching between the first data center and the corresponding disaster recovery data center during disaster recovery switching, thus ensuring the user experience.
[0035] In one alternative implementation, the method further includes:
[0036] In response to the deconfiguration command, the enabled status of the first data center and the second data center is set to the target status, and the primary / standby relationship between the first data center and the second data center is terminated so that data synchronization is no longer performed.
[0037] In this embodiment of the invention, the primary / backup relationship between the first data center and the second data center can be freely established or terminated in response to the actual usage needs of service system administrators, thereby improving the degree of freedom in data disaster recovery operations in this invention.
[0038] Secondly, the present invention provides a data disaster recovery device, the device comprising:
[0039] The configuration module is used to configure a second data center for the first data center in response to configuration commands. The second data center serves as a disaster recovery data center for the first data center.
[0040] The synchronization module is used to synchronize data between the first data center and the second data center based on the acquired data to be synchronized. The data to be synchronized includes business data and the metadata corresponding to the business data.
[0041] The switching module is used to perform data switching between the first data center and the second data center based on the synchronization results of the data synchronization.
[0042] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data disaster recovery method described in the first aspect or any corresponding embodiment thereof.
[0043] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the data disaster recovery method described in the first aspect or any corresponding embodiment thereof.
[0044] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the data disaster recovery method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0045] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart of a data disaster recovery method according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the disaster recovery function layer in a cloud management platform;
[0048] Figure 3 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention;
[0049] Figure 4 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram illustrating the process of data synchronization between the cloud management platforms of the first and second data centers.
[0051] Figure 6 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention;
[0052] Figure 7 This is a schematic diagram illustrating the data switching operation process;
[0053] Figure 8 This is a structural block diagram of a data disaster recovery device according to an embodiment of the present invention;
[0054] Figure 9 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] The application scenarios on which the execution of data disaster recovery methods depends are described here.
[0057] A Cloud Management Platform (CMP) is a software tool for managing multiple cloud resources. CMP provides business systems with unified management capabilities, including accounts, costs, security, and resources. Specifically, CMP mainly includes core functional modules such as unified resource management, operations management, and intelligent operations and maintenance.
[0058] However, CMP is designed to provide a unified cloud resource management platform, rather than directly handling all advanced cloud-related functions. When business systems are undergoing resource pool upgrades or hardware failures, how to perform cross-resource pool disaster recovery backups is a critical user need that urgently needs to be addressed.
[0059] Specifically, current service systems often employ a Kubernetes + Spring Boot architecture. Therefore, during disaster recovery backups, application data and metadata may be distributed across different locations in a containerized environment. For example, pod definitions might reside in etcd (a distributed key-value store), while application data might be in persistent volumes. If the backup strategy doesn't comprehensively consider these factors, metadata may not be effectively backed up. Even if metadata is backed up, the lack of a proper mechanism to handle it correctly during recovery can render the backup unusable or cause recovery failure, ultimately hindering cross-resource pool disaster recovery backup functionality.
[0060] Based on this, this invention provides a data disaster recovery method. First, in response to a configuration command, a second data center can be configured for a first data center, wherein the second data center serves as a disaster recovery data center for the first data center. Then, based on the acquired data to be synchronized, data synchronization can be performed between the first and second data centers. This data to be synchronized includes business data and corresponding metadata. Next, based on the synchronization results, a data switch can be performed between the first and second data centers, thereby deploying a cloud management platform in both the first and corresponding disaster recovery data centers. This cloud management platform enables cross-data center data backup, and thus, during disaster recovery switching, data switching between the first and corresponding disaster recovery data centers can be achieved.
[0061] According to an embodiment of the present invention, a data disaster recovery method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0062] This embodiment provides a data disaster recovery method that can be used in the aforementioned cloud management platform. Figure 1 This is a flowchart of a data disaster recovery method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0063] Step S101: In response to the configuration command, configure the second data center for the first data center, and the second data center is the disaster recovery data center of the first data center.
[0064] In this embodiment of the invention, the first data center can be a primary data center. This primary data center provides unified management capabilities, including account, cost, security, and resource management, for the CMPs deployed within it, and provides business services to the CMPs through various functional modules. Additionally, the second data center serves as a disaster recovery data center for the primary data center. When the primary data center fails due to viruses, hardware malfunctions, power outages, fires, earthquakes, or other reasons, the second data center can be activated to take over the services in the primary data center, thereby continuing to provide services to users.
[0065] It should be understood that a cloud management platform can be deployed in both the first and second data centers mentioned above, so as to ensure that after the switch between the primary and backup data centers, both the primary data center and the disaster recovery data center can take over the original business services.
[0066] Based on this, after enabling the disaster recovery environment configuration, the primary and backup environments can be configured first, that is, the primary data center and the corresponding disaster recovery data center are set up. In the event of a disaster recovery switch, the primary and backup switches will be performed, and the backup will be switched back to the primary when the primary data center recovers. This will minimize the impact on users when the business system is undergoing resource pool upgrades, hardware failures, or other scenarios.
[0067] Step S102: Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and the metadata corresponding to the business data.
[0068] In this embodiment of the invention, the aforementioned business data can be data generated by the aforementioned business system during various business activities. For example, the business data may include user data, behavioral data, etc. Metadata can be descriptive data corresponding to the business data, which can be used to help users better understand and use the business data. This metadata can be stored in the Kubernetes data container corresponding to the business data.
[0069] As can be seen from the above, cloud management platforms can be pre-deployed in both the first and second data centers. Therefore, data synchronization between the first and second data centers can be achieved through these cloud management platforms.
[0070] Specifically, it can perform full data synchronization and incremental data synchronization from the primary data center to the disaster recovery data center, or, when the disaster recovery data center is enabled, perform full data synchronization and incremental data synchronization from the disaster recovery data center to the primary data center.
[0071] Step S103: Based on the synchronization result of the data synchronization, perform data switching between the first data center and the second data center.
[0072] In this embodiment of the invention, after data synchronization, when the data center of the currently running system service fails or the resource pool is upgraded, the user can log in to the above-mentioned CMP to initiate a disaster recovery switchover command, and execute a primary-backup switchover or a backup-to-primary switchover in response to the switchover command.
[0073] Specifically, taking primary / standby failover as an example, you can log in to CMP in the first data center to initiate the disaster recovery failover command. Alternatively, if the first data center fails and you are unable to log in, you can log in to CMP in the second data center to initiate the disaster recovery failover command.
[0074] It should be understood that since the second data center is the disaster recovery data center of the first data center, when users log in to the CMP of the second data center, they can only load the disaster recovery menu and have only the permission to perform primary to backup operations. They cannot operate on the disaster recovery environment data therein, so as to avoid data inconsistency between the primary and backup data centers and the occurrence of data conflicts. The disaster recovery environment data is the business data and metadata synchronized from the aforementioned primary data center.
[0075] In addition, when performing primary / standby switchover, it is not affected by the login location. That is, the switchover operation can be performed by logging into CMP in the first data center or the second data center, so as to better adapt to the user's needs and improve the user experience.
[0076] Here, as Figure 2 The diagram shows the structure of the disaster recovery function layer in the cloud management platform. This disaster recovery function layer includes: the UI (user interface) layer, the interface layer, and the software layer.
[0077] Specifically, the UI layer includes disaster recovery function options in the disaster recovery menu, such as disaster recovery configuration, primary-backup synchronization, primary-to-backup failover, and backup-to-primary failover. The interface layer provides the API (Application Programming Interface) for disaster recovery services. This API can use the "REST API" interface protocol and includes interfaces for disaster recovery environment configuration, data migration, data synchronization configuration, and service start / stop. The software layer includes the primary CMP and the backup CMP. The primary CMP indicates the CMP deployed in the primary data center, and the backup CMP indicates the CMP deployed in the backup data center. Data synchronization from primary to backup databases or from backup to primary databases can be performed based on this software layer.
[0078] As described above, in this embodiment of the invention, firstly, in response to a configuration command, a second data center can be configured for the first data center, wherein the second data center serves as a disaster recovery data center for the first data center. Then, based on the acquired data to be synchronized, data synchronization can be performed between the first and second data centers. This data to be synchronized includes business data and corresponding metadata. Next, based on the synchronization results, a data switch can be performed between the first and second data centers, thereby deploying cloud management platforms in both the first and corresponding disaster recovery data centers. This enables cross-data center data backup based on the cloud management platform, and thus, during disaster recovery switching, data switching between the first and corresponding disaster recovery data centers is achieved.
[0079] This embodiment provides another data disaster recovery method, which can be used in the aforementioned cloud management platform. Figure 3 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0080] Step S301: In response to the configuration command, configure the second data center for the first data center, and the second data center is the disaster recovery data center of the first data center.
[0081] Specifically, step S301 includes:
[0082] Step S3011: Set a first identifier for the first data center and determine a second identifier associated with the first identifier.
[0083] Step S3012: Locate the second data center indicated by the configuration command and set a second identifier for the second data center.
[0084] In this embodiment of the invention, the first identifier can be a primary label, used to indicate that the first data center is the primary data center, and the second identifier can be a backup label, used to indicate that the second data center is the disaster recovery data center of the first data center.
[0085] After deploying CMP for the first and second data centers, disaster recovery environment configuration can be performed. At this time, both CMPs are enabled by default, and the label attributes are empty by default, so that both can perform disaster recovery environment configuration operations.
[0086] Next, a first identifier can be set for the CMP in the first data center and a second identifier can be set for the CMP in the second data center. These identifiers are then stored in the corresponding CMP databases. It should be understood that within the data center whose label attribute is set to the second identifier, other disaster recovery functions in the CMP of that data center are not supported before disaster recovery environment configuration is performed. For example, initiating primary / standby data synchronization by that CMP is not supported.
[0087] After configuring the tag data attributes for the first and second data centers, a disaster recovery environment can be configured in the first data center, and the configuration information will be automatically synchronized to the second data center containing the second identifier. This configuration information can be used to set network connectivity, data synchronization policies, system redundancy, and failover policies to ensure rapid business recovery in the event of a disaster.
[0088] Step S302: Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and the corresponding metadata. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0089] Step S303: Based on the synchronization result of the data synchronization, perform a data switch between the first data center and the second data center. See details below. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0090] In this embodiment of the invention, a disaster recovery data center can be set up for the primary data center by setting tag parameters, thereby providing a technical basis for data disaster recovery based on the primary data center and the disaster recovery data center, so as to avoid request conflicts caused by triggering disaster recovery switching operations in the primary and backup environments at the same time, which would lead to disaster recovery failure.
[0091] In some optional implementations, step S301 above further includes:
[0092] Step a1: After receiving the processing instruction for business data, determine whether the data center indicated by the processing instruction is in the target state.
[0093] If yes, in step a2, in response to the processing instruction, process the business data; otherwise, do not execute the processing instruction.
[0094] In this embodiment of the invention, before and after data synchronization between the first and second data centers, the status of the second data center, which serves as a disaster recovery data center, can be set from the enabled state to a non-target state to avoid data conflicts caused by users manipulating business data in the disaster recovery data center through processing commands. Here, the enabled state of the data center can include an enabled state and an disabled state, where the enabled state is the target state and the disabled state is the non-target state.
[0095] Similarly, after performing a primary / standby switchover, the enabled state of the first data center (which serves as the primary data center) can be set to disabled, and the second data center can be set to enabled. In this case, if a processing instruction instructs to process business data in the first data center, the processing instruction will not be executed.
[0096] In this embodiment of the invention, the activation status of the data center can be set to determine whether a user has permission to operate the business data therein, so as to avoid the same business data being operated on in multiple data centers, which would lead to inconsistency of business data in the primary and backup data centers and thus cause data conflicts.
[0097] This embodiment provides another data disaster recovery method, which can be used in the aforementioned cloud management platform. Figure 4 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:
[0098] Step S401: In response to the configuration command, configure the second data center for the first data center. The second data center serves as the disaster recovery data center for the first data center. For details, please refer to [link to details]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0099] Step S402: Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and the metadata corresponding to the business data.
[0100] Specifically, step S402 includes:
[0101] Step S4021: Set the activation status for the first data center and the second data center respectively, and determine the target data center with the activation status as the target status and the non-target data center with the activation status as the non-target status in the first data center and the second data center.
[0102] Step S4022: Clear the databases in non-target data centers based on the cloud management platform;
[0103] Step S4023: Obtain the full data from the target data center and synchronize the full data to the database in the non-target data center based on the cloud management platform;
[0104] Step S4024: Query the new data in the target data center according to the preset query interval to obtain the incremental data corresponding to the full data.
[0105] Step S4025: Synchronize incremental data to the database in the non-target data center based on the cloud management platform.
[0106] In this embodiment of the invention, information can first be configured in the first data center, and this configuration information can be automatically synchronized to the second data center containing the second identifier. Then, based on this configuration information, data synchronization can be performed between the cloud management platforms of the first and second data centers.
[0107] like Figure 5 The diagram illustrates the data synchronization process between the cloud management platforms of the first and second data centers. The data to be synchronized can include full data and incremental data. Specifically, full data in the first data center can be synchronized to the second data center first, and Otter incremental synchronization from primary to backup can be configured to synchronize subsequently generated incremental data to the second data center.
[0108] It should be understood that, in order to avoid data conflicts, this invention typically only supports initiating a full data synchronization request in the first data center, which serves as the primary data center. If a full data synchronization request is initiated in the second data center, a page exit exception will occur.
[0109] Based on this, such as Figure 5 As shown, after detecting a user's login to the CMP, the CMP's status can be determined. This CMP status indicates whether the CMP account is logged into the primary CMP in the first data center or the backup CMP in the second data center. If the CMP status is detected as backup, the aforementioned synchronization request for full data is not supported. If the CMP status is detected as primary, in response to the full data synchronization request, all data in the first data center is synchronized to the second data center, and the subsequent primary-to-backup Otter incremental synchronization process is executed. Here, the Otter incremental synchronization operation can perform a diff operation on the data in the first and second data centers to determine the incremental data in the first data center and synchronize this incremental data to the second data center.
[0110] During data synchronization, the synchronization status of the first and second data centers can be updated to "Master-to-Slave Synchronization in Progress" to avoid repeatedly initiating data synchronization requests. Then, the enabled status of the first data center can be set to the target status, and the status of the second data center can be set to disabled. Here, as can be seen from the above, the enabled status is the target status, and the disabled status is the aforementioned non-target status.
[0111] After data synchronization is complete, the IMA (Identity and Access Management) service in the second data center can be restarted to reset the transaction state, lock state, etc., within the second data center, thereby avoiding deadlock issues caused by inconsistent states. Then, the synchronization results can be synchronously stored in the database, and a WebSocket message can be sent to the second data center to log out the user from the service system and instruct the user to restart the login.
[0112] Additionally, after performing the primary / standby switchover, the second data center can be set to an enabled state and then deactivated, thereby executing the Otter incremental synchronization process from standby to primary. The specific incremental synchronization method and subsequent data synchronization process are as described above. Figure 5 The corresponding embodiments are described in the text and will not be repeated here.
[0113] Step S403: Based on the synchronization result, perform a data switch between the first data center and the second data center. See details below. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0114] In this embodiment of the invention, data synchronization can be performed based on the activation status of the data center, so as to realize data disaster recovery through the CMP configured in the primary and backup data centers, thereby providing a technical basis for subsequent disaster recovery switching between data centers.
[0115] In some optional implementations, step S102 above further includes:
[0116] Step S11: When synchronizing the data to be synchronized from the first data center to the second data center, stop the data services associated with the business data in the second data center.
[0117] Step S21: Synchronize the metadata to the memo storage device corresponding to the cloud management platform in the second data center, and store the business data in the database of the second data center.
[0118] In this embodiment of the invention, by Figure 5It can be seen that when performing data synchronization, the data services related to business data in the second data center can be stopped first. These data services may include UI layer services, interface layer services, and software layer services.
[0119] Specifically, the UI layer services provide users with disaster recovery-related services, such as itask and iplito services. The interface layer services provide the APIs required for disaster recovery services, and may include services such as container clusters. The software layer services provide the configuration and corresponding management services for the primary and backup CMPs, including services such as csp-config, neutron, ovn, and manila.
[0120] After the aforementioned data services are stopped, the data to be synchronized can be synchronized. First, a corresponding processing mechanism can be set up for the metadata. This can be achieved by connecting external memo storage devices to the first and second data centers to store metadata, and managing these memo storage devices through CMP. For example, the metadata in the memo storage devices can be synchronized based on this CMP. Simultaneously, business data can be stored in the database of the second data center to achieve the synchronization of the data to be synchronized.
[0121] Specifically, the aforementioned memo storage device can be MinIO, which can write metadata to the MinIO in the second data center based on Velero technology. The bucket replication capability of Velero technology can guarantee a latency of ≤20ms during data synchronization. Immediately, MinIO can be integrated with CMP nodes; after MinIO deployment is complete, the MinIO component can be installed in both the first and second data centers.
[0122] When storing business data in a database in a second data center, data synchronization can be achieved using remote storage replication technology. This technology supports both synchronous and asynchronous replication. Synchronous replication has a Recovery Point Objective (RPO) of 0, while asynchronous replication has an RPO close to 0, making it suitable for high-latency scenarios. Specifically, virtualization continuous data protection technology (CDP) combined with a data transmission management module can be used to achieve cross-data center synchronization of business data, supporting second-level RPO and minute-level Recovery Time Objective (RTO).
[0123] In this embodiment of the invention, corresponding processing mechanisms can be set for metadata and business data respectively. Here, a memo storage device for storing metadata can be connected to the first data center and the second data center, and the memo storage device can be managed by CMP. The business data is stored in the database of the data center, thereby realizing cross-data center data backup.
[0124] This embodiment provides another data disaster recovery method, which can be used in the aforementioned cloud management platform. Figure 6 This is a flowchart of another data disaster recovery method according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:
[0125] Step S601: In response to the configuration command, configure the second data center for the first data center. The second data center serves as the disaster recovery data center for the first data center. For details, please refer to [link to details]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0126] Step S602: Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and the corresponding metadata. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0127] Step S603: Based on the synchronization result of the data synchronization, perform data switching between the first data center and the second data center.
[0128] Specifically, step S603 includes:
[0129] Step S6031: When a disaster recovery switchover command is detected, determine the third data center to be switched over between the first data center and the second data center.
[0130] Step S6032: When the third data center is in the target state, enable the data service associated with the data to be synchronized in the third data center.
[0131] Step S6033: Based on the data service, deploy metadata in the data container of the third data center to enable the third data center according to the deployment results.
[0132] In embodiments of the present invention, such as Figure 7The diagram illustrates the data switchover process. Upon detecting a user login to the CMP, the first step is to determine the CMP's status. This status indicates whether the CMP account is logged into the primary CMP in the first data center or the backup CMP in the second data center. If the CMP is detected as the primary CMP, a backup-to-primary data switchover is performed from the second data center to the first data center. In this case, the first data center becomes the aforementioned third data center (the specific data switchover process is similar to the primary-to-backup switchover process). Figure 6 (Only the primary-to-backup switchover process is shown in the figure). If the CMP status is detected as backup CMP, the primary-to-backup data switchover from the first data center to the second data center is performed. At this time, the second data center is the aforementioned third data center.
[0133] During the primary-to-backup data switchover, the second data center can be designated as the aforementioned third data center. First, a disaster recovery menu can be loaded in the first data center to instruct users to perform the data switchover based on this menu. After the user initiates the disaster recovery switchover command, it can be determined whether the third data center is in the target state and has not yet performed a primary-to-backup switchover. If so, Otter synchronization in the first data center is stopped, and data services in the primary environment are stopped. Then, the enabled state of the first data center is changed to disabled, and users logged into the first data center in the service system are notified to log in again based on the aforementioned WebSocket service.
[0134] Simultaneously, data services in the third data center can be enabled, and metadata can be deployed in the data containers of the third data center based on these services. The third data center can then be enabled according to the deployment results. Specifically, after deploying the metadata, the enabled status of the third data center can be changed to enabled, and users logged into the first data center in the service system can be notified to log in again via WebSocket service.
[0135] In this embodiment of the invention, cross-data center data backup can be achieved based on the CMP, thereby enabling data switching between the first data center and the corresponding disaster recovery data center during disaster recovery switching, thus ensuring the user experience.
[0136] In some alternative implementations, the above Figure 1 Corresponding embodiments also include:
[0137] In response to the deconfiguration command, the enabled status of the first data center and the second data center is set to the target status, and the primary / standby relationship between the first data center and the second data center is terminated so that data synchronization is no longer performed.
[0138] In this embodiment of the invention, a deconfiguration command can be initiated in the first data center to terminate the primary / backup relationship between the CMPs of the first and second data centers, making the primary and backup CMPs independent systems. This stops the Otter operations between the primary and backup CMPs, thereby halting data synchronization between them. Specifically, the deconfiguration command can terminate the partnership between the aforementioned memo storage devices, preventing further Otter operations on metadata.
[0139] Meanwhile, the unconfiguration command can remove the label association between the first data center and the second data center, so as to set the enabled status of the first data center and the second data center to the target status. At this time, the first data center and the second data center can run independently, and the services that were stopped when the primary-standby relationship was not terminated will not be restarted actively, so as to ensure that the user experience will not be affected when the primary-standby relationship is terminated.
[0140] In this embodiment of the invention, the primary / backup relationship between the first data center and the second data center can be freely established or terminated in response to the actual usage needs of service system administrators, thereby improving the degree of freedom in data disaster recovery operations in this invention.
[0141] This embodiment also provides a data disaster recovery device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0142] In summary, in this embodiment of the invention, firstly, in response to a configuration command, a second data center can be configured for the first data center, wherein the second data center serves as a disaster recovery data center for the first data center. Then, based on the acquired data to be synchronized, data synchronization can be performed between the first and second data centers. This data to be synchronized includes business data and corresponding metadata. Next, based on the synchronization results, a data switch can be performed between the first and second data centers, thereby deploying cloud management platforms in both the first and corresponding disaster recovery data centers. This enables cross-data center data backup based on the cloud management platform, and thus, during disaster recovery switching, data switching between the first and corresponding disaster recovery data centers is achieved.
[0143] This embodiment provides a data disaster recovery device, such as... Figure 8 As shown, it includes:
[0144] Configuration module 801 is used to configure a second data center for the first data center in response to configuration instructions. The second data center is a disaster recovery data center for the first data center.
[0145] The synchronization module 802 is used to synchronize data between the first data center and the second data center based on the acquired data to be synchronized. The data to be synchronized includes business data and metadata corresponding to the business data.
[0146] The switching module 803 is used to perform data switching between the first data center and the second data center based on the synchronization result of data synchronization.
[0147] In some alternative implementations, the configuration module 801 includes:
[0148] The first determining unit is configured to set a first identifier for the first data center and determine a second identifier associated with the first identifier;
[0149] The lookup unit is used to locate the second data center indicated by the configuration command and set a second identifier for the second data center.
[0150] In some alternative implementations, the configuration module 801 includes:
[0151] The second determining unit is used to determine whether the data center indicated by the processing instruction is in the target state after receiving the processing instruction for the business data.
[0152] The execution unit is used to: if so, process business data in response to processing instructions; otherwise, not execute processing instructions.
[0153] In some alternative implementations, the synchronization module 802 includes:
[0154] The setting unit is used to set the activation status of the first data center and the second data center respectively, and to determine the target data center with the activation status as the target status and the non-target data center with the activation status as the non-target status in the first data center and the second data center.
[0155] The clear unit is used to clear databases in non-target data centers based on the cloud management platform;
[0156] The first synchronization unit is used to acquire the full data of the target data center and synchronize the full data to the database of the non-target data center based on the cloud management platform;
[0157] The query unit is used to query new data in the target data center according to a preset query interval, so as to obtain the incremental data corresponding to the full data.
[0158] The second synchronization unit is used to synchronize incremental data to databases in non-target data centers based on the cloud management platform.
[0159] In some alternative implementations, the synchronization module 802 further includes:
[0160] The stop unit is used to stop the data services associated with business data in the second data center when synchronizing the data to be synchronized in the first data center to the second data center;
[0161] The storage unit is used to synchronize metadata to the memo storage device corresponding to the cloud management platform in the second data center, and to store business data in the database of the second data center.
[0162] In some alternative implementations, the switching module 803 includes:
[0163] The third determining unit is used to determine the third data center to be switched between the first data center and the second data center when a disaster recovery switching instruction is detected;
[0164] The activation unit is used to enable data services associated with the data to be synchronized in the third data center when the third data center is in the target state.
[0165] The deployment unit is used to deploy metadata in the data container of the third data center based on the data service, so as to enable the third data center according to the deployment results.
[0166] In some alternative embodiments, the device further includes:
[0167] The configuration module 804 is used to respond to the deconfiguration command, set the enabled status of the first data center and the second data center to the target status, and remove the primary / standby relationship between the first data center and the second data center so that data synchronization is no longer performed.
[0168] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0169] In this embodiment, the data disaster recovery device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0170] This invention also provides a computer device having the above-described features. Figure 8 The data disaster recovery device shown.
[0171] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 9 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.
[0172] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0173] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0174] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0175] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0176] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0177] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0178] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0179] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A data disaster recovery method, characterized in that, The method includes: In response to the configuration command, a second data center is configured for the first data center, and the second data center serves as a disaster recovery data center for the first data center; Based on the acquired data to be synchronized, data synchronization is performed between the cloud management platforms of the first data center and the second data center. The data to be synchronized includes: business data and metadata corresponding to the business data. Based on the synchronization result of the data synchronization, a data switch is performed between the first data center and the second data center; The step of configuring a second data center for a first data center in response to a configuration command includes: A first identifier is set for the first data center, and a second identifier associated with the first identifier is determined; Locate the second data center indicated by the configuration command, and set a second identifier for the second data center; The data to be synchronized includes: full data and incremental data; The process of synchronizing data between the cloud management platforms of the first data center and the second data center based on the acquired data to be synchronized includes: The first data center and the second data center are set to be in an enabled state, and the target data center with the enabled state being the target state and the non-target data center with the enabled state being the non-target state are determined in the first data center and the second data center respectively; wherein, the enabled state is the target state and the disabled state is the non-target state. The database in the non-target data center is cleared based on the cloud management platform; Obtain all data from the target data center and synchronize the all data to the database of the non-target data center based on the cloud management platform; According to the preset query interval, query the new data in the target data center to obtain the incremental data corresponding to the full data; The incremental data is synchronized to the database of the non-target data center based on the cloud management platform. The process of synchronizing data between the cloud management platforms of the first data center and the second data center based on the acquired data to be synchronized includes: When synchronizing the data to be synchronized from the first data center to the second data center, stop the data services associated with the business data in the second data center; The metadata is synchronized to the memo storage device corresponding to the cloud management platform of the second data center, and the business data is stored in the database of the second data center; The data switching between the first data center and the second data center based on the synchronization result includes: Upon detecting a disaster recovery switchover command, a third data center to be switched over is determined between the first data center and the second data center; When the third data center is in the target state, the data service associated with the data to be synchronized in the third data center is activated. Based on the data service, the metadata is deployed in the data container of the third data center to enable the third data center according to the deployment results.
2. The method according to claim 1, characterized in that, The method further includes: Upon receiving a processing instruction for business data, determine whether the data center indicated by the processing instruction is in the target state; If so, in response to the processing instruction, process the business data; If not, the processing instructions will not be executed.
3. The method according to claim 1, characterized in that, The method further includes: In response to the deconfiguration command, the enabled status of the first data center and the second data center is set to the target status, and the primary / standby relationship between the first data center and the second data center is terminated so that data synchronization is no longer performed.
4. A data disaster recovery device, characterized in that, The device includes: The configuration module is used to configure a second data center for the first data center in response to configuration instructions, wherein the second data center is a disaster recovery data center for the first data center; The synchronization module is used to synchronize data between the cloud management platforms of the first data center and the second data center based on the acquired data to be synchronized. The data to be synchronized includes: business data and metadata corresponding to the business data. The switching module is used to perform data switching between the first data center and the second data center based on the synchronization result of the data synchronization. The configuration module includes: The first determining unit is configured to set a first identifier for the first data center and determine a second identifier associated with the first identifier; The lookup unit is used to locate the second data center indicated by the configuration instruction and set a second identifier for the second data center; The data to be synchronized includes: full data and incremental data; The synchronization module includes: The setting unit is used to set the activation status of the first data center and the second data center respectively, and to determine the target data center with the activation status as the target status and the non-target data center with the activation status as the non-target status among the first data center and the second data center; wherein, the activation status is the target status and the non-activation status is the non-target status. The clearing unit is used to clear the database of the non-target data center based on the cloud management platform; The first synchronization unit is used to acquire the full data of the target data center and synchronize the full data to the database of the non-target data center based on the cloud management platform; The query unit is used to query the new data in the target data center according to a preset query interval, so as to obtain the incremental data corresponding to the full data. The second synchronization unit is used to synchronize the incremental data to the database of the non-target data center based on the cloud management platform; The synchronization module further includes: The stop unit is used to stop the data service associated with the business data in the second data center when synchronizing the data to be synchronized from the first data center to the second data center; A storage unit is used to synchronize the metadata to the memo storage device corresponding to the cloud management platform of the second data center, and to store the business data in the database of the second data center; The switching module includes: The third determining unit is used to determine the third data center to be switched between the first data center and the second data center when a disaster recovery switching instruction is detected; An activation unit is used to activate data services associated with the data to be synchronized in the third data center when the third data center is in the target state. A deployment unit is used to deploy the metadata in the data container of the third data center based on the data service, so as to enable the third data center according to the deployment result.
5. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data disaster recovery method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the data disaster recovery method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method and device for disaster-tolerant management, storage medium and compute equipment
CN108932180A
Data backup equipment, method and device based on protection group and medium
CN115964226A