A method for database backup and recovery management

By performing risk classification and hierarchical backup of database data, combined with the use of off-site backup and backup-restore data tables, the problems of low database backup efficiency and large data volume in the existing technology are solved, and efficient and reliable database backup and recovery are achieved.

CN118642891BActive Publication Date: 2025-06-17HUANENG INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410668200.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-06-17
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

In the prior art, database backup efficiency is low and the amount of backup data is large, which makes it difficult to ensure data security and reliability.

Method used

Data classification is carried out based on the data risk of database data, and hierarchical backup is carried out based on the classification results, including full backup and incremental backup. The graded backup results are backed up off-site and a backup-restore data table is built so that the corresponding information is called when data is restored. Perform integrity checks on the data recovery results to determine whether the backup is successful.

Benefits of technology

It improves the backup efficiency of database data, reduces the space use of data backup, and enhances data reliability and risk resistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642891B_ABST
    Figure CN118642891B_ABST
Patent Text Reader

Abstract

The present invention provides a database backup and recovery management method, which relates to the technical field of backup and recovery, and includes: classifying data based on the data risk of database data, and performing hierarchical backup based on the data classification results; performing off-site backup processing on the hierarchical backup results, and obtaining a first backup result according to the processing results; building a backup-recovery data table for the first backup result, so as to call corresponding information for data recovery when performing database recovery; performing integrity verification on the data recovery results, and determining whether the database backup is successful based on the integrity verification results. By combining the data risk to perform hierarchical backup on the data results, performing off-site backup based on the hierarchical backup results, and establishing a backup-recovery data table to back up the data backup results in a timely manner, the backup efficiency of database data can be improved, and at the same time, the space usage of data backup can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of backup and recovery, and particularly to a database backup and recovery management method. Background Art

[0002] With the continuous expansion of the data scale, database backup and recovery have become important measures to ensure data security and reliability. A good database backup and recovery method can better ensure data availability and continuity, and avoid the risks of data loss and service interruption.

[0003] However, existing data backups generally use a single data backup method, resulting in problems such as low backup efficiency and large backup data volume.

[0004] Therefore, the present invention provides a database backup and recovery management method. Summary of the Invention

[0005] The present invention provides a database backup and recovery management method to solve the defects of low backup efficiency and large backup data volume in the prior art.

[0006] The present invention provides a database backup and recovery management method, including:

[0007] Step 1: Classify data based on the data risk of database data, and perform hierarchical backup based on the data classification result;

[0008] Step 2: Perform off-site backup processing on the hierarchical backup result, and obtain the first backup result according to the processing result;

[0009] Step 3: Build a backup-recovery data table for the first backup result, so as to call corresponding information for data recovery when performing database recovery;

[0010] Step 4: Perform integrity verification on the data recovery result, and determine whether the database backup is successful based on the integrity verification result.

[0011] According to the present invention, classifying data based on the data risk of database data and performing hierarchical backup based on the data classification result includes:

[0012] Step 11: Obtain the data to be backed up in the database as the initial data, and perform a first judgment on the data risk of each sub-data in the initial data;

[0013] Step 12: Classify the initial data based on the first judgment result to obtain the first classified data, and sort each sub-classified data according to the data risk of the first classified data to obtain the second classified data;

[0014] Step 13: Based on different data risks, screen all data backup methods in the risk-backup database that match the data risks corresponding to each sub-classified data as the first data backup method set;

[0015] Among them, the data backup methods corresponding to each data risk are not unique;

[0016] Step 14: Eliminate the data backup methods in the first data backup method set except the first backup method and the second backup method, and extract the sub-classified data corresponding to the first backup method as the first data, and extract the sub-classified data corresponding to the second backup method as the second data;

[0017] Step 15: Compare each sub-data in the first data with each sub-data in the second data one by one to determine whether there is data duplication between the first data and the second data;

[0018] If there is data duplication, then eliminate the corresponding sub-data in the second data to obtain the third data;

[0019] Step 16: Perform a full backup of the first data based on the first backup method to obtain the first initial backup result;

[0020] Step 17: Perform a full backup of the third data based on the second backup method to obtain the second initial backup result;

[0021] Among them, except for the first data backup cycle of the second classified data, the remaining data backup cycles do not require a full backup of the third data;

[0022] Step 18: Compare the data result corresponding to the third data in the previous data backup cycle with the third data, so as to extract the part of the data that is updated by the third data in the current data backup cycle as the fourth data;

[0023] Step 19: Generate an update data record compressed by time based on the fourth data, and then perform an incremental backup of the fourth data based on the second backup method to obtain the third initial backup result;

[0024] Step 110: Obtain the hierarchical backup result of the second classified data based on the first initial backup result, the second initial backup result and the third initial backup result.

[0025] According to the present invention, eliminating the data backup methods in the first data backup method set except the first backup method and the second backup method, and extracting the sub-classified data corresponding to the first backup method as the first data, and extracting the sub-classified data corresponding to the second backup method as the second data, further includes:

[0026] Compare the second classified sub-data corresponding to the first data backup method set with the first data and the second data to determine whether there is data loss;

[0027] If there is data loss, back up the missing sub-data based on the first data backup method corresponding to the missing sub-data to obtain a special backup result, and combine the special backup result with the first initial backup result, the second initial backup result, and the third initial backup result to obtain a hierarchical backup result for the second classified data.

[0028] Perform off-site backup processing on the hierarchical backup result provided by the present invention, and obtain a first backup result according to the processing result, including:

[0029] Step 21: Obtain a pre-set backup address, and determine whether the pre-set backup address and the current database address belong to the same local area network;

[0030] Step 22: Use the data backup address that can perform database data backup as the first address, and set the backup address of the current database as the first address;

[0031] Step 23: Transmit the hierarchical backup result of the second classified data to the first address through the network for off-site data backup, and combine the backup configuration information to obtain a first backup result.

[0032] Transmit the third classified data to the first address through the network for data backup according to the present invention, and combine the backup configuration information to obtain a first backup result, including:

[0033] Step 231: Set the backup time, backup frequency, and data backup methods corresponding to data of different sub-addresses of the database data as the first backup configuration information;

[0034] Step 232: Determine the data recovery method corresponding to each backup method based on the data backup methods corresponding to data of different sub-addresses, and correspond the data recovery method with the data backup method, and combine the remaining configuration information in the first backup configuration information to obtain the second backup configuration information;

[0035] Step 233: Transmit the hierarchical backup result corresponding to the second classified data to the first address through the network for off-site data backup, and combine the second backup configuration information to obtain a first backup result.

[0036] Build a backup-recovery data table for the first backup result according to the present invention, so as to call corresponding information for data recovery during database recovery, including:

[0037] Step 31: Set up a backup - recovery data table at the pre - set backup address based on the second backup configuration information in the first backup result as the recovery label for data recovery;

[0038] Step 32: Determine the recovery label corresponding to the data for which data recovery is required, and thus extract the corresponding second backup configuration information from the backup - recovery data table;

[0039] Step 33: Extract the corresponding sub - backup result from the first backup result according to the first backup configuration information;

[0040] Step 34: Perform data recovery on the sub - backup result according to the second backup configuration information.

[0041] According to the present invention, performing integrity verification on the data recovery result and determining whether the database backup is successful based on the integrity verification result includes:

[0042] Step 41: Extract the data backup log at any moment within a preset time period for inspection, determine whether there is a backup anomaly or backup error result in the data backup log, and use the determination result as the first basis for the integrity verification of the current data backup result;

[0043] Step 42: Set up a backup recovery virtual machine in the backup platform corresponding to the first address, and extract any address in the backup - recovery data table as the detection address;

[0044] Step 43: Extract the detection backup result corresponding to the detection address in the first address, perform virtual data recovery in the backup recovery virtual machine based on the second backup configuration information corresponding to the detection backup result, compare the virtual data recovery result with the corresponding initial data, and use the comparison result as the second basis for the integrity verification of the current data backup result;

[0045] Step 44: Combine the first basis and the second basis to judge the comprehensive data integrity of the current data recovery result, and thus judge whether the database backup is successful.

[0046] According to the present invention, comparing the virtual data recovery result with the corresponding initial data and using the comparison result as the second basis for the integrity verification of the current data backup result includes:

[0047] Based on the relative position of the detection address in the first address, extract the sub - classification data of the second classification data at the corresponding relative position as the first comparison data;

[0048] Compare the virtual data recovery result with the first comparison data, and compare the data consistency degree of the data comparison result with the preset data consistency range;

[0049] If the data consistency is less than the preset data consistency range, data prediction is performed based on the virtual data recovery result, and the data prediction result is combined with the virtual data recovery result as the first detection data;

[0050] Compare the first detection data with the first comparison data. If the data consistency of the data comparison result is still less than the preset data consistency range, it is determined that the data backup fails.

[0051] A database backup and recovery management method provided by the present invention can improve the backup efficiency of database data and reduce the space usage of data backup by performing hierarchical backup on data results in combination with data riskiness, performing off-site backup based on the hierarchical backup results, and establishing a backup-recovery data table to back up the data backup results in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0053] Figure 1 is a flowchart of a database backup and recovery management method provided by an embodiment of the present invention;

[0054] Figure 2 is a flowchart of a data recovery method provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0056] Embodiment 1:

[0057] An embodiment of the present invention provides a database backup and recovery management method, as Figure 1 shown, including:

[0058] Step 1: Classify data based on the data riskiness of database data, and perform hierarchical backup based on the data classification result;

[0059] Step 2: Perform off-site backup processing on the hierarchical backup result, and obtain the first backup result according to the processing result;

[0060] Step 3: Set up a backup - recovery data table for the first backup result, so that corresponding information can be called for data recovery during database recovery;

[0061] Step 4: Conduct integrity verification on the data recovery result, and determine whether the database backup is successful based on the integrity verification result.

[0062] In this embodiment, data risk refers to the data importance of database data. For example, there are differences in the data risks of technical materials, user data, business data, etc. Among them, the data risk of core technical materials is relatively high, and higher requirements are imposed on the backup of core data.

[0063] In this embodiment, classifying database data means classifying database data according to the level of data risk.

[0064] In this embodiment, hierarchical backup is based on the classification result of database data, and different backup methods are adopted for different classified database data. Among them, hierarchical backup methods include full - volume backup, incremental backup, etc. Full - volume backup means making a complete backup of the data to be backed up. For example, for a 100GB disk with 40GB of data written, the full - volume backup is also 40GB of data. Incremental backup means backing up newly changed data. For example, if 5GB of new data is generated or changed after the first backup, the incremental backup only backs up 5GB of data.

[0065] In this embodiment, off - site backup means backing up data to storage devices in different geographical locations to improve the reliability and availability of data. Off - site backup can save costs for enterprises while ensuring data security.

[0066] In this embodiment, after the first backup result, classifying the database data and performing hierarchical backup, the backup result obtained by off - site backup of the hierarchical backup result.

[0067] In this embodiment, the backup - recovery data table refers to a data table containing information such as the data backup method, recovery method, data backup time, backup frequency, etc. For example, the i - th row in the backup - recovery data table represents the i - th data backup, where the backup time is 2024.3.20.20:20, the backup frequency is 10min / time, and the data backup methods are the first backup method and the second backup method.

[0068] In this embodiment, data recovery means recovering the backup data. Among them, the data recovery result of full - volume backup is more complete, and the data recovery result of incremental backup is more concise.

[0069] In this embodiment, the integrity check compares the result of data recovery after data backup with the original data result to confirm the data integrity of the data recovery result.

[0070] The beneficial effects of the above technical solution are as follows: By classifying and backing up data results according to data riskiness, performing off-site backup based on the classified backup results, and establishing a backup-recovery data table to back up the data backup results in a timely manner, the backup efficiency of database data can be improved, and the space used for data backup can be reduced.

[0071] Embodiment 2:

[0072] Based on Embodiment 1, data is classified based on the data riskiness of database data, and hierarchical backup is performed based on the data classification results, including:

[0073] Step 11: Obtain the data to be backed up in the database as the initial data, and make a first judgment on the data riskiness of each sub-data in the initial data;

[0074] Step 12: Classify the initial data based on the first judgment result to obtain the first classified data, and sort each sub-classified data according to the data riskiness of the first classified data to obtain the second classified data;

[0075] Step 13: Based on different data riskiness, screen all data backup methods that match the data riskiness corresponding to each sub-classified data from the risk-backup database as the first data backup method set;

[0076] Among them, the data backup methods corresponding to each data riskiness are not unique;

[0077] Step 14: Remove the data backup methods in the first data backup method set except the first backup method and the second backup method, extract the sub-classified data corresponding to the first backup method as the first data, and extract the sub-classified data corresponding to the second backup method as the second data;

[0078] Step 15: Compare each sub-data in the first data with each sub-data in the second data one by one to determine whether there is data duplication between the first data and the second data;

[0079] If there is data duplication, then remove the corresponding sub-data in the second data to obtain the third data;

[0080] Step 16: Perform a full backup on the first data based on the first backup method to obtain the first initial backup result;

[0081] Step 17: Perform a full backup on the third data based on the second backup method to obtain the second initial backup result;

[0082] Among them, except for the first data backup cycle of the second classification data, full backup of the third data is not required for the remaining data backup cycles;

[0083] Step 18: Compare the corresponding data result of the third data in the previous data backup cycle with the third data, so as to extract part of the data for data update of the third data in the current data backup cycle as the fourth data;

[0084] Step 19: Generate an update data record based on time compression based on the fourth data, so as to perform incremental backup on the fourth data based on the second backup method to obtain the third initial backup result;

[0085] Step 110: Obtain the hierarchical backup result of the second classification data based on the first initial backup result, the second initial backup result and the third initial backup result.

[0086] In this embodiment, the initial data refers to the data that needs to be backed up in the database data.

[0087] In this embodiment, the first judgment refers to judging the data risk of the initial data, classifying the initial data according to the level of data risk, and then performing further backup.

[0088] In this embodiment, the first classification data refers to the data obtained by classifying the initial data according to its data risk, and the second classification data refers to the data obtained by sorting the first classification data according to the level of data risk.

[0089] In this embodiment, the first backup method set is obtained after determining the data backup methods for each sub-classification data in the second classification data. Among them, the first backup methods in the first backup method set include full backup, incremental backup, distributed backup, etc., and each sub-classification data corresponds to one or more first backup methods.

[0090] In this embodiment, the first backup method is full backup, the second backup method is incremental backup, the first data is the sub-classification data in the first backup method set that includes the full backup method, and the second data is the sub-classification data in the first backup method set that includes the incremental backup method.

[0091] In this embodiment, the third data refers to the data obtained by comparing the first data with the second data. If there is a phenomenon of data duplication in the second data, the duplicate sub-classification data in the second data is removed.

[0092] In this embodiment, the first initial backup result refers to the data backup result obtained after a full backup of the first data, and the second initial backup result refers to the data backup result obtained after a full backup of the third data.

[0093] In this embodiment, the fourth data refers to the extraction data obtained by comparing the corresponding data result of the third data in the previous data backup cycle with the third data and extracting the part of the third data with data differences in the comparison result.

[0094] In this embodiment, the third initial backup result refers to the data backup result obtained after an incremental backup of the fourth data.

[0095] In this embodiment, the hierarchical backup result refers to the backup result obtained after backing up the second classified data in ways such as the first initial backup, the second initial backup, and the third initial backup.

[0096] The beneficial effects of the above technical solution are: by classifying data results based on data risk and performing hierarchical backups according to the classification results, the backup efficiency of database data can be improved, and at the same time, the space usage of data backups can be reduced.

[0097] Embodiment 3:

[0098] Based on Embodiment 2, excluding the data backup methods in the first data backup method set except the first backup method and the second backup method, including:

[0099] Comparing the second classified sub-data corresponding to the first data backup method set with the first data and the second data to determine whether there is a data missing situation;

[0100] If there is a data missing situation, then based on the first data backup method corresponding to the missing sub-data, backing up the missing sub-data to obtain a special backup result, and combining the special backup result with the first initial backup result, the second initial backup result, and the third initial backup result to obtain the hierarchical backup result of the second classified data.

[0101] In this embodiment, data missing means comparing the second classified data corresponding to the first data backup method set with the data set of the first data and the second data, and determining whether there is second classified data that is not corresponding sub-classified data in the comparison result. Among them, the data that is not corresponding sub-classified data is the data with missing data.

[0102] In this embodiment, the special backup result refers to the result obtained after backing up the data with missing data according to any data backup method in the corresponding data backup result.

[0103] In this embodiment, the hierarchical backup result refers to a result obtained by combining the special backup result with the first initial backup result, the second initial backup result, and the third initial backup result.

[0104] The beneficial effect of the above technical solution is that by further analyzing the backup method of the hierarchical data backup, the hierarchical data backup result can be made more accurate, and the backup efficiency of the database data is also improved.

[0105] Embodiment 4:

[0106] Based on Example 2, the hierarchical backup result is processed in a remote location, and a first backup result is obtained according to the processing result, including:

[0107] Step 21: Obtain a preset backup address, and determine whether the preset backup address and the current database address belong to the same local area network;

[0108] Step 22: Using a data backup address where database data can be backed up as the first address, and setting the backup address of the current database as the first address;

[0109] Step 23: Transmit the hierarchical backup result of the second classified data to the first address through the network for off-site data backup, and obtain the first backup result in combination with the backup configuration information.

[0110] In this embodiment, the preset backup address is a data backup address that is predetermined according to the data size and data type of the data to be backed up.

[0111] In this embodiment, the first address refers to an address in the preset backup address that belongs to the same local area network as the current database address.

[0112] In this embodiment, the first backup result refers to a data backup result obtained by transmitting the hierarchical backup result of the second classified data to the first address through the network and performing off-site data backup.

[0113] The beneficial effect of the above technical solution is that by backing up the hierarchical backup results off-site, the risk resistance of data can be improved, and data recovery can be carried out in time after the initial data suffers from uncontrollable loss.

[0114] Embodiment 5:

[0115] Based on Example 4, the third classification data is transmitted to the first address through the network for data backup, and the first backup result is obtained in combination with the backup configuration information, including:

[0116] Step 231: Setting the backup time, backup frequency and data backup methods corresponding to different sub-address data of the database data as first backup configuration information;

[0117] Step 232: Determine the data recovery method corresponding to each backup method based on the data backup methods corresponding to different sub-address data, and correspond the data recovery method with the data backup method. Combine the remaining configuration information in the first backup configuration information to obtain the second backup configuration information;

[0118] Step 233: Transmit the hierarchical backup result corresponding to the second classified data to the first address through the network for off-site data backup, and obtain the first backup result by combining the second backup configuration information.

[0119] In this embodiment, the backup time refers to the moment when data backup is performed in each data backup cycle. The backup frequency is determined according to the data backup cycle and the time of each data backup cycle. The data backup method refers to the first data backup method and the second data backup method. Among them, the first data backup method is full backup, and the second data backup method is incremental backup. Among them, a full backup needs to be performed before the first incremental backup.

[0120] In this embodiment, the first backup configuration information includes the backup time, backup frequency of database data, and the data backup methods corresponding to different sub-address data. The second backup configuration information includes the backup time, backup frequency of database data, the data backup methods corresponding to different sub-address data, and the data recovery method corresponding to each data backup method. For example, the backup time for the i-th data backup is 2024.3.20.20:20, the backup frequency is 10 min / time, the data backup methods are the first backup method and the second backup method, the data recovery methods are the data recovery methods of the first backup method and the second backup method. The recovery method of the first data backup method is full recovery, and the recovery method of the second data backup method is to perform incremental recovery first, and then perform full recovery on the result of the most recent full backup.

[0121] In this embodiment, the data recovery methods are mainly full data recovery and incremental recovery methods. Incremental recovery refers to recovering the incremental backup data after the most recent full backup, so as to restore the database to the latest state. Incremental recovery can restore the database faster, while reducing the amount of data and storage space to be recovered, and improving the data recovery efficiency.

[0122] In this embodiment, off-site data backup refers to backing up data to storage devices with different geographical locations to improve the reliability and availability of data. Off-site backup can save costs for enterprises while ensuring data security.

[0123] In this embodiment, the first backup result includes the data backup result and the corresponding second backup configuration information.

[0124] The beneficial effects of the above technical solution are as follows: By performing off-site backup on the hierarchical backup results and determining the backup configuration information of the backup results, the anti-risk ability of the data can be improved. At the same time, the data recovery time can be shortened and the data recovery efficiency can be improved.

[0125] Embodiment 6:

[0126] Based on Embodiment 4, a backup-restore data table for the first backup result is built, so as to call the corresponding information for data recovery when performing database recovery. As Figure 2 shown, it includes:

[0127] Step 31: Set up a backup-restore data table in the pre-set backup address based on the second backup configuration information in the first backup result as the recovery label for data recovery;

[0128] Step 32: Determine the recovery label corresponding to the data for which data recovery is required, so as to extract the corresponding second backup configuration information from the backup-restore data table;

[0129] Step 33: Extract the corresponding sub-backup result from the first backup result according to the first backup configuration information;

[0130] Step 34: Perform data recovery on the sub-backup result according to the second backup configuration information.

[0131] In this embodiment, the recovery label refers to the backup-restore data table set in the first address, and the backup-restore data table contains information such as data backup method, data backup time, and backup frequency.

[0132] In the embodiment, the second backup configuration information refers to the configuration information including data backup method, data recovery method, data backup time, backup frequency, etc.

[0133] In this embodiment, data recovery refers to performing data recovery on the corresponding sub-backup result according to the second backup configuration information.

[0134] The beneficial effects of the above technical solution are as follows: By building a backup-restore data table, the address of the backup information and the corresponding backup and recovery methods can be determined more quickly when performing data recovery on the backup data, improving the data recovery efficiency.

[0135] Embodiment 7:

[0136] Based on Embodiment 6, perform integrity verification on the data recovery result, and determine whether the database backup is successful based on the integrity verification result, including:

[0137] Step 41: Extract the data backup log at any moment within a preset time period for inspection, determine whether there are backup anomalies or backup error results in the data backup log, and use the judgment result as the first basis for verifying the integrity of the current data backup result;

[0138] Step 42: Set up a backup recovery virtual machine in the backup platform corresponding to the first address, and extract any address in the backup - recovery data table as the detection address;

[0139] Step 43: Extract the detection backup result corresponding to the detection address in the first address, perform virtual data recovery in the backup recovery virtual machine based on the second backup configuration information corresponding to the detection backup result, and compare the virtual data recovery result with the corresponding initial data. Use the comparison result as the second basis for verifying the integrity of the current data backup result;

[0140] Step 44: Combine the first basis and the second basis to judge the comprehensive data integrity of the current data recovery result, so as to judge whether the database backup is successful.

[0141] In this embodiment, the data backup log refers to the event description information of relevant operations such as backup date, time, user, and actions when performing data backup.

[0142] In this embodiment, the first basis refers to using the judgment result of backup anomalies or backup errors in the data backup result as a basis for judging whether the database backup is successful.

[0143] In this embodiment, the detection address refers to any address in the backup - recovery data table.

[0144] In this embodiment, the second basis refers to transmitting the data backup result of the detection address to the virtual machine for backup recovery, comparing the recovery result with the corresponding data of the initial data, and using the comparison result as a basis for judging whether the database backup is successful.

[0145] In this embodiment, the comprehensive data integrity is determined according to the results of the first basis and the second basis corresponding to the current data.

[0146] The beneficial effects of the above - mentioned technical solution are: By verifying the data integrity, the backup result of data backup can be determined in a timely manner, so as to adjust the backup method in a timely manner and improve the data backup efficiency.

[0147] Embodiment 8:

[0148] Based on Embodiment 7, comparing the virtual data recovery result with the corresponding initial data, and using the comparison result as the second basis for verifying the integrity of the current data backup result, includes:

[0149] Extract the sub-classification data of the second classification data at the corresponding relative position as the first comparison data based on the relative position of the detection address in the first address;

[0150] Compare the virtual data recovery result with the first comparison data, and compare the data consistency degree of the data comparison result with the preset data consistency degree range;

[0151] If the data consistency degree is less than the preset data consistency degree range, perform data prediction based on the virtual data recovery result, and combine the data prediction result with the virtual data recovery result as the first detection data;

[0152] Compare the first detection data with the first comparison data. If the data consistency degree of the data comparison result is still less than the preset data consistency degree range, it is determined that the data backup fails.

[0153] In this embodiment, the first comparison data is obtained by extracting the sub-classification data of the second classification data at the corresponding relative position according to the relative position of the detection address in the first address.

[0154] In this embodiment, the data consistency degree refers to the consistency degree between the data obtained by comparing the first comparison data with the virtual data recovery result of the corresponding address.

[0155] In this embodiment, the preset data consistency degree range refers to the data consistency degree range determined according to the accuracy requirements of data backup, and the value of the preset data consistency degree range is (0.8, 1).

[0156] In this embodiment, the first detection data refers to the data result obtained by performing data prediction based on the virtual data recovery result when the data consistency degree is less than the preset data consistency degree range and combining the data prediction result with the virtual data recovery result.

[0157] The beneficial effects of the above technical solutions are: By determining the data consistency degree, data integrity verification can be performed, the backup result of data backup can be determined in a timely manner, and the backup method can be adjusted in a timely manner to improve the data backup efficiency.

[0158] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: They can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A database backup and recovery management method, characterized in that: include: Step 1: Classify the data based on the data risk of the database data, and perform hierarchical backup based on the data classification results; Step 2: Perform off-site backup processing on the hierarchical backup results, and obtain a first backup result according to the processing results; Step 3: Build a backup-restore data table of the first backup result, so that the corresponding information can be called for data recovery when restoring the database; Step 4: Perform integrity check on the data recovery result, and determine whether the database backup is successful based on the integrity check result; Wherein, step 1 includes: Step 11: Obtain the data that needs to be backed up in the database as initial data, and make a first judgment on the data risk of each sub-data in the initial data; Step 12: classifying the initial data based on the first judgment result to obtain first classified data, and sorting each sub-classified data according to the data risk of the first classified data to obtain second classified data; Step 13: Based on different data risks, all data backup methods matching the data risk corresponding to each sub-classification data are selected from the risk-backup database as a first data backup method set; Among them, the data backup method corresponding to each data risk is not unique; Step 14: Eliminate the data backup methods other than the first backup method and the second backup method in the first data backup method set, and extract the sub-classified data corresponding to the first backup method as the first data, and extract the sub-classified data corresponding to the second backup method as the second data; Step 15: Compare each sub-data in the first data with each sub-data in the second data one by one to determine whether there is data duplication between the first data and the second data; If there is data duplication, the corresponding sub-data in the second data is removed to obtain the third data; Step 16: Perform a full backup of the first data based on the first backup method to obtain a first initial backup result; Step 17: Perform a full backup of the third data based on the second backup method to obtain a second initial backup result; Except for the first data backup period of the second classification data, the remaining data backup periods do not require full backup of the third data; Step 18: Compare the corresponding data result of the third data in the previous data backup cycle with the third data, so as to extract the part of the third data updated in the current data backup cycle as the fourth data; Step 19: Generate an update data record based on time compression based on the fourth data, thereby performing an incremental backup of the fourth data based on the second backup method to obtain a third initial backup result; Step 110: Obtain a hierarchical backup result for the second classified data based on the first initial backup result, the second initial backup result, and the third initial backup result.

2. A database backup and recovery management method according to claim 1, characterized in that: Eliminating data backup methods other than the first backup method and the second backup method from the first data backup method set, extracting sub-classified data corresponding to the first backup method as first data, and extracting sub-classified data corresponding to the second backup method as second data, further comprising: Compare the second classification data corresponding to the first data backup method set with the first data and the second data to determine whether there is data missing; If there is data missing, the missing sub-data is backed up based on the first data backup method corresponding to the missing sub-data to obtain a special backup result, and the special backup result is combined with the first initial backup result, the second initial backup result and the third initial backup result to obtain a hierarchical backup result for the second classified data.

3. A database backup and recovery management method according to claim 1, characterized in that: The hierarchical backup results are processed off-site, and a first backup result is obtained according to the processing results, including: Step 21: Obtain a preset backup address, and determine whether the preset backup address and the current database address belong to the same local area network; Step 22: Using a data backup address where database data can be backed up as the first address, and setting the backup address of the current database as the first address; Step 23: Transmitting the hierarchical backup result of the second classified data to the first address through the network for off-site data backup, and obtaining the first backup result in combination with the backup configuration information; The first address refers to an address in the preset backup address that belongs to the same local area network as the current database address.

4. A database backup and recovery management method according to claim 3, characterized in that: The second classified data is transmitted to the first address through the network for data backup, and the first backup result is obtained in combination with the backup configuration information, including: Step 231: Setting the backup time, backup frequency and data backup methods corresponding to different sub-address data of the database data as first backup configuration information; Step 232: determining the data recovery mode corresponding to each backup mode based on the data backup modes corresponding to the different sub-address data, and matching the data recovery mode with the data backup mode, and combining the remaining configuration information in the first backup configuration information to obtain the second backup configuration information; Step 233: Transmit the second classified data to the first address through the network for off-site data backup, and obtain the first backup result in combination with the second backup configuration information.

5. A database backup and recovery management method according to claim 4, characterized in that: Build a backup-restore data table for the first backup result, so that the corresponding information can be called for data recovery when restoring the database, including: Step 31: Setting a backup-restore data table in a preset backup address based on the second backup configuration information in the first backup result as a restore tag for data restore; Step 32: determining the recovery tag corresponding to the data to be recovered, thereby extracting the corresponding second backup configuration information from the backup-recovery data table; Step 33: extracting the corresponding sub-backup result from the first backup result according to the first backup configuration information; Step 34: Perform data recovery on the sub-backup result according to the second backup configuration information.

6. A database backup and recovery management method according to claim 5, characterized in that: Perform integrity check on the data recovery results and determine whether the database backup is successful based on the integrity check results, including: Step 41: extracting the data backup log at any time within the preset time period for inspection, determining whether there is backup anomaly or backup error result in the data backup log, and using the determination result as the first basis for the integrity check of the current data backup result; Step 42: Setting a backup recovery virtual machine in the backup platform corresponding to the first address, and extracting any address in the backup-recovery data table as a detection address; Step 43: extracting the detection backup result corresponding to the detection address in the first address, and performing virtual data recovery in the backup recovery virtual machine based on the second backup configuration information corresponding to the detection backup result, and comparing the virtual data recovery result with the corresponding initial data, and using the comparison result as the second basis for the integrity check of the current data backup result; Step 44: Determine the comprehensive data integrity of the current data recovery result based on the first basis and the second basis, thereby determining whether the database backup is successful.

7. A database backup and recovery management method according to claim 6, characterized in that: Compare the virtual data recovery result with the corresponding initial data, and use the comparison result as the second basis for the integrity check of the current data backup result, including: Based on the relative position of the detection address in the first address, extracting sub-classification data of the second classification data at the corresponding relative position as the first comparison data; Comparing the virtual data recovery result with the first comparison data, and comparing the data consistency of the data comparison result with a preset data consistency range; If the data consistency is less than the preset data consistency range, data prediction is performed based on the virtual data recovery result, and the data prediction result is combined with the virtual data recovery result as the first detection data; The first detection data is compared with the first comparison data. If the data consistency of the data comparison result is still less than the preset data consistency range, it is determined that the data backup fails.

Citation Information

Patent Citations

  • Data processing method and device and storage medium

    CN112084066A

  • Data backup and recovery method and device, equipment and medium

    CN115586987A

  • Server data backup and recovery system and method

    CN117149527A

  • Disaster recovery backup data management system based on cloud computing

    CN117724898A

  • Computer network datarecovering method

    CN1975683A