A Key Data Backup Method and Backup System Based on Cloud Native Operating System

By customizing backup policies and scheduling k8s pod execution tasks in cloud native operating systems, the problem of insufficient scalability and fault tolerance of existing backup technologies is solved, and efficient data backup in multiple scenarios is achieved.

CN115640166BActive Publication Date: 2025-08-05CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211346499.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-08-05
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

The existing data backup technology based on cloud-native operating systems has a single backup strategy, insufficient scalability, low fault tolerance, and difficult to adapt to diverse application scenarios.

Method used

It adopts a modular and cloud-native controller to customize backup strategies according to different product types, and perform backup tasks by scheduling k8s pods to available servers, supporting multiple storage paths and timing cleaning mechanisms to improve the scalability and fault tolerance of backups.

Benefits of technology

It realizes efficient backup of different types of data in multiple application scenarios, has good applicability and fault tolerance, and avoids backup task failure caused by individual server failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115640166B_ABST
    Figure CN115640166B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of cloud-native operating system data backup, and relates to a key data backup method and backup system based on a cloud-native operating system. This method first customizes different backup strategies according to different product types, and then uses modular, cloud-native controllers to perform respective tasks for each specific product. In the most core backup tasks, the data is backed up by scheduling the k8s pod corresponding to the task to the available server, so that the backup process has better scalability and fault tolerance, and even if some servers fail, backup services can still be provided. In addition, the method of the present invention also has good applicability and high backup efficiency, and can efficiently back up different types of data for different application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud native operating system data backup, and in particular to a key data backup method and backup system based on a cloud native operating system. Background Art

[0002] Currently, most data backup technologies based on cloud-native operating systems only back up etcd data and use the command line to implement backups. The disadvantage of this backup method is that the backup strategy is too simple and cannot cope well with different application scenarios. In addition, this backup method lacks scalability and has low fault tolerance. Therefore, it is necessary to improve the existing backup technology. Summary of the Invention

[0003] To address the problems of existing data backup technologies for cloud-native operating systems, such as a single backup strategy, limited application scenarios, insufficient scalability, and low fault tolerance, the inventors have proposed a solution. For the first time, they have proposed a critical data backup method and system based on cloud-native operating systems. This method first customizes different backup strategies based on different product types. Then, for each specific product, a modular, cloud-native controller is used to execute its respective tasks. For the core backup tasks, data backup is performed by scheduling the corresponding pods to available servers, making the backup process more scalable and fault-tolerant. Even if some servers fail, backup services can still be provided.

[0004] Specifically, in a first aspect, the present invention provides a critical data backup method based on a cloud native operating system, the method comprising:

[0005] S1: Customized backup. There are many types of cloud native products based on the cloud native operating system (CCOS), such as Ceastor storage products, Ceacock computing products, and Ceacube hyper-converged products. Each type of product runs on different platforms. When building these products, the method of the present invention customizes different backup strategies according to different product types. The customized backup strategy mainly includes determining the target data that needs customized backup. For example, the Ceacock product only needs to back up etcd data, while the Ceacock product needs to back up etcd and MySQL data. The Ceacube product needs to back up more comprehensive data.

[0006] S2: Scheduled backup. This paper adopts a cloud-native solution to control the backup strategy. It uses the Kubernetes CR model to store the target data information that needs to be backed up in the backup strategy in the CR information, and writes the Kubernetes controller scheduled backup controller to control the execution of the scheduled backup.

[0007] S3: Backup cleanup. This uses the Kubernetes CR model to clean up backups by writing a Kubernetes controller called a backup cleanup controller and customizing the cleanup strategy. The operating system controller monitors data changes in the backup cleanup CR at any time and controls and adjusts the execution of the backup cleanup function based on these changes.

[0008] S4: Backup path selection. The present invention supports storing backup data in different storage paths. Compared with other cloud vendors that only back up etcd data and save etcd data on the host, this method supports backing up all backup data to a specified storage path, including object storage, FTP server storage and other shared storage. The specific implementation process is that the present invention first sets a CR for the backup path, and the operating system controller monitors the data changes of the CR at any time. By writing the k8s controller to back up the specified storage controller, the target data is backed up to the user-specified storage path according to the user's instructions (the storage method and password selected by the user).

[0009] S5: The execution of the backup task is different from other cloud vendors who perform backup by calling other backup service programs. The method of the present invention still adopts the cloud native controller model and writes the k8s controller backup task controller. By scheduling the pod corresponding to the customized task to the available server to perform target data backup, the failure of the backup task due to individual server failure is avoided. It has better fault tolerance and scalability. For example, when the cloud operating system runs in a 3+N (3 control nodes + N computing nodes) environment, this method can tolerate 1+N (1 control node + N computing nodes) server failures.

[0010] Furthermore, according to some embodiments of the present invention, the method for backing up key data based on a cloud-native operating system in step S1 of the present invention, wherein different backup strategies are customized according to different product categories, includes backup strategies for the following three scenarios:

[0011] For the Ceake computing product based on the cloud-native operating system, only etcd data is backed up;

[0012] Back up etcd and MySQL data for ceastor storage products based on cloud native operating systems;

[0013] For Ceacube hyper-converged products based on cloud-native operating systems, at least etcd and MySQL data must be backed up.

[0014] Furthermore, according to some embodiments of the present invention, step S2 of the key data backup method based on a cloud native operating system of the present invention further includes:

[0015] S21: Create a scheduled backup CR and customize the scheduled backup policy in this CR;

[0016] S22: Setting the enable and disable options of the scheduled backup function in the scheduled backup policy;

[0017] S23: In the scheduled backup policy, the scheduled time uses the crontab time format to achieve higher compatibility and readability;

[0018] S24: The operating system controller monitors the data changes of the CR at any time, and controls and adjusts the execution process of the scheduled backup function according to the data changes of the CR.

[0019] Furthermore, according to some embodiments of the present invention, the cleanup strategy in step S3 of the key data backup method based on a cloud native operating system of the present invention includes:

[0020] Clean up by time: backups that exceed the preset time will be cleaned up;

[0021] Clean up by backup quantity: When the preset number of backups is reached, an extra backup will be automatically cleaned up for each new backup.

[0022] Furthermore, according to some embodiments of the present invention, the user-specified storage path in step S4 of the key data backup method based on a cloud native operating system of the present invention includes object storage, FTP server storage, and other shared storage.

[0023] In a second aspect, the present invention further provides a critical data backup system based on a cloud native operating system, the backup system comprising:

[0024] Backup strategy customization module: used to customize different backup strategies according to different product types, including determining the target data that needs to be customized for backup;

[0025] Scheduled backup module: used to store the target data information that needs to be backed up in the backup strategy in the cr information, and write the k8s controller scheduled backup controller to control the execution of scheduled backup;

[0026] Backup cleanup module: used to write the k8s controller backup cleanup controller to clean up the backup and customize the cleanup strategy;

[0027] Backup path selection module: used to set the CR of the backup path. The operating system controller monitors the data changes of the CR at any time. By writing the k8s controller to backup the specified storage controller, the target data is backed up to the user-specified storage path according to the user's instructions.

[0028] Backup task execution module: used to write the k8s controller backup task controller, which backs up the target data by scheduling the pod corresponding to the customized task to the available server.

[0029] Furthermore, according to some embodiments of the present invention, the backup policy customization module in the key data backup system based on the cloud native operating system of the present invention customizes different backup policies according to different product categories, including backup policies for the following three scenarios:

[0030] For the Ceake computing product based on the cloud-native operating system, only etcd data is backed up;

[0031] Back up etcd and MySQL data for ceastor storage products based on cloud native operating systems;

[0032] For Ceacube hyper-converged products based on cloud-native operating systems, at least etcd and MySQL data must be backed up.

[0033] Furthermore, according to some embodiments of the present invention, the cleaning strategy in the backup cleaning module of the key data backup system based on the cloud native operating system of the present invention includes:

[0034] Clean up by time: backups that exceed the preset time will be cleaned up;

[0035] Clean up by backup quantity: When the preset number of backups is reached, an extra backup will be automatically cleaned up for each new backup.

[0036] Furthermore, according to some embodiments of the present invention, the user-specified storage path in the backup path selection module of the key data backup system based on the cloud native operating system of the present invention includes object storage, FTP server storage, and other shared storage.

[0037] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned critical data backup method based on a cloud-native operating system.

[0038] In summary, the key data backup method and backup system based on the cloud native operating system of the present invention have the following characteristics:

[0039] (1) This method performs strategic backup for key data in cloud-native scenarios. By customizing different backup strategies, customized strategy backup can be implemented for different cloud products. The backup strategy is more diversified, which significantly improves the backup efficiency.

[0040] (2) In this method, the backup task is executed in a cloud-native manner by scheduling the k8s pod to the available server. Compared with the traditional command line backup or backup using other backup programs, this method has higher scalability and fault tolerance, avoiding the failure of backup tasks caused by individual server failures.

[0041] (3) This method has good applicability and can back up different types of data for different application scenarios, including but not limited to etcd, mysql and other types of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below only represent some embodiments of the present invention, not all of them. Those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0043] Figure 1 The figure is a schematic diagram of the implementation process of the key data backup method based on the cloud native operating system of the present invention.

[0044] Figure 2 This is a schematic diagram of the implementation process of the scheduled backup step in the key data backup method based on the cloud native operating system of the present invention.

[0045] Figure 3 This is a schematic diagram of the overall organizational structure of the key data backup system based on the cloud native operating system of the present invention.

[0046] Figure 4 This is a diagram showing the operating principles of the key data backup system based on a cloud-native operating system according to the present invention. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions, and advantages of the present invention more clearly apparent, the technical solutions of the present invention will be described clearly and completely below with reference to specific embodiments. Obviously, the described embodiments are only a portion of the embodiments of the present invention, not all of them. The present invention may also be implemented or applied through different specific implementation methods, and the details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention.

[0048] It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments may be combined with each other; and, based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without making any creative work shall fall within the scope of protection of this disclosure.

[0049] It should be noted that the aspects described herein may be embodied in a wide variety of forms, and any specific structures and / or functions described herein are merely illustrative. Based on this disclosure, those skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, any number of the aspects described herein may be used to implement a device and / or practice a method.

[0050] The present invention is described in detail below with reference to the accompanying drawings.

[0051] A critical data backup method based on cloud native operating system (see Figure 1 、 3 , 4), including:

[0052] S1: Customized backup. Based on the cloud-native operating system CCOs, there are many types of cloud-native products, such as Ceastor storage products, Ceacock computing products, and Ceacube hyper-converged products. Each type of product runs on different platforms. When building these products, the method of the present invention customizes different backup strategies according to different product types. The customized backup strategy mainly includes determining the target data that needs customized backup. For example, the Ceacock product only needs to back up etcd data, while the Ceacock product needs to back up etcd and MySQL data. The Ceacube product needs to back up more comprehensive data.

[0053] S2: Scheduled backup (see Figure 2 );

[0054] S21: Use a cloud-native solution to control the backup strategy. Utilize the Kubernetes cluster model to create a scheduled backup cluster. In this cluster, customize the scheduled backup strategy. Meanwhile, store the target data to be backed up, as determined in the S1 backup strategy, in the cluster.

[0055] S22: Setting the enable and disable options of the scheduled backup function in the scheduled backup policy;

[0056] S23: In the scheduled backup policy, the scheduled time uses the crontab time format to achieve higher compatibility and readability;

[0057] S24: Write a k8s controller scheduled backup controller to control the execution of scheduled backup;

[0058] S25: The operating system controller monitors the data changes of the CR at any time, and controls and adjusts the execution process of the scheduled backup function according to the data changes of the CR;

[0059] S3: Backup cleanup. Utilize the k8s cr model to clean up backups by writing a k8s controller backup cleanup controller and customize the cleanup strategy. The cleanup strategy includes:

[0060] Clean up by time: backups that exceed the preset time will be cleaned up;

[0061] Clean up by backup quantity: When the preset backup quantity is reached, each time a new backup is added, an extra backup will be automatically cleaned up;

[0062] The operating system controller monitors the data changes of the backup and cleanup CR at any time, and controls and adjusts the execution process of the backup and cleanup function according to the data changes of CR;

[0063] S4: Backup path selection. The present invention supports storing backup data in different storage paths. Compared with other cloud vendors that only back up etcd data and save etcd data on the host, this method supports backing up all backup data to a specified storage path, including object storage, FTP server storage and other shared storage. The specific implementation process is that the present invention first sets a CR for the backup path, and the operating system controller monitors the data changes of the CR at any time. By writing the k8s controller to back up the specified storage controller, the target data is backed up to the user-specified storage path according to the user's instructions (the storage method and password selected by the user).

[0064] S5: The execution of the backup task is different from other cloud vendors who perform backup by calling other backup service programs. The method of the present invention still adopts the cloud native controller model and writes the k8s controller backup task controller. By scheduling the pod corresponding to the customized task to the available server to perform target data backup, the failure of the backup task due to individual server failure is avoided. It has better fault tolerance and scalability. For example, when the cloud operating system runs in a 3+N (3 control nodes + N computing nodes) environment, this method can tolerate 1+N (1 control node + N computing nodes) server failures.

[0065] The following uses the backup of etcd components as an example (similar principles are used for backup of other components) to introduce the specific process of performing backup tasks:

[0066] 1. When an etcd component backup is required, a backup CR is first issued through the cloud operating system platform. After the backup controller in the cloud operating system monitors the generation of this backup CR, it begins the process of creating an etcd backup.

[0067] 2. First, the backup controller checks whether the current operating system platform is running normally, finds the server node where the current etcd leader service is located (some server failures can be tolerated), and uses this node as the node for the pod that performs the backup task;

[0068] 3. Next, the backup controller renders an etcd backup pod task based on the etcd leader node. This pod task executes a backup script on the etcd leader node. This script is part of the cloud operating system and is specifically used for etcd backup. The backup task is executed in the pod by mounting the cloud host directory on the host, ensuring efficient and correct execution of the backup task.

[0069] 3.1 When the pod is successfully executed, the etcd backup file can be seen in the backup directory (which can be customized). At the same time, the status of the backup CR will be updated to record the successful backup. The recorded information includes the backup directory and the time when the backup was executed.

[0070] 3.2 When the pod fails to execute, it means that the etcd backup task has failed. At this time, the backup CR status will be updated to record the failed backup. The recorded information includes the reason for the backup failure and the time when the backup was executed.

[0071] 3.3 Regardless of whether the backup pod is executed successfully or not, the pod will be destroyed in the end to avoid occupying resources;

[0072] 4. If scheduled backup is required, create a scheduled backup context manager (CR). Once the scheduled backup controller detects the existence of this scheduled context manager, it will trigger etcd backups on a regular basis. Repeat steps 1-3 above for the backup process.

[0073] 5. If you need to back up other components, such as the MySQL component, the specific backup process is the same as steps 1-3 above. However, to perform the MySQL component backup task, you need to customize the corresponding backup strategy according to the component type.

[0074] The various embodiments of the present invention are described in a progressive manner, and reference may be made to the same or similar parts between the various embodiments.

[0075] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, substitutions, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A critical data backup method based on a cloud native operating system, characterized in that: The method comprises: S1: Customized backup: Customize different backup strategies based on different product types. The backup strategies include determining the target data that needs customized backup. The customized backup strategies based on different product types include backup strategies for the following three scenarios: For the Ceake computing product based on the cloud-native operating system, only etcd data is backed up; Back up etcd and MySQL data for ceastor storage products based on cloud native operating systems; For Ceacube hyper-converged products based on cloud-native operating systems, at least etcd and MySQL data should be backed up; S2: Scheduled backup, using the Kubernetes CR model, stores the target data information that needs to be backed up in the CR information, and writes the Kubernetes controller scheduled backup controller to control the execution of scheduled backup; S3: Backup and cleanup. This uses the Kubernetes cr model to clean up backups by writing a Kubernetes controller called backup and cleanup controller, while also customizing cleanup policies. S4: Backup path selection, set a backup path cr, the operating system controller monitors the data changes of the cr at any time, and backs up the target data to the user-specified storage path according to user instructions by writing the k8s controller backup specified storage controller; S5: To execute the backup task, we use the cloud-native controller model to write a k8s controller backup task controller, which schedules the pod corresponding to the customized task to an available server to back up the target data.

2. The critical data backup method based on a cloud native operating system according to claim 1, characterized in that: In step S2, the k8s cr model is used to store the target data information that needs to be backed up in the backup strategy in the cr information, and the k8s controller scheduled backup controller is written to control the execution of the scheduled backup, which also includes: S21: Create a scheduled backup CR and customize the scheduled backup policy in this CR; S22: Setting the enable and disable options of the scheduled backup function in the scheduled backup policy; S23: The scheduled time in the scheduled backup policy uses the crontab time format; S24: The operating system controller monitors the data changes of the CR at any time, and controls and adjusts the execution process of the scheduled backup function according to the data changes of the CR.

3. The critical data backup method based on cloud native operating system according to claim 1, characterized in that: The cleaning strategy in step S3 includes: Clean up by time: backups that exceed the preset time will be cleaned up; Clean up by backup quantity: When the preset number of backups is reached, an extra backup will be automatically cleaned up for each new backup.

4. The critical data backup method based on cloud native operating system according to claim 1, characterized in that: The storage path specified by the user in step S4 includes object storage, FTP server storage, and other shared storage.

5. A critical data backup system based on a cloud native operating system, characterized in that: The backup system includes: Backup strategy customization module: used to customize different backup strategies according to different product types. The backup strategies include determining the target data that needs to be customized for backup. The backup strategies customized according to different product types include backup strategies for the following three scenarios: For the Ceake computing product based on the cloud-native operating system, only etcd data is backed up; Back up etcd and MySQL data for ceastor storage products based on cloud native operating systems; For Ceacube hyper-converged products based on cloud-native operating systems, at least etcd and MySQL data should be backed up; Scheduled backup module: used to store the target data information that needs to be backed up in the backup strategy in the cr information, and write the k8s controller scheduled backup controller to control the execution of scheduled backup; Backup cleanup module: used to write the k8s controller backup cleanup controller to clean up the backup and customize the cleanup strategy; Backup path selection module: used to set the CR of the backup path. The operating system controller monitors the data changes of the CR at any time. By writing the k8s controller to backup the specified storage controller, the target data is backed up to the user-specified storage path according to the user's instructions. Backup task execution module: used to write the k8s controller backup task controller, which backs up the target data by scheduling the pod corresponding to the customized task to the available server.

6. The critical data backup system based on the cloud native operating system according to claim 5, characterized in that: The cleanup strategies described in the backup cleanup module include: Clean up by time: backups that exceed the preset time will be cleaned up; Clean up by backup quantity: When the preset number of backups is reached, an extra backup will be automatically cleaned up for each new backup.

7. The critical data backup system based on the cloud native operating system according to claim 5, characterized in that: The user-specified storage path in the backup path selection module includes object storage, FTP server storage, and other shared storage.

8. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the critical data backup method based on a cloud-native operating system according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Automatic backup method based on LVM snapshot in cloud native environment

    CN113391952A

  • Cloud native database backup method based on hybrid cloud

    CN114579364A