A protection group-based data backup device, method, apparatus, and medium
Patent Information
- Application Number
- CN202310017947.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-01-06
AI Technical Summary
虽然云原生具备故障自愈的能力,但是由于人为因素或者自然灾难会造成整个容器资源池严重瘫痪,导致所有上云应用业务不可用
[0005] The purpose of this application is to provide a data backup device, method, apparatus, and medium based on protection groups, which ensures data consistency during data synchronization.
Smart Images

Figure CN115964226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud-native technology, and in particular to a data backup device, method, apparatus, and medium based on protection groups. Background Technology
[0002] K8s is short for Kubernetes, an abbreviation formed by replacing the eight characters between the initial "K" and the final "s". Kubernetes is an open-source container orchestration tool used to manage containerized applications across multiple hosts in a cloud platform, offering advantages such as high availability and elastic scaling. With the continuous development of cloud-native technologies, Kubernetes has become the de facto standard in the container orchestration field. Due to the extreme elasticity, rapid deployment, and service autonomy of cloud-native technologies, more and more applications are migrating to the cloud. Although cloud-native technologies possess self-healing capabilities, human factors or natural disasters can severely paralyze the entire container resource pool, rendering all cloud-based applications unavailable.
[0003] Currently, most cloud platform vendors lack container disaster recovery capabilities. Even if such capabilities exist, application business data and metadata cannot be guaranteed to be successfully synchronized, meaning data consistency cannot be guaranteed.
[0004] Therefore, ensuring data consistency during data synchronization is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a data backup device, method, apparatus, and medium based on protection groups, which ensures data consistency during data synchronization.
[0006] To address the aforementioned technical issues, this application provides a data backup device based on protection groups, comprising: a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successfully or all synchronizations failing.
[0007] During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; wherein, the data backup site and the site to be backed up are respectively one of the main center and the backup center;
[0008] The data backup site synchronizes its own application metadata and business data based on the received application metadata and business data.
[0009] If the data backup site fails to synchronize all of its application metadata and business data, it will resynchronize until all data is successfully synchronized.
[0010] Preferably, determining that all application metadata has been synchronized includes:
[0011] Calculate the hash values of key fields of resource pool backup resources in the primary center and the backup center;
[0012] Compare the hash values of the primary center and the backup center;
[0013] If the hash values of the primary center and the backup center are consistent, it indicates that the application metadata synchronization is complete.
[0014] Preferably, determining whether all business data has been synchronized includes:
[0015] The interface for polling and querying the consistency group of the centralized storage is used; wherein, one protection group corresponds to one consistency group in storage;
[0016] If the state of the consistency group reaches a state of consistency synchronization, it indicates that the business data synchronization is complete.
[0017] Preferably, the data backup site synchronizes its own application metadata and business data based on the received application metadata and business data, including:
[0018] If the application metadata and the business data fail to synchronize successfully within the preset time period, then synchronization will be performed again.
[0019] Preferably, the main center and the backup center share the same cloud management platform; the cloud management platform provides a visual operation interface.
[0020] Preferably, each application is added to only one protection group.
[0021] To address the aforementioned technical problems, this application also provides a data backup method based on protection groups, applied to a data backup site; the data backup site and the site to be backed up are respectively a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed; the method includes:
[0022] During data backup, the system receives application metadata and business data sent by the site to be backed up.
[0023] Synchronize its own application metadata and business data based on the received application metadata and business data;
[0024] If the synchronization of the application metadata and the business data fails, the synchronization will be re-attempted until all data is successfully synchronized.
[0025] To address the aforementioned technical problems, this application also provides a data backup device based on protection groups, applied to a data backup site; the data backup site and the site to be backed up are respectively a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed; the device includes:
[0026] The receiving module is used to receive application metadata and business data sent by the site to be backed up during data backup.
[0027] The synchronization module is used to synchronize its own application metadata and business data based on the received application metadata and business data.
[0028] The restart module is used to re-synchronize the application metadata and business data if the synchronization of all data fails until the synchronization is successful.
[0029] To address the aforementioned technical problems, this application also provides a data backup device based on a protection group, comprising: a memory for storing computer programs;
[0030] A processor is used to implement the steps of the protection group-based data backup method described above when executing a computer program.
[0031] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned data backup method based on a protection group.
[0032] This application provides a data backup device based on protection groups, comprising a primary center and a backup center. Protection groups are created within both the primary and backup centers, and applications within each center are added to their respective protection groups. The synchronization status of applications within the same protection group can be either all successfully synchronized or all failed. During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; the data backup site then synchronizes its own application metadata and business data based on the received metadata and data. If the synchronization of the data backup site's own application metadata and business data fails, the synchronization is re-attempted until all data is successfully synchronized. The data backup site and the site to be backed up are either the primary center or the backup center. In the solution provided by this application, applications added to protection groups only have two states: success and failure. Success means all data is successfully synchronized; failure means all data synchronization fails. The protection group design ensures the consistency of metadata and business data.
[0033] This application also provides a data backup method apparatus and a computer-readable storage medium based on protection groups, which correspond to the above method and therefore have the same beneficial effects as the above method. Attached Figure Description
[0034] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 An overall architecture diagram of a data backup device provided in this application embodiment;
[0036] Figure 2 A schematic diagram of application metadata backup provided in this application embodiment;
[0037] Figure 3 A schematic diagram of a business data backup principle provided in an embodiment of this application;
[0038] Figure 4 A flowchart of a disaster recovery module provided in this application embodiment;
[0039] Figure 5 A protection group state machine design diagram provided for an embodiment of this application;
[0040] Figure 6 A protection group lifecycle management diagram provided for embodiments of this application;
[0041] Figure 7A flowchart illustrating a data backup method based on a protection group, provided as an embodiment of this application;
[0042] Figure 8 A structural diagram of a data backup device based on a protection group provided in an embodiment of this application;
[0043] Figure 9 This is a structural diagram of a data backup device based on a protection group, provided in another embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0045] The core of this application is to provide a data backup device, method, apparatus, and medium based on protection groups, which ensures data consistency during data synchronization.
[0046] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] With the continuous development of cloud-native technologies, Kubernetes has become the de facto standard in the container orchestration field. Due to the extreme elasticity, rapid deployment, and service autonomy of cloud-native technologies, more and more applications are migrating to the cloud. Although cloud-native technologies possess self-healing capabilities, human error or natural disasters can severely paralyze the entire container resource pool, rendering all cloud-based applications unavailable. Most cloud platform vendors lack container disaster recovery functionality, and even those that do cannot fully guarantee data consistency. Furthermore, disaster recovery is often based on file levels, resulting in low data replication efficiency and long recovery times. To address these issues, we propose a container disaster recovery solution based on protection groups. This solution ensures data security, atomicity, and consistency while improving disaster recovery backup efficiency and shortening application recovery time.
[0048] To address the technical problems existing in current solutions, this application provides a data backup device based on protection groups. The device includes a primary center and a backup center; protection groups are created within the primary and backup centers, and applications in the primary and backup centers are added to their respective protection groups; wherein, the synchronization status of applications within the same protection group includes either all synchronizations successful or all synchronizations failed. During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; wherein the data backup site and the site to be backed up are respectively one of the primary center and the backup center. The data backup site synchronizes its own application metadata and business data based on the received application metadata and business data; if the synchronization of the data backup site's own application metadata and business data fails completely, it re-synchronizes until all data is successfully synchronized.
[0049] This equipment primarily provides cross-regional cloud platform-level disaster recovery, mainly involving a container disaster recovery method and device based on protection groups. The corresponding method and device primarily provide cross-regional cloud platform-level disaster recovery. The overall design revolves around protection groups, which provide sub-processes such as enabling protection, primary / standby switching / reverse switching, etc.; the protection group features a reasonable state machine and a reasonable rollback mechanism. Figure 1 A general architecture diagram of a data backup device provided in this application embodiment; as follows: Figure 1 As shown, the system includes a primary center (Center 1) and a backup center (Center 2). Primary center 1 primarily serves as the production site for container application metadata and business data; backup center 2 primarily serves as the recovery site for container application metadata and business data. The protection group performs disaster recovery backups between primary center 1 and backup center 2 through failover / switchback. Application metadata and business data are backed up separately using different tools. Application metadata is backed up periodically using the Velero open-source tool, while business data is backed up at the I / O level based on the consistency group function of centralized storage. Each of primary and backup centers 2 can deploy a cloud management platform to manage multiple resource pools and provide a visual operation interface for tenants. Centralized storage provides consistency groups and remote data replication capabilities. The principles of metadata backup and application data backup are detailed below.
[0050] Figure 2 A schematic diagram of application metadata backup provided in this application embodiment; such as Figure 2As shown, this is a metadata backup based on Velero. The disaster recovery service is integrated into the cloud management platform 3, which manages the lifecycle of container application protection groups, including disaster recovery parameter configuration and disaster recovery protection group lifecycle management. After creating a protection group and adding container applications, scheduled metadata backups are enabled, including metadata at the container application (deployment, statefulset, PVC, service, etc.) and namespace levels (the disaster recovery service encapsulates and extends Velero's functionality). Through the infrastructure service, users update container application configurations, which provides application, compute, storage, and network management. Changes to container applications are synchronized to the object storage of the backup center along with scheduled backup tasks. The backup retention period can be set, such as one month. After the cluster in the backup center is restored via Velero, the Kubernetes layer container load is rebuilt, and then the container applications are rebuilt in the backup resource pool based on a bottom-up synchronization mechanism.
[0051] Figure 3 A schematic diagram of a business data backup principle provided in this application embodiment; such as Figure 3 As shown, this is a user data backup based on a centralized storage consistency group, with the disaster recovery service integrated into the cloud management platform 3. The disaster recovery adapter is invoked via REST API to complete atomic disaster recovery operations. The disaster recovery adapter is compatible with various backend storage systems and encapsulates atomic operations on disaster recovery objects such as remote replication relationships of container storage volumes and consistency groups, including enabling, detaching, and read / write restrictions.
[0052] The basic idea behind this application's embodiments lies in the design of protection groups. The protection group sub-processes include protection group creation, application joining, protection group startup / stopping, protection group primary / standby switchover / switchback, fault switching, re-protection, and disaster recovery drills. Through the organic coordination between these sub-processes, the consistency and atomicity of metadata and business data are guaranteed. Furthermore, the protection group, through a rationally designed state machine, restricts application operations by controlling the transitions between different states, ensuring data operability and security during disaster recovery. This embodiment also performs separate backups of container application metadata and business data, using appropriate backup tools. Application metadata uses periodic backups based on Velero, while business data uses I / O-level backups based on centralized storage consistency groups. Through the effective combination of container resources and centralized storage consistency group functionality, I / O-level container disaster recovery is achieved.
[0053] This application provides a container disaster recovery solution based on protection groups, which ensures data security and consistency while improving the efficiency of container disaster recovery data replication, thereby effectively improving the high availability of container application services and enhancing the value of the cloud platform.
[0054] This application provides a data backup device based on protection groups, including a primary center and a backup center. Protection groups are created within the primary and backup centers, and applications in the primary and backup centers are added to their respective protection groups. The synchronization status of applications within the same protection group includes either all synchronizations successful or all synchronizations failed. During data backup, the data backup station receives application metadata and business data sent by the station to be backed up; and the data backup station synchronizes its own application metadata and business data based on the received application metadata and business data. If the synchronization of the data backup station's own application metadata and business data fails, synchronization is re-attempted until all data is successfully synchronized. The data backup station and the station to be backed up are either the primary center or the backup center. In the solution provided by this application, applications added to protection groups only have two states: success and failure. Success means all data is successfully synchronized; failure means all data synchronization fails. The protection group design ensures the consistency of metadata and business data.
[0055] This application describes each sub-process in detail in its embodiments. Figure 4 This application provides an overall flowchart of a disaster recovery module. The first step is to create protection group 4, and the second step is to add container applications to protection group 4. Disaster recovery protection is performed using protection group 4 as a unit. The core of protection group 4 corresponds to the consistency group of the underlying storage, which synchronizes the stored data for consistency. The cloud management platform creates a protection group object, adds the container application to protection group 4, and the standby resource pool creates an empty application, saving information such as the primary and standby container applications and storage consistency groups to protection group 4. The resource pool creates all PVCs in protection group 4 in the standby storage pool. The backend storage establishes a remote replication relationship between the primary and standby volumes under the container application to be protected for disaster recovery and adds them to the consistency group, with the direction being primary -> standby.
[0056] The third step is to enable protection. The main purpose of enabling protection is to replicate container application metadata and user data to the backup center. The cloud management platform updates the status of the protection group and the container applications within the protection group. Resource pool: The primary center enables scheduled backups of Velero's primary to backup metadata. The backend storage begins data synchronization of the consistency group, in the primary to backup direction.
[0057] The fourth step is primary / standby failover. When the primary center becomes unavailable, a business system needs to be switched to the standby center for operation. The cloud management platform shuts down container applications in the primary resource pool within the protection group, starts container applications in the standby resource pool, and updates the protection group status. Resource pools: The primary center stops scheduled backups and performs a proactive primary-to-standby metadata backup (maximizing metadata up-to-dateness). The standby resource pool restores the latest Kubernetes metadata from object storage using Velero, and the standby center's Velero resumes scheduled metadata backups. The backend storage switches the data synchronization direction of the consistency group from standby to primary.
[0058] The fifth step is heavy protection. After the main center is repaired, the newly added data in the backup center is synchronized to the main center to prepare for the business to switch back.
[0059] The sixth step is the rollback, which involves switching the business from the backup center to the primary center. This primarily involves shutting down the application in the backup center and restoring the application in the primary center to its original configuration. Storage synchronization is then reversed, switching from primary to backup. The cloud management platform clears or sets the underlying workload corresponding to the container application in the CMP database to replica zero. The resource pool triggers Velero to perform a backup-to-primary metadata synchronization, then stops the backup-to-primary metadata synchronization. Simultaneously, the primary center starts scheduled backups of the primary-to-backup metadata in Velero. The backend storage switches the remote replication relationship protection direction of the primary and backup storage volumes to primary-to-backup.
[0060] in addition, Figure 5 A protection group state machine design diagram is provided for embodiments of this application; protection group state machine design reference. Figure 5 The status definitions can be set as follows: Idle (protection group created, application not yet added), Not protected (application added to protection group, but protection not enabled), Protecting (protection enabled, data synchronization started), Failover (due to a failure, the backup site provides services), Abnormal, Out of contact, Deleted, Storage partnership disconnected. Status transition conditions are as follows: Idle -> Not protected: Application added successfully; Not protected -> Protecting: Protection enabled; Protecting -> Not protected: Protection stopped; Protecting -> Protecting: Primary / backup switchover / failback; Protecting -> Failover: Failover; Failover -> Protecting: Re-protection.
[0061] In practice, the following components need to be deployed: a disaster recovery service module, a Velero metadata backup plugin, a centralized storage adapter, a cloud management platform, centralized storage supporting consistency groups, and object storage supporting the S3 protocol. The Velero metadata backup plugin and the Neptune centralized storage adapter are deployed in containerized form in the primary and backup resource pools, respectively. The Isterar disaster recovery module and the CMP platform are deployed in the management resource pool. Centralized storage is deployed, and partnerships are enabled on both the primary and backup storage. Object storage is also deployed to store application metadata.
[0062] The key technical points of this application embodiment are as follows: (1) Protection group design: The protection group sub-process includes protection group creation, application joining the protection group, protection group start / stop, protection group primary / backup switch / reverse switch, fault switching, re-protection, disaster recovery drill, etc. Through the organic cooperation between the various sub-processes, the consistency and atomicity of metadata and business data are guaranteed. (2) Protection group state machine design. The protection group restricts the operation of the application through the transition of each state of the protection group by reasonably designing the state machine, so as to ensure the operability and security of the data during the disaster recovery process. (3) Container application metadata and business data are backed up separately. Appropriate backup tools are used for backup. Metadata is backed up periodically based on Velero, and business data is backed up at the I / O level based on the centralized storage consistency group. (4) Effective combination of container resources and centralized storage consistency group functions to achieve I / O level container disaster recovery.
[0063] This application embodiment defines a reasonable protection group business model and designs reasonable protection group sub-processes and protection group state machines to ensure the atomicity and consistency of backup data. Container application metadata and business data are backed up separately. Metadata backup is performed periodically using the Velero tool, while application business data backup is performed at the I / O level using centralized storage remote replication. The main steps include: Step 1. Defining a reasonable protection group model, designing reasonable protection group sub-processes and protection group state machines to ensure the consistency and atomicity of metadata and business data. Step 2. Developing and designing a reasonable disaster recovery service module and implementing its various sub-processes. Step 3. Effectively combining container disaster recovery with centralized storage remote replication functionality.
[0064] In the consistency model provided in this embodiment, applications added to a protection group exist in only two states: success and failure. Success means all data synchronization is successful, and failure means all data synchronization fails. Furthermore, an application added to one protection group cannot be added to another. Once the protection group's data synchronization is successful, a consistent synchronization state is achieved.
[0065] In practical applications, it is necessary to determine whether all application metadata and business data have been synchronized. This embodiment provides a specific solution, in which determining whether all application metadata has been synchronized includes: calculating the hash values of key fields of backup resources in the resource pools of the primary center and the backup center; comparing the hash values of the primary center and the backup center; if the hash values of the primary center and the backup center are consistent, it indicates that the application metadata has been synchronized. In addition, determining whether all business data has been synchronized includes: polling and querying the consistency group interface of the centralized storage; where one protection group corresponds to one consistency group; if the status of the consistency group reaches consistency synchronization, it indicates that the business data has been synchronized. That is, the key logic of consistency is: (1) consistency guarantee of metadata: calculate the hash values of key fields of backup resources in the primary / backup resource pools and compare them. If the hashes are consistent, it means that the metadata has been synchronized. (2) consistency guarantee of business data: polling and querying the consistency group interface of the centralized storage (one protection group corresponds to one consistency group). If the status of the consistency group reaches consistency synchronization, it is considered that the synchronization has been completed.
[0066] Additionally, when the data backup site synchronizes its own application metadata and business data based on the received application metadata and business data, if the synchronization fails within a preset time limit, it needs to be re-synchronized. For example, the maximum timeout is: 15 minutes (maximum time for metadata backup) + the amount of business data (in GB) / 10 * 5 minutes. If synchronization is not completed within this time, it is considered a timeout, and a full rollback is performed. The rollback design logic is as follows: a custom model of underlying resources is designed using the k8s-operator mechanism. The current state of each resource is recorded in the underlying resource model.
[0067] {name:”xxx”
[0068] resources:[{
[0069] “name”:”xxx”,
[0070] "type":"xxx",
[0071] "state":"xxx"
[0072] },{
[0073] “name”:”xxx”,
[0074] "type":"xxx",
[0075] "state":"xxx"
[0076] },{
[0077] “name”:”xxx”,
[0078] "type":"xxx",
[0079] "state":"xxx"
[0080] }],
[0081] state:"xxx"}
[0082] Resource status includes: not synchronized, synchronizing, and synchronized. If a rollback occurs at this time and the resource in the protection group is not synchronized, skip that resource. If synchronizing or synchronizing is complete, first stop the remote replication relationship of the volume, clean up the data in the secondary volume, and then delete the synchronized metadata on the standby resource pool.
[0083] This embodiment provides explanations for the terms mentioned above. Velero is an open-source tool that provides backup, migration, and disaster recovery for Kubernetes clusters and persistent volumes. Centralized storage provides remote replication and consistency group functionality, and provides storage volumes for tenant applications. Application metadata refers to the K8s cluster resource configuration stored in etcd, while business data refers to data generated by tenant applications, ultimately stored in volumes provided by centralized storage. The cloud management platform refers to a container cloud management platform that can manage multiple container clusters and provides a visual interface for tenants to complete application-related operations (application creation, volume mounting, network configuration, disaster recovery protection, etc.). Disaster recovery service is the most important component of the device provided in this application, providing functions such as disaster recovery parameter configuration and protection group lifecycle management. The backend storage adapter adapts to various backend storage systems and encapsulates atomic operations on disaster recovery objects such as remote replication relationships and consistency groups for container storage volumes, including enabling, detaching, and read / write restrictions. The infrastructure service module is integrated into the cloud management platform, providing functions such as application, computing, storage, and network management. Namespace is a crucial resource in Kubernetes (K8s) systems, primarily used for resource isolation across multiple environments or multi-tenant environments. Deployment, StatefulSet, PVC, and Service are resource types in K8s; in this solution, they mainly refer to container application metadata. PVC is a container storage volume; PVC itself contains container application metadata, and the containers stored in its corresponding storage device are used for business data. API server is the K8s access point, providing HTTP REST interfaces for CRUD operations on various K8s resource objects (pods, RCs, Services, etc.) and watch functionality; it serves as the system's data bus and data center. Protection groups are a vital concept in disaster recovery services; multiple applications joined to a protection group ensure consistency and atomicity of their metadata and business data. Consistency groups are a crucial concept in backend storage, corresponding one-to-one with protection groups; multiple remote replications joined to a protection group guarantee consistency and atomicity. Remote replication relationships are also important in backend storage; the primary storage provides the primary volume, and the backup storage provides the backup volume, forming a remote replication relationship. When protection is enabled, data on the primary volume is automatically synchronized to the backup volume. Additionally, Figure 6 A protection group lifecycle management diagram is provided for embodiments of this application; such as Figure 6 As shown, the lifecycle of protection groups can be managed through the disaster recovery function of the cloud management platform, and application data can be backed up for disaster recovery.
[0084] To address the aforementioned technical issues, this application also provides a data backup method based on protection groups, applied to a data backup site; the data backup site and the site to be backed up are respectively a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed. Figure 7 A flowchart illustrating a data backup method based on a protection group provided in this application embodiment; as follows: Figure 7 As shown, the method includes the following steps:
[0085] S10: During data backup, receive application metadata and business data sent by the site to be backed up.
[0086] S11: Synchronize its own application metadata and business data based on the received application metadata and business data.
[0087] S12: If the synchronization of all application metadata and business data fails, then resynchronize until all data is successfully synchronized.
[0088] The data backup method based on protection groups provided in this embodiment is applied to a data backup site. Protection groups are created within the primary and backup centers, and applications in the primary and backup centers are added to their respective protection groups. The synchronization status of applications within the same protection group includes either all synchronizations successful or all synchronizations failed. During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; and the data backup site synchronizes its own application metadata and business data based on the received application metadata and business data. If the synchronization of the data backup site's own application metadata and business data fails, synchronization is re-attempted until all data is successfully synchronized. The data backup site and the site to be backed up are either the primary center or the backup center. In the solution provided in this embodiment, applications added to protection groups only have two states: success and failure. Success means all data is successfully synchronized; failure means all data synchronization fails. The protection group design ensures the consistency of metadata and business data.
[0089] In the above embodiments, the data backup method based on protection groups has been described in detail. This application also provides embodiments corresponding to the data backup device based on protection groups. It should be noted that this application describes the embodiments of the device part from two perspectives: one is based on functional modules, and the other is based on hardware.
[0090] From the perspective of functional modules, this embodiment provides a data backup device based on protection groups, which is applied to a data backup site; the data backup site and the site to be backed up are one of the main center and the backup center, respectively; protection groups are created inside the main center and the backup center, and the applications in the main center and the backup center are added to their respective protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronization successful or all synchronization failure. Figure 8 A structural diagram of the data backup device based on protection groups provided in the embodiments of this application is shown below. Figure 8 As shown, the device includes:
[0091] The receiving module 10 is used to receive application metadata and business data sent by the site to be backed up during data backup.
[0092] Synchronization module 11 is used to synchronize its own application metadata and business data based on the received application metadata and business data;
[0093] Restart module 12 is used to resynchronize if the synchronization of its own application metadata and business data fails until all data is successfully synchronized.
[0094] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0095] The data backup device based on protection groups provided in this embodiment is applied to a data backup site. Protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective protection groups. The synchronization status of applications within the same protection group includes either all synchronizations successful or all synchronizations failed. During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; and the data backup site synchronizes its own application metadata and business data based on the received application metadata and business data. If the synchronization of the data backup site's own application metadata and business data fails, synchronization is re-performed until all data is successfully synchronized. The data backup site and the site to be backed up are one of the primary center and the backup center, respectively. In the solution provided in this embodiment, applications added to a protection group only have two states: success and failure. Success means all data is successfully synchronized; failure means all data synchronization fails. The protection group design ensures the consistency of metadata and business data.
[0096] From a hardware perspective, this embodiment provides another data backup device based on protection groups. Figure 9 A structural diagram of a data backup device based on a protection group provided in another embodiment of this application is shown below. Figure 9 As shown, the data backup device based on the protection group includes: a memory 20 for storing computer programs;
[0097] The processor 21 is configured to execute a computer program to implement the steps of the data backup method based on protection groups as described in the above embodiments.
[0098] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0099] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the protection group-based data backup method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the protection group-based data backup method.
[0100] In some embodiments, the data backup device based on protection groups may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0101] Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on a protection group-based data backup device and may include more or fewer components than shown.
[0102] The data backup device based on protection groups provided in this application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a data backup method based on protection groups.
[0103] The data backup device based on protection groups provided in this embodiment is applied to a data backup site. Protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective protection groups. The synchronization status of applications within the same protection group includes either all synchronizations successful or all synchronizations failed. During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; and the data backup site synchronizes its own application metadata and business data based on the received application metadata and business data. If the synchronization of the data backup site's own application metadata and business data fails, synchronization is re-performed until all data is successfully synchronized. The data backup site and the site to be backed up are one of the primary center and the backup center, respectively. In the solution provided in this embodiment, applications added to a protection group only have two states: success and failure. Success means all data is successfully synchronized; failure means all data synchronization fails. The protection group design ensures the consistency of metadata and business data.
[0104] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.
[0105] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] The computer-readable storage medium provided in this embodiment corresponds to the method described above, and therefore has the same beneficial effects as the method described above.
[0107] The foregoing provides a detailed description of a data backup device, method, apparatus, and medium based on a protection group. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0108] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the aforementioned element.
Claims
1. A data backup device based on protection groups, characterized in that, include: A primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed; During data backup, the data backup site receives application metadata and business data sent by the site to be backed up; wherein, the data backup site and the site to be backed up are respectively one of the main center and the backup center; The data backup site synchronizes its own application metadata and business data based on the received application metadata and business data. If the data backup site fails to synchronize all of its application metadata and business data, it will resynchronize until all data is successfully synchronized. Determining that all application metadata has been synchronized includes: Calculate the hash values of key fields of resource pool backup resources in the primary center and the backup center; Compare the hash values of the primary center and the backup center; If the hash values of the primary center and the backup center are consistent, it indicates that the application metadata synchronization is complete. Determining whether all business data has been synchronized includes: The interface for polling and querying the consistency group of the centralized storage is used; wherein, one protection group corresponds to one consistency group in storage; If the state of the consistency group reaches a state of consistency synchronization, it indicates that the business data synchronization is complete.
2. The data backup device based on protection groups according to claim 1, characterized in that, The data backup site synchronizes its own application metadata and business data based on the received application metadata and business data, including: If the application metadata and the business data fail to synchronize successfully within the preset time period, then synchronization will be performed again.
3. The data backup device based on protection groups according to claim 1, characterized in that, The main center and the backup center share the same cloud management platform; the cloud management platform provides a visual operation interface.
4. The data backup device based on protection groups according to claim 1, characterized in that, Each application is added to only one protection group.
5. A data backup method based on protection groups, characterized in that, The method is applied to data backup sites; the data backup site and the site to be backed up are respectively a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed; the method includes: During data backup, the system receives application metadata and business data sent by the site to be backed up. Synchronize its own application metadata and business data based on the received application metadata and business data; If the synchronization of the application metadata and the business data fails, the synchronization will be re-run until all data is successfully synchronized. Determining that all application metadata has been synchronized includes: Calculate the hash values of key fields of resource pool backup resources in the primary center and the backup center; Compare the hash values of the primary center and the backup center; If the hash values of the primary center and the backup center are consistent, it indicates that the application metadata synchronization is complete. Determining whether all business data has been synchronized includes: The interface for polling and querying the consistency group of the centralized storage is used; wherein, one protection group corresponds to one consistency group in storage; If the state of the consistency group reaches a state of consistency synchronization, it indicates that the business data synchronization is complete.
6. A data backup device based on protection groups, characterized in that, The device is applied to a data backup site; the data backup site and the site to be backed up are respectively a primary center and a backup center; protection groups are created within the primary center and the backup center, and applications in the primary center and the backup center are added to their respective corresponding protection groups; wherein, the synchronization status of applications in the same protection group includes all synchronizations successful or all synchronizations failed; the device includes: The receiving module is used to receive application metadata and business data sent by the site to be backed up during data backup. The synchronization module is used to synchronize its own application metadata and business data based on the received application metadata and business data. The restart module is used to re-synchronize the application metadata and business data if the synchronization of all data fails until the synchronization is successful. Determining that all application metadata has been synchronized includes: Calculate the hash values of key fields of resource pool backup resources in the primary center and the backup center; Compare the hash values of the primary center and the backup center; If the hash values of the primary center and the backup center are consistent, it indicates that the application metadata synchronization is complete. Determining whether all business data has been synchronized includes: The interface for polling and querying the consistency group of the centralized storage is used; wherein, one protection group corresponds to one consistency group in storage; If the state of the consistency group reaches a state of consistency synchronization, it indicates that the business data synchronization is complete.
7. A data backup device based on protection groups, characterized in that, Includes memory used to store computer programs; A processor, configured to implement the steps of the data backup method based on protection groups as described in claim 5 when executing the computer program.
8. 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 backup method based on a protection group as described in claim 5.
Citation Information
Patent Citations
Disaster recovery method and device, electronic equipment and storage medium
CN112000437A
System and method for distributed-agent restoration of virtual machines
US20220318096A1