Data backup method, device, computer equipment, readable storage medium and program product

By detecting the first chain length of the target backup chain in the ceph storage cluster and determining whether to convert to full backup based on its length, the lag caused by excessive backup chain is solved, and data query efficiency is improved.

CN119179606BActive Publication Date: 2025-03-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411700082.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-11
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

There is often lag when querying backup data in a ceph storage cluster, mainly due to the long backup chain, the query time for the end-of-chain snapshot is too long.

Method used

By detecting the first chain length of the target backup chain, if it exceeds the preset length threshold, it will be converted to full backup. Otherwise, incremental backup will be continued to ensure that the backup chain length will not be too long.

Benefits of technology

It effectively avoids lag problems caused by too long backup chains and improves the efficiency of querying backup data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179606B_ABST
    Figure CN119179606B_ABST
Patent Text Reader

Abstract

The present application relates to a data backup method, device, computer equipment, readable storage medium and program product. The method is applied to any local backup device in a ceph storage cluster; the method comprises: receiving a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detecting the data backup type corresponding to the target disk data; in the case where the data backup type is incremental backup, detecting the first chain length of the target backup chain; if the first chain length is greater than the first preset length threshold, then responding to the data backup request, performing a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then responding to the data backup request, performing an incremental backup of the target disk data on the target backup chain. The use of this method can solve the problem of freezing when querying backup data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data backup, and in particular to a data backup method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of data storage technology, data backup technology has emerged. Data backup technology can be used to store and back up disk data in the Ceph storage cluster.

[0003] In traditional technology, a snapshot is usually created first to fix the backup data, and then the difference data between the backup snapshot and the last backup snapshot is exported and imported into the snapshot chain in the Ceph storage cluster to complete the backup.

[0004] However, when querying the backup data in the snapshot chain, there are often delays. Summary of the invention

[0005] Based on this, it is necessary to provide a data backup method, device, computer equipment, computer-readable storage medium and computer program product that can solve the lag problem when querying backup data in response to the above technical problems.

[0006] In a first aspect, the present application provides a data backup method, which is applied to any local backup device in a ceph storage cluster; the method comprises:

[0007] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster;

[0008] According to the data backup request, detecting the data backup type corresponding to the target disk data;

[0009] In the case where the data backup type is incremental backup, detecting the first chain length of the target backup chain;

[0010] If the first chain length is greater than a first preset length threshold, in response to the data backup request, performing a full backup of the target disk data on the created blank backup chain;

[0011] If the first chain length is not greater than a first preset length threshold, then in response to the data backup request, an incremental backup is performed on the target disk data on the target backup chain.

[0012] In one embodiment, the detecting the first chain length of the target backup chain includes:

[0013] Selecting a target backup chain from each existing backup chain, and detecting the number of backups on the target backup chain;

[0014] According to the backup quantity, a first chain length of the target backup chain is detected.

[0015] In one embodiment, selecting a target backup chain from existing backup chains includes at least one of the following:

[0016] Use the backup chain with the most recent backup time as the target backup chain;

[0017] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0018] In one embodiment, the method further comprises:

[0019] Detect cluster device information of the ceph storage cluster;

[0020] According to the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated to obtain an evaluation result;

[0021] According to the evaluation result, the first preset length threshold is selected within a preset first chain length interval.

[0022] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; and evaluating the backup chain storage capacity of the ceph storage cluster according to the cluster device information of the ceph storage cluster includes:

[0023] Perform feature encoding on the number of storage devices in the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices to obtain target features;

[0024] According to the target characteristics, the backup chain storage capacity of the ceph storage cluster is evaluated.

[0025] In one embodiment, the method further comprises:

[0026] After performing incremental backup or full backup, detect the second chain length of the target backup chain after the backup;

[0027] If the second chain length is less than a second preset length threshold, the chain tail position corresponding to the backed-up target backup chain is saved, wherein the chain tail position is the starting position for subsequent incremental backup.

[0028] In a second aspect, the present application further provides a data backup device, which is applied to any local backup device in a ceph storage cluster; the device comprises:

[0029] A request receiving module, used for receiving a data backup request, wherein the data backup request is used for requesting to back up the target disk data to the ceph storage cluster;

[0030] A detection module, configured to detect the data backup type corresponding to the target disk data according to the data backup request; and to detect the first chain length of the target backup chain when the data backup type is incremental backup;

[0031] A first backup module, configured to perform a full backup of the target disk data on the created blank backup chain in response to the data backup request if the first chain length is greater than a first preset length threshold;

[0032] The second backup module is configured to perform an incremental backup of the target disk data on the target backup chain in response to the data backup request if the first chain length is not greater than a first preset length threshold.

[0033] In one embodiment, the detection module is further used for:

[0034] Selecting a target backup chain from each existing backup chain, and detecting the number of backups on the target backup chain;

[0035] According to the backup quantity, a first chain length of the target backup chain is detected.

[0036] In one embodiment, the detection module is further used for:

[0037] The backup chain with the most recent backup time is used as the target backup chain.

[0038] In one embodiment, the detection module is further used for:

[0039] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0040] In one embodiment, the data backup device further includes:

[0041] A length threshold selection module is used to detect the cluster device information of the ceph storage cluster; based on the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated to obtain an evaluation result; based on the evaluation result, the first preset length threshold is selected within a preset first chain length interval.

[0042] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; the length threshold selection module is also used to:

[0043] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0044] In one embodiment, the data backup device further includes:

[0045] The starting position maintaining module is used to detect the second chain length of the target backup chain after the backup after the incremental backup or the full backup; if the second chain length is less than the second preset length threshold, the chain tail position corresponding to the target backup chain after the backup is saved, wherein the chain tail position is the starting position for the subsequent incremental backup.

[0046] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0047] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0048] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0049] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0050] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0051] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0052] The above-mentioned data backup method, device, computer equipment, computer-readable storage medium and computer program product, after receiving a data backup request requesting to back up the target disk data to the ceph storage cluster, can first detect the data backup type corresponding to the target disk data according to the data backup request; when the data backup type is incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than the first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain, that is, convert the incremental backup process of the target disk data into a full backup process; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain, so that when performing incremental backup, the length of the backup chain will not be increased indefinitely, and the length of the backup chain can be guaranteed not to be too long. In this way, when querying the backup data, the jamming caused by the excessively long backup chain can be avoided, thereby solving the jamming problem when querying the backup data in the ceph storage cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 This is a flow chart of a data backup method in one embodiment of the present application;

[0055] Figure 2 This is a schematic diagram of a process for detecting the first chain length of a target backup chain in one embodiment of the present application;

[0056] Figure 3 A schematic diagram of a process for selecting the first preset length threshold in an embodiment of the present application;

[0057] Figure 4 is a structural block diagram of a data backup device in one embodiment;

[0058] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] Currently, it is usually necessary to first create a snapshot of the cloud hard disk to back up the data, use the command line tool provided by the ceph software to export the difference data between the backup snapshot and the last backup snapshot, and then import the exported difference data into the snapshot chain of the ceph block storage cluster to complete the incremental backup.

[0061] However, in the above data backup process, the final backup data exists in the form of a snapshot chain. Due to the dependency between snapshot chains, as the length of snapshots continues to increase, the data that the snapshot at the end of the chain depends on is distributed more and more widely in the Ceph cluster, resulting in longer and longer query times for the snapshot at the end of the chain, which will lead to more and more lag.

[0062] In an exemplary embodiment, Figure 1 As shown, a data backup method is provided, which is applied to any local backup device in a ceph storage cluster, and includes the following steps 202 to 210. Among them:

[0063] Step 202: Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster.

[0064] It should be noted that the local backup device can be an orchestration device of the ceph storage cluster, which is used to orchestrate the backup tasks in the ceph storage cluster, specifically, it can orchestrate which data is stored in which backup storage devices; in addition, the local backup device can be a backup storage device while being an orchestration device, that is, the local backup device can be used as both an orchestration device and a backup storage device.

[0065] Step 204: Detect the data backup type corresponding to the target disk data according to the data backup request.

[0066] Among them, the target backup chain can be the snapshot chain of the ceph block storage cluster. The data backup request includes a backup identifier, which is used to identify the data backup type. For example, when the backup identifier is set to 1, the data backup type of this data backup is full backup. When the backup identifier is set to 0, the data backup type of this data backup is incremental backup. The target disk data is the disk data in the ceph storage cluster that needs to be backed up and stored this time.

[0067] As an example, step 204 includes: extracting a backup identifier in the data backup request; and determining, based on the backup identifier, whether the data backup type corresponding to the target disk data is an incremental backup or a full backup.

[0068] It should be noted that, in this embodiment, by setting a backup identifier in the data backup request, the user can flexibly specify the backup type, and the data backup process is more flexible.

[0069] Step 206: When the data backup type is incremental backup, detect the first chain length of the target backup chain.

[0070] As an example, step 206 includes: when the data backup type is incremental backup, determining the target backup chain and detecting the first chain length of the target backup chain, wherein the target backup chain is a snapshot chain of the ceph block storage cluster used for this data backup.

[0071] As an example, the target backup chain may be a snapshot chain with the most recent backup time in the Ceph block storage cluster.

[0072] Step 208: If the first chain length is greater than the first preset length threshold, in response to the data backup request, a full backup of the target disk data is performed on the created blank backup chain.

[0073] Step 210: If the first chain length is not greater than a first preset length threshold, in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0074] As an example, step 208 to step 210 include: if the first chain length is greater than the first preset length threshold, it means that the target backup chain is too long. If incremental backup is continued on the target backup chain, subsequent backup queries on the target backup chain are likely to cause jams, so a new blank storage disk is first rebuilt as a blank backup chain, and a full backup of the target disk data is performed on the blank backup chain; if the first chain length is not greater than the first preset length threshold, it means that the target backup chain is not too long. If data backup is continued on the target backup chain, subsequent backup queries on the target backup chain are not likely to cause jams, so incremental backup is continued on the target backup chain.

[0075] As an example, in the case where the data backup type is a full backup, a new blank storage disk may be rebuilt as a blank backup chain, and a full backup may be performed directly on the blank backup chain.

[0076] As an example, the data backup method further includes:

[0077] After performing the incremental backup, the second chain length of the target backup chain after the backup is detected; if the second chain length is less than the second preset length threshold, the chain tail point position corresponding to the target backup chain after the backup is saved, wherein the chain tail position is the starting point position for the subsequent incremental backup.

[0078] It should be noted that, currently, only the starting point position corresponding to the backup chain with the most recent backup time is usually retained as the backup starting point for the next incremental backup. In this embodiment, after each incremental backup or full backup, the second chain length of the target backup chain after the backup will be detected. If the second chain length is less than the second preset length threshold, it means that the target backup chain after the backup is still short. Continuing to perform incremental backup after the target backup chain after the backup will not cause lag. Therefore, the chain tail position corresponding to the target backup chain after the backup can be saved, so that the chain tail position can be used as the starting point for subsequent incremental backups. Even if the target backup chain after the backup is not the backup chain with the most recent backup time, the target backup chain after the backup can be used for incremental backup, saving the backup storage resources of the ceph storage cluster.

[0079] In the above data backup method, after receiving a data backup request to back up the target disk data to the ceph storage cluster, the data backup type corresponding to the target disk data can be detected according to the data backup request; in the case where the data backup type is incremental backup, the first chain length of the target backup chain is detected; if the first chain length is greater than the first preset length threshold, then in response to the data backup request, a full backup of the target disk data is performed on the created blank backup chain, that is, the incremental backup process of the target disk data is converted into a full backup process; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, an incremental backup of the target disk data is performed on the target backup chain, so that when performing incremental backup, the length of the backup chain will not be increased indefinitely, and the length of the backup chain can be guaranteed not to be too long. In this way, when querying the backup data, the jamming caused by the excessively long backup chain can be avoided, thereby solving the jamming problem when querying the backup data in the ceph storage cluster.

[0080] In an exemplary embodiment, Figure 2 As shown, detecting the first chain length of the target backup chain includes:

[0081] Step 302: Select a target backup chain from the existing backup chains, and detect the number of backups on the target backup chain.

[0082] As an example, step 302 includes: selecting a backup chain whose backup time point is closest to the current time point from each existing backup chain as the target backup chain; detecting the number of backups on the target backup chain, and determining the number of backups corresponding to the target backup chain based on the number of backups.

[0083] What needs data is that the above target backup chain is a snapshot chain in the ceph block storage cluster. Due to the dependency between snapshot chains, as the number of backups in the chain continues to increase, the backup data at the end of the chain depends on a wider distribution range in the ceph block storage cluster, which results in a longer time spent on backup queries from the target backup chain.

[0084] As an example, in this embodiment, the target backup chain may also be selected from all backup chains whose chain lengths are less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0085] In this way, in this embodiment, the backup chain with a shorter chain length can be used as the target backup chain, so that the backup chain with a shorter chain length in the ceph block storage cluster can be used, saving the backup storage resources of the ceph block storage cluster.

[0086] It should be noted that if a target backup chain with a chain length less than the second preset length threshold is used for incremental backup instead of using the backup chain with the most recent backup time, an association relationship should be established between the target backup chain and the backup chain originally used for full backup to facilitate backup query.

[0087] Step 304: Detect the first chain length of the target backup chain according to the backup quantity.

[0088] As an example, step 304 includes: directly using the detected number of backups as the first chain length of the target backup chain.

[0089] As an example, step 304 includes: normalizing the detected backup quantity to a preset value range to obtain a first chain length of the target backup chain, wherein the preset value range can be set to 0 to 100 or 0 to 10, etc.

[0090] In this embodiment, as the number of backups in the chain continues to increase, the backup data at the end of the chain depends on a wider distribution range in the Ceph block storage cluster. Therefore, after the target backup chain is selected, the first chain length of the target backup chain is determined by the number of backups on the target backup chain, rather than using the data field length of all backup data on the chain as the first chain length. This ensures that the first chain length can accurately represent the fluency of the target backup chain when performing backup queries after the backup is completed, thereby ensuring the accuracy of detecting the first chain length of the target backup chain.

[0091] In an exemplary embodiment, Figure 3 As shown, the data backup method also includes:

[0092] Step 402, detecting cluster device information of the ceph storage cluster.

[0093] The cluster device information of the ceph storage cluster may include the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices.

[0094] It should be noted that the more storage devices a ceph storage cluster has, the wider the data that the snapshot at the end of the backup chain depends on is distributed in the ceph cluster, and the longer it takes to query the snapshot at the end of the chain, resulting in weaker backup chain storage capacity of the ceph storage cluster; the fewer cluster devices a ceph storage cluster has, the narrower the data that the snapshot at the end of the backup chain depends on is distributed in the ceph cluster, and the shorter it takes to query the snapshot at the end of the chain, resulting in stronger backup chain storage capacity of the ceph storage cluster.

[0095] The better the performance of the storage devices in the ceph storage cluster, the stronger the backup data query capability of the ceph storage cluster, and the stronger the backup chain storage capability of the ceph storage cluster; the worse the performance of the storage devices, the worse the backup data query capability of the ceph storage cluster, and the worse the backup chain storage capability of the ceph storage cluster.

[0096] The better the network status of the storage in the ceph storage cluster, the stronger the backup data query capability of the ceph storage cluster, and the stronger the backup chain storage capability of the ceph storage cluster; the worse the network status of the storage device, the worse the backup data query capability of the ceph storage cluster, and the worse the backup chain storage capability of the ceph storage cluster.

[0097] Step 404: evaluate the backup chain storage capacity of the ceph storage cluster according to the cluster device information of the ceph storage cluster to obtain an evaluation result.

[0098] As an example, step 404 includes: scoring the backup chain storage capacity of the ceph storage cluster according to the number of cluster devices of the ceph storage cluster to obtain a first score, wherein the first score represents the degree of influence of the number of cluster devices of the ceph storage cluster on the backup chain storage capacity of the ceph storage cluster; scoring the backup chain storage capacity of the device performance information of the storage device according to the device performance information of the storage device to obtain a second score, wherein the second score represents the degree of influence of the device performance information of the storage device on the backup chain storage capacity of the ceph storage cluster; scoring the backup chain storage capacity of the ceph storage cluster according to the local network information of the storage device to obtain a third score, wherein the third score represents the degree of influence of the local network information of the storage device on the backup chain storage capacity of the ceph storage cluster; and weighted summing the first score, the second score and the third score to obtain a target score, and using the target score as the evaluation result.

[0099] Step 406: Select a first preset length threshold within a preset first chain length interval according to the evaluation result.

[0100] As an example, step 406 includes normalizing the target score, and selecting a first preset length threshold within a preset first chain length interval according to the normalized target score. For example, assuming that the preset first chain length interval is 80 to 90, if the normalized target score is 0, 80 is selected as the first preset length threshold, if the normalized target score is 1, 90 is selected as the first preset length threshold, if the normalized target score is x, x is greater than 0 and less than 1, then the value of 80+x*(90-80) is calculated, and the first preset length threshold is obtained after rounding.

[0101] As an example, the cluster device information includes the number of storage devices in the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices. The storage devices are storage devices used by the ceph storage cluster to store target disk data. Based on the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated, including:

[0102] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0103] It should be noted that in this embodiment, an AI model is set up as an evaluation model, which can evaluate the backup chain storage capacity of the ceph storage cluster; the device performance information of the above-mentioned storage device includes but is not limited to storage capacity parameters, computing performance parameters and scheduling performance parameters, etc., and the local network information of the storage device includes but is not limited to the local network speed and local network fluctuations, etc.

[0104] Specifically, the device performance information of all storage devices in the ceph storage cluster is one-hot encoded to obtain a first one-hot encoded feature, and the local network information of all storage devices in the ceph storage cluster is one-hot encoded to obtain a second one-hot encoded feature; the first one-hot encoded feature and the second one-hot encoded feature are spliced ​​to obtain a spliced ​​feature; the spliced ​​feature is weighted according to the weighted weight set according to the number of cluster devices in the ceph storage cluster to obtain a target feature; and the backup chain storage capacity of the ceph storage cluster is evaluated by inputting the target feature into a preset evaluation model.

[0105] It should be noted that the backup chain storage capacity of the ceph storage cluster represents the maximum number of backups or the maximum chain length of the backup chain of the ceph storage cluster without any lag during backup query.

[0106] As an example, the number of cluster devices in the ceph storage cluster can also be used as a cluster device quantity feature, and the cluster device quantity feature, the first unique hot encoding feature, and the second unique hot encoding feature are concatenated to obtain the target feature.

[0107] In addition, it should be noted that when performing a backup query, the ceph storage cluster will create a distributed task for the backup query. Since different storage devices in the ceph storage cluster use different types of computing chips, the storage devices using different types of computing chips have different response speeds to the distributed task. Therefore, the task type of the distributed task can be detected first (for example, whether the thread is parallel or serial, etc.), and the matching degree between the distributed task and each storage device is detected according to the task type and the computing chip type of each storage device in the ceph storage cluster to obtain task matching degree information; and the target weight is generated according to the task matching degree information, and the target feature is weighted according to the target weight, and the backup chain storage capacity of the ceph storage cluster is evaluated according to the weighted target feature. In this way, on the basis of generating the target feature, the speed of all storage devices in the ceph storage cluster responding to the distributed task of the backup query is fully considered, and the impact on the backup chain storage capacity of the ceph storage cluster is improved, so as to improve the accuracy of the backup chain storage capacity evaluation of the ceph storage cluster.

[0108] In this embodiment, by detecting the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated according to the cluster device information of the ceph storage cluster to obtain an evaluation result; based on the evaluation result, the first preset length threshold can be reasonably selected within the preset first chain length interval, so that the selection of the first preset length threshold is more reliable, and the setting accuracy of the first preset length threshold is improved.

[0109] In a complete embodiment, a data backup request is received, wherein the data backup request is used to request to back up the target disk data to a ceph storage cluster; a backup identifier in the data backup request is extracted; based on the backup identifier, it is determined whether the data backup type corresponding to the target disk data is an incremental backup or a full backup; in the case where the data backup type is an incremental backup, a backup chain whose backup time point is closest to the current time point is selected from each existing backup chain as the target backup chain; the number of backups on the target backup chain is detected, and the number of backups corresponding to the target backup chain is determined based on the number of backups, and the detected number of backups is directly used as the first chain length of the target backup chain.

[0110] Furthermore, if the first chain length is greater than the first preset length threshold, it means that the target backup chain is too long. If incremental backup is continued on the target backup chain, subsequent backup queries on the target backup chain will easily cause jams. Therefore, a new blank storage disk is first rebuilt as a blank backup chain, and a full backup of the target disk data is performed on the blank backup chain; if the first chain length is not greater than the first preset length threshold, it means that the target backup chain is not too long. If data backup is continued on the target backup chain, subsequent backup queries on the target backup chain will not easily cause jams. Therefore, incremental backup is continued on the target backup chain.

[0111] In this embodiment, when performing incremental backup, the length of the backup chain will not be increased indefinitely, which can ensure that the length of the backup chain will not be too long. In this way, when querying backup data, the jamming caused by the too long backup chain can be avoided, thereby solving the jamming problem when querying backup data.

[0112] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0113] Based on the same inventive concept, the embodiment of the present application also provides a data backup device for implementing the data backup method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data backup device embodiments provided below can refer to the limitations on the data backup method above, and will not be repeated here.

[0114] In an exemplary embodiment, Figure 4 As shown, a data backup device is provided, which is applied to any local backup device in a ceph storage cluster; the device includes: a request receiving module 502, a detection module 504, a first backup module 506 and a second backup module 508, wherein:

[0115] The request receiving module 502 is used to receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster.

[0116] The detection module 504 is used to detect the data backup type corresponding to the target disk data according to the data backup request; when the data backup type is incremental backup, detect the first chain length of the target backup chain.

[0117] The first backup module 506 is configured to perform a full backup of the target disk data on the created blank backup chain in response to the data backup request if the first chain length is greater than a first preset length threshold.

[0118] The second backup module 508 is configured to perform an incremental backup of the target disk data on the target backup chain in response to the data backup request if the first chain length is not greater than a first preset length threshold.

[0119] In one embodiment, the detection module is further used for:

[0120] Selecting a target backup chain from each existing backup chain, and detecting the number of backups on the target backup chain;

[0121] According to the backup quantity, a first chain length of the target backup chain is detected.

[0122] In one embodiment, the detection module is further used for:

[0123] The backup chain with the most recent backup time is used as the target backup chain.

[0124] In one embodiment, the detection module is further used for:

[0125] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0126] In one embodiment, the data backup device further includes:

[0127] A length threshold selection module is used to detect the cluster device information of the ceph storage cluster; based on the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated to obtain an evaluation result; based on the evaluation result, the first preset length threshold is selected within a preset first chain length interval.

[0128] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; the length threshold selection module is also used to:

[0129] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0130] In one embodiment, the data backup device further includes:

[0131] The starting position maintaining module is used to detect the second chain length of the target backup chain after the backup after the incremental backup or the full backup; if the second chain length is less than the second preset length threshold, the chain tail position corresponding to the target backup chain after the backup is saved, wherein the chain tail position is the starting position for the subsequent incremental backup.

[0132] Each module in the above data backup device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0133] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a data backup method is implemented. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0134] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0135] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] A target backup chain is selected from each existing backup chain, and the number of backups on the target backup chain is detected; and according to the number of backups, a first chain length of the target backup chain is detected.

[0138] In one embodiment, when the processor executes the computer program, it also implements at least one of the following steps:

[0139] Use the backup chain with the most recent backup time as the target backup chain;

[0140] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0142] Detect cluster device information of the ceph storage cluster; evaluate the backup chain storage capacity of the ceph storage cluster according to the cluster device information of the ceph storage cluster to obtain an evaluation result; and select the first preset length threshold within a preset first chain length interval according to the evaluation result.

[0143] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; when the processor executes the computer program, the following steps are also implemented:

[0144] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0146] After performing an incremental backup or a full backup, detect the second chain length of the target backup chain after the backup; if the second chain length is less than a second preset length threshold, save the chain tail position corresponding to the target backup chain after the backup, wherein the chain tail position is the starting position for the subsequent incremental backup.

[0147] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0148] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0150] A target backup chain is selected from each existing backup chain, and the number of backups on the target backup chain is detected; and according to the number of backups, a first chain length of the target backup chain is detected.

[0151] In one embodiment, when the computer program is executed by a processor, at least one of the following steps is implemented:

[0152] Use the backup chain with the most recent backup time as the target backup chain;

[0153] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0155] Detect cluster device information of the ceph storage cluster; evaluate the backup chain storage capacity of the ceph storage cluster according to the cluster device information of the ceph storage cluster to obtain an evaluation result; and select the first preset length threshold within a preset first chain length interval according to the evaluation result.

[0156] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; when the computer program is executed by the processor, the following steps are also implemented:

[0157] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] After performing an incremental backup or a full backup, detect the second chain length of the target backup chain after the backup; if the second chain length is less than a second preset length threshold, save the chain tail position corresponding to the target backup chain after the backup, wherein the chain tail position is the starting position for the subsequent incremental backup.

[0160] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0161] Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; according to the data backup request, detect the data backup type corresponding to the target disk data; when the data backup type is an incremental backup, detect the first chain length of the target backup chain; if the first chain length is greater than a first preset length threshold, then in response to the data backup request, perform a full backup of the target disk data on the created blank backup chain; if the first chain length is not greater than the first preset length threshold, then in response to the data backup request, perform an incremental backup of the target disk data on the target backup chain.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] A target backup chain is selected from each existing backup chain, and the number of backups on the target backup chain is detected; and according to the number of backups, a first chain length of the target backup chain is detected.

[0164] In one embodiment, when the computer program is executed by a processor, at least one of the following steps is implemented:

[0165] Use the backup chain with the most recent backup time as the target backup chain;

[0166] A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

[0167] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0168] Detect cluster device information of the ceph storage cluster; evaluate the backup chain storage capacity of the ceph storage cluster according to the cluster device information of the ceph storage cluster to obtain an evaluation result; and select the first preset length threshold within a preset first chain length interval according to the evaluation result.

[0169] In one embodiment, the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; when the computer program is executed by the processor, the following steps are also implemented:

[0170] The number of storage devices of the ceph storage cluster, device performance information of the storage devices and local network information of the storage devices are feature encoded to obtain target features; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the target features.

[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0172] After performing an incremental backup or a full backup, detect the second chain length of the target backup chain after the backup; if the second chain length is less than a second preset length threshold, save the chain tail position corresponding to the target backup chain after the backup, wherein the chain tail position is the starting position for the subsequent incremental backup.

[0173] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0174] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0175] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data backup method, characterized in that: Applied to any local backup device in a ceph storage cluster; the method comprises: Receive a data backup request, wherein the data backup request is used to request to back up the target disk data to the ceph storage cluster; According to the data backup request, detecting the data backup type corresponding to the target disk data; In the case where the data backup type is incremental backup, detecting the first chain length of the target backup chain; If the first chain length is greater than a first preset length threshold, in response to the data backup request, performing a full backup of the target disk data on the created blank backup chain; If the first chain length is not greater than a first preset length threshold, in response to the data backup request, incrementally backing up the target disk data on the target backup chain, wherein the method further comprises: Detect cluster device information of the ceph storage cluster; According to the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated to obtain an evaluation result; According to the evaluation result, the first preset length threshold is selected within a preset first chain length interval, wherein the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices, and the storage devices are devices used by the ceph storage cluster to store the target disk data; and the backup chain storage capacity of the ceph storage cluster is evaluated according to the cluster device information of the ceph storage cluster, including: Perform feature encoding on the number of storage devices in the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices to obtain target features; According to the task type of the distributed task and the computing chip type of each storage device in the ceph storage cluster, the matching degree between the distributed task and each storage device is detected to obtain task matching degree information, and a target weight is generated according to the task matching degree information, and the target feature is weighted according to the target weight, and the backup chain storage capacity of the ceph storage cluster is evaluated according to the weighted target feature, wherein the distributed task is used for backup query.

2. The method according to claim 1, characterized in that The first chain length of the detection target backup chain includes: Selecting a target backup chain from each existing backup chain, and detecting the number of backups on the target backup chain; According to the backup quantity, a first chain length of the target backup chain is detected.

3. The method according to claim 2, characterized in that The step of selecting a target backup chain from the existing backup chains includes at least one of the following: Use the backup chain with the most recent backup time as the target backup chain; A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

4. The method according to claim 1, characterized in that: The method further comprises: After performing incremental backup or full backup, detect the second chain length of the target backup chain after the backup; If the second chain length is less than a second preset length threshold, the chain tail position corresponding to the backed-up target backup chain is saved, wherein the chain tail position is the starting position for subsequent incremental backup.

5. A data backup device, characterized in that: Applicable to any local backup device in a ceph storage cluster; the device comprises: A request receiving module, used for receiving a data backup request, wherein the data backup request is used for requesting to back up the target disk data to the ceph storage cluster; A detection module, configured to detect the data backup type corresponding to the target disk data according to the data backup request; and to detect the first chain length of the target backup chain when the data backup type is incremental backup; A first backup module, configured to perform a full backup of the target disk data on the created blank backup chain in response to the data backup request if the first chain length is greater than a first preset length threshold; A second backup module is configured to perform an incremental backup of the target disk data on the target backup chain in response to the data backup request if the first chain length is not greater than a first preset length threshold, wherein the device further comprises: A length threshold selection module is used to detect cluster device information of the ceph storage cluster; based on the cluster device information of the ceph storage cluster, the backup chain storage capacity of the ceph storage cluster is evaluated to obtain an evaluation result; According to the evaluation result, the first preset length threshold is selected within the preset first chain length interval, wherein the cluster device information includes the number of storage devices of the ceph storage cluster, device performance information of the storage device, and local network information of the storage device, and the storage device is a device used by the ceph storage cluster to store the target disk data, and the length threshold selection module is further used to: Perform feature encoding on the number of storage devices in the ceph storage cluster, device performance information of the storage devices, and local network information of the storage devices to obtain target features; According to the task type of the distributed task and the computing chip type of each storage device in the ceph storage cluster, the matching degree between the distributed task and each storage device is detected to obtain task matching degree information, and a target weight is generated according to the task matching degree information, and the target feature is weighted according to the target weight, and the backup chain storage capacity of the ceph storage cluster is evaluated according to the weighted target feature, wherein the distributed task is used for backup query.

6. The device according to claim 5, characterized in that The detection module is also used for: Selecting a target backup chain from each existing backup chain, and detecting the number of backups on the target backup chain; According to the backup quantity, a first chain length of the target backup chain is detected.

7. The device according to claim 6, characterized in that The detection module is also used for: Use the backup chain with the most recent backup time as the target backup chain; A target backup chain is selected from all backup chains whose chain length is less than a second preset length threshold, wherein the second preset length threshold is less than the first preset length threshold.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Virtual machine backup method and device, electronic equipment and storage medium

    CN117033084A