Off-capacitance recovery method, device and equipment and readable storage medium

By deploying a triggered backup and restore controller and distributed storage module in the Kubernetes cluster, the problem of insufficient granularity of backup and restore and cross-cluster migration is solved, automatic backup and real-time capacity recovery are realized, and the capacity of the same cluster and across clusters is supported. disaster recovery.

CN118819947APending Publication Date: 2024-10-22CHINA MOBILE GROUP ZHEJIANG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311575468.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing cluster data backup and restoration methods have problems such as insufficient granularity of backup and restoration, no real-time backup capabilities, and no support for cross-cluster migration.

Method used

By deploying a triggered backup and restore controller in the original cluster and the new cluster at the same time, configuring it to access data from the distributed storage module, the backup resources will be stored in the distributed storage module based on the backup task resource object created by the service module, and stored in the same cluster. Or apply these backup resources during cross-cluster recovery.

Benefits of technology

It implements automatic backup and capacity recovery within the same cluster and across clusters, supports real-time backup and triggered backup capabilities, and ensures high availability and cross-cluster migration of backup resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819947A_ABST
    Figure CN118819947A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a quenching recovery method and device, equipment and a readable storage medium. The extinguishing recovery method is applied to the extinguishing recovery system comprising a service module, a trigger type backup recovery controller and a distributed storage module. A trigger type backup and restoration controller is deployed in each cluster, the trigger type backup and restoration controller is configured to store and acquire data from a distributed storage module, and backup resources corresponding to backup tasks are stored in the distributed storage module. When the same cluster capacitance recovery is executed, the backup resources in the distributed storage module are applied to the original cluster; and when cross-cluster quenching recovery is executed, the backup resources in the distributed storage module are applied to the new cluster. And automatic backup and extinguishing recovery of the same cluster and the cross-cluster are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and readable storage medium for recovering from a lost or destroyed storage. Background Art

[0002] Kubernetes is a popular container orchestration platform that can be used to automate the deployment, expansion, and management of containerized applications. It has been widely used in cloud-native container platforms. In order to ensure the high availability and data security of the Kubernetes cluster data, it is usually necessary to back up the cluster data regularly. However, in some cases, the backup resources may need to restore the data back to the original cluster or migrate it to another Kubernetes cluster. However, the existing cluster data backup and restore methods have the following shortcomings: the backup and restore granularity is not fine enough; there is no real-time backup and lack of triggered backup capabilities; cross-cluster migration is not supported. Summary of the invention

[0003] The embodiments of the present application provide a method, device, equipment and readable storage medium for tolerant recovery, which are used to solve the above technical problems existing in the existing cluster data backup and restoration methods.

[0004] In a first aspect, an embodiment of the present application provides a method for recovering a failed container, which is applied to a failed container recovery system. The failed container recovery system includes a service module, a triggered backup and restore controller, and a distributed storage module. The failed container recovery method includes:

[0005] Deploy the trigger-type backup and restore controller in both the original cluster and the new cluster, and configure the trigger-type backup and restore controller to access data to the distributed storage module;

[0006] Based on the backup task resource object created by the service module, the backup resources are stored in the distributed storage module;

[0007] In case of performing the same cluster destruction recovery, applying the backup resources to the original cluster;

[0008] In the case of performing cross-cluster tolerance recovery, the backup resources are applied to the new cluster.

[0009] In one embodiment, the backup task resource object created based on the network module, after storing the backup resource in the distributed storage module, comprises:

[0010] The resources of the original cluster are monitored, and when the resources of the original cluster are changed, the changed resources are stored in the distributed storage module.

[0011] In one embodiment, the system for recovering from a lost container also includes a database module; and the method for recovering from a lost container also includes:

[0012] In the case of performing inter-cluster node migration, obtaining information of nodes to be migrated from the database module;

[0013] The original cluster is cleaned up based on the information of the nodes to be migrated, and the nodes corresponding to the information of the nodes to be migrated are added to the new cluster.

[0014] In one embodiment, the storage and recovery system further includes a network module; based on the backup task resource object created by the service module, storing the backup resource in the distributed storage module includes:

[0015] Sending the backup task created by the user based on the network module to the service module;

[0016] storing the task information, cluster information and user information determined by the service module based on the backup task into the database module;

[0017] Determine a backup task table based on the task information and the cluster information;

[0018] The backup resources corresponding to the backup task table are stored in the distributed storage module.

[0019] In one embodiment, storing the backup resources in the distributed storage module based on the backup task resource object created by the service module further comprises:

[0020] Based on the backup task resource object created by the service module, determine the cluster to be backed up and the backup mode, where the backup mode includes full backup, namespace backup, and tag filtering backup;

[0021] In the full backup mode, when it is detected that the resource objects of the cluster to be backed up have changed, the changed resource objects are synchronized to the distributed storage module;

[0022] In the namespace backup mode, when the resource objects under the monitored namespace change, the changed resource objects are synchronized to the distributed storage module;

[0023] In the tag screening backup mode, when it is detected that the tag of the changed resource object matches the backup task resource object, the changed resource object is synchronized to the distributed storage module.

[0024] In one embodiment, in the case of performing the same cluster destruction recovery, applying the backup resource to the original cluster includes:

[0025] In the case of performing cluster failure recovery, obtaining cluster failure recovery form information from the service module;

[0026] Based on the form information of the same cluster destruction and recovery, the backup resources downloaded from the distributed storage module are applied to the original cluster.

[0027] In one embodiment, in the case of performing cross-cluster tolerance recovery, applying the backup resource to the new cluster includes:

[0028] In the case of performing cross-cluster tolerance and destruction recovery, obtaining cross-cluster tolerance and destruction recovery form information from the service module;

[0029] Based on the cross-cluster recovery form information, the backup resources downloaded from the distributed storage module are applied to the new cluster.

[0030] In a second aspect, an embodiment of the present application provides a device for restoring a lost capacity, including:

[0031] A triggered backup and restore controller deployment module is used to deploy a triggered backup and restore controller in both the original cluster and the new cluster, and configure the triggered backup and restore controller to access data to the distributed storage module;

[0032] A backup resource storage module, used to store the backup resources in the distributed storage module based on the backup task resource object created by the service module;

[0033] A cluster failure recovery module, used to apply the backup resources to the original cluster when performing cluster failure recovery;

[0034] The cross-cluster failure recovery module is used to apply the backup resources to the new cluster when performing cross-cluster failure recovery.

[0035] In a third aspect, an embodiment of the present application provides a device, including a processor and a memory storing a computer program, wherein the processor implements the method for recovery from loss of capacity described in the first aspect when executing the computer program.

[0036] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for recovering from loss of capacity described in the first aspect is implemented.

[0037] The method, device, equipment and readable storage medium for failure recovery provided by the embodiments of the present application deploy a triggered backup and restore controller in each cluster, configure the triggered backup and restore controller to store and obtain data from the distributed storage module, and store the backup resources corresponding to the backup task in the distributed storage module. When performing failure recovery within the same cluster, the backup resources in the distributed storage module are applied to the original cluster; when performing failure recovery across clusters, the backup resources in the distributed storage module are applied to the new cluster. Automatic backup, failure recovery within the same cluster and across clusters are achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 This is one of the flowcharts of the method for restoring the lost capacity provided in the embodiment of the present application;

[0040] Figure 2 It is a framework diagram of the storage and recovery system provided in the embodiment of the present application;

[0041] Figure 3 This is the second flow chart of the method for restoring the lost capacity provided in the embodiment of the present application;

[0042] Figure 4 It is a structural schematic diagram of a storage device for recovery provided in an embodiment of the present application;

[0043] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] Reference Figure 1 , Figure 1 This is one of the flow charts of the method for recovering from a failed container failure in the embodiment of the present application. The method for recovering from a failed container failure provided in the embodiment of the present application may include:

[0046] Step 100, deploying the trigger-type backup and restore controller in both the original cluster and the new cluster, and configuring the trigger-type backup and restore controller to access data to the distributed storage module;

[0047] Specifically, Figure 2 As shown, the disaster recovery system provided by the present application includes a network module, a service module, a database, a distributed storage module, a triggered backup and restore controller, and an inter-cluster node migration module. It is necessary to deploy a customized triggered backup and restore controller in both the original cluster and the cluster (new cluster) used for disaster recovery in advance, and configure the (triggered backup and restore) controller to obtain data from the same distributed storage module and store data in the same distributed storage module.

[0048] Step 200, based on the backup task resource object created by the service module, the backup resource is stored in the distributed storage module;

[0049] Specifically, the user creates a backup resource task through the network module, and the backup resource task is sent to the service module. The service module stores the backup task information in the database for display and use. At the same time, the backup task information is converted into a crd object in the cluster; the triggered backup and restore controller reads the crd information and filters resources according to the backup mode; the filtered resources are saved to the distributed storage; the custom generated crd related resources are also automatically synchronized to the distributed storage when the backup task is created, so that the related crd resources of the backup task can be used by the cluster for disaster recovery.

[0050] Step 300, in the case of performing the same cluster destruction recovery, applying the backup resource to the original cluster;

[0051] Step 400: In case of performing cross-cluster failure recovery, the backup resources are applied to the new cluster.

[0052] The difference between the same-cluster and cross-cluster recovery processes is the cluster to which the backup resources downloaded from the distributed storage are restored. In the case of same-cluster recovery, the downloaded backup resources are applied to the original cluster; in the case of same-cluster recovery, the downloaded backup resources are applied to the new cluster.

[0053] This embodiment deploys a triggered backup and restore controller in each cluster, configures the triggered backup and restore controller to store and obtain data from the distributed storage module, and stores the backup resources corresponding to the backup task in the distributed storage module. When performing the same cluster failure recovery, the backup resources in the distributed storage module are applied to the original cluster; when performing cross-cluster failure recovery, the backup resources in the distributed storage module are applied to the new cluster. Automatic backup, same cluster and cross-cluster failure recovery are achieved.

[0054] In one embodiment, the method for recovering from a lost state provided in the embodiment of the present application may further include:

[0055] Step 500: monitor the resources of the original cluster, and when the resources of the original cluster change, store the changed resources in the distributed storage module.

[0056] Specifically, in terms of the triggered backup implementation process, the custom (triggered) backup and restore controller uses the cluster's monitoring mechanism to monitor changes in cluster resources when users modify resources in the cluster; the backup and restore controller is defined to obtain the label and namespace information of the changed resources through the cluster interface; the custom backup and restore controller compares the obtained resource object information with the previous backup task to determine whether to trigger the backup. In the case of triggered backup, the changed resources are stored in the distributed storage module.

[0057] This embodiment implements triggered backup through the monitoring mechanism of the cluster.

[0058] In one embodiment, the method for recovering from a lost state provided in the embodiment of the present application may further include:

[0059] Step 600, when performing inter-cluster node migration, obtaining information of nodes to be migrated from the database module;

[0060] Step 700: clean up nodes in the original cluster based on the information of the nodes to be migrated, and add the nodes corresponding to the information of the nodes to be migrated to the new cluster.

[0061] Specifically, due to business firewalls, whitelists, or the need for applications to run on a specified host, if the application is simply copied to the new cluster, the application itself will not function properly. At the same time, if the ingress node on the upper layer of the application is not migrated to the new cluster, the application cannot be accessed normally. Therefore, in some scenarios, it is necessary to migrate the original cluster nodes to ensure that the working nodes between clusters can be quickly migrated. The following is the interaction process of node migration between clusters:

[0062] (1) The user triggers the inter-cluster node migration operation to the service module through the network module. The inter-cluster node migration user table contains the task identifier, source cluster, list of nodes to be migrated, whether to migrate nodes, and target cluster.

[0063] The task ID is the unique identifier of the task and is automatically generated after the form is submitted. The source cluster can be used to find the associated cluster nodes, node labels, and taint information. Whether to migrate node information can determine whether to retain the previous node information when migrating to a new cluster. The target cluster is the cluster to which you want to migrate.

[0064] The cluster node information table includes the cluster ID, cluster name, node name, node IP, node label, and node taint. The cluster ID is the unique ID of the managed cluster and is automatically generated.

[0065] (2) The service module obtains the node label and taint information from the database based on the user operation form and the node IP in the form, generates the configuration file format required by the Ansible Playbook (an automated operation and maintenance tool) script, and distributes the configuration file to the configuration directory of the Ansible Playbook;

[0066] (3) The service module connects to the host where the Ansible Playbook is located and executes the Ansible Playbook script;

[0067] (4) The Ansible Playbook script logs in to the working node of the original cluster according to the configuration file, cleans up the configuration information of the original cluster, adds the working node to the new cluster, and re-adds the node labels and taint information of the original cluster so that applications that require fixed label information or fixed nodes before the failure can run normally.

[0068] This embodiment retains the node core configuration information such as the node label and stain in the original cluster, quickly migrates the node from the old cluster to the target cluster, enables some resources that require specific nodes to run normally, and ensures that the business call architecture and configuration do not need to be changed when different clusters are restored to disaster recovery.

[0069] Reference Figure 3 , Figure 3 This is the second flow chart of the method for recovering from a failed container in the embodiment of the present application. In one embodiment, the method for recovering from a failed container provided in the embodiment of the present application may further include:

[0070] Step 210, sending the backup task created by the user based on the network module to the service module;

[0071] Step 220, storing the task information, cluster information and user information determined by the service module based on the backup task into the database module;

[0072] Step 230, determining a backup task table based on the task information and the cluster information;

[0073] Step 240: Store the backup resources corresponding to the backup task table into the distributed storage module.

[0074] Specifically, the task flow for creating a backup is as follows:

[0075] (1) The network module creates a backup task and submits the backup task information. The table structure of the task creation includes: identification, task name, cluster, backup mode, backup delay time start, and backup delay time.

[0076] The ID is the unique ID of the backup task; the task name is the name of the backup task; the cluster is the cluster to be backed up; the backup modes include full backup, namespace backup, and tag filtering backup; backup delay time on: whether to enable the delay, if enabled, you need to set the backup delay time; backup delay time: after the resources to be backed up are modified, the backup will be performed after the set backup delay time has passed, to avoid a large number of cluster resource backup events being triggered by a large number of cluster resource modifications in a short period of time.

[0077] (2) The service module stores the backup task information in the database for display and use. At the same time, it converts the backup task information into a crd object in the cluster;

[0078] (3) The triggered backup and restore controller reads the crd information and selects resources from the cluster according to the above backup mode;

[0079] (4) Save the selected resources to distributed storage;

[0080] (5) At the same time, the custom generated CRD related resources are also automatically synchronized to the distributed storage when the backup task is created, so that the related CRD resources of the backup task can be used by the disaster recovery cluster.

[0081] This embodiment solves the problem that the prior art can only perform full disaster recovery in the same cluster and the real-time resource backup.

[0082] In one embodiment, the method for recovering from a lost state provided in the embodiment of the present application may further include:

[0083] Step 250, based on the backup task resource object created by the service module, determine the cluster to be backed up and the backup mode, the backup mode including full backup, namespace backup and tag filtering backup;

[0084] Step 260, in full backup mode, when it is monitored that the resource objects of the cluster to be backed up have changed, the changed resource objects are synchronized to the distributed storage module;

[0085] Step 270, in the namespace backup mode, when a resource object under the monitored namespace changes, the changed resource object is synchronized to the distributed storage module;

[0086] Step 280: In the tag screening backup mode, when it is detected that the tag of the changed resource object matches the backup task resource object, the changed resource object is synchronized to the distributed storage module.

[0087] Specifically, as mentioned above, the backup modes include full backup, namespace backup, and tag filter backup. The backup and restore controller compares the acquired resource object information with the previous backup task to determine whether to trigger the backup.

[0088] If it is full backup mode, when changes (addition, deletion and modification) of resource objects are detected, the new resources will be synchronized to the corresponding distributed storage; if it is namespace backup mode, when addition, deletion and modification of resource objects under the corresponding namespace are detected, the new resources will be synchronized to the corresponding distributed storage; if it is tag matching backup mode, when addition, deletion and modification of resource objects are detected, when the tag of the resource object matches the tag of the backup task, the new resources will be synchronized to the corresponding distributed storage.

[0089] This embodiment supports real-time automatic backup and has a triggered backup capability. When cluster resource data changes, the backup of related data can be automatically triggered to ensure the real-time nature of the backup data.

[0090] In one embodiment, the method for recovering from a lost state provided in the embodiment of the present application may further include:

[0091] Step 310, in the case of performing cluster failure recovery, obtaining cluster failure recovery form information from the service module;

[0092] Step 320: Based on the table information of the same cluster destruction recovery, the backup resources downloaded from the distributed storage module are applied to the original cluster.

[0093] Specifically, the process of cluster failure recovery is as follows:

[0094] (1) The network module finds the name of the previously backed up task and restores it to the same cluster. The same cluster disaster recovery table structure includes the identifier, task name, and version. The identifier is the unique identifier of the task; the task name is the task name when the backup task is created; the version is the stored data version. By default, the latest version is used for restoration.

[0095] (2) The service module submits the form information of the original cluster disaster recovery to the triggered backup and restore controller of the current cluster;

[0096] (3) The triggered backup and restore controller of the current cluster downloads the corresponding backup resource file from the distributed storage according to the backup task name;

[0097] (4) The triggered backup and restore controller restores the backed-up resource content to the current cluster.

[0098] This embodiment implements cluster destruction recovery through resource backup and application.

[0099] In one embodiment, the method for recovering from a lost state provided in the embodiment of the present application may further include:

[0100] Step 410, in the case of performing cross-cluster failure recovery, obtaining cross-cluster failure recovery form information from the service module;

[0101] Step 420: Based on the cross-cluster recovery form information, apply the backup resources downloaded from the distributed storage module to the new cluster.

[0102] Specifically, the cross-cluster failure recovery process is as follows:

[0103] (1) The network module finds the name of the previously backed up task and restores it to the new cluster. The cross-cluster disaster recovery table structure includes the identifier, task name, version, and target cluster. The identifier is the unique identifier of the task; the task name is the task name when the backup task is created; the version is the stored data version, and the latest version is used for restoration by default; the target cluster is the cluster to be migrated.

[0104] (2) The service module submits the cross-cluster disaster recovery form information to the triggered backup and restore controller of the new cluster;

[0105] (3) The triggered backup and restore controller of the new cluster obtains and downloads the corresponding backup resource file from the distributed storage according to the backup task name;

[0106] (4) The triggered backup and restore controller restores the backed-up resource content to the new cluster.

[0107] This embodiment implements cross-cluster recovery through resource backup and application.

[0108] refer to Figure 4 , Figure 4 : is a structural diagram of a container failure recovery device in an embodiment of the present application. The container failure recovery device provided in an embodiment of the present application is described below. The container failure recovery device described below and the container failure recovery method described above can be referred to each other.

[0109] A triggered backup and restore controller deployment module 401 is used to deploy a triggered backup and restore controller in both the original cluster and the new cluster, and configure the triggered backup and restore controller to access data to the distributed storage module;

[0110] The backup resource storage module 402 is used to store the backup resources in the distributed storage module based on the backup task resource object created by the service module;

[0111] The same cluster failure recovery module 403 is used to apply the backup resources to the original cluster when performing the same cluster failure recovery;

[0112] The cross-cluster failure recovery module 404 is used to apply the backup resources to the new cluster when performing cross-cluster failure recovery.

[0113] Optionally, the container destruction recovery device further includes:

[0114] The resource monitoring module is used to monitor the resources of the original cluster, and when the resources of the original cluster change, store the changed resources in the distributed storage module.

[0115] Optionally, the container destruction recovery system further includes a database module; and the container destruction recovery device further includes:

[0116] A module for acquiring information of nodes to be migrated, used to acquire information of nodes to be migrated from the database module when performing inter-cluster node migration;

[0117] The node cleaning module is used to clean up the nodes of the original cluster based on the node information to be migrated, and add the nodes corresponding to the node information to be migrated to the new cluster.

[0118] Optionally, the storage and recovery system further includes a network module; and the backup resource storage module includes:

[0119] A backup task sending unit, used for sending the backup task created by the user based on the network module to the service module;

[0120] An information storage unit, used for storing the task information, cluster information and user information determined by the service module based on the backup task into the database module;

[0121] A backup task table determining unit, configured to determine a backup task table based on the task information and the cluster information;

[0122] The backup resource storage unit is used to store the backup resources corresponding to the backup task table in the distributed storage module.

[0123] Optionally, the backup resource storage module further includes:

[0124] A backup mode determination unit, configured to determine a cluster to be backed up and a backup mode based on the backup task resource object created by the service module, wherein the backup mode includes full backup, namespace backup, and tag filtering backup;

[0125] A full backup unit, used for synchronizing the changed resource objects to the distributed storage module when detecting changes in the resource objects of the cluster to be backed up in the full backup mode;

[0126] A namespace backup unit, configured to synchronize the changed resource objects to the distributed storage module when the resource objects under the monitored namespace change in the namespace backup mode;

[0127] The tag filtering backup unit is used to synchronize the changed resource object to the distributed storage module in the tag filtering backup mode when it is detected that the tag of the changed resource object matches the backup task resource object.

[0128] Optionally, the cluster failure recovery module includes:

[0129] A cluster failure recovery unit, configured to obtain form information of cluster failure recovery from the service module when performing cluster failure recovery;

[0130] The first backup resource application unit is used to apply the backup resources downloaded from the distributed storage module to the original cluster based on the form information of the same cluster destruction and recovery.

[0131] Optionally, the cross-cluster failure recovery module includes:

[0132] A cross-cluster failure recovery unit, used to obtain cross-cluster failure recovery form information from the service module when performing cross-cluster failure recovery;

[0133] The second backup resource application unit is used to apply the backup resources downloaded from the distributed storage module to the new cluster based on the cross-cluster recovery form information.

[0134] Figure 5 The following is an example of a physical structure diagram of a device, such as Figure 5 As shown, the device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the capacity recovery method.

[0135] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0136] On the other hand, an embodiment of the present application further provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the computer can execute the steps of the capacity destruction recovery method provided in the above embodiments.

[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the capacity recovery method described in each embodiment or some parts of the embodiment.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for restoring a lost container, characterized in that: Applied to a storage and recovery system, the storage and recovery system includes a service module, a trigger-type backup and restore controller, and a distributed storage module; The tolerance recovery method comprises: Deploy the trigger-type backup and restore controller in both the original cluster and the new cluster, and configure the trigger-type backup and restore controller to access data to the distributed storage module; Based on the backup task resource object created by the service module, the backup resources are stored in the distributed storage module; In case of performing the same cluster destruction recovery, applying the backup resources to the original cluster; In the case of performing cross-cluster tolerance recovery, the backup resources are applied to the new cluster.

2. The method for restoring a lost container according to claim 1, characterized in that: The backup task resource object created based on the network module, storing the backup resource in the distributed storage module comprises: The resources of the original cluster are monitored, and when the resources of the original cluster are changed, the changed resources are stored in the distributed storage module.

3. The method for restoring a lost container according to claim 1, characterized in that: The storage and recovery system further includes a database module; the storage and recovery method further includes: In the case of performing inter-cluster node migration, obtaining information of nodes to be migrated from the database module; The original cluster is cleaned up based on the information of the nodes to be migrated, and the nodes corresponding to the information of the nodes to be migrated are added to the new cluster.

4. The method for restoring a lost container according to claim 3, characterized in that: The storage and recovery system further includes a network module; based on the backup task resource object created by the service module, storing the backup resources in the distributed storage module includes: Sending the backup task created by the user based on the network module to the service module; storing the task information, cluster information and user information determined by the service module based on the backup task into the database module; Determine a backup task table based on the task information and the cluster information; The backup resources corresponding to the backup task table are stored in the distributed storage module.

5. The method for restoring a lost container according to claim 1, characterized in that: The step of storing the backup resources in the distributed storage module based on the backup task resource object created by the service module further comprises: Based on the backup task resource object created by the service module, determine the cluster to be backed up and the backup mode, where the backup mode includes full backup, namespace backup, and tag filtering backup; In the full backup mode, when it is detected that the resource objects of the cluster to be backed up have changed, the changed resource objects are synchronized to the distributed storage module; In the namespace backup mode, when the resource objects under the monitored namespace change, the changed resource objects are synchronized to the distributed storage module; In the tag screening backup mode, when it is detected that the tag of the changed resource object matches the backup task resource object, the changed resource object is synchronized to the distributed storage module.

6. The method for restoring a lost container according to claim 1, characterized in that: In the case of performing the same cluster destruction recovery, applying the backup resource to the original cluster includes: In the case of performing cluster failure recovery, obtaining cluster failure recovery form information from the service module; Based on the form information of the same cluster destruction and recovery, the backup resources downloaded from the distributed storage module are applied to the original cluster.

7. The method for restoring a lost container according to claim 1, characterized in that: In the case of performing cross-cluster tolerance and destruction recovery, applying the backup resources to the new cluster includes: In the case of performing cross-cluster tolerance and destruction recovery, obtaining cross-cluster tolerance and destruction recovery form information from the service module; Based on the cross-cluster recovery form information, the backup resources downloaded from the distributed storage module are applied to the new cluster.

8. A device for restoring a lost capacity, characterized in that: include: A triggered backup and restore controller deployment module is used to deploy a triggered backup and restore controller in both the original cluster and the new cluster, and configure the triggered backup and restore controller to access data to the distributed storage module; A backup resource storage module, used to store the backup resources in the distributed storage module based on the backup task resource object created by the service module; A cluster failure recovery module, used to apply the backup resources to the original cluster when performing cluster failure recovery; The cross-cluster failure recovery module is used to apply the backup resources to the new cluster when performing cross-cluster failure recovery.

9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for recovering from a loss of storage capacity according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for recovering from a loss of storage capacity as claimed in any one of claims 1 to 7 is implemented.