A cloud cluster-based disaster recovery method, device, electronic device and storage medium

By obtaining and updating the disaster recovery configuration template, the problem of inflexible application recovery in cloud clusters during off-site disaster recovery is solved, and instant unboxing is realized after application recovery is achieved, ensuring the sustainability of the service.

CN119759647APending Publication Date: 2025-04-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411782519.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The disaster recovery solutions of existing cloud clusters are not flexible enough in off-site disaster recovery scenarios, resulting in off-site cluster applications that cannot be used out of the box and require manual adjustment or reconstruction, the steps are cumbersome and error-prone.

Method used

By obtaining the disaster recovery configuration template, update the configuration information in the backup file, and sending the updated backup file to the second subcluster, cross-cluster remote recovery is achieved.

Benefits of technology

It realizes instant unboxing after application recovery, avoids additional configuration time and ensures the sustainability of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759647A_ABST
    Figure CN119759647A_ABST
Patent Text Reader

Abstract

The present application provides a disaster recovery method, device, electronic device and storage medium based on a cloud cluster. Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is recovered, without the need to perform additional configuration on the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a disaster recovery method, device, electronic device and storage medium based on a cloud cluster. Background Art

[0002] In the cloud-native era, container orchestration technologies represented by Kubernetes have developed rapidly. Since the Kubernetes platform itself does not provide a disaster recovery solution, the more common disaster recovery solution in the industry is to back up and restore the cluster configuration data as is. Summary of the invention

[0003] The present application shows a disaster recovery method, device, electronic device and storage medium based on cloud cluster.

[0004] In a first aspect, the present application shows a disaster recovery method based on a cloud cluster, wherein the cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The method is applied to the first subcluster in the cloud cluster, and the method includes:

[0005] Obtaining a disaster recovery configuration template for a target application in the second subcluster, wherein the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters;

[0006] Acquire a current backup file of the target application in the first sub-cluster, wherein the current backup file includes current configuration information of each resource object involved in the target application in the first sub-cluster; the current configuration information of a resource object includes: a configuration parameter of the resource object and a current parameter value corresponding to the configuration parameter;

[0007] At least according to the target configuration parameter, searching the current backup file for current configuration information of the target resource object involved in the target application in the first sub-cluster;

[0008] In the current backup file, the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the found current configuration information, so as to obtain a target backup file applicable to the target application in the second sub-cluster;

[0009] The target backup file is sent to the second subcluster, so that the second subcluster stores the target backup file.

[0010] In a second aspect, the present application shows a disaster recovery method based on a cloud cluster, wherein the cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The method is applied to the second subcluster in the cloud cluster, and the method includes:

[0011] In the event of a target application failure in the second subcluster, obtaining a target backup file that is stored in the second subcluster and is applicable to the target application in the second subcluster;

[0012] Restoring the target application in the second subcluster based on the target backup file;

[0013] The target backup file is sent by the first subcluster to the second subcluster in advance; the target backup file is obtained by the first subcluster in the current backup file by using the target parameter value corresponding to the target configuration parameter to update the current parameter value corresponding to the target configuration parameter in the current configuration information found; the current configuration information found is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter; the current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter; the target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter; the incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

[0014] In a third aspect, the present application shows a disaster recovery device based on a cloud cluster, wherein the cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster, the device is applied to the first subcluster in the cloud cluster, and the device includes:

[0015] A first acquisition module is used to acquire a disaster recovery configuration template for a target application in the second sub-cluster, wherein the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second sub-cluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second sub-cluster and target parameter values ​​corresponding to the target configuration parameters;

[0016] A second acquisition module is used to acquire a current backup file of the target application in the first sub-cluster, wherein the current backup file includes current configuration information of each resource object involved in the target application in the first sub-cluster; the current configuration information of a resource object includes: a configuration parameter of the resource object and a current parameter value corresponding to the configuration parameter;

[0017] A search module, configured to search, in a current backup file, for current configuration information of a target resource object involved in a target application in the first sub-cluster according to at least a target configuration parameter;

[0018] An update module, configured to update the current parameter value corresponding to the target configuration parameter in the found current configuration information with the target parameter value corresponding to the target configuration parameter in the current backup file, so as to obtain a target backup file applicable to the target application in the second sub-cluster;

[0019] The sending module is used to send the target backup file to the second sub-cluster so that the second sub-cluster can store the target backup file.

[0020] In a fourth aspect, the present application shows a disaster recovery device based on a cloud cluster, wherein the cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster, and the device is applied to the second subcluster in the cloud cluster, and the device includes:

[0021] A third acquisition module is used to acquire a target backup file stored in the second subcluster and applicable to the target application in the second subcluster when the target application in the second subcluster fails;

[0022] A recovery module, used for restoring a target application in a second sub-cluster based on a target backup file;

[0023] The target backup file is sent by the first subcluster to the second subcluster in advance; the target backup file is obtained by the first subcluster in the current backup file by using the target parameter value corresponding to the target configuration parameter to update the current parameter value corresponding to the target configuration parameter in the current configuration information found; the current configuration information found is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter; the current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter; the target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter; the incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

[0024] In a fifth aspect, the present application illustrates an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.

[0025] In a sixth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.

[0026] In a seventh aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.

[0027] The technical solution provided by this application may have the following beneficial effects:

[0028] In the present application, a cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The first subcluster obtains a disaster recovery configuration template for the target application in the second subcluster, and the disaster recovery configuration template at least includes: incremental configuration information applicable to the target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; obtains a current backup file of the target application in the first subcluster, and the current backup file includes current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters; at least according to the target configuration parameters, in the current backup file, the current configuration information of the target resource object involved in the target application in the first subcluster is searched; in the current backup file, the target parameter values ​​corresponding to the target configuration parameters are used to update the current parameter values ​​corresponding to the target configuration parameters in the current configuration information found, and obtain a target backup file applicable to the target application in the second subcluster; sends the target backup file to the second subcluster, so that the second subcluster can store the target backup file.

[0029] In the event of a target application failure in the second subcluster, the second subcluster obtains a target backup file stored in the second subcluster and applicable to the target application in the second subcluster, and restores the target application in the second subcluster based on the target backup file.

[0030] Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. Secondly, according to the setting of the recovery task, flexible replacement of specific configuration data can be achieved, which has broad application prospects. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is restored, without the need to perform additional configuration of the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a flowchart of the steps of a cloud cluster-based disaster recovery method of the present application.

[0032] Figure 2 This is a flowchart of the steps of a cloud cluster-based disaster recovery method of the present application.

[0033] Figure 3 This is a structural block diagram of a cloud cluster-based disaster recovery device of the present application.

[0034] Figure 4 This is a structural block diagram of a cloud cluster-based disaster recovery device of the present application.

[0035] Figure 5 It is a block diagram of an electronic device of the present application.

[0036] Figure 6 It is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION

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

[0038] The solution of backing up and restoring the configuration data of the cluster as it is can achieve certain results for the backup and recovery of the same cluster, but it is not flexible enough in the scenario of off-site disaster recovery. Applications in off-site clusters cannot be used out of the box, and some adjustments may be required to restore services normally.

[0039] For example, the address of the image repository that the application in the remote cluster depends on has changed, the address of the out-of-cluster service referenced by the application in the remote cluster has changed, the address of the server that the application in the remote cluster depends on and needs to be bound to the load balancer has changed, etc.

[0040] In this way, after a remote cluster fails and the previous backup is used to restore the data, the configuration and services that the applications in the remote cluster depend on need to be manually adjusted or rebuilt. This step is cumbersome, error-prone, labor-intensive, and labor-intensive.

[0041] To this end, the solution of this application is proposed.

[0042] Before introducing the solution of the present application, the technical terms that may be involved in the present application are first explained.

[0043] Cloud native: A distributed cloud based on distributed deployment and unified operation and management, a set of cloud technology product systems built on technologies such as containers and microservices.

[0044] Kubernetes: A container orchestration engine open sourced by Google that supports automated deployment, large-scale scalability, and containerized application management. Kubernetes has comprehensive cluster management capabilities, including multi-level security protection and access mechanisms, multi-tenant application support capabilities, transparent service registration and service discovery mechanisms, built-in intelligent load balancers, powerful fault detection and self-healing capabilities, service rolling upgrades and online capacity expansion capabilities, scalable resource automatic scheduling mechanisms, and multi-granular resource quota management capabilities.

[0045] Etcd: A highly available distributed key-value storage system, mainly used for sharing configuration information and service discovery. It uses the Raft consensus algorithm to ensure strong data consistency and supports monitoring and updating of data. Etcd is one of the important components of container orchestration tools such as Kubernetes.

[0046] Velero: A disaster recovery and migration tool written in GO language that can safely back up, restore, and migrate Kubernetes cluster resources and persistent volumes.

[0047] Kubernetes API server: One of the core components of Kubernetes, it is the unified entry point for all service access (the unified entry point for all requests), and provides authentication, authorization, access control, API registration and discovery capabilities. It is also the front-end interface of the Kubernetes Cluster. Various client tools and other Kubernetes components can use it to manage various resources of the Cluster.

[0048] Deployment: One of the core workload controllers in Kubernetes, Deployment provides declarative management and automatic update mechanisms for application instances.

[0049] Endpoints: Endpoints is an important concept when using Services in a Kubernetes cluster. It allows you to associate a Service with a backend Pod or other service instances.

[0050] Service: It is used to abstract a stable network access address for a group of Pods that provide services. It is the core concept of Kubernetes in implementing microservices.

[0051] Pod: The smallest resource management component in Kubernetes. Pod is also the resource object that minimizes the running of containerized applications. A Pod represents a process running in the cluster.

[0052] Minio: An open source object storage server for storing and managing large-scale unstructured data, such as images, videos, log files, backups, and container images. MinIO aims to provide high-performance, high-availability, scalability, and ease-of-use object storage solutions for private, public, and hybrid cloud environments.

[0053] YAML: A highly readable format for expressing data serialization.

[0054] The present application shows a cloud cluster, which includes a first subcluster and a second subcluster, wherein the first subcluster is one of the subcluster in the cloud cluster, and the second subcluster is one of the subcluster in the cloud cluster except the first subcluster. The applications deployed in the first subcluster and the applications deployed in the second subcluster have an intersection, for example, the first subcluster has a target application deployed, and the second subcluster has a target application deployed. The present application is applicable to the case where there is an intersection between the applications deployed in the first subcluster and the applications deployed in the second subcluster.

[0055] The application may be an application program with certain functions, etc., and the present application does not limit the type of the application program. The target application deployed in the first sub-cluster is the same as the target application deployed in the second sub-cluster.

[0056] Reference Figure 1 , shows a flow chart of the steps of a cloud cluster-based disaster recovery method of the present application, wherein the method is applied to a first sub-cluster in a cloud cluster, and the method includes:

[0057] In step S101, a disaster recovery configuration template for a target application in the second sub-cluster is obtained, and the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second sub-cluster. The incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second sub-cluster and target parameter values ​​corresponding to the target configuration parameters.

[0058] The resource objects involved in the application can be understood as the resource objects that the application needs to use during its operation, such as external storage space, component library, and image repository, etc. The specific ones can be determined according to the actual needs or actual situation of the application, and will not be described in detail here.

[0059] Disaster recovery configuration templates can be expressed in JSON format and can be chained together.

[0060] The target configuration parameters include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, the current parameter value of the target resource object, the target resource identifier of the target resource object, and the target resource path of the target resource object.

[0061] The resource identifier of the resource object may include: the resource name of the resource object and / or a tag keyword of the resource object.

[0062] The types of operations that need to be performed on resource objects include: image repository address replacement, IP (Internet Protocol) address replacement, integer value (int) replacement, etc.

[0063] The resource path of the resource object is connected by the attribute name plus a separator. If an array type is encountered, the i-th element is represented by the number i-1.

[0064] In one embodiment, the disaster recovery configuration template can be embodied in the following manner:

[0065]

[0066] The resource path expression can be written in chain form, assembled in sequence according to the field names. When an array is encountered, it is represented by the array number, which is used to retrieve specific fields in the YAML format resource.

[0067] In step S102, the current backup file of the target application in the first sub-cluster is obtained, and the current backup file includes the current configuration information of each resource object involved in the target application in the first sub-cluster. The current configuration information of a resource object includes: a configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter.

[0068] The open source plug-in Velero can be installed in the first subcluster, and the open source Velero plug-in is called to generate a current backup file. For example, the open source plug-in Velero is called to perform a backup operation on the target application in the first subcluster, execute a backup command, and generate a current backup file of the target application in the first subcluster.

[0069] The current backup file of the target application in the first subcluster can be saved to a local or third-party object storage Minio.

[0070] In one example, the backup command may be:

[0071] "curl--location-requestPOST

[0072] 'http: / / 10.50.208.7:8001 / apis / ccse.k8s.io / v1 / backup / export' --header 'Content-Type: application / json' --data '{"name":"testapiexport","namespace":"default","kind":"pods,deployments.apps,configmaps,secrets","includePv":false,"clusterId":"10000"}'".

[0073] The command to download the current backup file to the local computer can be:

[0074] curl-otestapiexporthttp: / / 10.50.208.7:8001 / apis / ccse.k8s.io / v1 / backup / export / 10000 / testapiexport / download.

[0075] In step S103, current configuration information of a target resource object involved in a target application in the first sub-cluster is searched in the current backup file at least according to the target configuration parameter.

[0076] The interface opened by the Kubernetes API server can be called to query all resource objects in the non-system namespace in the first subcluster (the resource objects in the non-system namespace include the resource objects respectively involved in the various applications in the first subcluster), and obtain the current configuration information of the resource objects respectively involved in the various applications in the first subcluster, for example, the current configuration information in the YAML format.

[0077] According to the target configuration parameters, the current configuration information of the target resource objects involved in the target application in the first subcluster is searched in the current configuration information of the resource objects respectively involved in the various applications in the first subcluster, so that the target configuration parameters are expanded and enriched according to the configuration parameters in the current configuration information of the target resource objects involved in the target application, and configuration parameters richer than the target configuration parameters are obtained. Then, according to the enriched configuration parameters, the current configuration information of the target resource objects involved in the target application in the first subcluster can be searched more quickly and accurately in the current backup file, so as to improve the search efficiency and search accuracy and save time.

[0078] Secondly, the query targets all resource objects in the non-system namespace in the first subcluster, which has a small amount of data and saves memory space.

[0079] In step S104, in the current backup file, the target parameter value corresponding to the target configuration parameter in the found current configuration information is used to update the current parameter value corresponding to the target configuration parameter, so as to obtain a target backup file applicable to the target application in the second sub-cluster.

[0080] For example, in the current backup file, the target parameter value corresponding to the target configuration parameter is used to replace the current parameter value corresponding to the target configuration parameter in the found current configuration information, so as to obtain a target backup file suitable for the target application in the second sub-cluster.

[0081] In step S105 , the target backup file is sent to the second sub-cluster so that the second sub-cluster stores the target backup file.

[0082] This is convenient for using the target backup file to restore the target application in the second sub-cluster when the target application in the second sub-cluster fails. For details, see the following Figure 2 The illustrated embodiment will not be described in detail here.

[0083] In the present application, a cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The first subcluster obtains a disaster recovery configuration template for the target application in the second subcluster, and the disaster recovery configuration template at least includes: incremental configuration information applicable to the target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; obtains a current backup file of the target application in the first subcluster, and the current backup file includes current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters; at least according to the target configuration parameters, in the current backup file, the current configuration information of the target resource object involved in the target application in the first subcluster is searched; in the current backup file, the target parameter values ​​corresponding to the target configuration parameters are used to update the current parameter values ​​corresponding to the target configuration parameters in the current configuration information found, and obtain a target backup file applicable to the target application in the second subcluster; sends the target backup file to the second subcluster, so that the second subcluster can store the target backup file.

[0084] In the event of a target application failure in the second subcluster, the second subcluster obtains a target backup file stored in the second subcluster and applicable to the target application in the second subcluster, and restores the target application in the second subcluster based on the target backup file.

[0085] Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. Secondly, according to the setting of the recovery task, flexible replacement of specific configuration data can be achieved, which has broad application prospects. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is restored, without the need to perform additional configuration of the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services.

[0086] In one embodiment of the present application, the target configuration parameters of the target resource object involved in the target application in the second subcluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, and the current parameter value of the target resource object.

[0087] For example, incremental configuration information is used to match resource objects based on resource type + current parameter value.

[0088] For example, the incremental configuration information of the target resource objects involved in the target application in the second sub-cluster configured by the disaster recovery configuration template includes:

[0089] {"filterActions":[{"action":"imageReplace","newVal":"192.168.205.20:32000","oldVal":"172.31.100.1:32000","kinds":"Deployment"}]}.

[0090] In this way, all resource objects of the "Deployment" type with the current parameter value "172.31.100.1:32000" can be searched, and then the image warehouse address in the image template can be replaced in batches from 172.31.100.1:32000 ("imageReplace" represents image warehouse address replacement) to the target parameter value "192.168.205.20:32000".

[0091] Accordingly, when searching for current configuration information of target resource objects involved in the target application in the first subcluster in the current backup file according to the target configuration parameters, configuration information of resource objects whose parameter values ​​are the current parameter values ​​and whose resource types are the target resource types can be searched in the current backup file and used as the current configuration information of the target resource objects.

[0092] Correspondingly, in the current backup file, when the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the current configuration information found, and the target backup file suitable for the target application in the second sub-cluster is obtained, the operation corresponding to the target operation type can be performed on the current parameter value corresponding to the target configuration parameter in the current configuration information found according to the target parameter value in the current backup file to obtain the target backup file suitable for the target application in the second sub-cluster.

[0093] In another embodiment of the present application, the target configuration parameters of the target resource object involved in the target application in the second subcluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, the target resource identifier of the target resource object, and the target resource path of the target resource object.

[0094] For example, the incremental configuration information is used to match resource objects according to resource type + resource identifier + resource path.

[0095] For example, the incremental configuration information of the target resource objects involved in the target application in the second sub-cluster configured by the disaster recovery configuration template includes:

[0096] {"filterActions": [{"action": "replace_int", "newVal": "192.168.4.154", "prop": "subsets.0.addresses.0.ip"}], "kinds": "Endpoints", "name": "mysql-service", "labelselector": "mysql-service"}.

[0097] You can then search for a resource object with a resource name of mysql-service, a resource type of Endpoints, and located under the path "subsets.0.addresses.0.ip", and replace the value of the ip field of the first embedded object in the addresses field of the first embedded object in the subsets field (array subscript is 0) in the resource object with "192.168.4.154".

[0098] Accordingly, when searching for the current configuration information of the target resource object involved in the target application in the first subcluster in the current backup file at least based on the target configuration parameters, the configuration information of the resource object whose resource path is the target resource path, the resource type is the target resource type, and the resource identifier is the target resource identifier can be searched in the current backup file and used as the current configuration information of the target resource object.

[0099] Correspondingly, in the current backup file, when the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the current configuration information found, and the target backup file suitable for the target application in the second sub-cluster is obtained, the operation corresponding to the target operation type can be performed on the current parameter value corresponding to the target configuration parameter in the current configuration information found according to the target parameter value in the current backup file to obtain the target backup file suitable for the target application in the second sub-cluster.

[0100] This application defines two different disaster recovery configuration templates, one for matching resource objects based on resource type + current parameter value (adapting to the scenario of batch adjustment configuration), and the other for matching resource objects based on resource type + resource identifier + resource path (adapting to the scenario of precise adjustment configuration). It can be flexibly combined to reduce duplication of work while meeting personalized requirements, and realize out-of-the-box use of applications after recovery. It has the advantages of intuitive configuration, flexible functions, and easy operation, and has broad application prospects.

[0101] Reference Figure 2 , shows a flow chart of the steps of a cloud cluster-based disaster recovery method of the present application, wherein the method is applied to a second sub-cluster in the cloud cluster, and the method includes:

[0102] In step S201, when a target application in the second sub-cluster fails, a target backup file that is stored in the second sub-cluster and is applicable to the target application in the second sub-cluster is obtained.

[0103] In step S202 , the target application is restored in the second subcluster based on the target backup file.

[0104] The target backup file is sent by the first subcluster to the second subcluster in advance. The target backup file is obtained by the first subcluster updating the current parameter value corresponding to the target configuration parameter in the current configuration information found by using the target parameter value corresponding to the target configuration parameter in the current backup file. The found current configuration information is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter. The current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster. The current configuration information of a resource object includes: a configuration parameter of a resource object and the current parameter value corresponding to the configuration parameter. The target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter. The incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, and the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

[0105] In the present application, a cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The first subcluster obtains a disaster recovery configuration template for the target application in the second subcluster, and the disaster recovery configuration template at least includes: incremental configuration information applicable to the target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; obtains a current backup file of the target application in the first subcluster, and the current backup file includes current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters; at least according to the target configuration parameters, in the current backup file, the current configuration information of the target resource object involved in the target application in the first subcluster is searched; in the current backup file, the target parameter values ​​corresponding to the target configuration parameters are used to update the current parameter values ​​corresponding to the target configuration parameters in the current configuration information found, and obtain a target backup file applicable to the target application in the second subcluster; sends the target backup file to the second subcluster, so that the second subcluster can store the target backup file.

[0106] In the event of a target application failure in the second subcluster, the second subcluster obtains a target backup file stored in the second subcluster and applicable to the target application in the second subcluster, and restores the target application in the second subcluster based on the target backup file.

[0107] Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. Secondly, according to the setting of the recovery task, flexible replacement of specific configuration data can be achieved, which has broad application prospects. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is restored, without the need to perform additional configuration of the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services.

[0108] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0109] Reference Figure 3 , shows a disaster recovery device based on a cloud cluster of the present application, the cloud cluster includes a first sub-cluster and a second sub-cluster, the first sub-cluster has a target application deployed, the second sub-cluster has a target application deployed, the device is applied to the first sub-cluster in the cloud cluster, and the device includes:

[0110] The first acquisition module 11 is used to acquire a disaster recovery configuration template for a target application in the second sub-cluster, wherein the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second sub-cluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second sub-cluster and target parameter values ​​corresponding to the target configuration parameters;

[0111] The second acquisition module 12 is used to acquire the current backup file of the target application in the first sub-cluster, wherein the current backup file includes the current configuration information of each resource object involved in the target application in the first sub-cluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters;

[0112] A search module 13, configured to search the current configuration information of the target resource object involved in the target application in the first sub-cluster in the current backup file at least according to the target configuration parameter;

[0113] An updating module 14 is configured to update the current parameter value corresponding to the target configuration parameter in the found current configuration information using the target parameter value corresponding to the target configuration parameter in the current backup file, so as to obtain a target backup file applicable to the target application in the second sub-cluster;

[0114] The sending module 15 is configured to send the target backup file to the second sub-cluster so that the second sub-cluster can store the target backup file.

[0115] In an optional implementation, the target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: a target resource type of the target resource object, a target operation type of an operation to be performed on the target resource object, and a current parameter value of the target resource object;

[0116] Accordingly, the search module includes:

[0117] A first search unit is used to search for configuration information of a resource object whose parameter value is the current parameter value and whose resource type is the target resource type in the current backup file, and use the configuration information as the current configuration information of the target resource object;

[0118] Accordingly, the update module includes:

[0119] The first execution unit is used to execute an operation corresponding to a target operation type on a current parameter value corresponding to a target configuration parameter in the found current configuration information in the current backup file according to the target parameter value, so as to obtain a target backup file suitable for a target application in the second sub-cluster.

[0120] In an optional implementation, the target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: a target resource type of the target resource object, a target operation type of an operation to be performed on the target resource object, a target resource identifier of the target resource object, and a target resource path of the target resource object;

[0121] Accordingly, the search module includes:

[0122] A second searching unit is used to search for configuration information of a resource object whose resource path is the target resource path, whose resource type is the target resource type and whose resource identifier is the target resource identifier in the current backup file, and use the configuration information as the current configuration information of the target resource object;

[0123] Accordingly, the update module includes:

[0124] The second execution unit is used to execute the operation corresponding to the target operation type for the current parameter value corresponding to the target configuration parameter in the found current configuration information in the current backup file according to the target parameter value, so as to obtain the target backup file suitable for the target application in the second subcluster.

[0125] In the present application, a cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The first subcluster obtains a disaster recovery configuration template for the target application in the second subcluster, and the disaster recovery configuration template at least includes: incremental configuration information applicable to the target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; obtains a current backup file of the target application in the first subcluster, and the current backup file includes current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters; at least according to the target configuration parameters, in the current backup file, the current configuration information of the target resource object involved in the target application in the first subcluster is searched; in the current backup file, the target parameter values ​​corresponding to the target configuration parameters are used to update the current parameter values ​​corresponding to the target configuration parameters in the current configuration information found, and obtain a target backup file applicable to the target application in the second subcluster; sends the target backup file to the second subcluster, so that the second subcluster can store the target backup file.

[0126] In the event of a target application failure in the second subcluster, the second subcluster obtains a target backup file stored in the second subcluster and applicable to the target application in the second subcluster, and restores the target application in the second subcluster based on the target backup file.

[0127] Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. Secondly, according to the setting of the recovery task, flexible replacement of specific configuration data can be achieved, which has broad application prospects. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is restored, without the need to perform additional configuration of the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services.

[0128] Reference Figure 4 , shows a disaster recovery device based on a cloud cluster of the present application, the cloud cluster includes a first sub-cluster and a second sub-cluster, the first sub-cluster has a target application deployed, the second sub-cluster has a target application deployed, the device is applied to the second sub-cluster in the cloud cluster, and the device includes:

[0129] The third acquisition module 21 is used to acquire a target backup file stored in the second subcluster and applicable to the target application in the second subcluster when the target application in the second subcluster fails;

[0130] A recovery module 22, configured to restore the target application in the second sub-cluster based on the target backup file;

[0131] The target backup file is sent by the first subcluster to the second subcluster in advance; the target backup file is obtained by the first subcluster in the current backup file by using the target parameter value corresponding to the target configuration parameter to update the current parameter value corresponding to the target configuration parameter in the current configuration information found; the current configuration information found is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter; the current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter; the target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter; the incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

[0132] In the present application, a cloud cluster includes a first subcluster and a second subcluster, a target application is deployed in the first subcluster, and a target application is deployed in the second subcluster. The first subcluster obtains a disaster recovery configuration template for the target application in the second subcluster, and the disaster recovery configuration template at least includes: incremental configuration information applicable to the target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; obtains a current backup file of the target application in the first subcluster, and the current backup file includes current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameters of the resource object and the current parameter values ​​corresponding to the configuration parameters; at least according to the target configuration parameters, in the current backup file, the current configuration information of the target resource object involved in the target application in the first subcluster is searched; in the current backup file, the target parameter values ​​corresponding to the target configuration parameters are used to update the current parameter values ​​corresponding to the target configuration parameters in the current configuration information found, and obtain a target backup file applicable to the target application in the second subcluster; sends the target backup file to the second subcluster, so that the second subcluster can store the target backup file.

[0133] In the event of a target application failure in the second subcluster, the second subcluster obtains a target backup file stored in the second subcluster and applicable to the target application in the second subcluster, and restores the target application in the second subcluster based on the target backup file.

[0134] Through the present application, the update process of the parameter values ​​of the resource objects involved in the application in the sub-cluster is described using a predefined disaster recovery configuration template, which is predictable and plannable, avoiding the problems of configuration adjustment confusion, manual repeated adjustment, and difficult to track change records. Secondly, according to the setting of the recovery task, flexible replacement of specific configuration data can be achieved, which has broad application prospects. In addition, during the cross-cluster off-site recovery process, there is no intrusion on the second sub-cluster, so that the second sub-cluster can immediately unpack and use the target application after the target application is restored, without the need to perform additional configuration of the parameter values ​​of the resource objects involved in the target application in the second sub-cluster, and no additional configuration time is consumed, that is, the target application in the second sub-cluster does not have unavailable time after recovery, ensuring the sustainability of the target application in the second sub-cluster in providing external services.

[0135] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0136] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0137] Figure 5 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0138] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0139] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0140] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0141] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0142] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also monitor the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0143] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0144] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0145] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can monitor the open / closed state of the device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also monitor the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to monitor the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0146] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0147] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0148] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0149] Figure 61 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.

[0150] Reference Figure 6 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0151] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0154] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0155] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0157] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0160] If the functions are implemented in the form of 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 the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A cloud cluster-based disaster recovery method, characterized in that: The cloud cluster includes a first subcluster and a second subcluster, the first subcluster has a target application deployed in it, and the second subcluster has a target application deployed in it. The method is applied to the first subcluster in the cloud cluster, and the method includes: Obtaining a disaster recovery configuration template for a target application in the second subcluster, wherein the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second subcluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second subcluster and target parameter values ​​corresponding to the target configuration parameters; Acquire a current backup file of the target application in the first sub-cluster, wherein the current backup file includes current configuration information of each resource object involved in the target application in the first sub-cluster; the current configuration information of a resource object includes: a configuration parameter of the resource object and a current parameter value corresponding to the configuration parameter; At least according to the target configuration parameters, searching the current backup file for current configuration information of the target resource object involved in the target application in the first sub-cluster; In the current backup file, the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the found current configuration information, so as to obtain a target backup file applicable to the target application in the second sub-cluster; The target backup file is sent to the second subcluster, so that the second subcluster stores the target backup file.

2. The method according to claim 1, characterized in that The target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, and the current parameter value of the target resource object; Accordingly, searching the current backup file for the current configuration information of the target resource object involved in the target application in the first sub-cluster at least according to the target configuration parameter includes: In the current backup file, search for configuration information of a resource object whose parameter value is the current parameter value and whose resource type is the target resource type, and use the configuration information as the current configuration information of the target resource object; Accordingly, in the current backup file, the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the current configuration information found, to obtain a target backup file suitable for the target application in the second sub-cluster, including: In the current backup file, according to the target parameter value, an operation corresponding to the target operation type is performed on the current parameter value corresponding to the target configuration parameter in the found current configuration information to obtain a target backup file suitable for the target application in the second sub-cluster.

3. The method according to claim 1, characterized in that The target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, the target resource identifier of the target resource object, and the target resource path of the target resource object; Accordingly, searching the current backup file for the current configuration information of the target resource object involved in the target application in the first sub-cluster at least according to the target configuration parameter includes: In the current backup file, search for configuration information of a resource object whose resource path is the target resource path, whose resource type is the target resource type, and whose resource identifier is the target resource identifier, and use the configuration information as the current configuration information of the target resource object; Accordingly, in the current backup file, the target parameter value corresponding to the target configuration parameter is used to update the current parameter value corresponding to the target configuration parameter in the current configuration information found, to obtain a target backup file suitable for the target application in the second sub-cluster, including: In the current backup file, according to the target parameter value, an operation corresponding to the target operation type is performed on the current parameter value corresponding to the target configuration parameter in the found current configuration information to obtain a target backup file suitable for the target application in the second sub-cluster.

4. A cloud cluster-based disaster recovery method, characterized in that: The cloud cluster includes a first subcluster and a second subcluster, the first subcluster has a target application deployed in it, the second subcluster has a target application deployed in it, the method is applied to the second subcluster in the cloud cluster, and the method includes: In the case of a target application failure in the second subcluster, obtaining a target backup file that is stored in the second subcluster and is applicable to the target application in the second subcluster; Restoring the target application in the second subcluster based on the target backup file; The target backup file is sent by the first subcluster to the second subcluster in advance; the target backup file is obtained by the first subcluster in the current backup file by using the target parameter value corresponding to the target configuration parameter to update the current parameter value corresponding to the target configuration parameter in the current configuration information found; the current configuration information found is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter; the current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter; the target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter; the incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

5. A disaster recovery device based on a cloud cluster, characterized in that: The cloud cluster includes a first subcluster and a second subcluster, the first subcluster has a target application deployed therein, the second subcluster has a target application deployed therein, the device is applied to the first subcluster in the cloud cluster, and the device includes: A first acquisition module is used to acquire a disaster recovery configuration template for a target application in the second sub-cluster, wherein the disaster recovery configuration template at least includes: incremental configuration information applicable to a target resource object involved in the target application in the second sub-cluster; the incremental configuration information includes: target configuration parameters of the target resource object involved in the target application in the second sub-cluster and target parameter values ​​corresponding to the target configuration parameters; A second acquisition module is used to acquire a current backup file of the target application in the first sub-cluster, wherein the current backup file includes current configuration information of each resource object involved in the target application in the first sub-cluster; the current configuration information of a resource object includes: a configuration parameter of the resource object and a current parameter value corresponding to the configuration parameter; A search module, configured to search, in a current backup file, for current configuration information of a target resource object involved in a target application in the first sub-cluster according to at least a target configuration parameter; An update module, configured to update the current parameter value corresponding to the target configuration parameter in the found current configuration information with the target parameter value corresponding to the target configuration parameter in the current backup file, so as to obtain a target backup file applicable to the target application in the second sub-cluster; The sending module is used to send the target backup file to the second sub-cluster so that the second sub-cluster can store the target backup file.

6. The device according to claim 5, characterized in that The target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, and the current parameter value of the target resource object; Accordingly, the search module includes: A first search unit is used to search for configuration information of a resource object whose parameter value is the current parameter value and whose resource type is the target resource type in the current backup file, and use the configuration information as the current configuration information of the target resource object; Accordingly, the update module includes: The first execution unit is used to execute an operation corresponding to a target operation type on a current parameter value corresponding to a target configuration parameter in the found current configuration information in the current backup file according to the target parameter value, so as to obtain a target backup file suitable for a target application in the second sub-cluster.

7. The device according to claim 5, characterized in that The target configuration parameters of the target resource object involved in the target application in the second sub-cluster include: the target resource type of the target resource object, the target operation type of the operation to be performed on the target resource object, the target resource identifier of the target resource object, and the target resource path of the target resource object; Accordingly, the search module includes: A second searching unit is used to search for configuration information of a resource object whose resource path is the target resource path, whose resource type is the target resource type and whose resource identifier is the target resource identifier in the current backup file, and use the configuration information as the current configuration information of the target resource object; Accordingly, the update module includes: The second execution unit is used to execute the operation corresponding to the target operation type for the current parameter value corresponding to the target configuration parameter in the found current configuration information in the current backup file according to the target parameter value, so as to obtain the target backup file suitable for the target application in the second subcluster.

8. A disaster recovery device based on cloud cluster, characterized in that: The cloud cluster includes a first subcluster and a second subcluster, the first subcluster has a target application deployed therein, the second subcluster has a target application deployed therein, the device is applied to the second subcluster in the cloud cluster, and the device includes: A third acquisition module is used to acquire a target backup file stored in the second subcluster and applicable to the target application in the second subcluster when the target application in the second subcluster fails; A recovery module, used for restoring a target application in a second sub-cluster based on a target backup file; The target backup file is sent by the first subcluster to the second subcluster in advance; the target backup file is obtained by the first subcluster in the current backup file by using the target parameter value corresponding to the target configuration parameter to update the current parameter value corresponding to the target configuration parameter in the current configuration information found; the current configuration information found is the current configuration information of the target resource object involved in the target application in the first subcluster found by the first subcluster in the current backup file at least according to the target configuration parameter; the current backup file is the current backup file of the target application in the first subcluster obtained by the first subcluster, and the current backup file includes the current configuration information of each resource object involved in the target application in the first subcluster; the current configuration information of a resource object includes: the configuration parameter of the resource object and the current parameter value corresponding to the configuration parameter; the target configuration parameter is the configuration parameter of the target resource object involved in the target application in the second subcluster in the incremental configuration information, and the incremental configuration information also includes: the target parameter value corresponding to the target configuration parameter; the incremental configuration information is the incremental configuration information applicable to the target resource object involved in the target application in the second subcluster, the incremental configuration information is located in the disaster recovery configuration template, and the disaster recovery configuration template is the disaster recovery configuration template for the target application in the second subcluster obtained in the first subcluster.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the cloud cluster-based disaster recovery method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the cloud cluster-based disaster recovery method according to any one of claims 1 to 4 is implemented.