A method and system for verifying the validity of backup data
By classifying and differentiating data, and performing quality evaluation and replacement recovery during the recovery process, the problems of data duplication, wasting storage space and low recovery efficiency in traditional data backup methods are solved, and efficient and secure data backup and recovery are achieved.
Patent Information
- Application Number
- CN202410790969.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Traditional data backup methods have problems such as data duplication, waste of storage space, insufficient differential comparison and storage, low recovery efficiency and lack of recovery quality evaluation mechanism.
By sorting and backing up the backup data, calculate the difference comparison value between the newly added backup data and the latest backup data, make the difference judgment and storage, and calculate the recovery quality value during the recovery process, and make judgments and replacement recovery.
It realizes more efficient data management and storage, reduces the storage space required for backup, improves the speed and quality of data recovery, and ensures data security and reliability.
Smart Images

Figure CN118656252B_ABST
Abstract
Description
Technical Field
[0001] The invention proposes a backup data validity verification method and system, and relates to the technical field of backup verification. Background Art
[0002] With the rapid development of information technology, data has become an indispensable and important asset for enterprises and individuals. The security and integrity of data have a vital impact on the operation and decision-making of enterprises and individuals. Therefore, data backup technology, as an important means to ensure data security, has received widespread attention and application. However, traditional data backup methods often have the following problems: First, backup data is usually stored as a whole, without classification and backup according to different types of data, resulting in a large amount of duplication in backup data and serious waste of storage space. Secondly, the backup data is not effectively compared and stored during storage, so that when restoring data, the entire backup data set needs to be fully loaded, which not only has low recovery efficiency, but also makes it difficult to replace the difference content separately for data with recovery quality problems, making it difficult to ensure that the data can be effectively restored and verified. Finally, in the data recovery process, there is often a lack of effective recovery quality assessment mechanism, which cannot ensure the accuracy and integrity of the restored data. Summary of the invention
[0003] The present invention provides a method and system for verifying the validity of backup data, which is used to solve the problem that traditional data backup methods often store backup data as a whole without classifying and backing up the data according to different types of parts, resulting in a large amount of duplication in the backup data and serious waste of storage space. Secondly, the backup data is not effectively compared and stored during the storage process, so that when the data is restored, the entire backup data set needs to be fully loaded, which not only has low recovery efficiency, but also makes it difficult to replace the content with differences separately, so as to ensure that the data can be effectively restored and verified. Finally, during the data recovery process, there is often a lack of effective recovery quality assessment mechanism, and it is impossible to ensure the accuracy and completeness of the restored data.
[0004] A backup data validity verification method and system proposed by the present invention A backup data validity verification method, the method comprising:
[0005] S1. Classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, sort the backup data in chronological order, and obtain time-series backup data;
[0006] S2, calculating a difference comparison value between the newly acquired backup data and the backup data packets of the latest backup data, determining a difference between the backup data packets according to the difference comparison value, performing differential storage on the backup data packets, and obtaining a differential data packet;
[0007] S3. Restore the backup data and calculate the recovery quality value, determine whether the backup data recovery is qualified according to the recovery quality value, and replace and restore the backup data according to the recovery determination result combined with the difference data packet until the recovery determination result is a qualified recovery state.
[0008] Furthermore, the S1 includes:
[0009] Acquire the data to be backed up from the database server, pre-process the data to be backed up, and obtain the pre-processed data to be backed up;
[0010] Classifying the data to be backed up according to the data types of the data to be backed up, and obtaining data groups to be backed up of multiple data types;
[0011] Backing up each to-be-backed-up data of the to-be-backed-up data group to a backup database, obtaining backup data, and then obtaining a backup data group;
[0012] Classify each backup data according to preset requirement types to obtain multiple types of backup data packages for each backup data;
[0013] Each backup data of each backup data group is marked with a backup time, and is sorted in chronological order from recent to far to obtain time-series backup data.
[0014] Further, the S2 includes:
[0015] Acquire newly added backup data of each backup data group, compare the difference of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculate the difference comparison value;
[0016] Compare the difference comparison value with a preset difference threshold to obtain a difference comparison result;
[0017] Performing difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result to obtain a difference determination result;
[0018] Determine whether to differentially store each type of backup data packet according to the difference determination result to obtain a determination result;
[0019] The backup data package is differentially stored according to the judgment result to obtain a differential data package corresponding to the newly added backup data.
[0020] Further, the S3 includes:
[0021] Obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction;
[0022] Performing data recovery on the backup data to obtain data recovery information, and calculating a recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0023] Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result;
[0024] Determine whether the backup data is qualified for restoration according to the restoration comparison result, and obtain a restoration determination result;
[0025] Whether to perform replacement recovery is determined according to the recovery determination result, until the recovery determination result is a recovery qualified state.
[0026] Further, the determining whether to perform replacement recovery according to the recovery determination result until the recovery determination result is a recovery qualified state includes:
[0027] When the recovery judgment result is a qualified recovery state, the backup server automatically goes offline and automatically goes online at the preset backup time;
[0028] When the recovery judgment result is a recovery failure state, the latest difference data packet of each type before the current ranking is replaced with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data to obtain the replacement backup data;
[0029] Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again;
[0030] The restoration quality value is compared with the preset restoration threshold value again until the restoration determination result is a restoration qualified state.
[0031] Furthermore, the system comprises:
[0032] The data classification storage module is used to classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, and sort the backup data in chronological order to obtain time-series backup data;
[0033] A difference calculation and determination module is used to calculate the difference comparison value between the newly acquired backup data and the backup data packet of the latest backup data, perform difference determination on the backup data packet according to the difference comparison value, perform difference storage on the backup data packet, and obtain a difference data packet;
[0034] The replacement recovery module is used to restore the backup data and calculate the recovery quality value, determine whether the backup data recovery is qualified according to the recovery quality value, and replace and restore the backup data according to the recovery determination result combined with the difference data packet until the recovery determination result is a qualified recovery state.
[0035] Furthermore, the data classification storage module includes:
[0036] A preprocessing module is used to obtain the data to be backed up from the database server, preprocess the data to be backed up, and obtain the preprocessed data to be backed up;
[0037] A to-be-backed up grouping module is used to classify the to-be-backed up data according to the data types of the to-be-backed up data, and obtain to-be-backed up data groups of multiple data types;
[0038] A backup module, used for backing up each data to be backed up in the data group to be backed up to a backup database, obtaining the backup data, and then obtaining the backup data group;
[0039] The data packet generation module is used to classify each backup data according to the preset required categories to obtain multiple types of backup data packets for each backup data;
[0040] The time sequence sorting module is used to mark the backup time of each backup data of each backup data group, and sort them from recent to far in chronological order to obtain time sequence backup data.
[0041] Furthermore, the difference calculation and determination module includes:
[0042] A difference calculation module, used for obtaining newly added backup data of each backup data group, performing a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculating a difference comparison value;
[0043] A difference comparison module, used to compare the difference comparison value with a preset difference threshold to obtain a difference comparison result;
[0044] A difference determination module, used for performing a difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result, to obtain a difference determination result;
[0045] A storage judgment module, used to judge whether to differentially store each type of backup data packet according to the difference judgment result, and obtain a judgment result;
[0046] The difference storage module is used to perform difference storage on the backup data package according to the judgment result to obtain the difference data package corresponding to the newly added backup data.
[0047] Furthermore, the replacement recovery module includes:
[0048] A backup and recovery module, used to obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction;
[0049] A recovery quality calculation module, used to perform data recovery on the backup data, obtain data recovery information, and calculate a recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0050] Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result;
[0051] A recovery determination module, used to determine whether the backup data is qualified for recovery according to the recovery comparison result, and obtain a recovery determination result;
[0052] The data packet replacement module is used to determine whether to perform replacement recovery according to the recovery determination result, until the recovery determination result is a recovery qualified state.
[0053] Furthermore, the data packet replacement module includes:
[0054] The qualified module is used to automatically offline the backup server when the recovery judgment result is a qualified recovery state, and automatically go online at the preset backup time;
[0055] A sequential replacement module is used to replace the latest difference data packet of each type before the current ranking with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data when the recovery judgment result is a recovery failure state, so as to obtain replacement backup data;
[0056] Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again;
[0057] The recovery quality value is compared with the preset recovery threshold value again until the recovery judgment result is a qualified recovery state. The beneficial effect of the present invention is that by classifying and backing up the backup data according to the data type, different types of data can be managed more clearly, and the organization and manageability of the backup data can be improved. The backup data packets are sorted in chronological order to form time-series backup data, which is helpful to track the historical versions and changes of the data and provide a clear reference for data recovery. By calculating the difference comparison value between the newly added backup data and the latest backup data and making a difference judgment, differential storage can be achieved. This means that only the changed data part is stored or replaced, instead of storing or replacing the complete data set every time, thereby significantly reducing the storage space required for backup and increasing the flexibility and efficiency of abnormal data replacement. The use of differential data packets makes it necessary to restore only the differential part when restoring data, instead of the entire data set, thereby greatly speeding up the speed of data recovery. In the recovery process, by calculating the recovery quality value and determining whether the recovery is qualified, the consistency of the restored data with the original data can be ensured. If the recovery quality value does not meet the requirements, replacement recovery is performed according to the differential data packet until the recovery is qualified, which ensures a high success rate and high quality of data recovery. The classification, sorting and differential storage of backup data, as well as the quality assessment and replacement recovery during the recovery process, all provide multiple layers of protection for data security. Even if the original data is lost or damaged, the data can be quickly and accurately restored through the backup data. Since the backup data packets are stored in chronological order, you can choose to restore to a specific time point or version as needed, which provides more flexible strategy options for data recovery. The backup data verification process of the present invention improves data management efficiency, optimizes storage space, speeds up recovery, improves recovery quality, enhances data security, and supports flexible data recovery strategies, providing a comprehensive, efficient, and reliable solution for data backup and recovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic diagram of a backup data validity verification method;
[0059] Figure 2 Schematic diagram of data packet replacement. DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0061] In one embodiment of the present invention, a backup data validity verification method and system are provided. A backup data validity verification method comprises:
[0062] Classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, sort the backup data in chronological order, and obtain time-series backup data;
[0063] Calculate the difference comparison value between the newly acquired backup data and the backup data packet of the latest backup data, determine the difference of the backup data packet according to the difference comparison value, perform differential storage on the backup data packet, and obtain a differential data packet;
[0064] The backup data is restored and a restoration quality value is calculated. Whether the restoration of the backup data is qualified is determined according to the restoration quality value. The backup data is replaced and restored according to the restoration determination result combined with the difference data packet until the restoration determination result is a qualified restoration state.
[0065] The working principle of the above technical solution is as follows: first, the backup data is classified and backed up according to the data type, the backup data of the obtained backup data group is classified according to the preset demand type, the backup data packet is obtained and stored, and the backup data is sorted in chronological order to obtain the time-series backup data; then, the difference comparison value of the backup data packet of the newly acquired backup data and the latest backup data is calculated, the difference of the backup data packet is judged according to the difference comparison value, the backup data packet is differentially stored, and the differential data packet is obtained; finally, the backup data is restored, and the restoration quality value is calculated, and the restoration quality value is determined according to the restoration quality value. Whether the restoration of the backup data is qualified is determined, and the backup data is replaced and restored according to the restoration judgment result combined with the differential data packet, until the restoration judgment result is a qualified restoration state.
[0066] The technical effect of the above technical solution is: by classifying and backing up the backup data according to the data type, different types of data can be managed more clearly, and the organization and manageability of the backup data can be improved. The backup data packets are sorted in chronological order to form time-series backup data, which helps to track the historical versions and changes of the data and provides a clear reference for data recovery. Differential storage can be achieved by calculating the difference comparison value between the newly added backup data and the latest backup data and making a difference judgment. This means that only the changed data part is stored or replaced, instead of storing or replacing the complete data set every time, thereby significantly reducing the storage space required for backup and increasing the flexibility and efficiency of abnormal data replacement. The use of differential data packets means that when restoring data, only the differential part needs to be restored, rather than the entire data set, which greatly speeds up the data recovery. During the recovery process, the consistency of the restored data with the original data can be ensured by calculating the recovery quality value and determining whether the recovery is qualified. If the recovery quality value does not meet the requirements, replacement recovery is performed according to the differential data packet until the recovery is qualified, which ensures a high success rate and high quality of data recovery. The classification, sorting and differential storage of backup data, as well as the quality judgment and replacement recovery during the recovery process, all provide multiple layers of protection for data security. Even if the original data is lost or damaged, the data can be quickly and accurately restored through the backup data. Since the backup data packets are stored in chronological order, you can choose to restore to a specific time point or version as needed, providing more flexible strategy options for data recovery. The backup data verification process of the present invention improves data management efficiency, optimizes storage space, speeds up recovery, improves recovery quality, enhances data security, and supports flexible data recovery strategies, providing a comprehensive, efficient, and reliable solution for data backup and recovery.
[0067] In one embodiment of the present invention, the S1 includes:
[0068] Acquire the data to be backed up from the database server, pre-process the data to be backed up, and obtain the pre-processed data to be backed up;
[0069] Classifying the data to be backed up according to the data types of the data to be backed up, and obtaining data groups to be backed up of multiple data types;
[0070] Backing up each to-be-backed-up data of the to-be-backed-up data group to a backup database, obtaining backup data, and then obtaining a backup data group;
[0071] Classify each backup data according to preset requirement types to obtain multiple types of backup data packages for each backup data;
[0072] Each backup data of each backup data group is marked with a backup time, and is sorted in chronological order from recent to far to obtain time-series backup data.
[0073] The working principle of the above technical solution is: obtain the data to be backed up from the database server, pre-process the data to be backed up, and obtain the pre-processed data to be backed up; classify the data to be backed up according to the data type of the data to be backed up, and obtain multiple data types of data groups to be backed up; the data to be backed up of the same data type is multiple times of the same data to be backed up, such as multiple backups of the same file. Back up each data to be backed up in the data group to be backed up to the backup database to obtain the backup data, and then obtain the backup data group; classify each backup data according to the preset demand type to obtain multiple types of backup data packets for each backup data; for example, divide the data between different page breaks of the same file into multiple different data packets and store them separately. Mark the backup time for each backup data in each backup data group, and sort them from near to far in chronological order to obtain time series backup data. For example, the backup data ranked first in the time series backup data is the latest backup data.
[0074] The technical effect of the above technical solution is as follows: the preprocessing step can eliminate redundancy or errors in the data to be backed up, ensuring that the backed up data is high-quality and error-free. By grouping multiple backups of the same data type, it is easier to track and manage the backup time and data of each backup data. The backup data is further split into multiple types of backup data packets, which allows the selective recovery of specific parts of the data according to actual needs, thereby improving the flexibility of recovery. Dividing different parts of the same file into multiple data packets and storing them separately can reduce redundant data, thereby making more efficient use of storage space. The time marking and time sequence sorting of the backup data enable the most recent backup version to be quickly located when data needs to be restored, thereby reducing the time required for recovery. When only a specific part of the data needs to be restored, only the corresponding data packet can be restored instead of the entire data set, further speeding up the recovery speed. The complete backup process ensures that data can be quickly restored when it is lost or damaged, thereby improving data security. Multiple backups and classified storage increase the redundancy of the data, further improving the reliability of the data. Since the backup data is classified in detail and marked with time, it can meet complex data recovery requirements, such as restoring the data state to a specific point in time or restoring a specific part of the data. This method provides a comprehensive, efficient and reliable backup and recovery solution for database servers by improving backup efficiency and accuracy, enhancing backup flexibility and manageability, optimizing storage space usage, accelerating recovery, enhancing data security and reliability, and supporting complex data recovery requirements.
[0075] In one embodiment of the present invention, S2 includes:
[0076] Acquire newly added backup data of each backup data group, compare the difference of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculate the difference comparison value;
[0077] Compare the difference comparison value with a preset difference threshold to obtain a difference comparison result;
[0078] Performing difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result to obtain a difference determination result;
[0079] Determine whether to differentially store each type of backup data packet according to the difference determination result to obtain a determination result;
[0080] The backup data package is differentially stored according to the judgment result to obtain a differential data package corresponding to the newly added backup data.
[0081] The working principle of the above technical solution is: obtain the newly added backup data of each backup data group, perform a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculate the difference comparison value; compare the difference comparison value with the preset difference threshold to obtain the difference comparison result; perform a difference judgment on each type of backup data packet of the newly added backup data according to the difference comparison result to obtain the difference judgment result; when the difference comparison value is greater than the preset difference threshold, perform a difference judgment on the backup data packet, otherwise no judgment is performed. According to the difference judgment result, a judgment is made on whether each type of backup data packet is differentially stored to obtain a judgment result; when the difference judgment result is a difference judgment on the backup data packet, the backup data packet is differentially stored, otherwise it is not stored. According to the judgment result, the backup data packet is differentially stored to obtain the difference data packet corresponding to the newly added backup data.
[0082] The calculation formula of the difference comparison value is:
[0083]
[0084] Among them, CYZ is the difference comparison value, d is the minimum number of paragraphs in the data packet, M is the total number of words in the data packet, and X i is the i-th word of the backup data packet of the newly added backup data, Y i is the i-th word of the backup data to be calculated (the first-ranked backup data), (X i -Y i ) a is the difference between the i-th word in the a-th segment of the backup data packet of the newly added backup data and the backup data to be calculated. i With Y i If the same, let X i-Y i 1, do not set X i -Y i =2, D max is the maximum value of the new backup data and the backup data to be calculated, D min is the minimum value of the new backup data and the backup data to be calculated. max With D min At the same time, 1, not set at the same time is 2.
[0085] The technical effect of the above technical solution is: by performing a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first (i.e., the latest) in the time series backup data, the changed part of the data can be accurately identified. Calculating the difference comparison value can quantify the degree of data change and provide an accurate basis for subsequent difference determination. The strategy of difference comparison and difference storage only stores the changed data part, avoiding repeated storage of unchanged data, thereby significantly optimizing the use of storage space. For those backup data packets with small difference comparison values or unchanged, no difference storage is performed, further saving storage space. The calculation process of difference comparison and difference storage reduces the data transmission and storage burden during the backup process, thereby improving the efficiency of backup. When restoring data, since only the difference part needs to be restored, or part of the difference data needs to be replaced, rather than the entire data set, the efficiency of data recovery is also improved. The storage method of the difference data packet makes it easier to find and restore the required data part when data needs to be restored, improving the convenience of data management. At the same time, the difference data packet also provides convenience for data version control and tracking, and can more clearly understand the history of data changes. The storage method of differential data packages supports the selective recovery of specific parts of data according to actual needs, thus supporting a more flexible data recovery strategy. When the data state at a specific point in time needs to be restored, it can be achieved by combining differential data packages and baseline backup data without restoring the entire data set.
[0086] In one embodiment of the present invention, S3 includes:
[0087] Obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction;
[0088] Performing data recovery on the backup data to obtain data recovery information, and calculating a recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0089] Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result;
[0090] Determine whether the backup data is qualified for restoration according to the restoration comparison result, and obtain a restoration determination result;
[0091] Whether to perform replacement recovery is determined according to the recovery determination result, until the recovery determination result is a recovery qualified state.
[0092] The working principle of the above technical solution is: obtain a backup and recovery instruction, and retrieve the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction in the backup database;
[0093] Performing data recovery on the backup data to obtain data recovery information, and calculating a recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0094] The calculation formula of the restored quality value is:
[0095]
[0096] Among them, HFZ is the recovery quality value, B is the minimum number of backup data packets before and after recovery, [(X i -Y i ) a ] s is the difference value of the ith word of the ath segment of the sth backup data packet, B mas is the maximum number of data packets of the backup data before and after recovery, B min is the minimum number of backup data packets before and after recovery. max With B min At the same time, 1, not set at the same time is 2.
[0097] The recovery quality value is compared with a preset recovery threshold value to obtain a recovery comparison result; whether the backup data is recovered is determined to be qualified according to the recovery comparison result to obtain a recovery determination result; when the recovery quality value is greater than the preset recovery threshold value, the recovery of the backup data is determined to be qualified, otherwise it is unqualified. Whether to perform replacement recovery is determined according to the recovery determination result until the recovery determination result is a qualified recovery state. When the recovery determination result is a qualified recovery state, replacement recovery is not performed, otherwise replacement recovery is performed.
[0098] The technical effect of the above technical solution is: by calculating the recovery quality value and comparing it with the preset threshold, the system can accurately determine whether the data recovery is successful, thereby avoiding data loss or damage caused by incomplete or erroneous recovery. Through the strategy of differential storage and on-demand recovery, the system can optimize the use of storage and computing resources. Only when the recovery is unqualified is replacement recovery required, thereby reducing unnecessary waste of resources. The backup recovery mechanism ensures that even in the event of data loss or damage, it can be quickly restored through backup data, thereby enhancing data security. The system supports flexible recovery strategy adjustment based on the recovery quality value, and can select the most appropriate recovery method according to actual conditions, thereby improving the flexibility and reliability of data recovery. By calculating the recovery quality value, the system can provide users with quantifiable recovery quality evaluation results to help users better understand the effect and reliability of data recovery.
[0099] In one embodiment of the present invention, the step of determining whether to perform replacement recovery according to the recovery determination result until the recovery determination result is a recovery qualified state includes:
[0100] When the recovery judgment result is a qualified recovery state, the backup server automatically goes offline and automatically goes online at the preset backup time;
[0101] When the recovery judgment result is a recovery failure state, the latest difference data packet of each type before the current ranking is replaced with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data to obtain the replacement backup data;
[0102] Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again;
[0103] The restoration quality value is compared with the preset restoration threshold value again until the restoration determination result is a restoration qualified state.
[0104] The working principle of the above technical solution is as follows: when the recovery judgment result is a qualified recovery state, the backup server automatically goes offline and automatically goes online at the preset backup time; when the recovery judgment result is an unqualified recovery state, the latest differential data packet of each type before the current ranking is replaced with the backup data packet of the same type as the backup data of the current ranking in the order of the time series backup data to obtain replacement backup data; the backup data of the current ranking is the backup data of the ranking that needs to be replaced, for example, the current ranking is the third ranking, and the backup data packet of the same type as the backup data of the first ranking in the time series backup data and the latest differential data packet of the same type as the second ranking are used to replace the backup data packet of the same type as the third ranking to obtain replacement backup data. The differential data packet of the first ranking of the same type will overwrite the differential data packet of the second ranking of the same type, such as Figure 2As shown; perform data recovery on the replacement backup data, and recalculate the recovery quality value of the replacement backup data; compare the recovery quality value with the preset recovery threshold again until the recovery judgment result is a qualified recovery state.
[0105] The technical effect of the above technical solution is: when the recovery judgment result is qualified, the backup server automatically goes offline and automatically goes online at the preset backup time. This automated process reduces the need for manual operation and improves management efficiency. The entire recovery process, including replacement recovery and data quality assessment, is automated, reducing the possibility of human error and improving the accuracy and reliability of the recovery process. In the case of unqualified recovery, the system uses differential data packets for replacement instead of the entire backup data set, which greatly improves recovery efficiency and resource utilization. Replacement is performed in the order of time-series backup data to ensure that the restored data is the latest and retains the integrity and consistency of the data. By calculating the recovery quality value multiple times and comparing it with the preset threshold, the system can ensure that the data is restored to a qualified state, improving the reliability and accuracy of the restored data. The storage strategy of the differential data packet reduces the storage space occupied while ensuring the integrity and accuracy of the data during recovery. Even in the case of unqualified data recovery, the system can ensure that the data can be restored to a qualified state by replacing the recovery strategy, enhancing the robustness and fault tolerance of the system. Since the operation and results of each step are recorded during the data recovery process, this provides users with a clear data recovery history, which is convenient for subsequent problem tracking and auditing. For users, they do not need to care about complex recovery processes and strategies. They only need to issue recovery instructions, and the system can automatically complete the recovery process and give the recovery results, which greatly simplifies the complexity of operations. This method provides an efficient and reliable data recovery solution for database servers through automated management, flexible recovery strategies, guaranteed data recovery quality, optimized storage space, and enhanced system robustness.
[0106] In one embodiment of the present invention, the system comprises:
[0107] The data classification storage module is used to classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, and sort the backup data in chronological order to obtain time-series backup data;
[0108] A difference calculation and determination module is used to calculate the difference comparison value between the newly acquired backup data and the backup data packet of the latest backup data, perform difference determination on the backup data packet according to the difference comparison value, perform difference storage on the backup data packet, and obtain a difference data packet;
[0109] The replacement recovery module is used to restore the backup data and calculate the recovery quality value, determine whether the backup data recovery is qualified according to the recovery quality value, and replace and restore the backup data according to the recovery determination result combined with the difference data packet until the recovery determination result is a qualified recovery state.
[0110] The working principle of the above technical solution is as follows: the data classification and storage module is used to classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packet, sort the backup data in chronological order, and obtain the time-series backup data; the difference calculation and judgment module is used to calculate the difference comparison value of the backup data packet of the newly acquired backup data and the latest backup data, perform the difference judgment of the backup data packet according to the difference comparison value, perform difference storage on the backup data packet, and obtain the difference data packet; the replacement and recovery module is used to restore the backup data, and calculate the recovery quality value, determine whether the recovery of the backup data is qualified according to the recovery quality value, and replace and restore the backup data according to the recovery judgment result combined with the difference data packet until the recovery judgment result is a qualified recovery state.
[0111] The technical effect of the above technical solution is: by classifying and backing up the backup data according to the data type, different types of data can be managed more clearly, and the organization and manageability of the backup data can be improved. The backup data packets are sorted in chronological order to form time-series backup data, which helps to track the historical versions and changes of the data and provides a clear reference for data recovery. Differential storage can be achieved by calculating the difference comparison value between the newly added backup data and the latest backup data and making a difference judgment. This means that only the changed data part is stored or replaced, instead of storing or replacing the complete data set every time, thereby significantly reducing the storage space required for backup and increasing the flexibility and efficiency of abnormal data replacement. The use of differential data packets means that when restoring data, only the differential part needs to be restored, rather than the entire data set, which greatly speeds up the data recovery. During the recovery process, the consistency of the restored data with the original data can be ensured by calculating the recovery quality value and determining whether the recovery is qualified. If the recovery quality value does not meet the requirements, replacement recovery is performed according to the differential data packet until the recovery is qualified, which ensures a high success rate and high quality of data recovery. The classification, sorting and differential storage of backup data, as well as the quality judgment and replacement recovery during the recovery process, all provide multiple layers of protection for data security. Even if the original data is lost or damaged, the data can be quickly and accurately restored through the backup data. Since the backup data packets are stored in chronological order, you can choose to restore to a specific time point or version as needed, providing more flexible strategy options for data recovery. The backup data verification process of the present invention improves data management efficiency, optimizes storage space, speeds up recovery, improves recovery quality, enhances data security, and supports flexible data recovery strategies, providing a comprehensive, efficient, and reliable solution for data backup and recovery.
[0112] In one embodiment of the present invention, the data classification storage module includes:
[0113] A preprocessing module is used to obtain the data to be backed up from the database server, preprocess the data to be backed up, and obtain the preprocessed data to be backed up;
[0114] A to-be-backed up grouping module is used to classify the to-be-backed up data according to the data types of the to-be-backed up data, and obtain to-be-backed up data groups of multiple data types;
[0115] A backup module, used for backing up each data to be backed up in the data group to be backed up to a backup database, obtaining the backup data, and then obtaining the backup data group;
[0116] The data packet generation module is used to classify each backup data according to the preset required categories to obtain multiple types of backup data packets for each backup data;
[0117] The time sequence sorting module is used to mark the backup time of each backup data of each backup data group, and sort them from recent to far in chronological order to obtain time sequence backup data.
[0118] The working principle of the above technical solution is as follows: the preprocessing module is used to obtain the data to be backed up of the database server, preprocess the data to be backed up, and obtain the preprocessed data to be backed up; the backup grouping module is used to classify the data to be backed up according to the data type of the data to be backed up, and obtain multiple data types of data groups to be backed up; the data to be backed up of the same data type is multiple backup data of the same data to be backed up, such as multiple backups of the same file. The backup module is used to back up each data to be backed up in the data group to be backed up to the backup database, obtain the backup data, and then obtain the backup data group; the data packet generation module is used to classify each backup data according to the preset demand type, and obtain multiple types of backup data packets for each backup data; for example, the data between different page breaks of the same file is divided into multiple different data packets and stored separately. The time sequence sorting module is used to mark the backup time of each backup data in each backup data group, and sort them from near to far in chronological order to obtain time sequence backup data. For example, the backup data ranked first in the time sequence backup data is the latest backup data.
[0119] The technical effect of the above technical solution is as follows: the preprocessing step can eliminate redundancy or errors in the data to be backed up, ensuring that the backed up data is high-quality and error-free. By grouping multiple backups of the same data type, it is easier to track and manage the backup time and data of each backup data. The backup data is further split into multiple types of backup data packets, which allows the selective recovery of specific parts of the data according to actual needs, thereby improving the flexibility of recovery. Dividing different parts of the same file into multiple data packets and storing them separately can reduce redundant data, thereby making more efficient use of storage space. The time marking and time sequence sorting of the backup data enable the most recent backup version to be quickly located when data needs to be restored, thereby reducing the time required for recovery. When only a specific part of the data needs to be restored, only the corresponding data packet can be restored instead of the entire data set, further speeding up the recovery speed. The complete backup process ensures that data can be quickly restored when it is lost or damaged, thereby improving data security. Multiple backups and classified storage increase the redundancy of the data, further improving the reliability of the data. Since the backup data is classified in detail and marked with time, it can meet complex data recovery requirements, such as restoring the data state to a specific point in time or restoring a specific part of the data. This method provides a comprehensive, efficient and reliable backup and recovery solution for database servers by improving backup efficiency and accuracy, enhancing backup flexibility and manageability, optimizing storage space usage, accelerating recovery, enhancing data security and reliability, and supporting complex data recovery requirements.
[0120] In one embodiment of the present invention, the difference calculation and determination module includes:
[0121] A difference calculation module, used for obtaining newly added backup data of each backup data group, performing a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculating a difference comparison value;
[0122] A difference comparison module, used to compare the difference comparison value with a preset difference threshold to obtain a difference comparison result;
[0123] A difference determination module, used for performing a difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result, to obtain a difference determination result;
[0124] A storage judgment module, used to judge whether to differentially store each type of backup data packet according to the difference judgment result, and obtain a judgment result;
[0125] The difference storage module is used to perform difference storage on the backup data package according to the judgment result to obtain the difference data package corresponding to the newly added backup data.
[0126] The working principle of the above technical solution is as follows: the difference calculation module is used to obtain the newly added backup data of each backup data group, and compare the difference of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculate the difference comparison value; the difference comparison module is used to compare the difference comparison value with the preset difference threshold to obtain the difference comparison result; the difference judgment module is used to perform difference judgment on each type of backup data packet of the newly added backup data according to the difference comparison result to obtain the difference judgment result; when the difference comparison value is greater than the preset difference threshold, the backup data packet is subjected to difference judgment, otherwise no judgment is performed. The storage judgment module is used to judge whether to perform difference storage on each type of backup data packet according to the difference judgment result to obtain the judgment result; when the difference judgment result is to perform difference judgment on the backup data packet, the backup data packet is differentially stored, otherwise it is not stored. The difference storage module is used to perform difference storage on the backup data packet according to the judgment result to obtain the difference data packet corresponding to the newly added backup data.
[0127] The calculation formula of the difference comparison value is:
[0128]
[0129] Among them, CYZ is the difference comparison value, d is the minimum number of paragraphs in the data packet, M is the total number of words in the data packet, and X i is the i-th word of the backup data packet of the newly added backup data, Yi is the i-th word of the backup data to be calculated (the first-ranked backup data), (X i -Y i ) a is the difference between the i-th word in the a-th segment of the backup data packet of the newly added backup data and the backup data to be calculated. i With Y i If they are the same, set it to 1, if they are different, set it to 2, D max is the maximum value of the new backup data and the backup data to be calculated, D min It is the minimum value of the paragraphs of the newly added backup data and the backup data to be calculated.
[0130] The technical effect of the above technical solution is: by performing a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first (i.e., the latest) in the time series backup data, the changed part of the data can be accurately identified. Calculating the difference comparison value can quantify the degree of data change and provide an accurate basis for subsequent difference determination. The strategy of difference comparison and difference storage only stores the changed data part, avoiding repeated storage of unchanged data, thereby significantly optimizing the use of storage space. For those backup data packets with small difference comparison values or unchanged, no difference storage is performed, further saving storage space. The calculation process of difference comparison and difference storage reduces the data transmission and storage burden during the backup process, thereby improving the efficiency of backup. When restoring data, since only the difference part needs to be restored, or part of the difference data needs to be replaced, rather than the entire data set, the efficiency of data recovery is also improved. The storage method of the difference data packet makes it easier to find and restore the required data part when data needs to be restored, improving the convenience of data management. At the same time, the difference data packet also provides convenience for data version control and tracking, and can more clearly understand the history of data changes. The storage method of differential data packages supports the selective recovery of specific parts of data according to actual needs, thus supporting a more flexible data recovery strategy. When the data state at a specific point in time needs to be restored, it can be achieved by combining differential data packages and baseline backup data without restoring the entire data set.
[0131] In one embodiment of the present invention, the replacement recovery module includes:
[0132] A backup and recovery module, used to obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction;
[0133] A recovery quality calculation module, used to perform data recovery on the backup data, obtain data recovery information, and calculate a recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0134] Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result;
[0135] A recovery determination module, used to determine whether the backup data is qualified for recovery according to the recovery comparison result, and obtain a recovery determination result;
[0136] The data packet replacement module is used to determine whether to perform replacement recovery according to the recovery determination result, until the recovery determination result is a recovery qualified state.
[0137] The working principle of the above technical solution is as follows: the backup recovery module is used to obtain the backup recovery instruction, and retrieve the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup recovery instruction in the backup database; the recovery quality calculation module is used to perform data recovery on the backup data, obtain data recovery information, and calculate the recovery quality value of the backup data according to the data recovery information combined with the backup data;
[0138] The calculation formula of the restored quality value is:
[0139]
[0140] Among them, HFZ is the recovery quality value, B is the minimum number of backup data packets before and after recovery, [(X i -Y i ) a ] s is the difference value of the ith word of the ath segment of the sth backup data packet, B max is the maximum number of data packets of the backup data before and after recovery, B min is the minimum number of backup data packets before and after recovery. max With B min At the same time, 1, not set at the same time is 2.
[0141] The recovery quality value is compared with the preset recovery threshold to obtain a recovery comparison result; the recovery judgment module is used to judge whether the backup data is restored to a qualified state according to the recovery comparison result to obtain a recovery judgment result; when the recovery quality value is greater than the preset recovery threshold, the backup data is judged to be restored to a qualified state, otherwise it is unqualified. The data packet replacement module is used to determine whether to perform replacement recovery according to the recovery judgment result until the recovery judgment result is a qualified state. When the recovery judgment result is a qualified state, replacement recovery is not performed, otherwise replacement recovery is performed.
[0142] The technical effect of the above technical solution is: by calculating the recovery quality value and comparing it with the preset threshold, the system can accurately determine whether the data recovery is successful, thereby avoiding data loss or damage caused by incomplete or erroneous recovery. Through the strategy of differential storage and on-demand recovery, the system can optimize the use of storage and computing resources. Only when the recovery is unqualified is replacement recovery required, thereby reducing unnecessary waste of resources. The backup recovery mechanism ensures that even in the event of data loss or damage, it can be quickly restored through backup data, thereby enhancing data security. The system supports flexible recovery strategy adjustment based on the recovery quality value, and can select the most appropriate recovery method according to actual conditions, thereby improving the flexibility and reliability of data recovery. By calculating the recovery quality value, the system can provide users with quantifiable recovery quality evaluation results to help users better understand the effect and reliability of data recovery.
[0143] In one embodiment of the present invention, the data packet replacement module includes:
[0144] The qualified module is used to automatically offline the backup server when the recovery judgment result is a qualified recovery state, and automatically go online at the preset backup time;
[0145] A sequential replacement module is used to replace the latest difference data packet of each type before the current ranking with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data when the recovery judgment result is a recovery failure state, so as to obtain replacement backup data;
[0146] Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again;
[0147] The restoration quality value is compared with the preset restoration threshold value again until the restoration determination result is a restoration qualified state.
[0148] The working principle of the above technical solution is as follows: the qualified module compares the recovery quality value with the preset recovery threshold value again until the recovery judgment result is a qualified recovery state. When the recovery judgment result is a qualified recovery state, the backup server automatically goes offline and automatically goes online at the preset backup time; the sequential replacement module is used to replace the latest differential data packet of each type before the current ranking with the same type of backup data packet of the current ranking backup data in the order of the time series backup data when the recovery judgment result is an unqualified recovery state, to obtain replacement backup data; the backup data of the current ranking is the backup data of the ranking to be replaced, for example, the current ranking is the third ranking, and the same type of the latest differential data packet of the first ranking backup data and the same type of the second ranking backup data are used to replace the same type of backup data packet of the third ranking to obtain replacement backup data. The differential data packet of the first ranking of the same type will overwrite the differential data packet of the second ranking of the same type. Data recovery is performed on the replacement backup data, and the recovery quality value of the replacement backup data is calculated again; the recovery quality value is compared with the preset recovery threshold value again until the recovery judgment result is a qualified recovery state.
[0149] The technical effect of the above technical solution is: when the recovery judgment result is qualified, the backup server automatically goes offline and automatically goes online at the preset backup time. This automated process reduces the need for manual operation and improves management efficiency. The entire recovery process, including replacement recovery and data quality assessment, is automated, reducing the possibility of human error and improving the accuracy and reliability of the recovery process. In the case of unqualified recovery, the system uses differential data packets for replacement instead of the entire backup data set, which greatly improves recovery efficiency and resource utilization. Replacement is performed in the order of time-series backup data to ensure that the restored data is the latest and retains the integrity and consistency of the data. By calculating the recovery quality value multiple times and comparing it with the preset threshold, the system can ensure that the data is restored to a qualified state, improving the reliability and accuracy of the restored data. The storage strategy of the differential data packet reduces the storage space occupied while ensuring the integrity and accuracy of the data during recovery. Even in the case of unqualified data recovery, the system can ensure that the data can be restored to a qualified state by replacing the recovery strategy, enhancing the robustness and fault tolerance of the system. Since the operation and results of each step are recorded during the data recovery process, this provides users with a clear data recovery history, which is convenient for subsequent problem tracking and auditing. For users, they do not need to care about complex recovery processes and strategies. They only need to issue recovery instructions, and the system can automatically complete the recovery process and give the recovery results, which greatly simplifies the complexity of operations. This method provides an efficient and reliable data recovery solution for database servers through automated management, flexible recovery strategies, guaranteed data recovery quality, optimized storage space, and enhanced system robustness.
[0150] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for verifying the validity of backup data, characterized in that: The method comprises: S1. Classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, sort the backup data in chronological order, and obtain time-series backup data; Wherein, the S1 includes: Acquire the data to be backed up from the database server, pre-process the data to be backed up, and obtain the pre-processed data to be backed up; Classifying the data to be backed up according to the data types of the data to be backed up, and obtaining data groups to be backed up of multiple data types; Backing up each to-be-backed-up data of the to-be-backed-up data group to a backup database, obtaining backup data, and then obtaining a backup data group; Classify each backup data according to preset requirement types to obtain multiple types of backup data packages for each backup data; Mark each backup data of each backup data group with the backup time, and sort them in chronological order from recent to far to obtain time-series backup data; S2, calculating a difference comparison value between the newly acquired backup data and the backup data packets of the latest backup data, determining a difference between the backup data packets according to the difference comparison value, performing differential storage on the backup data packets, and obtaining a differential data packet; Wherein, the S2 includes: Acquire newly added backup data of each backup data group, compare the difference of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculate the difference comparison value; The calculation formula of the difference comparison value is: Among them, CYZ is the difference comparison value, d is the minimum number of paragraphs in the data packet, M is the total number of words in the data packet, and X i is the i-th word of the backup data packet of the newly added backup data, Y i is the backup data to be calculated, that is, the i-th word of the backup data ranked first, (X i -Y i ) a is the difference between the i-th word in the a-th segment of the backup data packet of the newly added backup data and the backup data to be calculated. i With Y i If the same, let X i -Y i 1, do not set X i -Y i =2, D max is the maximum value of the new backup data and the backup data to be calculated, D min is the minimum value of the new backup data and the backup data to be calculated. max With D min At the same time, 1, not set at the same time is 2; Compare the difference comparison value with a preset difference threshold to obtain a difference comparison result; Performing difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result to obtain a difference determination result; Determine whether to differentially store each type of backup data packet according to the difference determination result to obtain a determination result; Perform differential storage on the backup data package according to the judgment result to obtain a differential data package corresponding to the newly added backup data; S3, restoring the backup data and calculating the restoration quality value, determining whether the restoration of the backup data is qualified according to the restoration quality value, and replacing and restoring the backup data according to the restoration determination result combined with the difference data packet, until the restoration determination result is a qualified restoration state; Wherein, the S3 includes: Obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction; Performing data recovery on the backup data to obtain data recovery information, and calculating a recovery quality value of the backup data according to the data recovery information combined with the backup data; The calculation formula of the restored quality value is: Among them, HFZ is the recovery quality value, B is the minimum number of backup data packets before and after recovery, [(X i -Y i ) a ] s is the difference value of the ith word of the ath segment of the sth backup data packet, B max is the maximum number of data packets of the backup data before and after recovery, B min is the minimum number of backup data packets before and after recovery. max With B min At the same time, 1, not set at the same time is 2; Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result; Determine whether the backup data is qualified for restoration according to the restoration comparison result, and obtain a restoration determination result; Determine whether to perform replacement recovery according to the recovery determination result, until the recovery determination result is a recovery qualified state; The step of determining whether to perform replacement recovery according to the recovery determination result until the recovery determination result is a recovery qualified state includes: When the recovery judgment result is a qualified recovery state, the backup server automatically goes offline and automatically goes online at the preset backup time; When the recovery judgment result is a recovery failure state, the latest difference data packet of each type before the current ranking is replaced with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data to obtain the replacement backup data; Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again; The restoration quality value is compared with the preset restoration threshold value again until the restoration determination result is a restoration qualified state.
2. A backup data validity verification system, characterized in that: The system comprises: The data classification storage module is used to classify and back up the backup data according to the data type, classify the backup data of the obtained backup data group according to the preset requirement type, obtain and store the backup data packets, and sort the backup data in chronological order to obtain time-series backup data; Wherein, the data classification storage module includes: A preprocessing module is used to obtain the data to be backed up from the database server, preprocess the data to be backed up, and obtain the preprocessed data to be backed up; A to-be-backed up grouping module is used to classify the to-be-backed up data according to the data types of the to-be-backed up data, and obtain to-be-backed up data groups of multiple data types; A backup module, used for backing up each data to be backed up in the data group to be backed up to a backup database, obtaining the backup data, and then obtaining the backup data group; The data packet generation module is used to classify each backup data according to the preset required categories to obtain multiple types of backup data packets for each backup data; A time sequence sorting module is used to mark the backup time of each backup data of each backup data group and sort them from recent to far in chronological order to obtain time sequence backup data; A difference calculation and determination module is used to calculate the difference comparison value between the newly acquired backup data and the backup data packet of the latest backup data, perform difference determination on the backup data packet according to the difference comparison value, perform difference storage on the backup data packet, and obtain a difference data packet; Wherein, the difference calculation and determination module includes: A difference calculation module, used for obtaining newly added backup data of each backup data group, performing a difference comparison of each type of backup data packet between the newly added backup data and the backup data ranked first in the time series backup data, and calculating a difference comparison value; The calculation formula of the difference comparison value is: Among them, CYZ is the difference comparison value, d is the minimum number of paragraphs in the data packet, M is the total number of words in the data packet, and X i is the i-th word of the backup data packet of the newly added backup data, Y i is the backup data to be calculated, that is, the i-th word of the backup data ranked first, (X i -Y i ) a is the difference between the i-th word in the a-th segment of the backup data packet of the newly added backup data and the backup data to be calculated. i With Y i If the same, let X i -Y i 1, do not set X i -Y i =2, D max is the maximum value of the new backup data and the backup data to be calculated, D min is the minimum value of the new backup data and the backup data to be calculated. max With D min At the same time, 1, not set at the same time is 2; A difference comparison module, used to compare the difference comparison value with a preset difference threshold to obtain a difference comparison result; A difference determination module, used for performing a difference determination on each type of backup data packet of the newly added backup data according to the difference comparison result, to obtain a difference determination result; A storage judgment module, used to judge whether to differentially store each type of backup data packet according to the difference judgment result, and obtain a judgment result; A difference storage module, used to perform difference storage on the backup data packet according to the judgment result, and obtain a difference data packet corresponding to the newly added backup data; A replacement recovery module is used to recover the backup data and calculate the recovery quality value, determine whether the recovery of the backup data is qualified according to the recovery quality value, and replace and recover the backup data according to the recovery determination result combined with the difference data packet until the recovery determination result is a qualified recovery state; Wherein, the replacement recovery module includes: A backup and recovery module, used to obtain a backup and recovery instruction, and retrieve from a backup database the first-ranked backup data in the time-series backup data in the backup data group corresponding to the backup and recovery instruction; A recovery quality calculation module, used to perform data recovery on the backup data, obtain data recovery information, and calculate a recovery quality value of the backup data based on the data recovery information combined with the backup data; The calculation formula of the restored quality value is: Among them, HFZ is the recovery quality value, B is the minimum number of backup data packets before and after recovery, [(X i -Y i ) a ] s is the difference value of the ith word of the ath segment of the sth backup data packet, B max is the maximum number of data packets of the backup data before and after recovery, B min is the minimum number of backup data packets before and after recovery. max With B min At the same time, 1, not set at the same time is 2; Comparing the restoration quality value with a preset restoration threshold to obtain a restoration comparison result; A recovery determination module, used to determine whether the backup data is qualified for recovery according to the recovery comparison result, and obtain a recovery determination result; A data packet replacement module, used for determining whether to perform replacement recovery according to the recovery determination result, until the recovery determination result is a recovery qualified state; Wherein, the data packet replacement module includes: The qualified module is used to automatically offline the backup server when the recovery judgment result is a qualified recovery state, and automatically go online at the preset backup time; A sequential replacement module is used to replace the latest difference data packet of each type before the current ranking with the backup data packet of the same type of the current ranking backup data in the order of the time-series backup data when the recovery judgment result is a recovery failure state, so as to obtain replacement backup data; Performing data recovery on the replacement backup data, and calculating the recovery quality value of the replacement backup data again; The restoration quality value is compared with the preset restoration threshold value again until the restoration determination result is a restoration qualified state.
Citation Information
Patent Citations
Backup and recovery method and backup and recovery device for high-availability server databases in offline places
CN106648980A
NAS (Network Attached Storage) data restoration method and device, equipment and storage medium
CN116610501A