Backup management method, system and device for distributed computing cluster, storage medium and program product
By setting up multiple replica sub-clusters in a distributed computing cluster, coordinating business access nodes, metadata nodes, and data nodes, and utilizing the cluster management server for decision-making and locking, the challenges of DPC cluster backup and recovery are solved, improving backup stability and data protection reliability.
Patent Information
- Application Number
- CN202511064913.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-07-31
AI Technical Summary
Traditional technologies cannot meet the backup and recovery requirements of distributed computing clusters (DPC clusters), and the fault tolerance of the clusters is challenged.
By setting up multiple replica sub-clusters in a distributed computing cluster, the backend management server selects the backup master node, coordinates with business access nodes, metadata nodes, and data nodes to perform backup and recovery operations, and the cluster management server makes decisions and locks to ensure the successful execution of backup tasks.
It improves the backup stability and data protection reliability of distributed computing clusters, avoids data conflicts and consistency issues, and ensures the successful execution of backup tasks.
Smart Images

Figure CN120994464A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a backup management method and system for a distributed computing cluster, a computer device, a computer readable storage medium, and a computer program product. BACKGROUND
[0002] The advent of the big data era is an inevitable trend in the process of social development, and its influence has penetrated into every aspect of daily life. For data with a specific structure organized according to established rules and methods, a database system has become a widely used solution due to its advantages in storage management, efficient query, and convenient access. To prevent the risk of losing critical data due to hardware or software failure, regular data backup is essential. With a complete backup set and corresponding archive logs, important data in the database can be recovered, copied, or migrated, thereby effectively ensuring data security and business continuity.
[0003] Currently, with the development of computer technology, a single data server cannot meet the needs of a large number of users. Clusters can better share the pressure of single data servers and improve user access performance and user experience. Due to the diversity of clusters, some clusters of certain types can improve overall access performance, but the fault tolerance of the entire cluster is tested. Based on the above complex considerations and the advantages of various clusters, combined clusters are born, and DPC clusters (Distributed Processing Cluster) are one of the combined multi-replica clusters.
[0004] The cluster backup method in the traditional technology cannot meet the backup and recovery of DPC clusters. SUMMARY
[0005] Therefore, it is necessary to provide a backup management method and system for a distributed computing cluster, a computer device, a computer readable storage medium, and a computer program product to solve the above technical problems. The method can cooperate with a business access node, a metadata node, and a data node to complete a DPC cluster backup task.
[0006] In a first aspect, the present application provides a backup management method for a distributed computing cluster. The distributed computing cluster includes a plurality of business access nodes, a metadata cluster, and a plurality of data clusters. The metadata cluster and the data clusters each adopt a multi-replica sub-cluster, and each multi-replica sub-cluster is provided with a sub-cluster master node. The method includes:
[0007] The background management server selects backup master nodes from the several service access nodes according to the topology information of the distributed computing cluster, and respectively distributes backup sub-jobs to the backup master nodes and the sub-cluster master nodes;
[0008] The backup master node obtains cluster lock information based on the backup sub-job, and sends the cluster lock information to the cluster management server;
[0009] The sub-cluster master node performs backup configuration based on the backup sub-job, and sends configuration information to the cluster management server;
[0010] The cluster management server makes a backup decision according to the cluster lock information and the configuration information, and notifies the backup master node and the sub-cluster master node of the decision result;
[0011] The backup master node sends a backup command to the sub-cluster master node if the cluster state meets the preset condition according to the decision result;
[0012] The sub-cluster master node connects the storage server and performs a database backup operation according to the parameters carried in the backup command and the parameters carried in the backup sub-job.
[0013] In one embodiment, after the sub-cluster master node performs the database backup operation, the method further comprises:
[0014] The backup master node aggregates the backup operation results of each sub-cluster master node, accesses the storage server to read the backup data, checks the backup operation results and the read backup data, and after the check is passed, stores the backup metadata into the Catalog server.
[0015] In one embodiment, the backup metadata includes at least one of the topology information of the distributed computing cluster, the type of each backup set, the source information of each backup set, the storage address of each backup set, the archive log address, and the backup data volume.
[0016] In one embodiment, after the backup master node stores the backup metadata into the Catalog server, the method further comprises:
[0017] The backup master node notifies the sub-cluster master node of backup completion information;
[0018] The sub-cluster master node deletes the corresponding cache data in response to the backup completion information.
[0019] In one embodiment, the method further comprises:
[0020] The background management server filters out the service access nodes according to the topology structure information of the distributed computing cluster, and respectively sends backup recovery jobs to the metadata nodes in the metadata cluster and the data nodes in the data cluster;
[0021] The metadata nodes and the data nodes respectively access the Catalog server to obtain backup metadata based on the backup recovery jobs, determine backup set storage addresses and archive log addresses of the corresponding nodes according to the backup metadata, download the archive logs from the storage server according to the archive log addresses, and perform a database recovery operation according to the backup sets corresponding to the backup set storage addresses in the storage server and the downloaded archive logs.
[0022] In one of the embodiments, the method further comprises:
[0023] In the case that the backup recovery job belongs to a cross-cluster recovery job, the metadata node modifies the registration information of each data node stored after the backup recovery is completed.
[0024] In a second aspect, the application further provides a backup management of a distributed computing cluster, which comprises a background management server, a distributed computing cluster, a cluster management server and a storage server.
[0025] The background management server is configured to select a backup master node from the plurality of service access nodes according to the topology structure information of the distributed computing cluster, and send backup sub-jobs to the backup master node and the sub-cluster master node respectively.
[0026] The backup master node is configured to obtain cluster lock information based on the backup sub-jobs, and send the cluster lock information to the cluster management server.
[0027] The sub-cluster master node is configured to perform backup configuration based on the backup sub-jobs, and send configuration information to the cluster management server.
[0028] The cluster management server is configured to make a backup decision according to the cluster lock information and the configuration information, and notify the backup master node and the sub-cluster master node of the decision result.
[0029] The backup master node is further configured to send a backup command to the sub-cluster master node in the case that the cluster state determined according to the decision result meets a preset condition.
[0030] The sub-cluster master node is further configured to connect the storage server and perform a database backup operation according to parameters carried in the backup command and parameters carried in the backup sub-job.
[0031] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to the first aspect when executing the computer program.
[0032] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0033] In a fifth aspect, the present application also provides a computer program product comprising a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
[0034] The backup management method, system, computer device, computer readable storage medium and computer program product of the distributed computing cluster have the following advantages. The backup master node is selected from the plurality of business access nodes according to the topology structure information of the distributed computing cluster, and the backup sub-job is respectively distributed to the backup master node and the sub-cluster master node. The cluster lock information is obtained based on the backup sub-job, and the cluster lock information is sent to the cluster management server. The backup configuration is performed based on the backup sub-job, and the configuration information is sent to the cluster management server. The backup decision is made according to the cluster lock information and the configuration information, and the decision result is notified to the backup master node and the sub-cluster master node. The backup command is sent to the sub-cluster master node according to the decision result. The storage server is connected and the database backup operation is performed according to the parameters carried in the backup command and the parameters carried in the backup sub-job. In this way, the DPC cluster backup task can be completed by the cooperation of the business access node, the metadata node and the data node. Since the sub-cluster master node is arranged in each multi-copy sub-cluster, the single node failure in the multi-copy sub-cluster does not affect the business of the entire distributed computing cluster, and the stability of the database backup is improved. The backup decision is made according to the cluster lock information and the configuration information, the backup preparation work of the distributed computing cluster can be completed, the data conflict and consistency problem can be avoided, the backup task can be successfully executed, and the reliability of the data protection is improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0036] Figure 1 Figure 1 is a diagram of an application environment of a backup management method of a distributed computing cluster in one embodiment;
[0037] Figure 2 Figure 2 is a flowchart of a backup management method of a distributed computing cluster in one embodiment;
[0038] Figure 3 Figure 3 is a diagram of a backup flow of a DPC cluster in one embodiment;
[0039] Figure 4 Figure 4 is a diagram of a recovery flow of a DPC cluster in one embodiment;
[0040] Figure 5 Figure 5 is a structural block diagram of a backup management system of a distributed computing cluster in one embodiment;
[0041] Figure 6 Figure 6 is an internal structure diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0043] It should be noted that the terms "first", "second", etc. used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" used in the present application and any variations thereof are intended to cover non-exclusive inclusion. The term "a plurality of" used in the present application means two and more than two. The term "and / or" used in the present application means one of the solutions, or any combination of a plurality of solutions.
[0044] The backup management method of the distributed computing cluster provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment shown. Among them, the UI (User Interface, user interface) 101 communicates with the backupd (background management server) 102 through the network, the backupd 102 communicates with the distributed computing cluster (DPC) 103 through the network, and the distributed computing cluster 103 communicates with the cluster management server 104, the storage server 105 and the Catalog server 106 through the network respectively. The distributed computing cluster 103 includes SP nodes (SQL Processor, business access node), MP clusters (Metadata Processor, metadata cluster) and several BP clusters (Backend Processor, data cluster). Further, the SP node refers to the access node for backup or recovery of the entire cluster data. This node only provides data service access function and does not store business data itself, and does not need to backup any data of this node. The MP cluster includes multiple MP nodes, adopts multiple copy sub-clusters, and is used to store metadata information of the DPC cluster. The joining of all nodes of the cluster must be registered in the MP node. The BP cluster includes multiple BP nodes, adopts multiple copy sub-clusters, and stores all business data of the DPC cluster through multiple BP clusters.
[0045] In an exemplary embodiment, as Figure 2 shown, a backup management method of a distributed computing cluster is provided, which is applied to the environment shown in Figure 1 The distributed computing cluster includes several business access nodes, a metadata cluster and several data clusters. The metadata cluster and the data cluster each adopt a multiple copy sub-cluster, and each multiple copy sub-cluster is provided with a sub-cluster master node. The method comprises:
[0046] Step 202, the background management server selects a backup master node from the several business access nodes according to the topology structure information of the distributed computing cluster, and respectively issues backup sub-jobs to the backup master node and the sub-cluster master node.
[0047] Among them, the DPC cluster refers to the Dream distributed computing cluster, which is composed of multiple nodes working together to complete the task of the entire DPC cluster. In order to improve the overall fault tolerance of the DPC cluster, the DPC cluster includes MP multiple copy architecture and BP multiple copy architecture, that is, each MP cluster and BP cluster in the DPC is composed of multiple copy sub-clusters. Therefore, the failure of a single MP node and a single BP node does not affect the business of the entire DPC cluster, so that the DPC cluster has the characteristics of high availability, high expansion, high performance, high throughput and transparency. Referring to Figure 1 , the DPC cluster includes several SP nodes Figure 1The DPC cluster is composed of one SP node, one MP multi-copy sub-cluster, and several BP multi-copy sub-clusters. The MP cluster, the BP1 cluster, and the BP2 cluster are three multi-copy sub-clusters in the entire combined cluster, and the entire DPC cluster is composed of the three multi-copy sub-clusters and one SP node.
[0048] During backup, the background management server dynamically selects one SP node as the backup access point of the entire DPC cluster according to a preset algorithm. Alternatively, the background management server selects a backup master node for performing the current backup task from the plurality of SP nodes according to the topology information of the DPC cluster and a preset load balancing rule. Alternatively, each SP node and each MP node in the MP cluster is built on the same physical machine, and the selected backup master SP node can dynamically change with the change of the sub-cluster master node in the MP cluster.
[0049] It should be noted that the DPC cluster only backs up the data of the master nodes in all multi-copy sub-clusters each time, and the sub-cluster master node in the MP cluster and the sub-cluster master node in the BP cluster can be dynamically switched. The switching of the master node in each multi-copy sub-cluster does not affect the external business function of the entire DPC.
[0050] In an optional implementation, the data content in the multi-copy sub-cluster is cloned, but the DB_MAGIC (database magic number) of the multi-copy is not equal, that is, the backup data of each node in the multi-copy sub-cluster is not common to the nodes across the master and backup sub-clusters. Since the master node in the multi-copy sub-cluster can drift during operation, for example, the multi-copy sub-cluster reelects a new master node, which will cause the entire DPC cluster to fail to perform incremental backup due to the lack of basic backup of the new master node. Therefore, the background management server detects whether the backup set of the entire combined cluster is composed of nodes that can support incremental backup or differential backup, and if the incremental backup is supported, the incremental backup mode is switched to, and in the subsequent backup process, each sub-cluster master node is notified to perform incremental backup.
[0051] In step 204, the backup master node obtains cluster lock information based on the backup sub-job, and sends the cluster lock information to the cluster management server.
[0052] Wherein, since data backup is a mutual exclusion operation itself, there is a mutual exclusion lock in the database. In order to avoid the failure of concurrent backup in the cluster in the database, which leads to subsequent processing (because the cluster nodes are too many, and the subsequent operation is more troublesome, such as garbage data recovery, etc.), when the backup command is issued to the cluster, the cluster backup lock needs to be acquired in advance. If the lock is occupied by another job, the backup lock acquisition fails, and the backup task needs to be retried until the backup lock is acquired to execute the cluster backup task. It can be understood that when there are continuous multiple backup jobs in the DPC cluster, the cluster resource mutual exclusion lock will be grabbed. If the cluster resource lock fails to be grabbed, the backup job will fail, and the backup job needs to be retried.
[0053] The cluster management server is responsible for detecting the real-time node state information of each node in the DPC cluster, collecting the topology structure information of the entire cluster, and collecting the metadata information corresponding to each backup set.
[0054] In step 206, the sub-cluster master node performs backup configuration based on the backup sub-job, and sends the configuration information to the cluster management server.
[0055] The sub-cluster master node of the embodiment refers to the sub-cluster master node in the MP cluster or any BP cluster, that is, the master node in each multi-copy sub-cluster performs step 206. In a specific implementation, the sub-cluster master node completes the preparation work before the data backup operation through backup configuration. In an optional implementation, the backup configuration of the sub-cluster master node includes configuration and SBT (System Backup to Tape) library installation.
[0056] In step 208, the cluster management server makes a backup decision according to the cluster lock information and the configuration information, and notifies the decision result to the backup master node and the sub-cluster master node.
[0057] Wherein, the cluster management server collects cluster information and performs state detection, makes a backup decision according to the collected various information, and notifies the decision result to each node. The backup decision includes but is not limited to at least one of the following: detecting whether the state of the entire cluster is normal, detecting whether each node has completed the preparation work, detecting whether there is a node occupying the cluster lock, etc.
[0058] In step 210, the backup master node sends a backup command to the sub-cluster master node when it is determined that the cluster state meets the preset condition according to the decision result.
[0059] The decision result includes a first result and a second result, the first result is used to represent that the cluster state meets the preset condition, and the second result is used to represent that the cluster state does not meet the preset condition. In the case that the first result is received, the backup master node sends a backup command to the sub-cluster master node. The cluster state meeting the preset condition means that the state of the entire cluster is normal, each node has completed the preparation work, and no other node occupies the cluster lock.
[0060] In step 212, the sub-cluster master node connects the storage server and performs the database backup operation according to the parameters carried in the backup command and the parameters carried in the backup sub-job.
[0061] The storage server is mainly used to store a plurality of backup sets and archive logs of the entire cluster database. Each sub-cluster master node connects the storage server to separately perform the database backup according to the parameters carried in the backup command and the job parameter information distributed by the background management server. It can be understood that the DPC cluster generates a plurality of backup sets during backup, that is, each multi-copy sub-cluster generates a backup set, and the backup sets are divided into MP backup sets and BP backup sets according to the roles of the multi-copy sub-clusters in the entire cluster.
[0062] In the backup management method of the distributed computing cluster, the background management server selects a backup master node from a plurality of business access nodes according to the topology structure information of the distributed computing cluster, and distributes backup sub-jobs to the backup master node and the sub-cluster master node respectively; the backup master node obtains cluster lock information based on the backup sub-job, and sends the cluster lock information to the cluster management server; the sub-cluster master node performs backup configuration based on the backup sub-job, and sends the configuration information to the cluster management server; the cluster management server makes a backup decision according to the cluster lock information and the configuration information, and notifies the backup master node and the sub-cluster master node of the decision result; the backup master node sends a backup command to the sub-cluster master node in the case that the cluster state meets the preset condition according to the decision result; and the sub-cluster master node connects the storage server and performs the database backup operation according to the parameters carried in the backup command and the parameters carried in the backup sub-job. Through the above manner, the business access node, the metadata node and the data node work cooperatively to complete the DPC cluster backup task. Since the sub-cluster master node is arranged in each multi-copy sub-cluster, the single node failure in the multi-copy sub-cluster does not affect the business of the entire distributed computing cluster, and the stability of the database backup is improved. The cluster management server makes a backup decision according to the cluster lock information and the configuration information, which can complete the backup preparation work of the distributed computing cluster, avoid data conflict and consistency problem, ensure that the backup task can be successfully executed, and improve the reliability of data protection.
[0063] In an exemplary embodiment, as Figure 3As shown, after the sub-cluster master node performs the database backup operation, the method further comprises: the backup master node aggregates the backup operation result of each sub-cluster master node, reads the backup data from the storage server, checks the backup operation result and the read backup data, after the check passes, counts the backup metadata, and stores the backup metadata into the Catalog server.
[0064] In this embodiment, since the master node in each multi-copy sub-cluster (i.e., the sub-cluster master node) is switchable, after the backup is completed, the backup master node (SP node) reads the storage server to perform backup set checking and multi-backup set data aggregation.
[0065] The Catalog server in this embodiment is used to store and query the backup job of the entire system, including the backup set record of the cluster, the backup record of the log, the topology structure of the cluster, and some system metadata information. The cluster generates a backup record of the cluster every time the cluster is backed up, which is used to find the available backup set during recovery, find the existing basic backup of the system during incremental backup, or find the required archive log during archive log download.
[0066] In an exemplary embodiment, the backup metadata includes at least one of the topology structure information of the distributed computing cluster, the type of each backup set, the source information of each backup set, the storage address of each backup set, the archive log address, and the backup data volume.
[0067] In this embodiment, the backup metadata refers to the metadata information of the backup set, and records at least one of the following: the topology structure information of the entire DPC cluster, the backup set type to which the backup set belongs (including two types of MP backup set and BP backup set), the source information of the backup set (i.e., which multi-copy sub-cluster the backup set belongs to, and which node in the multi-copy sub-cluster the backup set belongs to), the storage address of each backup set, the archive log address, and the backup data volume.
[0068] Preferably, as the information set, the backup metadata includes the topology structure information of the distributed computing cluster, the type of each backup set, the source information of each backup set, the storage address of each backup set, the archive log address, and the backup data volume. In a specific implementation, in addition to these information, the backup metadata can also include other backup information.
[0069] In an exemplary embodiment, after the backup master node stores the backup metadata into the Catalog server, the method further comprises: the backup master node notifies the sub-cluster master node of the backup completion information; and the sub-cluster master node deletes the corresponding cache data in response to the backup completion information.
[0070] Among them, the backup master node notifies all other nodes of the entire cluster of backup completion information again, and the subset cluster master node can delete some cache data to complete the backup finishing work.
[0071] In an exemplary embodiment, the method further comprises: the background management server filtering out the service access nodes according to the topology information of the distributed computing cluster, and respectively distributing the backup recovery jobs to the metadata nodes in the metadata cluster and the data nodes in the data cluster; the metadata nodes and the data nodes respectively accessing the Catalog server to obtain backup metadata based on the backup recovery jobs, determining the backup set storage addresses and the archive log addresses of the corresponding nodes according to the backup metadata, downloading the archive logs from the storage server according to the archive log addresses, and performing a database recovery operation according to the backup sets corresponding to the backup set storage addresses in the storage server and the downloaded archive logs.
[0072] Among them, the background management server analyzes the topology information of the DPC cluster, filters out the SP nodes, and distributes the backup recovery tasks of the cluster to all metadata nodes (MP nodes) and data nodes (BP nodes). In an optional implementation, in the case that the backup recovery job belongs to an inter-cluster recovery job, one-to-one correspondence is performed according to the role relationship of the cluster nodes, and a specific node is notified to undertake the data recovery work of the target node corresponding to it in the source cluster.
[0073] After receiving the backup recovery job, the MP nodes and the BP nodes will respectively access and obtain the backup metadata defined by the Catalog; each node separately analyzes the entire backup metadata and obtains the address of the data set in the storage server. The cluster finds and downloads the required archive logs in the entire storage server through the metadata analysis. The backup sets of the server and the downloaded archive logs are used to perform the database recovery job respectively.
[0074] In this embodiment, the backup sets generated by each multi-copy subset cluster are used to perform data recovery or restoration of the multi-copy subset cluster, thereby realizing the recovery or restoration of the entire DPC cluster. Each node has its own separate archive log, and even if the archive logs of the multi-copy subset cluster are used across nodes, it is invalid.
[0075] In an optional implementation, the recovery of the DPC cluster is offline recovery, which requires closing the monitoring process of the database service. The recovery of any multi-copy subset cluster or single node in the DPC cluster is independent and does not affect each other. After the node is recovered, the database is started respectively, and the database will automatically detect and synchronize the cluster data according to the cluster configuration.
[0076] In order to ensure the consistency of the entire cluster data after the combined cluster is recovered, the method provided by the present example can manage and maintain the backup set and the archive log at a certain time point in the cluster, including management, query and intelligent download of all backup sets and related archive logs in the cluster.
[0077] In an exemplary embodiment, the method further comprises: in the case that the backup recovery job belongs to a cross-cluster recovery job, the metadata node modifies the registration information of each data node stored after the backup recovery is completed.
[0078] It can be understood that the cross-cluster recovery job refers to that the recovery cluster and the source backup cluster are two different clusters, and there are many different configurations when configuring, such as instance name, port number, machine IP address, etc. After the MP data of the source cluster is recovered to the new cluster, since the configuration information belongs to the configuration of the source cluster, it needs to be updated and synchronized according to the information of the new cluster. In a specific implementation, if it is a cross-cluster recovery, the MP is started in a single machine mode and the registration information of all nodes in the MP is modified, and then it is started in a cluster mode. The case that the backup recovery job belongs to the source cluster recovery job skips this step.
[0079] In an exemplary embodiment, with reference to Figure 3 , the backup process of the DPC cluster includes the following steps:
[0080] 1. The UI page intelligently binds the cluster according to the actual configured DPC environment, so that the page processes the databases of multiple nodes in the cluster as the entire cluster, and the user clicks any node to select the cluster backup of DPC.
[0081] 2. The backup task is issued from the front end to the background management server (backupd), at this time the backupd analyzes the topology structure of the entire cluster according to the background cluster data bound by the cluster, and dynamically selects one of the SP nodes in the cluster as the backup command issuing node (i.e. the master node of the entire cluster), and simultaneously issues the backup task of the cluster to all nodes in the cluster.
[0082] 3. After all nodes in the cluster receive the backup task, they query whether there is a backup task being executed in the cluster (whether the cluster lock is being used). If the lock is occupied, it means that a backup or recovery job is being executed in the cluster; if the lock is not occupied, the cluster lock is acquired and occupied, and some preparation work before backup is performed, such as generating configuration information by configuring the service to which the backup data is uploaded, and simultaneously notifying the information of the node in the cluster to the cluster management server, so that the cluster management server performs real-time data aggregation of the cluster.
[0083] 4, The cluster management server collects real-time information of all nodes in the entire cluster, performs summarization, and decides whether the entire DPC cluster has conditions for cluster backup (such as whether the entire cluster is in a normal state, whether a node occupies a cluster lock, etc.), and notifies each node in the cluster of the decision.
[0084] 5, The master node issues a database backup command to each node in the cluster in the case of obtaining a cluster lock.
[0085] 6, Each node separately connects a storage server to perform database backup according to parameters carried by the command issued by the master node and job parameter information distributed by backupd.
[0086] 7, The backup server returns the backup result to each node in the cluster separately.
[0087] 8, The master node summarizes the backup data result of each node, accesses the storage server again to read and verify the backup data of each node, and counts data, such as how much storage space is occupied by the entire cluster backup.
[0088] 9, The master node stores the statistical result of the entire cluster as metadata into the Catalog, including the composition structure of the entire cluster data, the data volume, and the instance information corresponding to each data set, etc.
[0089] 10, The master node notifies all other nodes in the entire cluster that the backup is completed, and some cache data can be deleted to complete the backup finishing work.
[0090] 11, The master node notifies backupd that the backup is completed.
[0091] 12, backupd returns information to the front-end page for display.
[0092] In an exemplary embodiment, with reference to Figure 4 , the recovery process of the DPC cluster includes the following steps:
[0093] 1, The UI page selects any node in the cluster for cluster recovery.
[0094] 2, backupd analyzes the cluster topology according to the data when the cluster is bound, filters out all SP nodes, and distributes the cluster recovery task to all MP nodes and BP nodes. If it is a heterogeneous cluster recovery, it will perform one-to-one correspondence of nodes according to the role relationship of the cluster nodes, and notify a specific node to undertake the data recovery work of the target node corresponding to it in the source cluster.
[0095] 3、These MP nodes and BP nodes access and obtain the metadata information defined by Catalog (i.e. Figure 3 the data backed up in the storage server) after receiving the cluster recovery task.
[0096] 4、Each node separately parses the entire metadata information and obtains the address of the data set in the storage server.
[0097] 5、The cluster finds and downloads the required archive log in the entire storage server through the data parsed by the metadata.
[0098] 6、The backup set of the storage server and the downloaded archive log are used to perform the database recovery job respectively. If it is a cross-cluster recovery, the MP needs to be started in a single-machine mode and the registration information of all nodes in the MP needs to be modified, and then the MP is started in a cluster mode (the source cluster recovery skips this step).
[0099] 7、The recovery result is notified to backupd.
[0100] 8、The recovery result is notified to the front-end page display by backupd.
[0101] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps. It can be understood that each step in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.
[0102] Based on the same inventive concept, the embodiments of the present application also provide a backup management system of a distributed computing cluster for implementing the backup management method of the distributed computing cluster involved in the above. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more backup management system embodiments of the distributed computing cluster provided below can refer to the limitations of the backup management method of the distributed computing cluster in the above, which will not be described herein again.
[0103] In an exemplary embodiment, as Figure 5As shown, a backup management system of a distributed computing cluster is provided, the system comprising a background management server 501, a distributed computing cluster 502, a cluster management server 503 and a storage server 504, the distributed computing cluster 502 comprising a plurality of service access nodes 5021, a metadata cluster 5022 and a plurality of data clusters 5023, the metadata cluster 5022 and the data clusters 5023 each adopting a plurality of replica sub-clusters, and each of the plurality of replica sub-clusters is provided with a sub-cluster master node; wherein:
[0104] The background management server 501 is configured to select a backup master node from the plurality of service access nodes 5021 according to topology structure information of the distributed computing cluster 502, and to respectively distribute backup sub-jobs to the backup master node and the sub-cluster master node.
[0105] The backup master node is configured to acquire cluster lock information based on the backup sub-jobs, and to send the cluster lock information to the cluster management server 503.
[0106] The sub-cluster master node is configured to perform backup configuration based on the backup sub-jobs, and to send configuration information to the cluster management server 503.
[0107] The cluster management server 503 is configured to make a backup decision according to the cluster lock information and the configuration information, and to notify the backup master node and the sub-cluster master node of a decision result.
[0108] The backup master node is further configured to send a backup command to the sub-cluster master node in a case where it is determined according to the decision result that a cluster state meets a preset condition.
[0109] The sub-cluster master node is further configured to connect the storage server 504 and perform a database backup operation according to parameters carried in the backup command and parameters carried in the backup sub-jobs.
[0110] In an exemplary embodiment, the system further comprises a Catalog server, and the backup master node is further configured to aggregate backup operation results of each sub-cluster master node, access the storage server 504 to read backup data, verify the backup operation results against the read backup data, and after the verification passes, count backup metadata and store the backup metadata into the Catalog server.
[0111] In an exemplary embodiment, the backup metadata comprises at least one of topology structure information of the distributed computing cluster 502, a type of each backup set, source information of each backup set, a storage address of each backup set, an archive log address, and a backup data volume.
[0112] In an exemplary embodiment, the backup master node is further configured to notify the sub-cluster master node of backup completion information.
[0113] The sub-cluster master node is further configured to delete the corresponding cache data in response to the backup completion information.
[0114] In an exemplary embodiment, the background management server 501 is further configured to filter out the service access nodes 5021 according to the topology information of the distributed computing cluster 502, and distribute the backup recovery jobs to the metadata nodes in the metadata cluster 5022 and the data nodes in the data cluster 5023 respectively.
[0115] The metadata nodes and the data nodes respectively access the Catalog server to obtain backup metadata based on the backup recovery jobs, determine the backup set storage address and the archive log address of the corresponding nodes according to the backup metadata, download the archive log from the storage server 504 according to the archive log address, and perform a database recovery operation according to the backup set corresponding to the backup set storage address in the storage server 504 and the downloaded archive log.
[0116] In an exemplary embodiment, in the case where the backup recovery job belongs to a cross-cluster recovery job, the metadata node modifies the registration information of each data node stored after the backup recovery is completed.
[0117] The above-mentioned various modules in the backup management system of the distributed computing cluster can be realized by software, hardware and combinations thereof in whole or in part. The above-mentioned various modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned various modules.
[0118] In an exemplary embodiment, a computer device is provided, which can be a server, and the internal structure diagram thereof can be as shown in Figure 6 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a backup management method of a distributed computing cluster.
[0119] Those skilled in the art can understand that,Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In an exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0121] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0122] In an embodiment, a computer program product is provided, including a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0123] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0125] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0126] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A backup management method for a distributed computing cluster, characterized in that, The distributed computing cluster includes several service access nodes, a metadata cluster, and several data clusters. Both the metadata cluster and the data clusters employ multi-replica sub-clusters, and each multi-replica sub-cluster has a sub-cluster master node. The method includes: Based on the topology information of the distributed computing cluster, the backend management server selects a backup master node from the plurality of service access nodes and distributes backup sub-jobs to the backup master node and the sub-cluster master node respectively; The backup master node obtains cluster lock information based on the backup sub-job and sends the cluster lock information to the cluster management server; The sub-cluster master node performs backup configuration based on the backup sub-job and sends the configuration information to the cluster management server; The cluster management server makes backup decisions based on the cluster lock information and the configuration information, and notifies the backup master node and the sub-cluster master node of the decision results; When the backup master node determines that the cluster status meets the preset conditions based on the decision result, it sends a backup command to the sub-cluster master node. The sub-cluster master node connects to the storage server and performs database backup operations based on the parameters carried in the backup command and the parameters carried in the backup sub-job.
2. The method according to claim 1, characterized in that, After the sub-cluster master node performs the database backup operation, the method further includes: The backup master node summarizes the backup operation results of each sub-cluster master node, accesses the storage server to read back the backup data, verifies the backup operation results against the read-back backup data, and after the verification is successful, compiles the backup metadata and stores the backup metadata in the Catalog server.
3. The method according to claim 2, characterized in that, The backup metadata includes at least one of the following: the topology of the distributed computing cluster, the type of each backup set, the source information of each backup set, the storage address of each backup set, the archived log address, and the amount of backup data.
4. The method according to claim 1, characterized in that, After the backup master node stores the backup metadata in the Catalog server, the method further includes: The backup master node notifies the sub-cluster master node of backup completion information; The sub-cluster master node responds to the backup completion information by deleting the corresponding cached data.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The backend management server filters out the business access nodes based on the topology information of the distributed computing cluster, and distributes the backup and recovery jobs to the metadata nodes in the metadata cluster and the data nodes in the data cluster, respectively. The metadata node and the data node respectively access the Catalog server to obtain the backup metadata based on the backup and recovery job, determine the backup set storage address and archive log address of the corresponding node according to the backup metadata, download the archive log from the storage server according to the archive log address, and perform database recovery operation according to the backup set corresponding to the backup set storage address in the storage server and the downloaded archive log.
6. The method according to claim 5, characterized in that, The method further includes: When the backup and recovery job is a cross-cluster recovery job, the metadata node modifies the registration information of each data node after the backup and recovery is completed.
7. A backup management system for a distributed computing cluster, characterized in that, The system includes a backend management server, a distributed computing cluster, a cluster management server, and a storage server. The distributed computing cluster includes several business access nodes, a metadata cluster, and several data clusters. Both the metadata cluster and the data clusters adopt multi-replica sub-clusters, and each multi-replica sub-cluster has a sub-cluster master node. The background management server is used to select a backup master node from the plurality of business access nodes according to the topology information of the distributed computing cluster, and to distribute backup sub-jobs to the backup master node and the sub-cluster master node respectively. The backup master node is used to obtain cluster lock information based on the backup sub-job and send the cluster lock information to the cluster management server; The sub-cluster master node is used to perform backup configuration based on the backup sub-job and send the configuration information to the cluster management server; The cluster management server is used to make backup decisions based on the cluster lock information and the configuration information, and to notify the backup master node and the sub-cluster master node of the decision results; The backup master node is also used to send a backup command to the sub-cluster master node when the cluster status is determined to meet preset conditions based on the decision result. The sub-cluster master node is also used to connect to the storage server and perform database backup operations based on the parameters carried in the backup command and the parameters carried in the backup sub-job.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Database cluster backup system
CN115202929A
Backup method and device, equipment and storage medium
CN116974825A
Backup management method and device for main and standby clusters, computer equipment and storage medium
CN117667515A