Data recovery processing method, apparatus and system
By optimizing the recovery verification path of the database backup file and identifying concurrent and non-concurrent jobs, the recovery verification was completed efficiently within a preset time, solving the verification delay problem caused by large data volume and improving resource utilization.
Patent Information
- Application Number
- CN202210197321.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-03-01
AI Technical Summary
During the data recovery verification process, the recovery verification of backup data with a large amount of data takes too long, causing other backup data recovery verification jobs to fail to complete within the expected time, affecting the availability of backup data and the effectiveness of the task.
By obtaining the pending execution paths of multiple database backup files, the first recovery verification job that can be executed concurrently and the second recovery verification job that cannot be executed concurrently are determined. Based on the pending execution paths and preset scheduling optimization conditions, the critical path is optimized to obtain the optimal execution path, and the recovery verification server is controlled to execute the recovery verification job according to the optimal path.
The system completes the recovery verification of multiple database backup files within the preset recovery verification time, which improves the efficiency of recovery verification, avoids resource waste, and ensures the availability and validity of backup data.
Smart Images

Figure CN114546730B_ABST
Abstract
Description
Technical Field
[0001] This application relates primarily to the field of data processing technology, and more specifically to a data recovery processing method, apparatus, and system. Background Technology
[0002] In the era of big data, data disaster recovery, or data disaster backup technology, has become an issue that cannot be ignored. It can back up system data to other databases in case of abnormalities such as operational errors or system failures, thus avoiding data loss.
[0003] To ensure the availability of backup data, in actual business operations, a large amount of backup data is usually sent to the target recovery machine, and its effectiveness is verified one by one in a preset order. However, since the data volume of different backup data often varies, if the verification of a backup data with a large data volume takes too long, the verification of other backup data will not be completed within the expected time, thus failing to guarantee the availability of backup data and the effectiveness of the backup task. Summary of the Invention
[0004] In view of this, this application provides a data recovery processing method, the method comprising:
[0005] Obtain multiple database backup files to be restored and verified, and a pending execution path for serial restoration and verification of the multiple database backup files;
[0006] At least one first recovery verification job and a second recovery verification job are determined to perform recovery verification on the plurality of database backup files; the first recovery verification job can be executed concurrently; the second recovery verification job cannot be executed concurrently.
[0007] Based on the pending execution path and the preset scheduling optimization conditions, the critical path of the first recovery verification job and the second recovery verification job is optimized to obtain the optimal execution path that satisfies the preset scheduling optimization conditions;
[0008] According to the optimal execution path, the recovery verification server is controlled to execute the plurality of first recovery verification jobs and second recovery verification jobs.
[0009] Optionally, determining at least one first recovery verification job and a second recovery verification job for recovering and verifying the plurality of database backup files includes:
[0010] Obtain historical recovery verification information for each of the multiple database backup files, as well as the available resources of the recovery verification server;
[0011] Based on the historical recovery verification information and the available resources, a first predicted probability is obtained that the recovery verification server can complete the recovery verification of the multiple database backup files within a preset recovery verification time according to the pending execution path.
[0012] If the first predicted probability is determined to be less than the first probability threshold, an optimized scheduling instruction is generated for the pending execution path.
[0013] In response to the optimized scheduling instruction, a resource competition analysis is performed on the recovery verification process of the multiple database backup files;
[0014] Based on the results of different resource competition and cooperation analysis, the corresponding first recovery verification job and second recovery verification job are determined from the multiple recovery verification jobs that perform recovery verification on the multiple database backup files.
[0015] Optionally, the recovery verification process for the multiple database backup files involves resource competition analysis. Based on different resource competition analysis results, a corresponding first recovery verification job is determined from the multiple recovery verification jobs that perform recovery verification on the multiple database backup files, including:
[0016] Determine the database server source for each of the multiple database backup files;
[0017] If the same database server source corresponds to multiple database backup files, the corresponding recovery verification process will be determined as the first recovery verification job;
[0018] Based on the execution entities involved in the recovery verification process of the database backup file, the first recovery verification job is decomposed into multiple recovery verification sub-jobs, and recovery verification sub-jobs that can be executed concurrently among different first recovery verification jobs are determined; and / or,
[0019] If multiple database server sources each correspond to a database backup file, the recovery verification process of that database backup file is determined as the first recovery verification job.
[0020] Optionally, the step of performing critical path optimization on the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions to obtain the optimal execution path that satisfies the preset scheduling optimization conditions includes:
[0021] Execution path scheduling is performed for multiple first recovery verification jobs corresponding to the same database server source;
[0022] Based on the pending execution paths and the predicted recovery verification time of different recovery jobs, candidate execution paths for the first recovery verification job and the second recovery verification job are determined according to the scheduling optimization method corresponding to the obtained execution path scheduling results.
[0023] Verify that the predicted execution results of the first and second recovery verification jobs executed by the recovery verification server according to the candidate execution path meet the preset scheduling optimization conditions, and determine the candidate execution path as the optimal execution path.
[0024] Optionally, the verification, according to the candidate execution path, controls the recovery verification server to execute the first recovery verification job and the predicted execution results of the second recovery verification job to meet preset scheduling optimization conditions, including:
[0025] Obtain the recovery verification jobs corresponding to the multiple database backup files, and complete them within a preset recovery verification time according to the second predicted probability of the candidate execution paths;
[0026] If the second predicted probability is determined to be less than the second probability threshold, the candidate execution path is further optimized until the newly obtained second predicted probability is equal to or greater than the second probability threshold.
[0027] And / or,
[0028] If the range of jobs that cannot be executed within the preset recovery verification time has not decreased in the recovery verification jobs corresponding to the multiple database backup files, continue to optimize the candidate execution path until the range of jobs that cannot be executed within the preset recovery verification time is reduced.
[0029] And / or,
[0030] If a recovery verification job that cannot be executed within the preset recovery verification time is in the candidate execution path and its execution order has not been moved backward relative to the pending execution path, the candidate execution path will continue to be optimized until the execution order is moved backward.
[0031] Optionally, the step of performing critical path optimization on the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions to obtain the optimal execution path that satisfies the preset scheduling optimization conditions includes:
[0032] The execution paths of multiple first recovery verification jobs corresponding to the same database server source are scheduled to obtain at least one first concurrent execution path;
[0033] The execution paths of the first recovery verification jobs corresponding to different database server sources are scheduled to obtain at least one second concurrent execution path;
[0034] Based on the pending execution path, the first concurrent execution path, and the second concurrent execution path, according to the scheduling optimization strategy, the first recovery verification job and the second recovery verification job are scheduled for critical paths to obtain the optimal execution path that meets the preset scheduling optimization conditions;
[0035] The preset scheduling optimization conditions include reducing the recovery verification time and resource consumption of the multiple database backup files when the recovery verification of the multiple database backup files is completed within the preset recovery verification time.
[0036] Optionally, obtaining the pending execution path for serial recovery verification of the multiple database backup files includes:
[0037] Obtain priority configuration data corresponding to each of the plurality of database backup files; the priority configuration data includes one or more combinations of the following: historical recovery verification information of the database corresponding to the database backup file, database attributes, database backup method, and recovery verification prediction duration;
[0038] Based on the priority configuration data, the recovery verification priority for serial recovery verification of the multiple database backup files is determined.
[0039] Based on the recovery verification priority, the pending execution paths for the recovery verification of the multiple database backup files are obtained.
[0040] Optionally, determining the recovery verification priority for serial recovery verification of the multiple database backup files based on the priority configuration data includes:
[0041] If the database backup method includes a full backup method and an incremental backup method, the recovery processing priority of the database backup file obtained by the full backup method is configured to be higher than the recovery processing priority of the database backup file obtained by the incremental backup method.
[0042] And / or,
[0043] Based on the historical recovery verification information, if it is determined that the corresponding database backup file has not completed or has not successfully completed recovery verification within the adjacent previous preset recovery verification period, the recovery verification priority of the database backup file is increased.
[0044] This application also proposes a data recovery processing apparatus, the apparatus comprising:
[0045] The information acquisition module is used to acquire multiple database backup files to be restored and verified, as well as the pending execution path for serial restoration and verification of the multiple database backup files;
[0046] The recovery verification job determination module is used to determine at least one first recovery verification job and a second recovery verification job for performing recovery verification on the plurality of database backup files; the first recovery verification job can be executed concurrently; the second recovery verification job cannot be executed concurrently.
[0047] The optimal execution path acquisition module is used to perform critical path optimization on the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions, so as to obtain the optimal execution path that satisfies the preset scheduling optimization conditions.
[0048] The recovery verification processing module is used to control the recovery verification server to execute the plurality of first recovery verification jobs and second recovery verification jobs according to the optimal execution path.
[0049] This application also proposes a data recovery processing system, the system comprising: a database server, a backup server, a recovery verification server, and a scheduling device, wherein the scheduling device includes at least one communication interface, at least one memory, and at least one processor, wherein:
[0050] The memory is used to store programs that implement the data recovery processing method described above;
[0051] The processor is used to load and execute the program stored in the memory to implement the data recovery processing method described above.
[0052] Therefore, this application provides a data recovery processing method, apparatus, and system. For multiple database backup files to be recovered and verified, after initially determining the pending execution path for serial recovery verification, at least one first recovery verification job that can be executed concurrently and a second recovery verification job that cannot be executed concurrently are initially determined among the multiple recovery verification jobs for recovering and verifying the multiple database backup files. Then, based on the pending execution path and preset scheduling optimization conditions, critical path optimization is performed on these recovery verification jobs to determine the optimal execution path that meets the preset scheduling optimization conditions. In this way, the scheduling device controls at least one selected recovery verification server to execute these multiple recovery verification jobs concurrently along the preset path according to the optimal execution path, ensuring that the recovery verification process of these multiple database backup files can be completed within the preset recovery verification time and improving the resource utilization of the recovery verification server. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of the architecture of an optional example of a data recovery processing system applicable to any application environment of the data recovery processing method proposed in this application;
[0055] Figure 2 A flowchart illustrating an optional example of the data recovery processing method proposed in this application;
[0056] Figure 3 This is a flowchart illustrating yet another optional example of the data recovery processing method proposed in this application.
[0057] Figure 4 This is a flowchart illustrating yet another optional example of the data recovery processing method proposed in this application.
[0058] Figure 5 This is a flowchart illustrating yet another optional example of the data recovery processing method proposed in this application.
[0059] Figure 6 This is a schematic diagram showing the result of an optional example of the data recovery processing apparatus proposed in this application;
[0060] Figure 7 A schematic diagram showing the result of yet another optional example of the data recovery processing apparatus proposed in this application;
[0061] Figure 8 A schematic diagram of the hardware structure of an optional example of a scheduling device applicable to the data recovery processing method proposed in this application. Detailed Implementation
[0062] Regarding the description in the background section, in order to improve the recovery verification efficiency of multiple database backup files, it is proposed to configure a corresponding number of recovery verification servers to simultaneously perform recovery verification on different database backup files, so as to ensure that these multiple database backup files can be completed within the preset recovery verification time, thereby ensuring the availability and validity of the database backup files. However, this data recovery processing method will cause a large waste of recovery verification server resources, which is not advisable.
[0063] To further address the aforementioned issues, and while ensuring the successful recovery verification of multiple database backup files within the preset verification time, the system aims to fully utilize the resources of one or more recovery verification servers, guaranteeing their normal operation while avoiding resource waste. Therefore, considering the varying complexity of recovery execution steps for different database backup files, and the fact that the entire recovery verification process often involves the execution of multiple entities, for example, when restoring backup files for relational databases such as MySQL and PostgreSQL, the backup file must first be restored to the local disk before the recovery verification is performed on the corresponding database server.
[0064] To address this, this application proposes a reasonable allocation of concurrently executable jobs during the recovery verification process of multiple database backup files. This involves determining the number of recovery verification servers required for concurrent execution, identifying the database backup files included in each path, and their execution order. Furthermore, for multiple database backup files from the same database server, the entire recovery verification process can be decomposed. By combining critical path optimization algorithms, the allocation of time for parallel execution between the decomposed steps of these multiple database backup files can be optimized. This achieves resource scheduling optimization for the recovery verification servers, ensuring the high-quality and efficient completion of the recovery verification of multiple data packet backup files within the preset recovery verification time. This reduces resource waste, improves the efficiency of recovery verification job execution, resolves job backlog issues, and guarantees the availability and validity of database backup files.
[0065] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] Reference Figure 1 This is a schematic diagram of an optional example of a data recovery processing system applicable to any application environment of the data recovery processing method proposed in this application. This application does not limit the type of application environment, such as... Figure 1 As shown, the system may include: a database server 11, a backup server 12, a recovery verification server 13, and a scheduling device 14. Each of these components in the system is usually at least one, and they can communicate with each other through a wired or wireless communication network. This application does not limit the communication connection method between the components, and it can be determined according to the needs of the scenario. This application will not describe it in detail here.
[0067] Database server 11 can be a server providing data storage services, a standalone physical server, a service cluster consisting of multiple physical servers, or a cloud server. In practical applications, database server 11 is typically divided into several types, such as relational databases and non-relational databases, allowing for flexible selection of the database server used to store the enterprise's business data based on different business needs.
[0068] Each database server 11 may be configured with one or more databases (i.e., database instances) to enable flexible storage of various types of data. Typically, considering data security, a disaster recovery system is configured for each database server 11. This means that, according to a preset backup cycle or backup rules, a backup server 12 can periodically perform backup operations on the data of each database, obtaining corresponding database backup files for storage. This allows for subsequent recovery operations based on business needs, restoring the database instance from the time of backup. This application does not detail the database backup operation process.
[0069] In practical applications, for multiple database servers 11, a corresponding number of backup servers can execute backup jobs in parallel to obtain database backup files for each database. Subsequently, to ensure the effectiveness of subsequent recovery operations on these database backup files, a recovery validity verification is usually performed. This process can be implemented by a server verification server (i.e., the recovery target machine). During this recovery verification process, the corresponding database server can perform critical data content verification on the database backup files; the implementation process is not detailed here.
[0070] In this application, the number of backup servers 12 can be multiple, or multiple backup processes / threads can be created on a single backup server to execute backup jobs according to preset backup rules, thereby performing backup processing on the database instance in the corresponding database server and obtaining the database backup file of that database instance. The number of recovery verification servers participating in the data recovery process, and the number of processing processes / threads executed by each recovery verification server, can be determined based on the optimal scheduling scheme obtained from the critical path analysis of the backup and recovery jobs that can be executed concurrently during the recovery verification of the database backup file obtained this time. This application will not elaborate on this further.
[0071] The scheduling device 14 can be a computer device that analyzes the multiple database backup files obtained, determines the optimal scheduling scheme, and then controls the scheduling control to realize the recovery verification of the multiple database backup files obtained in this round based on the optimal scheduling scheme. It can be a terminal device or a server. The terminal device can include, but is not limited to, smartphones, tablets, wearable devices, smart transportation equipment, smart medical equipment, robots, desktop computers, etc.; the server can be a physical server or a cloud server, etc. This application does not limit the product type of the scheduling device 14 and can be determined as appropriate.
[0072] In the backup verification process for each database backup file, the database backup file stored on the backup server can be sent to the local electronic device of the administrator requesting the recovery verification. The local electronic device then restores the database backup file to the backup verification database. This local electronic device can be the scheduling device 14, or it can be another electronic device different from the scheduling device 14. This application does not limit this and it can be determined as appropriate.
[0073] It should be understood that, Figure 1 The data recovery processing system structure shown does not constitute a limitation on the data recovery processing system in the embodiments of this application. In practical applications, the system may include more... Figure 1 The more or fewer devices, or combinations thereof, shown are not listed here in this application.
[0074] Reference Figure 2 The above is a flowchart illustrating an optional example of the data recovery processing method proposed in this application. This method can be executed by the aforementioned scheduling device, such as... Figure 2 As shown, the method may include:
[0075] Step S21: Obtain multiple database backup files to be restored and verified, and the pending execution path for serial restoration and verification of these multiple database backup files;
[0076] Based on the description of the relevant parts of the above embodiments, the backup jobs of database instances in each database server are usually executed according to a certain period or time rule, such as performing a backup job on the database instance once every 24 hours. This 24 hours can be used as the preset recovery verification duration, but it is not limited to 24 hours. The time interval between two adjacent backup jobs can be determined according to business needs, that is, the preset recovery verification duration.
[0077] For multiple database backup files obtained from backup jobs executed within each preset recovery verification period, when recovery verification processing is required, in order to solve the problem of backlogged jobs not being completed, this application can first determine the recovery verification priority of these multiple database backup files, configure a corresponding recovery verification priority flag for the recovery verification job of the corresponding database backup file, and then, based on the recovery verification priority flag, execute the recovery verification job with higher recovery verification priority first, that is, determine the pending execution path for serial recovery verification of multiple database backup files, thereby instructing the recovery verification of these multiple database backup files to be executed sequentially according to the pending execution path.
[0078] Regarding the method for obtaining the recovery verification priority of each of the multiple database backup files, that is, when determining the aforementioned pending execution path, the method can be based on one or more combinations of the historical recovery verification information of the databases corresponding to each database backup file (such as whether the previous recovery verification of the corresponding database backup file was completed, the time spent completing the recovery verification, etc.), database attributes (such as database type, etc.), database backup method (such as full backup method that backs up all data in the database, incremental backup method that backs up part of the data in the database), and recovery verification prediction time (i.e., the predicted time that the current recovery verification of the database backup file may take, etc.), to determine the marking strategy for the recovery verification priority of each database backup file, and accordingly determine the pending execution path for the serial recovery verification of the multiple database backup files obtained this time, that is, the execution order of the recovery verification of the multiple database backup files. The implementation process is not detailed in this application.
[0079] It should be noted that the marking strategy used to determine the pending execution path for serial recovery verification of multiple database backup files includes, but is not limited to, the content described above. It can be determined based on actual business needs, and this application will not provide detailed examples.
[0080] In some embodiments, since the determination of the above-mentioned pending execution path is usually aimed at maximizing the number of recovery verification jobs completed within the preset recovery verification time, and is continuously adjusted and optimized, this application can predict whether the recovery verification of multiple database backup files can be completed within the preset recovery verification time if the pending execution path is followed. If there is a high probability that it can be completed, that is, the obtained first predicted probability reaches the first probability threshold (that is, the predicted probability threshold value that the recovery verification of multiple database backup files can be completed within the preset recovery verification time; this application does not limit its value and it can be determined according to the situation), the pending execution path can be used as the target scheduling scheme, and the scheduling device can directly control multiple database backup files to perform recovery verification in sequence according to the pending execution path.
[0081] Conversely, if the prediction process described above determines that the first prediction probability has not reached the first probability threshold, it is necessary to further optimize the scheduling scheme for the recovery verification process of these multiple database backup files. At this time, subsequent steps can be executed to determine whether the target scheduling scheme for the recovery verification of multiple database backup files can be achieved within the preset recovery verification time while making full use of the resources of the recovery verification server.
[0082] Of course, in some other embodiments, after obtaining multiple database backup files, the optimal scheduling scheme for these multiple database backup files can be determined by combining the above description of the technical solution of this application with the technical means of parallel execution of recovery jobs, that is, the backup and recovery task scheduling method based on the critical path optimization of concurrent jobs, thereby improving the recovery verification efficiency.
[0083] Step S22: Determine at least one first recovery verification job and a second recovery verification job for performing recovery verification on multiple database backup files;
[0084] In this embodiment, the recovery verification process for each database backup file can be defined as a recovery verification job. The first recovery verification job can refer to the recovery verification jobs that can be executed concurrently; the second recovery verification job can refer to the recovery verification jobs that cannot be executed concurrently. This application does not limit the method for determining the first recovery verification job and the second recovery verification job, and can refer to, but is not limited to, the description in the corresponding part of the following embodiment.
[0085] It should be noted that in some embodiments, for the multiple recovery verification jobs corresponding to the multiple database backup files obtained in this study, some recovery verification jobs may be the first recovery verification jobs, all recovery verification jobs may be the first recovery verification jobs (i.e., there are no second recovery verification jobs), or there may be no first recovery verification jobs. In the case where multiple recovery verification jobs are all second recovery verification jobs, the recovery verification of these multiple database backup files can be directly controlled according to the pending execution path. This application does not describe the processing procedure for this situation in detail.
[0086] In the first recovery verification job, the database servers from which the database backup files of each recovery verification job originate can be considered. For multiple database backup files from different database servers, directly executing the recovery verification process of these multiple database backup files concurrently is not conducive to improving recovery verification efficiency. In this case, the recovery verification process of this type of database backup file can be decomposed to obtain multiple corresponding recovery verification sub-jobs. In this way, considering that the execution time of different recovery verification sub-jobs is different, and the execution time of the same database backup file in the same type of recovery verification sub-job is also different, the concurrent execution strategy among these multiple database backup files is no longer limited to concurrent execution from the start time. For example, when executing the second recovery verification sub-job for a certain database backup file, the first recovery verification sub-job of the recovery verification job of the next database backup file can be started simultaneously to maximize the number of recovery verification jobs executed within the preset recovery verification time and to make full use of the recovery verification server resources. The process of determining the scheduling scheme is not detailed in this application.
[0087] Step S23: Based on the pending execution path and the preset scheduling optimization conditions, perform critical path optimization on the first recovery verification job and the second recovery verification job to obtain the optimal execution path that meets the preset scheduling optimization conditions;
[0088] Step S24: According to the optimal execution path, control the recovery verification server to execute multiple first recovery verification jobs and second recovery verification jobs.
[0089] As described above, the preset scheduling optimization conditions may include reducing the recovery verification time and resource consumption for performing recovery verification on multiple database backup files (i.e., database backup files obtained by performing backup jobs within a preset recovery verification time) when the recovery verification of multiple database backup files is completed within a preset recovery verification time. This solves the technical problems of performing serial recovery verification on these multiple database backup files or sending these multiple database backup files to a corresponding number of recovery verification servers for parallel recovery verification. This application does not limit the specific content of the preset scheduling optimization conditions and can be determined as appropriate.
[0090] Based on the above description of the technical solution of this application, this application considers the predicted recovery verification time of different recovery verification jobs and the available resources of the recovery verification server, and schedules the concurrent execution of each first recovery verification job, that is, determines the first recovery verification job and its execution order corresponding to each concurrent recovery verification, which is to determine the first recovery verification job queue / execution path of the concurrent recovery verification. At the same time, for the first recovery verification job that can be decomposed, when determining the various execution orders of the first recovery verification job, the different start execution times of each recovery verification sub-job executed concurrently between different first recovery verification jobs can also be determined, resulting in multiple strategies, that is, the various execution paths of each determined recovery verification job.
[0091] Subsequently, the predicted recovery verification time and the amount of recovery verification server resources required to execute multiple recovery verification jobs (including the first and second recovery verification jobs) according to each execution path (i.e., scheduling strategy) can be analyzed to determine the optimal execution path. This application does not limit the implementation method of the above-mentioned critical path optimization method for determining the optimal solution (i.e., the optimal execution path) based on the execution order of multiple recovery verification jobs satisfying the preset scheduling optimization conditions.
[0092] After determining the optimal execution path for performing recovery verification on the multiple database backup files obtained in this study according to the method described above, the scheduling device can control the multiple database backup files to be restored to the corresponding recovery verification server according to the optimal execution path, and sequentially realize the recovery verification of the received database backup files. The implementation process is not detailed in this application.
[0093] In summary, for multiple database backup files to be restored and verified, after initially determining the pending execution path for serial restoration and verification, this embodiment of the application, in order to improve the efficiency of restoration and verification and the resource utilization of the restoration and verification server, first initially determines at least one first restoration and verification job that can be executed concurrently and a second restoration and verification job that cannot be executed concurrently among the multiple restoration and verification jobs for restoring and verifying multiple database backup files. Then, based on the pending execution path and preset scheduling optimization conditions, critical path optimization is performed on these restoration and verification jobs to determine the optimal execution path that meets the preset scheduling optimization conditions, that is, the concurrent execution combination of these restoration and verification jobs and their execution order, etc. In this way, the scheduling device controls the selected at least one restoration and verification server to execute multiple restoration and verification jobs concurrently according to the optimal execution path, ensuring that the restoration and verification process of multiple database backup files can be completed within the preset restoration and verification time, and that the resources of the restoration and verification server can be fully utilized to avoid resource waste.
[0094] Reference Figure 3This is a flowchart illustrating another optional example of the data recovery processing method proposed in this application. This embodiment can be described as an optional refined implementation of the data recovery processing method described above, but it is not limited to this refined implementation. This embodiment can provide a refined description of the method for obtaining the above-mentioned pending execution path. Other processing steps are not described in detail in this embodiment. Figure 3 As shown, this refined implementation method may include, but is not limited to:
[0095] Step S31: Obtain multiple database backup files to be restored and verified;
[0096] Step S32: Obtain the priority configuration data corresponding to each of the multiple database backup files;
[0097] In this embodiment of the application, the priority configuration data may include, but is not limited to, one or more combinations of the following: historical recovery verification information of the database corresponding to the database backup file, database attributes, database backup method, and recovery verification prediction duration. The content of the priority configuration data can be determined according to business needs, and this application does not impose any restrictions on it.
[0098] The priority configuration data can be used to indicate the recovery verification priority of the corresponding database backup file, that is, the execution order of recovery verification in the recovery verification process of multiple database backup files obtained this time. It can be determined according to the recovery verification priority configuration strategy of the database backup file. This application does not restrict the acquisition methods of the priority configuration data listed above, including but not limited to them.
[0099] Step S33: Based on the priority configuration data, determine the recovery verification priority for serial recovery verification of multiple database backup files;
[0100] Step S34: Based on the recovery verification priority, obtain the pending execution paths for the recovery verification of multiple database backup files;
[0101] In this embodiment of the application, the database backup methods included in the priority configuration data typically include full backup and incremental backup. In actual business applications, the recovery verification priority of database backup files obtained using the full backup method can be configured to be higher than that of database backup files obtained using the incremental backup method. In this way, when determining the recovery verification priority of multiple database backup files, the database backup method of each database backup file can be determined, thereby determining whether database backup files with different backup methods belong to a higher recovery verification priority or a lower recovery verification priority, and thus determining the execution order of the recovery verification of these multiple database backup files.
[0102] Optionally, if the aforementioned priority configuration data includes the aforementioned historical recovery verification information, since it can indicate that the recovery verification of the corresponding database backup file was not completed or was not successfully completed within the adjacent previous preset recovery verification period, in order to ensure that the recovery verification of the corresponding database backup file can be reliably completed this time, the recovery verification priority of the corresponding database backup file can be increased. The specific number of priority levels to be increased depends on the situation, and this application does not impose any restrictions on this.
[0103] In some other embodiments, during the process of adjusting the recovery verification priority of each database backup file, the predicted recovery verification time of each database backup file can be obtained. The predicted recovery verification time of these multiple database backup files is accumulated according to the execution order obtained in this adjustment to obtain the total predicted recovery verification time. It is then determined whether the total predicted recovery verification time has been reached, so as to maximize the number of recovery verification jobs of these multiple database backup files that can be completed within the preset recovery verification time.
[0104] Furthermore, this application can determine, based on actual business needs, which type of database backup files should be prioritized for recovery verification and which type of database backup files should be prioritized for recovery verification. This determines the database attributes with higher recovery verification priority / that need to be increased in recovery verification priority, as well as the database attributes with lower recovery verification priority / that need to be reduced in recovery verification priority. Subsequently, the recovery verification priority of multiple database backup files can be configured accordingly.
[0105] In practical applications of this application, one or more recovery verification configuration methods listed above can be combined to accurately determine the recovery verification priority of each database backup file. The priority flag configured for the recovery verification priority is then associated with the recovery verification job of the database backup file so that the execution order of the recovery verification of each database backup file can be determined based on the priority flag.
[0106] Of course, after determining the recovery verification priority for serial recovery verification of multiple database backup files, the execution order of the recovery verification of the database backup files corresponding to that priority can be used as the pending execution path for the recovery verification of these multiple database backup files. It should be noted that the method for obtaining the pending execution path includes, but is not limited to, the implementation methods listed above, and can be flexibly adjusted according to different business needs. This application will not provide detailed examples of each method.
[0107] Step S35: Obtain the first predicted probability that the recovery verification server can complete the recovery verification of multiple database backup files within the preset recovery verification time according to the pending execution path;
[0108] Step S36: Determine that the first predicted probability is less than the first probability threshold, and generate an optimized scheduling instruction for the pending execution path;
[0109] Based on the description of the corresponding parts of the above embodiments, a preliminary execution path for serial recovery verification of multiple database backup files is determined. That is, after determining the recovery verification priority queue of multiple database backup files, the predicted execution time (i.e., recovery verification prediction duration) or predicted execution time interval of the recovery verification job of each database backup file can be predicted. According to the execution order of the pending execution path, the sum of the predicted execution times of the corresponding recovery verification jobs is accumulated to determine whether it reaches the preset recovery verification duration. That is, it is predicted whether the recovery verification of multiple database backup files can be completed within the preset recovery verification duration. This application does not limit the prediction implementation method. It can be implemented by combining the historical recovery verification information of each database, the available resources of the current recovery verification server, etc. The embodiments of this application will not be described in detail here.
[0110] As described above, after predicting the first predicted probability that the recovery verification of multiple database backup files can be completed within the preset recovery verification time according to the pending execution path, the first predicted probability threshold can be compared to determine whether the recovery verification of multiple database backup files can be completed within the preset recovery verification time. This application does not limit the value of the first probability threshold or the method of obtaining it, and it can be determined as appropriate.
[0111] Based on the above analysis, if the first predicted probability is less than the first probability threshold, it can be considered that the recovery verification of multiple database backup files cannot be completed within the preset recovery verification time according to the pending execution path. At this time, an optimization scheduling instruction can be generated to instruct the pending execution path to be further optimized. This application does not limit the generation method and content of the optimization scheduling instruction.
[0112] Step S37: In response to the optimized scheduling instruction, determine at least one first recovery verification job and a second recovery verification job for performing recovery verification on multiple database backup files;
[0113] Step S38: Based on the pending execution path and the preset scheduling optimization conditions, perform critical path optimization on the first recovery verification job and the second recovery verification job to obtain the optimal execution path that meets the preset scheduling optimization conditions;
[0114] Step S39: According to the optimal execution path, control the recovery verification server to execute multiple first recovery verification jobs and second recovery verification jobs.
[0115] The optimized scheduling implementation method described in steps S37-S39 can be referred to the description in the corresponding part of the above embodiment, and will not be repeated here in the embodiment of this application.
[0116] Reference Figure 4 This is a flowchart illustrating another optional example of the data recovery processing method proposed in this application. This embodiment can be a description of another optional refined implementation method of the data recovery processing method described above. It can refine the scheduling optimization implementation method proposed in the above embodiments, but is not limited to the refined implementation method described in this embodiment. Figure 4 As shown, the method may include:
[0117] Step S41: Obtain multiple database backup files to be restored and verified, and a pending execution path for serial restoration and verification of the multiple database backup files;
[0118] Step S42: Obtain the historical recovery verification information of the database corresponding to each of the multiple database backup files, as well as the available resources of the recovery verification server;
[0119] In this embodiment, the recovery verification server can determine its available resources based on the task processes / threads created for the recovery verification job to be executed. The more task processes executed in parallel on the same recovery verification server, the more intense the resource contention, which may affect the recovery verification progress of these multiple task processes. Therefore, in determining the parallel recovery verification process for multiple database backup files, it is necessary to combine the available resources of the recovery verification server to determine the number of task processes that the recovery verification server needs to create, and then determine the recovery verification job queue in each task process.
[0120] Step S43: Based on historical recovery verification information and available resources, obtain the first predicted probability that the recovery verification server can complete the recovery verification of multiple database backup files within a preset recovery verification time according to the pending execution path;
[0121] Step S44: Determine that the first predicted probability is less than the first probability threshold, and generate an optimized scheduling instruction for the pending execution path;
[0122] Based on the above description of historical recovery verification information, we can estimate the predicted duration of the current recovery verification of multiple database backup files. This allows us to calculate the predicted probability that the current recovery verification task cannot be completed within the preset recovery verification duration, or the first predicted probability that the current recovery verification task will be completed within the preset recovery verification duration according to the pending execution path (i.e., the initially set recovery verification priority queue). If the first predicted probability is less than the first probability threshold, it indicates that directly controlling the serial recovery verification of multiple database backup files according to the pending execution path cannot be completed within the preset recovery verification duration. Parallel recovery verification of at least some database backup files is required to shorten the recovery verification duration and simultaneously fully utilize the resources of the selected recovery verification servers.
[0123] Step S45: In response to the optimization scheduling instruction, perform resource competition analysis on the recovery verification process of multiple database backup files;
[0124] Step S46: Based on different resource competition and cooperation analysis results, determine the corresponding first recovery verification job and second recovery verification job from multiple recovery verification jobs that perform recovery verification on multiple database backup files;
[0125] In practical applications, each database server is usually configured with a database instance, and a backup job is performed on it to obtain the corresponding database backup file. For the recovery verification between these database backup files from different database servers, there is usually no resource contention, and the recovery verification job can be executed in parallel. That is, the parallel recovery verification job between database backup files on different nodes (i.e., database servers) can be recorded as the first recovery verification job.
[0126] Of course, some database servers may store multiple or different databases. Executing multiple recovery verification processes concurrently directly is not conducive to improving recovery efficiency, and executing them sequentially may result in failure to complete the recovery verification within the preset time limit. To improve the efficiency of recovery verification execution, the recovery verification process for such database backup files can be decomposed. Multiple recovery verification sub-jobs corresponding to different database backup files from the same database server can be executed in parallel. Therefore, the recovery verification job for each of the multiple database backup files from the same database server can be designated as the first recovery verification job.
[0127] Step S47: Schedule the execution paths for multiple first recovery verification jobs corresponding to the same database server source;
[0128] The typical recovery process for database backup files involves sending the backup file to the local system for decompression, and then restoring the decompressed file to the recovery verification server. For example, in MySQL, the backup file is exported to an SQL file using the `mysqldump` command, and the recovery process is performed using this SQL file. To improve the efficiency of recovery verification, the entire recovery verification process for each database backup file can be decomposed. For instance, a single recovery verification job can be broken down into multiple sub-jobs based on execution entities. This application does not restrict the method for decomposing concurrent job plans for the first recovery verification job from the same database server.
[0129] In some embodiments, this application can determine the database server source of each of the multiple database backup files. If the same database server source corresponds to multiple database backup files, the corresponding recovery verification process is determined as the first recovery verification job. Then, based on the execution entity involved in the recovery verification process of the database backup files, the first recovery verification job can be decomposed into multiple recovery verification sub-jobs, and recovery verification sub-jobs that can be executed concurrently between different first recovery verification jobs can be determined.
[0130] Based on this, when decomposing a concurrent job of any database backup file from the same database server into multiple corresponding recovery verification sub-jobs, the process of transferring the database backup file from the backup server to the local device can be identified as the first sub-job, and the execution time of this concurrently executable job can be denoted as t1; the process of transferring the database backup file from the local device to the recovery verification server can be identified as the second sub-job, and the execution time of this concurrently executable job can be denoted as t2; the process of the database server verifying the key content of the database backup file can be identified as the third sub-job, and the execution time of this job can be denoted as t3; the process of resetting the recovery verification environment of the recovery verification server can be identified as the fourth sub-job, and the execution time of this concurrently executable job can be denoted as t4.
[0131] Therefore, it is evident that during the recovery verification process of each database backup file, the t2 and t3 jobs are executed by different servers and do not interfere with each other, allowing for parallel execution. Similarly, sub-jobs within the same recovery verification job but at different time periods can also be executed in parallel if resource contention is minimal, such as sub-jobs at time periods t1 and t2 executed on the same local device. Thus, recovery verification sub-jobs corresponding to t1 and t2 belonging to different database backup files can be executed concurrently, and the recovery verification sub-jobs corresponding to t2 and t3 can also be executed concurrently.
[0132] For example, when a recovery verification job on one task process enters a sub-job in stage t2, a sub-job in stage t1 of the next recovery verification job (determined according to the execution order of the pending execution path) can be started simultaneously on another task process. When this recovery verification job enters a sub-job in time period t3, that is, when entering time period t3, the next recovery verification job in time period t2 can be executed synchronously on the other task process. In other words, during the data verification process of a recovery verification job, data recovery jobs of other database examples or databases on another database server can be executed synchronously. According to this scheduling method, concurrent execution paths of different recovery verification sub-jobs of multiple database backup files in the same database server can be realized, including but not limited to the concurrent scheduling schemes listed above in this embodiment.
[0133] It should be noted that for the above-mentioned decomposable and concurrently executable first recovery verification jobs, multiple recovery verification jobs belonging to the same first recovery verification job will be executed in the decomposition order. That is, the recovery verification sub-jobs corresponding to t1, t2, t3 and t4 of each first recovery verification job will be executed serially in one task process. However, when entering the recovery verification sub-job corresponding to a certain time period, another recovery verification sub-job of the next recovery verification job may be executed synchronously in another task process.
[0134] Based on the scheduling criteria described above, execution path scheduling can be performed on the various recovery verification sub-jobs included in multiple first recovery verification jobs corresponding to the same database server source, determining multiple execution paths. Each execution path can include the queues of the recovery verification job on multiple task processes and their execution order. During this execution path scheduling process, for the aforementioned concurrently executable first recovery verification jobs, critical path scheduling with different recovery verification priorities can be performed. This application does not detail the implementation method of this critical path scheduling, but it can be implemented in conjunction with a critical path analysis algorithm.
[0135] Furthermore, if multiple database server sources each correspond to a single database backup file, the recovery verification process of that database backup file is defined as the first recovery verification job. This type of first recovery verification job can be executed as a whole without further decomposition and concurrent scheduling. Alternatively, this type of first recovery verification job can be assigned to different task processes to allow these first recovery verification jobs located in different task processes to execute in parallel.
[0136] Step S48: Based on the pending execution path and the predicted recovery verification time of different recovery jobs, determine the candidate execution paths for the first recovery verification job and the second recovery verification job according to the scheduling optimization method corresponding to the obtained execution path scheduling results;
[0137] In this embodiment of the application, the scheduling optimization method may include, but is not limited to, exhaustive search, steepest descent, heuristic algorithm, etc. The appropriate scheduling optimization method can be selected based on the execution path scheduling result to determine the candidate execution path of the recovery verification job corresponding to multiple database backup files.
[0138] In one possible implementation, if the number of execution paths scheduled is less than a first threshold (i.e., the solution space for concurrent recovery verification jobs is small), an exhaustive search method can be used to determine the scheduling optimization method. If the number of execution paths scheduled is equal to or greater than the first threshold (i.e., the solution space for concurrent recovery verification jobs is large), and the recovery verification jobs corresponding to multiple database backup files have a first predicted probability of completion within a preset recovery verification time greater than a first probability threshold, and if it is known through experience that there is a high probability that they can be completed within the preset recovery verification time, the steepest descent method can be used to determine the scheduling optimization method to optimize the execution path of the recovery verification jobs. If the number of execution paths scheduled is equal to or greater than the first threshold, and the first predicted probability is less than or equal to the first probability threshold, a heuristic algorithm is used to determine the scheduling optimization method. That is, a heuristic algorithm is used to calculate the critical path of the concurrent recovery verification jobs, and the range of recovery verification jobs that may not be completed within the preset recovery verification time can be marked. This application does not limit the implementation method.
[0139] The implementation process of determining candidate execution paths according to the various scheduling optimization methods described above can be determined based on the operational principles of the corresponding algorithms of the scheduling optimization methods, and will not be described in detail here.
[0140] Step S49: Verify that the predicted execution results of the first recovery verification job and the second recovery verification job executed by the control recovery verification server according to the candidate execution path meet the preset scheduling optimization conditions, and determine the candidate execution path as the optimal execution path;
[0141] Step S410: Following the optimal execution path, control the recovery verification server to execute multiple first recovery verification jobs and second recovery verification jobs.
[0142] In the process of optimizing the critical path according to the method described above in this embodiment of the application, it can be detected whether the execution path after each optimization meets the preset scheduling optimization conditions, such as whether the recovery verification jobs corresponding to multiple database backup files meet the following conditions: the second predicted probability of the candidate execution path being completed within the preset recovery verification time is greater than the second probability threshold; and / or the range of jobs that cannot be executed within the preset recovery verification time among the recovery verification jobs corresponding to multiple database backup files is reduced; and / or the recovery verification jobs that cannot be executed within the preset recovery time are executed later in the candidate execution path compared to the execution order in the pending execution path. If these conditions are met, the optimization result can be adopted to obtain the optimal execution path, and the current recovery verification job can be started accordingly.
[0143] Based on this, step S49 above may include, but is not limited to, the following execution steps:
[0144] Obtain recovery verification jobs corresponding to multiple database backup files. Based on the second predicted probability of the candidate execution path being completed within a preset recovery verification time, if the second predicted probability is less than a second probability threshold, the candidate execution path can be further optimized according to the method described above until the newly obtained second predicted probability is equal to or greater than the second probability threshold; and / or, if it is determined that the range of jobs that cannot be executed within the preset recovery verification time among the recovery verification jobs corresponding to multiple database backup files has not decreased, the candidate execution path can be further optimized according to the method described above until the range of jobs that cannot be executed within the preset recovery verification time has decreased; and / or, if it is determined that the recovery verification jobs that cannot be executed within the preset recovery verification time have not moved backward in the execution order relative to the pending execution path in the candidate execution path, the candidate execution path can be further optimized according to the method described above until the recovery verification jobs that cannot be executed within the preset recovery verification time have moved backward in the execution order relative to the pending execution path in the candidate execution path.
[0145] It should be noted that the content of the preset scheduling optimization conditions includes, but is not limited to, one or more combinations of conditions listed above, and the preset scheduling optimization conditions can be determined according to business needs.
[0146] Reference Figure 5 This is a flowchart illustrating another optional example of the data recovery processing method proposed in this application. This embodiment can be described as another optional refined implementation of the data recovery processing method described above. This embodiment also provides another optional implementation of determining the optimal execution path, such as... Figure 5 As shown, the method may include:
[0147] Step S51: Obtain multiple database backup files to be restored and verified, and a pending execution path for serial restoration and verification of the multiple database backup files;
[0148] Step S52: Perform resource competition analysis on the recovery verification process of multiple database backup files;
[0149] Step S53: Based on different resource competition and cooperation analysis results, determine the corresponding first recovery verification job and second recovery verification job from multiple recovery verification jobs that perform recovery verification on multiple database backup files;
[0150] Step S54: Schedule the execution paths of multiple first recovery verification jobs corresponding to the same database server source to obtain at least one first concurrent execution path;
[0151] Step S55: Schedule the execution paths of the first recovery verification jobs corresponding to different database server sources to obtain at least one second concurrent execution path;
[0152] Based on the descriptions in the relevant sections of the above embodiments, for multiple first recovery verification jobs corresponding to the same database server source, each first recovery verification job can be decomposed into multiple recovery verification sub-jobs through parallel execution. Then, critical path scheduling is performed on these sub-jobs to obtain one or more first concurrent execution paths for these multiple first recovery verification jobs, i.e., one or more queues of such first recovery verification jobs. Similarly, for the scheduling of execution paths for first recovery verification jobs corresponding to different database server sources, one or more second concurrent execution paths for such first recovery verification jobs can be obtained by combining the predicted recovery verification duration and available resources, i.e., one or more queues of such first recovery verification jobs. The implementation process is not detailed in this application.
[0153] Step S56: Based on the pending execution path, the first concurrent execution path, and the second concurrent execution path, according to the scheduling optimization strategy, perform critical path scheduling for the first recovery verification job and the second recovery verification job to obtain the optimal execution path that meets the preset scheduling optimization conditions.
[0154] In practical applications of this embodiment, the scheduling optimization strategy can be determined by combining the various scheduling optimization methods described above, and the combination of various execution paths determined above can be realized to obtain multiple critical paths for the recovery verification job of multiple database backup files. Then, the execution results of the recovery verification job executed according to each critical path, such as the estimated recovery verification prediction time and the recovery verification server resources consumed, can be used to determine the optimal execution path. This reduces the recovery verification time and resource consumption for the recovery verification of multiple database backup files while completing the recovery verification of multiple database backup files within the preset recovery verification time. The implementation process is not described in detail in this application.
[0155] Step S57: According to the optimal execution path, control the recovery verification server to execute multiple first recovery verification jobs and second recovery verification jobs;
[0156] Step S58: Obtain the job log data generated by the recovery verification server executing the first recovery verification job and the second recovery verification job;
[0157] Step S59: Based on the job log data, determine if there are recovery verification jobs that have not been successfully executed within the preset recovery verification time, and adjust the optimal scheduling scheme;
[0158] Step S510: Based on the adjusted optimal scheduling scheme, within the next preset recovery verification period, the database backup files of the databases corresponding to the multiple database backup files are restored and verified.
[0159] After executing multiple recovery verification jobs according to the optimal execution path determined in the above embodiments, i.e., after completing the current recovery verification task, the execution status of this task can be reported to the administrator. This involves recording the job log data generated by the execution of each of the first and second recovery verification jobs, which represents the execution status of the corresponding recovery verification jobs. Based on the job log data, if recovery verification jobs that failed to execute successfully within the preset recovery verification time are identified, the optimal scheduling scheme can be adjusted. This allows for the recovery verification processing of multiple database backup files within the next preset recovery verification time. In other words, if a list of recovery verification jobs that failed to complete is identified, the administrator can adjust the recovery verification job scheduling scheme for the next preset recovery verification time according to actual needs. Furthermore, the above method can be repeated before each recovery and restore job begins to perform recovery verification on multiple database backup files. This optimizes the critical path of concurrently executing jobs during the recovery process, optimizing resource scheduling for backup file recovery, ensuring business quality while improving operational efficiency, and ensuring that the recovery jobs of multiple database backup files can be completed within the preset recovery verification time.
[0160] In some embodiments proposed in this application, a general scheduling model can be pre-built for the method of obtaining the optimal execution path (i.e., optimal scheduling scheme) described in the above embodiments. Thus, for different services, after obtaining multiple database backup files and their corresponding priority configuration data according to the method described above, the information can be directly input into the scheduling model, and the optimal execution path for the current recovery verification job of these multiple database backup files will be output. This application does not limit the method of constructing and implementing the scheduling model; it can be determined in conjunction with the execution path optimization method described in the above steps.
[0161] In some embodiments of this application, in certain practical business scenarios, to ensure the data security and availability of more databases, the goal is to maximize the number of recovery verification jobs that can be completed within a preset recovery verification time. Before the recovery verification job begins, the size of each database to be recovered and verified is estimated, along with the estimated execution time of the recovery verification job (i.e., the predicted recovery verification time). The estimated time for executing a recovery verification job on a database with a capacity greater than x GB (i.e., a first data volume threshold, which is not limited in this application) is calculated. The estimated time for executing the recovery of n databases with a capacity less than x GB at once is then calculated. This application can bundle these n databases with a capacity less than x GB for batch processing, thereby improving processing performance. For example, OpenStack databases may contain several low-frequency used databases with very small sizes, even those compressed to within 1MB. Batch database recovery operations can effectively improve recovery verification efficiency.
[0162] Based on this, this application can determine the data volume and recovery verification prediction duration of each of the multiple database backup files. Based on the recovery verification prediction duration and the preset recovery verification duration, multiple first database backup files with data volumes less than a first data volume threshold are determined, namely, the database backup files of the above n databases with a capacity less than x GB. The recovery verification process performed on these multiple first database backup files can be determined as a recovery verification job. Subsequently, it can still be scheduled and controlled in parallel with other recovery verification jobs according to the scheduling method described above, so that small-sized database recovery verification jobs can be executed in batches concurrently. The implementation process is not detailed in this application.
[0163] Furthermore, since the strategy for performing batch database backup file recovery verification is symbiotic with the backup job plan that obtains the corresponding database backup files, small-sized database backup files can be exported in batches from the database backup files exported from several databases on the database server and backed up as a batch of database backup jobs. Correspondingly, the recovery verification jobs for these batch database backup files can also be executed concurrently in batches as described above, improving recovery processing efficiency.
[0164] Reference Figure 6 This is a schematic diagram illustrating the result of an optional example of the data recovery processing apparatus proposed in this application, such as... Figure 6 As shown, the device may include:
[0165] The information acquisition module 61 is used to acquire multiple database backup files to be restored and verified, as well as the pending execution path for serial restoration and verification of the multiple database backup files;
[0166] The recovery verification job determination module 62 is used to determine at least one first recovery verification job and a second recovery verification job for performing recovery verification on the plurality of database backup files; the first recovery verification job can be executed concurrently; the second recovery verification job cannot be executed concurrently.
[0167] The optimal execution path acquisition module 63 is used to perform critical path optimization on the first recovery verification job and the second recovery verification job based on the pending execution path and the preset scheduling optimization conditions, so as to obtain the optimal execution path that satisfies the preset scheduling optimization conditions.
[0168] The recovery verification processing module 64 is used to control the recovery verification server to execute the plurality of first recovery verification jobs and second recovery verification jobs according to the optimal execution path.
[0169] In some embodiments, such as Figure 7 As shown, the recovery verification job determination module 62 may include:
[0170] The first information acquisition unit 621 is used to acquire historical recovery verification information of the database corresponding to each of the plurality of database backup files, as well as the available resources of the recovery verification server;
[0171] The first prediction probability obtaining unit 622 is used to obtain, based on the historical recovery verification information and the available resources, the first prediction probability that the recovery verification server can complete the recovery verification of the multiple database backup files within a preset recovery verification time according to the pending execution path.
[0172] The optimized scheduling instruction determination unit 623 is used to determine that the first predicted probability is less than the first probability threshold and generate an optimized scheduling instruction for the pending execution path.
[0173] The resource competition and cooperation analysis unit 624 is used to respond to the optimization scheduling instruction and perform resource competition and cooperation analysis on the recovery verification process of the multiple database backup files;
[0174] The recovery verification job determination unit 625 is used to determine the corresponding first recovery verification job and second recovery verification job from multiple recovery verification jobs that perform recovery verification on the multiple database backup files based on different resource competition analysis results.
[0175] Optionally, the resource competition and cooperation analysis unit 624 mentioned above may include:
[0176] A database server source determination unit is used to determine the database server source of each of the plurality of database backup files;
[0177] The aforementioned recovery verification operation determination unit 625 may include:
[0178] The first determining unit is configured to determine the corresponding recovery verification process as the first recovery verification job if the same database server source corresponds to multiple database backup files.
[0179] The second determining unit is configured to, based on the execution entities involved in the recovery verification process of the database backup file, decompose the first recovery verification job into multiple recovery verification sub-jobs, and determine the recovery verification sub-jobs that can be executed concurrently among different first recovery verification jobs; and / or,
[0180] The third determining unit is used to determine the recovery verification process of the database backup file as the first recovery verification job if each of the multiple database server sources corresponds to a database backup file.
[0181] In some other embodiments proposed in this application, such as Figure 7 As shown, the optimal execution path acquisition module 63 mentioned above may include:
[0182] The execution path scheduling unit 631 is used to schedule the execution paths of multiple first recovery verification jobs corresponding to the same database server source.
[0183] The candidate execution path determination unit 632 is used to determine candidate execution paths for the first recovery verification job and the second recovery verification job based on the pending execution paths and the recovery verification prediction time of different recovery jobs, and according to the scheduling optimization method corresponding to the obtained execution path scheduling results.
[0184] The optimal execution path determination unit 633 is used to verify that the predicted execution results of the first recovery verification job and the second recovery verification job executed by the recovery verification server according to the candidate execution path meet the preset scheduling optimization conditions, and to determine the candidate execution path as the optimal execution path.
[0185] Optionally, the optimal execution path determination unit 633 may include:
[0186] The second prediction probability acquisition unit is used to acquire the recovery verification job corresponding to the plurality of database backup files and the second prediction probability of completion within a preset recovery verification time according to the candidate execution path.
[0187] The first optimization unit is used to determine that the second predicted probability is less than the second probability threshold, and to continue to optimize the candidate execution path until the newly obtained second predicted probability is equal to or greater than the second probability threshold.
[0188] And / or, the second optimization unit is used to determine that the range of jobs that cannot be executed within the preset recovery verification time in the recovery verification jobs corresponding to the plurality of database backup files has not decreased, and to continue to optimize the candidate execution path until the range of jobs that cannot be executed within the preset recovery verification time is reduced;
[0189] And / or, the third optimization unit is used to determine that a recovery verification job that cannot be executed within a preset recovery verification time has not been moved backward relative to the execution order in the candidate execution path, and to continue optimizing the candidate execution path until the execution order is moved backward.
[0190] In some other embodiments proposed in this application, the optimal execution path acquisition module 63 may also include:
[0191] The first scheduling unit is used to schedule the execution paths of multiple first recovery verification jobs corresponding to the same database server source, so as to obtain at least one first concurrent execution path.
[0192] The second scheduling unit is used to schedule the execution paths of the first recovery verification jobs corresponding to different database server sources, so as to obtain at least one second concurrent execution path.
[0193] The third scheduling unit is used to schedule the critical path of the first recovery verification job and the second recovery verification job according to the pending execution path, the first concurrent execution path and the second concurrent execution path, and to obtain the optimal execution path that meets the preset scheduling optimization conditions.
[0194] The preset scheduling optimization conditions include reducing the recovery verification time and resource consumption of the multiple database backup files when the recovery verification of the multiple database backup files is completed within the preset recovery verification time.
[0195] In some other embodiments, such as Figure 7 As shown, the information acquisition module 61 mentioned above may include:
[0196] Backup file acquisition unit 611 is used to acquire multiple database backup files to be restored and verified;
[0197] The priority configuration data acquisition unit 612 is used to acquire the priority configuration data corresponding to each of the plurality of database backup files;
[0198] The aforementioned priority configuration data includes one or more combinations of the following: historical recovery verification information of the database corresponding to the database backup file, database attributes, database backup method, and recovery verification prediction duration.
[0199] The recovery verification priority determination unit 613 is used to determine the recovery verification priority for serial recovery verification of the multiple database backup files based on the priority configuration data.
[0200] The pending execution path acquisition unit 614 is used to obtain the pending execution path for the recovery verification of the multiple database backup files according to the recovery verification priority.
[0201] Optionally, the recovery verification priority determination unit 613 may include:
[0202] The first configuration unit is configured to, if the database backup method includes a full backup method and an incremental backup method, configure the recovery processing priority of the database backup file obtained by the full backup method to be higher than the recovery processing priority of the database backup file obtained by the incremental backup method.
[0203] And / or,
[0204] The second configuration unit is used to determine, based on the historical recovery verification information, that the corresponding database backup file has not completed or has not successfully completed recovery verification within the adjacent previous preset recovery verification period, and to increase the recovery verification priority of the database backup file.
[0205] It should be noted that the various modules and units in the above-mentioned device embodiments can all be stored in the memory as program modules. The processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions. The functions realized by each program module and its combination, as well as the technical effects achieved, can be referred to the description of the corresponding part of the above-mentioned method embodiments. This embodiment will not repeat them here.
[0206] This application also provides a computer-readable storage medium on which a computer program can be stored, which can be invoked and loaded by a processor to implement the various steps of the data recovery processing method described in the above embodiments.
[0207] Reference Figure 8The above is a schematic diagram of the hardware structure of an optional example of a scheduling device applicable to the data recovery processing method proposed in this application. The scheduling device may include: at least one communication interface 81, at least one memory 82, and at least one processor 83, wherein:
[0208] The communication interface 81 may include an interface for a communication module used to achieve data interaction via a wireless communication network. This communication module may include, but is not limited to, a WIFI module, a 5G / 6G (fifth-generation mobile communication network / sixth-generation mobile communication network) module, a GPRS module, etc., to enable the scheduling device to establish communication connections with other devices in the data recovery processing system. The implementation method is not detailed in this application. Additionally, the communication interface 81 may also include a communication interface for data interaction between internal components of the scheduling device, such as a USB interface, a serial / parallel port, a multimedia interface, etc. This application does not limit the type and number of interfaces included in the communication interface 81; it can be determined as needed.
[0209] The memory 82 can be used to store a program that implements the data recovery processing method described in the above method embodiments; the processor 83 can load and execute the program stored in the memory to implement each step of the data recovery processing method described in the above corresponding method embodiments. The specific implementation process can be referred to the description of the corresponding part of the above embodiments, and will not be repeated here.
[0210] In practical applications, the communication interface 81, memory 82 and processor 93 can be connected to a communication bus to realize data interaction between themselves and other structural components of the computer device. The specific details can be determined according to actual needs, and will not be described in detail in this application.
[0211] In this embodiment, memory 82 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device. Processor 83 may be a central processing unit (CPU), application-specific integrated circuit (ASIC), digital signal processor (DSP), application-specific integrated circuit (ASIC), off-the-shelf programmable gate array (FPGA), or other programmable logic devices. This application does not limit the structure and model of the memory 82 and processor 83 described above, and they can be flexibly adjusted according to actual needs.
[0212] It should be understood that, Figure 8 The structure of the scheduling device shown does not constitute a limitation on the scheduling device in the embodiments of this application. In practical applications, the scheduling device may include more than Figure 8The device may include more components or combinations of certain components. For example, if the scheduling device is a terminal device, it may also include at least one input component such as a touch sensing unit for sensing touch events on a touch display panel, a keyboard, a mouse, a camera, a microphone, etc.; at least one output component such as a display, a speaker, a vibration mechanism, a lamp, etc.; an antenna; a sensor module; a power supply module, etc., which will not be listed here.
[0213] Finally, it should be noted that, regarding the above embodiments, relational terms such as "first," "second," etc., are merely used to distinguish one operation, unit, or module from another, and do not necessarily require or imply any such actual relationship or order between these units, operations, or modules. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, or system that includes said element.
[0214] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus, scheduling device, and system disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section.
[0215] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data recovery processing method, the method comprising: Obtain multiple database backup files to be restored and verified, and a pending execution path for serial restoration and verification of the multiple database backup files; Determine at least one first recovery verification job and a second recovery verification job to perform recovery verification on the plurality of database backup files; The first recovery verification job can be executed concurrently; the second recovery verification job cannot be executed concurrently; wherein, for multiple database backup files from the same database server, the corresponding recovery verification process is determined as the first recovery verification job, the first recovery verification job is decomposed into multiple recovery verification sub-jobs, and recovery verification sub-jobs that can be executed concurrently between different first recovery verification jobs are determined; Based on the pending execution path and the preset scheduling optimization conditions, the critical path of the first recovery verification job and the second recovery verification job is optimized to obtain the optimal execution path that satisfies the preset scheduling optimization conditions; According to the optimal execution path, the recovery verification server is controlled to execute the plurality of first recovery verification jobs and second recovery verification jobs.
2. The method according to claim 1, wherein determining at least one first recovery verification job and a second recovery verification job for recovering and verifying the plurality of database backup files comprises: Obtain historical recovery verification information for each of the multiple database backup files, as well as the available resources of the recovery verification server; Based on the historical recovery verification information and the available resources, a first predicted probability is obtained that the recovery verification server can complete the recovery verification of the multiple database backup files within a preset recovery verification time according to the pending execution path. If the first predicted probability is determined to be less than the first probability threshold, an optimized scheduling instruction is generated for the pending execution path. In response to the optimized scheduling instruction, a resource competition analysis is performed on the recovery verification process of the multiple database backup files; Based on the results of different resource competition and cooperation analysis, the corresponding first recovery verification job and second recovery verification job are determined from the multiple recovery verification jobs that perform recovery verification on the multiple database backup files.
3. The method according to claim 2, wherein the resource competition analysis is performed on the recovery verification process of the plurality of database backup files, and based on different resource competition analysis results, a corresponding first recovery verification job is determined from the plurality of recovery verification jobs that perform recovery verification on the plurality of database backup files, including: Determine the database server source for each of the multiple database backup files; If the same database server source corresponds to multiple database backup files, the corresponding recovery verification process will be determined as the first recovery verification job; Based on the execution entities involved in the recovery verification process of the database backup file, the first recovery verification job is decomposed into multiple recovery verification sub-jobs, and recovery verification sub-jobs that can be executed concurrently among different first recovery verification jobs are determined. And / or, If each of the multiple database server sources corresponds to a database backup file, the recovery verification process of that database backup file is determined as the first recovery verification job.
4. The method according to any one of claims 1-3, wherein the critical path optimization of the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions to obtain the optimal execution path that satisfies the preset scheduling optimization conditions includes: Execution path scheduling is performed for multiple first recovery verification jobs corresponding to the same database server source; Based on the pending execution paths and the predicted recovery verification time of different recovery jobs, candidate execution paths for the first recovery verification job and the second recovery verification job are determined according to the scheduling optimization method corresponding to the obtained execution path scheduling results. Verify that the predicted execution results of the first and second recovery verification jobs executed by the recovery verification server according to the candidate execution path meet the preset scheduling optimization conditions, and determine the candidate execution path as the optimal execution path.
5. The method according to claim 4, wherein the verification, according to the candidate execution path, controls the recovery verification server to execute the first recovery verification job and the predicted execution results of the second recovery verification job to meet the preset scheduling optimization conditions, including: Obtain the recovery verification jobs corresponding to the multiple database backup files, and complete them within a preset recovery verification time according to the second predicted probability of the candidate execution paths; If the second predicted probability is determined to be less than the second probability threshold, the candidate execution path is further optimized until the newly obtained second predicted probability is equal to or greater than the second probability threshold. And / or, If the range of jobs that cannot be executed within the preset recovery verification time has not decreased in the recovery verification jobs corresponding to the multiple database backup files, continue to optimize the candidate execution path until the range of jobs that cannot be executed within the preset recovery verification time is reduced. And / or, If a recovery verification job that cannot be executed within the preset recovery verification time is in the candidate execution path and its execution order has not been moved backward relative to the pending execution path, the candidate execution path will continue to be optimized until the execution order is moved backward.
6. The method according to any one of claims 1-3, wherein the critical path optimization of the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions to obtain the optimal execution path that satisfies the preset scheduling optimization conditions includes: The execution paths of multiple first recovery verification jobs corresponding to the same database server source are scheduled to obtain at least one first concurrent execution path; The execution paths of the first recovery verification jobs corresponding to different database server sources are scheduled to obtain at least one second concurrent execution path; Based on the pending execution path, the first concurrent execution path, and the second concurrent execution path, according to the scheduling optimization strategy, the first recovery verification job and the second recovery verification job are scheduled for critical paths to obtain the optimal execution path that meets the preset scheduling optimization conditions; The preset scheduling optimization conditions include reducing the recovery verification time and resource consumption of the multiple database backup files when the recovery verification of the multiple database backup files is completed within the preset recovery verification time.
7. The method according to any one of claims 1-3, wherein obtaining the pending execution path for serial recovery verification of the plurality of database backup files includes: Obtain the priority configuration data corresponding to each of the multiple database backup files; The priority configuration data includes one or more combinations of the following: historical recovery verification information of the database corresponding to the database backup file, database attributes, database backup method, and recovery verification prediction duration; Based on the priority configuration data, the recovery verification priority for serial recovery verification of the multiple database backup files is determined. Based on the recovery verification priority, the pending execution paths for the recovery verification of the multiple database backup files are obtained.
8. The method according to claim 7, wherein determining the recovery verification priority for serial recovery verification of the plurality of database backup files based on the priority configuration data includes: If the database backup method includes a full backup method and an incremental backup method, the recovery processing priority of the database backup file obtained by the full backup method is configured to be higher than the recovery processing priority of the database backup file obtained by the incremental backup method. And / or, Based on the historical recovery verification information, if it is determined that the corresponding database backup file has not completed or has not successfully completed recovery verification within the adjacent previous preset recovery verification period, the recovery verification priority of the database backup file is increased.
9. A data recovery processing apparatus, the apparatus comprising: The information acquisition module is used to acquire multiple database backup files to be restored and verified, as well as the pending execution path for serial restoration and verification of the multiple database backup files; The recovery verification job determination module is used to determine at least one first recovery verification job and a second recovery verification job for performing recovery verification on the plurality of database backup files; The first recovery verification job can be executed concurrently; the second recovery verification job cannot be executed concurrently; wherein, for multiple database backup files from the same database server, the corresponding recovery verification process is determined as the first recovery verification job, the first recovery verification job is decomposed into multiple recovery verification sub-jobs, and recovery verification sub-jobs that can be executed concurrently between different first recovery verification jobs are determined; The optimal execution path acquisition module is used to perform critical path optimization on the first recovery verification job and the second recovery verification job based on the pending execution path and preset scheduling optimization conditions, so as to obtain the optimal execution path that satisfies the preset scheduling optimization conditions. The recovery verification processing module is used to control the recovery verification server to execute the plurality of first recovery verification jobs and second recovery verification jobs according to the optimal execution path.
10. A data recovery processing system, the system comprising: The system comprises a database server, a backup server, a recovery verification server, and a scheduling device, wherein the scheduling device includes at least one communication interface, at least one memory, and at least one processor, wherein: The memory is used to store a program that implements the data recovery processing method as described in any one of claims 1-8; The processor is configured to load and execute the program stored in the memory to implement the data recovery processing method as described in any one of claims 1-8.
Citation Information
Patent Citations
Database scheduling method and device, computer equipment and storage medium
CN110147270A
Resource health inspection method and resource health inspection device
CN110188023A
Distributed cluster resource scheduling method based on user operation process
CN113157421A