Database data recovery drill method, device and storage medium

Through the automated database data recovery drill method, the problems of complex and inefficient database data backup and recovery operations in the existing technology are solved, and efficient and automated data recovery drill is realized, reducing costs and improving stability.

CN112527564BActive Publication Date: 2025-03-25PING AN TECH (SHENZHEN) CO LTD

Patent Information

Application Number
CN202011511684.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2025-03-25
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

The products for backup and recovery of existing database data are complex, time-consuming and labor-intensive, inefficient, increase labor costs, and have high dependence on the professional level of backup managers and poor stability.

Method used

Provide a database data recovery drill method, which automatically obtains information about database backup instances, formulates a data recovery drill plan, and realizes the automation of data recovery drill.

Benefits of technology

It improves the efficiency of data recovery drills, reduces user operation complexity, saves implementation costs, and improves the stability of backup management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112527564B_ABST
    Figure CN112527564B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, computer equipment and storage medium for data recovery drill of a database, the method comprising: obtaining database instance information of a backup database instance of a database, and formulating a data recovery drill plan corresponding to the backup database instance; when the data recovery drill time arrives, performing a recovery drill on the backup database instance based on the data recovery drill plan and generating a temporary database instance when the recovery drill is completed; determining whether the recovery drill of the backup database instance is successful based on the backup database instance and the temporary database instance, if the recovery drill of the backup database instance is successful, generating a data recovery drill report of the backup database instance, and pushing the data recovery drill report to the business terminal of the backup database instance. By adopting the present application, the automation of data recovery drill of the database can be realized, the efficiency of data recovery drill can be improved, and the implementation cost of data recovery drill can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method, device and storage medium for data recovery drill of a database. Background Art

[0002] As enterprises attach more and more importance to business continuity, in order to avoid irreversible business losses caused by data loss, scheduled recovery drills for backup data are the last straw. At present, the products on the market for database data backup and recovery all require manual design of the drill process from data recovery to startup verification, convening database upstream and downstream application administrators to formulate related drill sequences, and conduct verification of related parties after the drill is completed. The final drill report is also written manually, which is complicated, time-consuming, and labor-intensive, and inefficient. For enterprises with high requirements for backup and recovery coverage, this not only greatly increases labor costs, but also has a high reliance on the professional level of backup managers and poor stability. Summary of the invention

[0003] The present application provides a database data recovery drill method, device and storage medium, which can realize the automation of database data recovery drills, improve the efficiency of data recovery drills, reduce the user operation complexity of data recovery drills, and save the implementation cost of data recovery drills.

[0004] In a first aspect, the present application provides a method for rehearsing data recovery of a database, the method comprising:

[0005] Obtaining database instance information of a backup database instance of the database, and formulating a data recovery drill plan corresponding to the backup database instance according to the database instance information, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance;

[0006] When the data recovery drill time arrives, a recovery drill is performed on the backup database instance based on the data recovery drill plan and a temporary database instance is generated when the recovery drill is completed;

[0007] Determine whether the backup database instance recovery drill is successful based on the backup database instance and the temporary database instance;

[0008] If the recovery drill of the backup database instance is successful, a data recovery drill report of the backup database instance is generated, and the database recovery drill report is pushed to the business terminal of the backup database instance.

[0009] In combination with the first aspect, in a possible implementation manner, before obtaining the database instance information of the backup database instance of the database, the method further includes:

[0010] The environment type of the database is determined. If the environment type of the database is a production environment, a database instance of the database is backed up to obtain a backup database instance of the database.

[0011] In combination with the first aspect, in a possible implementation manner, when the data recovery drill time arrives, the method further includes:

[0012] Determine whether the number of data recovery drill tasks in the data recovery availability zone in the current recovery time window is greater than or equal to the task number threshold;

[0013] If the number of data recovery drill tasks in the above data recovery available zone is less than the task number threshold, then executing the steps of performing a recovery drill on the above backup database instance based on the above data recovery drill plan and generating a temporary database instance when the recovery drill is completed;

[0014] If the number of data recovery drill tasks in the above data recovery availability zone is greater than or equal to the task number threshold, the data recovery drill time of the above backup database instance is changed to the next recovery time window of the current recovery time window.

[0015] In combination with the first aspect, in a possible implementation manner, when the data recovery drill time arrives, the method further includes:

[0016] If the above data recovery drill time conflicts with the change window time, a change window time conflict reminder is sent to the cloud control platform;

[0017] Receive the data recovery drill initiation time returned by the cloud control platform based on the change window time conflict prompt from the cloud control platform, and change the data recovery drill time of the backup database instance to the data recovery drill initiation time.

[0018] In combination with the first aspect, in a possible implementation manner, the data recovery drill plan further includes multiple business function instances associated with the backup database instance; and the recovery drill for the backup database instance based on the data recovery drill plan includes:

[0019] The function modules associated with the business function instances associated with the backup database instance are called, and the data recovery drill tasks of the business function instances are performed through the function modules.

[0020] In combination with the first aspect, in a possible implementation manner, the determining whether the recovery drill of the backup database instance is successful according to the backup database instance and the temporary database instance includes:

[0021] Verify whether the database version numbers of the temporary database instance and the backup database instance are consistent. If the database version numbers of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful.

[0022] Alternatively, verify whether the locations of the database log records of the temporary database instance and the backup database instance are consistent. If the locations of the database log records of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful.

[0023] In combination with the first aspect, in a possible implementation manner, after the recovery drill of the backup database instance is successful, the method further includes:

[0024] Clear the above temporary database instance.

[0025] In combination with the first aspect, in a possible implementation manner, the backup database instance is the first backup database instance in the database; after formulating the data recovery drill plan corresponding to the backup database instance according to the database instance information, the method further includes:

[0026] When a second backup database instance of the database is detected, database instance information of the second backup database instance is obtained, and a data recovery drill plan corresponding to the second backup database instance is formulated according to the database instance information of the second backup database instance;

[0027] Among them, the above-mentioned second backup database instance is a database instance in the above-mentioned database that is generated and backed up after the above-mentioned first backup database instance, and the data recovery drill time of the above-mentioned second backup database instance is after the data recovery drill time of the above-mentioned first backup database instance.

[0028] In combination with the first aspect, in a possible implementation manner, the method further includes:

[0029] Determine a generation time dimension of the data recovery drill report, and generate a data recovery drill report for the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database;

[0030] Among them, the above-mentioned generation time dimension includes year, quarter or month, and the above-mentioned one generation time dimension includes one year, one quarter or one month.

[0031] In combination with the first aspect, in a possible implementation manner, the method further includes:

[0032] Receive a drill report acquisition request from a business terminal, where the drill report acquisition request carries a push path and a target generation time dimension of the data recovery drill report;

[0033] A target database recovery drill report generated within the target generation time dimension is determined from the database, and the target database recovery drill report is pushed to the business terminal based on the push path.

[0034] In a second aspect, the present application provides a data recovery drill device for a database, the device comprising:

[0035] An acquisition module, used to acquire database instance information of a backup database instance of data;

[0036] A drill formulation module, used to formulate a data recovery drill plan corresponding to the backup database instance according to the database instance information obtained by the acquisition module, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance;

[0037] A drill execution module, used for, when the data recovery drill time arrives, performing a recovery drill on the backup database instance based on the data recovery drill plan and generating a temporary database instance when the recovery drill is completed;

[0038] A drill verification module, used to determine whether the recovery drill of the backup database instance is successful based on the backup database instance and the temporary database instance generated by the drill execution module;

[0039] A report generation module, used to generate a data recovery drill report for the backup database instance when the drill verification module determines that the recovery drill for the backup database instance is successful;

[0040] The report push module is used to push the data recovery drill report generated by the report generation module to the business terminal of the backup database instance.

[0041] In conjunction with the second aspect, in a possible implementation manner, the data recovery drill device for the database further includes:

[0042] The backup module is used to determine the environment type of the database. If the environment type of the database is a production environment, the database instance of the database is backed up to obtain a backup database instance of the database.

[0043] In conjunction with the second aspect, in a possible implementation, the drill execution module includes:

[0044] A first determining unit is used to determine whether the number of data recovery drill tasks in the data recovery available zone in the current recovery time window is greater than or equal to a task number threshold when the above-mentioned data recovery drill time arrives;

[0045] A rehearsal unit, configured to, when the first determination unit determines that the number of data recovery rehearsal tasks in the data recovery available zone is less than a task number threshold, execute the steps of performing a recovery rehearsal on the backup database instance based on the data recovery rehearsal plan and generating a temporary database instance when the recovery rehearsal is completed;

[0046] The first time changing unit is used to change the data recovery drill time of the above-mentioned backup database instance to the next recovery time window of the current recovery time window when the number of data recovery drill tasks in the above-mentioned data recovery available zone determined by the above-mentioned first determining unit is greater than or equal to the task number threshold.

[0047] In conjunction with the second aspect, in a possible implementation manner, the drill execution module further includes:

[0048] A prompt push unit is used for sending a change window time conflict prompt to the cloud control platform when the data recovery drill time arrives and if the data recovery drill time conflicts with the change window time;

[0049] The second time changing unit is used to receive from the above-mentioned cloud control platform the data recovery drill initiation time returned by the above-mentioned cloud control platform based on the above-mentioned change window time conflict prompt, and change the data recovery drill time of the above-mentioned backup database instance to the above-mentioned data recovery drill initiation time.

[0050] In conjunction with the second aspect, in a possible implementation manner, the data recovery drill plan further includes multiple business function instances associated with the backup database instance; and the drill execution module is further configured to:

[0051] The function modules associated with the business function instances associated with the backup database instance are called, and the data recovery drill tasks of the business function instances are performed through the function modules.

[0052] In conjunction with the second aspect, in a possible implementation manner, the drill verification module includes:

[0053] A version number verification unit, used to verify whether the database version numbers of the temporary database instance and the backup database instance are consistent, and if the database version numbers of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful;

[0054] The location verification unit is used to verify whether the location of the database log records of the above-mentioned temporary database instance is consistent with that of the above-mentioned backup database instance. If the location of the database log records of the above-mentioned temporary database instance is consistent with that of the above-mentioned backup database instance, it is determined that the recovery drill of the above-mentioned backup database instance is successful.

[0055] In conjunction with the second aspect, in a possible implementation manner, the data recovery drill device for the database further includes:

[0056] The clearing module is used to clear the temporary database instance after the recovery drill of the backup database instance is successful.

[0057] In conjunction with the second aspect, in a possible implementation manner, the backup database instance is the first backup database instance in the database; after the data recovery drill plan corresponding to the backup database instance is formulated according to the database instance information;

[0058] The above acquisition module is also used to:

[0059] When a second backup database instance of the database is detected, obtaining database instance information of the second backup database instance;

[0060] The above exercise development module is also used to:

[0061] Formulate a data recovery drill plan corresponding to the second backup database instance according to the database instance information of the second backup database instance;

[0062] Among them, the above-mentioned second backup database instance is a database instance in the above-mentioned database that is generated and backed up after the above-mentioned first backup database instance, and the data recovery drill time of the above-mentioned second backup database instance is after the data recovery drill time of the above-mentioned first backup database instance.

[0063] In conjunction with the second aspect, in a possible implementation manner, the report generating module is further configured to:

[0064] Determine a generation time dimension of the data recovery drill report, and generate a data recovery drill report for the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database;

[0065] Among them, the above-mentioned generation time dimension includes year, quarter or month, and the above-mentioned one generation time dimension includes one year, one quarter or one month.

[0066] In conjunction with the second aspect, in a possible implementation manner, the report push module further includes:

[0067] A receiving unit, configured to receive a drill report acquisition request from a service terminal, wherein the drill report acquisition request carries a push path and a target generation time dimension of the data recovery drill report;

[0068] A second determining unit is used to determine from the database a target database recovery drill report generated within a target generation time dimension carried in the drill report acquisition request received by the receiving unit;

[0069] The pushing unit is used to push the target database recovery drill report to the service terminal based on the pushing path carried in the drill report acquisition request received by the receiving unit.

[0070] In a third aspect, the present application provides a computer device, including: a processor, a memory, a transceiver, and a network interface;

[0071] The processor is connected to a memory, a transceiver, and a network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the transceiver and processor are used to call the computer program to execute the database data recovery drill method in the first aspect of the present application.

[0072] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the database data recovery drill method in the first aspect of the present application is executed.

[0073] In this application, when the business party database needs to back up the database and perform a recovery drill on the backup data, the data recovery drill system can automatically and synchronously obtain the database instance information, and formulate a data recovery drill plan corresponding to the backed up database instance for the backed up database instance. When the data recovery drill time arrives, the backed up database instance is automatically subjected to a data recovery drill based on the formulated data recovery drill plan, and a temporary database instance is generated when the data recovery drill is completed. When the data recovery drill plan is completed, the database can be started and the verification can be completed for the generated temporary database instance. The data recovery drill system can analyze in real time whether the restored temporary database instance can be successfully started. By comparing whether the database version number of the backup database instance and the temporary database instance are consistent and whether the location of the database log record is consistent, it can be determined whether the data recovery drill plan is successful. There is no need to log in to the database instance, which ensures the security of the database account. When the data recovery drill plan is successful, the data recovery drill system can automatically generate and save all drill records of all databases of the business party according to annual, quarterly, monthly and other time dimensions. Business parties can choose to generate drill reports for a single database instance, multiple instances, or all instances on a monthly, quarterly, or annual basis. There is no need to manually write drill reports, and no human intervention is required throughout the process. The report is automatically executed by the data recovery drill system, which is simple to operate and highly applicable. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0075] Figure 1 It is a structural diagram of the network architecture provided by this application;

[0076] Figure 2 It is a flow chart of a method for data recovery drill of a database provided by the present application;

[0077] Figure 3 It is another flow chart of the data recovery drill method for the database provided by the present application;

[0078] Figure 4 It is a structural schematic diagram of a data recovery drill device for a database provided by the present application;

[0079] Figure 5 It is a structural schematic diagram of a data recovery drill device for a database provided by the present application;

[0080] Figure 6 It is a structural schematic diagram of the computer device provided by this application. DETAILED DESCRIPTION

[0081] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0082] See also Figure 1 , Figure 1 This is a schematic diagram of the network architecture provided by this application. Figure 1 As shown, the network architecture may include a server 1, a database 2, and a service terminal cluster. The service terminal cluster may include multiple service terminals, such as Figure 1 As shown, it may specifically include service terminal 100a, service terminal 100b, service terminal 100c, ..., service terminal 100n.

[0083] Among them, server 1 can be an independent physical server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data, and artificial intelligence platforms. Each business terminal in the business terminal cluster may include but is not limited to: the above-mentioned terminals may include mobile phones, tablet computers, laptops, PDAs, smart speakers, mobile Internet devices (mobile internet devices, MID), points of sales (point of sales, POS), wearable devices (such as smart watches, smart bracelets, etc.), etc. The above-mentioned database 2 refers to a general data processing system of a unit or an application field, which stores a collection of relevant data belonging to enterprises and business departments, groups and individuals. The data in the database is established from a global perspective and is organized, described and stored according to a certain data model. Its structure is based on the natural connection between data, so that all necessary access paths can be provided, and the data is no longer targeted at a certain application, but is oriented to the entire organization, with overall structured characteristics. In some feasible implementations, the above-mentioned database 2 can be Oracle, MySQL, SQL Server, PostgrcSQL, DB2, Couchbase, etc.

[0084] like Figure 1As shown, the service terminal 100a, service terminal 100b, service terminal 100c, ..., service terminal 100n can respectively establish a network connection with the server 1, so that each service terminal can exchange data with the server 1 through the network connection; it can be understood that a network connection is also established between the server 1 and the database 2, so that the server 1 can exchange data with the database 2 through the network connection. For example, the server 1 receives a drill report acquisition request from the service terminal 100a or the service terminal 100b, service terminal 100c, ..., service terminal 100n, and based on the drill report acquisition request carrying the database recovery drill report push path and the target generation time dimension, the server 1 determines the target database recovery drill report generated within the target generation time dimension from the database 2, and pushes the target database recovery drill report to the service terminal 100a or the service terminal 100b, service terminal 100c, ..., service terminal 100n based on the push path.

[0085] The database data recovery drill method provided in this application can be applied to data backup and recovery scenarios of any category of data, such as financial data backup and recovery scenarios, medical data backup and recovery scenarios, inventory data backup and recovery scenarios, or other data backup and recovery scenarios. The specific method can be determined based on the actual application scenario and is not limited here.

[0086] The following will be combined Figures 2 to 6 The present invention describes a method for rehearsing data recovery of a database, a device for rehearsing data recovery of a database, and computer equipment.

[0087] See also Figure 2 , Figure 2 It is a flow chart of the data recovery drill of the database provided by the present application. The method can be executed by a data recovery drill system carried on a computer device. In other words, the data recovery drill system can run on the computer device, and the data recovery drill system can call the function modules associated with each business function instance associated with the backup database instance to execute the data recovery drill plan for each backup database instance. For the convenience of description, the following will be described by taking the data recovery drill system as the execution subject of the method provided by the embodiment of the present application as an example. Optionally, the computer device can be the above-mentioned Figure 1 The server 1 in the corresponding embodiment will not be limited here. This application will be described by taking the computer device as a server as an example. Figure 2 The method shown may include the following steps S101-S105:

[0088] Step S101: Obtain database instance information of a backup database instance of a database.

[0089] In some feasible implementations, the data recovery drill system can perform a full real-time analysis of the backup and recovery drills of all database data on the cloud. For example, for the backup of database instance data, the data recovery drill system can determine whether to enable backup by judging the database environment type. If the database environment is a production environment, enable backup. The backup content here includes all the data of the database instance, such as the account list of the database instance, database configuration information, database log files and data files, to ensure that when a logical error or physical device failure occurs in the database data and the database data needs to be restored, the data backed up by the recovery drill system can be successfully restored. The recovery drill of the database instance is mainly for the data that has been backed up. For the convenience of description, the database instance that has been backed up can be described as a backup database instance below. When the above database instance is backed up, the data recovery drill system obtains the database instance information of the backup database instance of the database, which is used to subsequently formulate a recovery drill plan for the above database instance information. The database instance here specifically refers to the memory structure plus a set of background processes. It can be understood that the database is used to store the database for a long time, while the memory can only temporarily store data, and the disk can really store data. Therefore, when using the database, a group of background processes in the instance need to read the data from the disk into the memory of the instance, and then write the data from the memory of the instance to the database through a group of background processes after operating the data in the memory. It should be noted that one instance can be used for one database, and multiple instances can also be used for one database at the same time. The relationship between the instance and the database is a one-to-many relationship. In an optional embodiment of the present application, the database instance information of the backup database instance obtained by the data recovery drill system includes all data information including the account list of the database instance.

[0090] Step S102: formulating a data recovery drill plan corresponding to the backup database instance according to the database instance information.

[0091] In some feasible implementations, the scenario where a data recovery drill is required can be the business party's own recovery drill requirements for database business. For example, when the business party's database needs to back up the database and perform a recovery drill on the backup data, the data recovery drill system can automatically obtain the database instance information, and then automatically formulate a data recovery drill plan for all database instances in the database that are backed up using the data recovery drill system based on the database's environmental information, such as production environment information, development environment information, test environment information, etc. The above-mentioned data recovery drill plan may include the target backup database instance and the data recovery drill time of the target backup database instance. Here, the target backup database instance can be any backup database instance that has been backed up using the data recovery drill system. Optionally, the above-mentioned database recovery drill time is usually not set within the change window time. The change window time specifically refers to the agreed, periodic time for implementing certain operations on the system, during which the impact of implementing changes or releases on system services is minimal. When the data recovery drill time generated by the data recovery drill system conflicts with the change window time, the data recovery drill system issues a corresponding time conflict prompt to the cloud console, the data recovery drill system receives from the cloud control platform the data recovery drill initiation time returned by the cloud control platform based on the change window time conflict prompt, and changes the data recovery drill time of the backup database instance to the data recovery drill initiation time to avoid the problem of conflict between the data recovery drill time generated by the data recovery drill system and the change window time.

[0092] Here, the cloud control platform can be a user operation interface of a computer device, such as a user interface (UI) of a computer device. It can be understood that the data recovery drill system runs in the background of the computer device, and the user interface can be a front-end user operation interface provided by the computer device to the administrator of the data recovery drill system for operation. The administrator of the data recovery drill system can monitor the data recovery drill of the data recovery drill system based on the user interface, or provide technical support during the data recovery drill of the data recovery drill system. When the data recovery drill time generated by the data recovery drill system conflicts with the change window time, the data recovery drill system outputs time conflict prompt information to the above user operation interface to issue a time conflict alarm to the administrator. The administrator can view the time conflict prompt information and the data recovery drill time based on the user operation interface, and then set the data recovery drill initiation time based on the change window time and the data recovery drill time to reset the data recovery drill time, and feed back the above data recovery drill initiation time to the data recovery drill system.

[0093] Optionally, in some feasible implementations, for database instances that have failed in the drill, the data recovery drill system can automatically generate a new data recovery drill plan, which is flexible in operation. Here, the new data recovery drill plan mainly changes the data recovery drill time, and the drill content included in the data recovery drill plan can remain unchanged. In other words, if a database instance recovery drill fails, a new data recovery drill time is selected to perform a recovery drill with the same content.

[0094] Step S103: Perform a recovery drill on the backup database instance based on the data recovery drill plan and generate a temporary database instance when the recovery drill is completed.

[0095] In some feasible implementations, when the data recovery drill system automatically formulates a data recovery drill plan for a backup database instance, the data recovery drill system can formulate corresponding data recovery drill plans for different backup database instances and the data recovery drill times for different backup database instances increase in sequence. The data recovery drill system can periodically check the data recovery drill time and automatically initiate the execution of the corresponding data recovery drill plan when the above data recovery drill time arrives, and generate a temporary database instance after the data recovery drill is completed. The above data recovery drill plan also includes multiple business function instances associated with the above backup database instance. When the above data recovery drill time arrives, the data recovery drill system can call each functional module associated with each business function instance associated with the above backup database instance, and execute the data recovery drill tasks of the above business function instances through the above functional modules. In an optional embodiment of the present application, the above-mentioned data recovery drill task can be performed by a data recovery drill system that can adapt to the application programming interface (API) of different functional modules, and remotely call the above-mentioned functional modules through a network protocol to perform the data recovery drill tasks of the above-mentioned business function instances. When the data recovery drill is completed, a temporary business function instance is generated. The temporary business function instance here can be a database instance generated by the data recovery drill system and having the same business function as the backup database instance of the business terminal.

[0096] Step S104: determining whether the recovery drill of the backup database instance is successful according to the backup database instance and the temporary database instance.

[0097] In some feasible implementations, when the data recovery drill plan is completed, the generated temporary database instance can be started and verified. The data recovery drill system analyzes in real time whether the restored temporary database instance can be successfully started, and determines whether the data recovery drill plan is successful by comparing whether the database version number of the backup database instance is consistent with that of the temporary database instance or whether the location of the database log record is consistent. If the database version number of the temporary database instance is consistent with that of the backup database instance, it is determined that the recovery drill of the backup database instance is successful; or, if the location of the database log record of the temporary database instance is consistent with that of the backup database instance, it is determined that the recovery drill of the backup database instance is successful. The above verification process does not require logging into the database instance, which ensures the security of the database account. When the data recovery drill system completes the database-related verification, the restored temporary database instance will be immediately cleared and released by the data recovery drill system after it is started normally, which ensures the security of the database data information. The business party can check the destruction record by itself to ensure that the database instance data is not leaked, which ensures the security of the database instance data.

[0098] Step S105: Generate a data recovery drill report for the backup database instance, and push the data recovery drill report to a business terminal of the backup database instance.

[0099] In some feasible embodiments, if the data recovery drill of the backup database instance is successful, the data recovery drill system determines the generation time dimension of the data recovery drill report, and generates the database recovery drill report of the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database. Wherein, the generation time dimension includes annual, quarterly or monthly, and the generation time dimension includes one year, one quarter or one month. The database recovery drill report of the backup database is a collection of data recovery drill reports for the database instance generated within a generation time dimension. When the data recovery drill system receives a push path carrying the data recovery drill report and a drill report acquisition request of the target generation time dimension sent by the business terminal, the data recovery drill system determines the target database recovery drill report produced within the target generation time dimension from the database, and pushes the target database recovery drill report to the business terminal based on the push path information. Optionally, the push path can be a contact method such as a system station letter, email, mobile phone, etc. If the target generation time dimension is one month, the target database recovery drill report is a collection of data recovery drill reports of each backup database instance within one month. In a feasible implementation manner, when the data recovery drill system receives a drill report acquisition request with a push path and a target generation time dimension carrying a data recovery drill report sent by a business terminal, it generates a database recovery drill report for the backup database instance, and pushes the database recovery drill report to the business terminal of the backup database instance. When the data recovery drill system receives a drill report acquisition request with a push path and a target generation time dimension of one month sent by a business terminal, it generates a database recovery drill report for the backup database instance for one month based on the data recovery drill report of each backup database instance, and sends the database recovery drill report to the business terminal of the backup database instance via a system station message.

[0100] In this application, when the business party database needs to back up the database and perform data recovery drills on the backup data, the data recovery drill system can automatically and synchronously obtain the database instance information, and formulate a data recovery drill plan corresponding to the backed up database instance for the backed up database instance. When the data recovery drill time arrives, the backed up database instance is automatically restored and a temporary database instance is generated when the recovery drill is completed based on the formulated data recovery drill plan. When the data recovery drill plan is completed, the database can be started and the verification can be completed for the generated temporary database instance. The data recovery drill system analyzes in real time whether the restored database can be started smoothly. By checking whether the database version number of the backup database instance and the temporary database instance are consistent and whether the location of the database log record is consistent, it can be determined whether the data recovery drill plan is successful. There is no need to log in to the database instance, which ensures the security of the database account. When the data recovery drill plan is successful, the data recovery drill system can automatically generate and save all drill records of all databases of the business party according to annual, quarterly, monthly and other time dimensions. Business parties can choose to generate drill reports for a single database instance, multiple instances, or all instances on a monthly, quarterly, or annual basis. There is no need to manually write drill reports, and no human intervention is required throughout the process. The drills are automatically executed by the data recovery drill system, which can improve the efficiency of data recovery drills, reduce the complexity of user operations for data recovery drills, and save the implementation costs of data recovery drills.

[0101] See also Figure 3 , Figure 3 is another flow chart of the database data recovery drill method provided by the present application. The method can be executed by a computer device, and optionally, the computer device can be the above-mentioned Figure 1 The server 1 in the corresponding embodiment will not be limited here. This application will be described by taking the computer device as a server as an example. Figure 3 The method shown may include the following steps S201-S206:

[0102] Step S201: Obtain database instance information of a first backup database instance of a database, and formulate a data recovery drill plan corresponding to the backup database instance according to the information.

[0103] The specific implementation of step S201 can be found in the above Figure 2 The description of steps S101-S102 in the corresponding embodiment will not be repeated here.

[0104] Step S202: when a second backup database instance of the database is detected, database instance information of the second backup database instance is obtained, and a corresponding data recovery drill plan is formulated according to the information.

[0105] In some feasible implementations, the backup database instance may be the first backup database instance in the database, where the first backup database instance may be a database instance that has been generated and backed up in the database. When the data recovery drill system formulates a data recovery drill plan corresponding to the first backup database instance based on the first backup database instance information and / or performs a data recovery drill on the first backup database instance based on the data recovery drill plan, if the data recovery drill system detects a second backup database instance of the database, the database instance information of the second backup database instance is obtained, and a data recovery drill plan corresponding to the second backup database instance is formulated based on the database instance information of the second backup database instance. The second backup database instance is a database instance in the database that is generated and backed up in the first backup database instance, and the data recovery drill time of the second backup database instance is after the data recovery drill time of the first backup database instance. In an optional embodiment of the present application, when the data recovery drill system performs data recovery drills on each backup database instance, only one designated host is needed to perform the recovery drill task, which is completely physically isolated from the production library to ensure that the running production library is not affected. Therefore, during the data recovery drill of the backup database, a new database instance will still be generated. The production database here can be a database that provides services to the outside world, and the backup data is mainly stored in the exchange database. When the data recovery drill system performs a recovery drill, the production database operates normally and generates a database instance. When the data recovery drill system detects a second backup database instance, it formulates a data recovery drill plan corresponding to the second backup database instance based on the database instance information of the second backup database instance. For the detected second backup database instance, the data recovery drill system will formulate a corresponding data recovery drill plan for it, and for the database instance that has been offline, the data recovery drill system will delete the corresponding data recovery drill plan, and the host resources and storage resources are reused, so there is no need to spend too many hardware resources to perform recovery drills, saving the implementation cost of data recovery drills.

[0106] Step S203: When the data recovery drill time arrives, determine whether the number of data recovery drill tasks in the data recovery available zone in the current recovery time window is greater than or equal to the task number threshold.

[0107] In some feasible implementations, before the data recovery drill plan starts, the data recovery drill system will verify whether the number of data recovery drill tasks in the current data recovery availability zone is greater than or equal to the task number threshold. The data recovery availability zone here specifically refers to different modules of the same data center computer room. For example, a company has a computer room in a certain place, and the same computer room has different floors. The 3rd floor is called "SZA" and the 4th floor is called "SZB". Then the 3rd floor and the 4th floor belong to different data recovery availability zones. Adhering to the principle of giving priority to business continuity, if the number of data recovery drill tasks in the above-mentioned data recovery availability zone is less than the task number threshold, the steps of performing a recovery drill on the above-mentioned backup database instance based on the above-mentioned data recovery drill plan and generating a temporary database instance when the recovery drill is completed are executed. If the number of data recovery drill tasks in the above-mentioned data recovery availability zone is greater than or equal to the task number threshold, the data recovery drill time of the above-mentioned backup database instance is changed to the next recovery time window of the current recovery time window. The recovery time window here can be a fixed period of time for data recovery drills.

[0108] Step S204: Perform a recovery drill on the backup database instance based on the data recovery drill plan and generate a temporary database instance when the recovery drill is completed.

[0109] The specific implementation of step S204 can be found in the above Figure 2 The description of step S103 in the corresponding embodiment will not be repeated here.

[0110] Step S205: determining whether the recovery drill of the backup database instance is successful according to the backup database instance and the temporary database instance.

[0111] The specific implementation of step S205 can be found in the above Figure 2 The description of step S104 in the corresponding embodiment will not be repeated here.

[0112] Step S206: Generate a data recovery drill report for the backup database instance, and push the data recovery drill report to the business terminal of the backup database instance.

[0113] The specific implementation of step S206 can be found in the above Figure 2 The description of step S105 in the corresponding embodiment will not be repeated here.

[0114] In this application, when the data recovery drill system performs a recovery drill on each database instance, it only needs a designated recovery host to perform the recovery drill task, which is completely physically isolated from the production library to ensure that the running production library is not affected. For the detected second backup database instance, a corresponding data recovery drill plan is automatically formulated. If the database instance goes offline, the corresponding data recovery drill plan is automatically deleted. For the database instance that fails the data recovery drill, a corresponding drill plan is automatically formulated, which is flexible in operation. Regardless of whether the data recovery drill succeeds or fails, the data recovery drill system will delete the restored temporary database instance, and the host resources and storage resources are reused, so there is no need to spend too many hardware resources for data recovery drills. And adhering to the principle of giving priority to business continuity, if there are a large number of backup or recovery tasks in the current data recovery availability zone, the data recovery drill plan will be automatically postponed to the next recovery time window for execution, which is flexible in operation. When the data recovery drill plan is completed, the database can be started and the verification can be completed for the generated temporary database instance. The data recovery drill system will analyze in real time whether the restored database can be successfully started. By comparing whether the database version number of the backup database instance and the temporary database instance are consistent and whether the location of the database log record is consistent, it can be judged whether the data recovery drill plan is successful. There is no need to log in to the database instance, which ensures the security of the database account. When the data recovery drill plan is successful, the recovery drill system can automatically generate and save all drill records of all databases of the business party according to the annual, quarterly, monthly and other time dimensions. The business party can choose to generate drill reports for a single database instance, multiple instances, or all instances in monthly, quarterly, and annual dimensions. There is no need to manually write drill reports, and no manual intervention is required throughout the process. The data recovery drill system automatically executes, which is simple to operate and highly applicable.

[0115] For further information, see Figure 4 , Figure 4 The present invention provides a schematic diagram of a database data recovery drill device. The database data recovery drill device may be a computer program (including program code) running in a computer device. For example, the database data recovery drill device is an application software. The database data recovery drill device may be used to execute the corresponding steps in the method provided by the present invention. Figure 4 As shown, the data recovery drill device for the database can be applied to computer equipment, and the data recovery drill device for the database can include: an acquisition module 10, a drill formulation module 20, a drill execution module 30, a drill verification module 40, a report generation module 50 and a report push module 60.

[0116] An acquisition module 10 is used to acquire database instance information of a backup database instance of data;

[0117] A drill formulation module 20, configured to formulate a data recovery drill plan corresponding to the backup database instance according to the database instance information obtained by the acquisition module, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance;

[0118] A drill execution module 30, configured to perform a recovery drill on the backup database instance based on the data recovery drill plan when the data recovery drill time arrives and generate a temporary database instance when the recovery drill is completed;

[0119] A drill verification module 40, used to determine whether the recovery drill of the backup database instance is successful based on the backup database instance and the temporary database instance generated by the drill execution module 30;

[0120] A report generating module 50, configured to generate a data recovery drill report for the backup database instance when the drill verification module 40 determines that the recovery drill for the backup database instance is successful;

[0121] The report pushing module 60 is used to push the data recovery drill report generated by the report generating module to the business terminal of the backup database instance.

[0122] In a possible implementation, please refer to Figure 5 , the data recovery drill device of the above database also includes:

[0123] The backup module 70 is used to determine the environment type of the database. If the environment type of the database is a production environment, the database instance of the database is backed up to obtain a backup database instance of the database.

[0124] In a possible implementation, the drill execution module 30 includes:

[0125] The first determining unit 301 is used to determine whether the number of data recovery drill tasks in the data recovery available zone in the current recovery time window is greater than or equal to the task number threshold when the above-mentioned data recovery drill time arrives;

[0126] A rehearsal unit 302 is used to perform a recovery rehearsal on the backup database instance based on the data recovery rehearsal plan and generate a temporary database instance when the recovery rehearsal is completed when the first determination unit 301 determines that the number of data recovery rehearsal tasks in the data recovery available zone is less than the task number threshold;

[0127] The first time changing unit 303 is used to change the data recovery drill time of the above-mentioned backup database instance to the next recovery time window of the current recovery time window if the number of data recovery drill tasks in the above-mentioned data recovery available zone determined by the above-mentioned first determining unit 301 is greater than or equal to the task number threshold.

[0128] In a possible implementation, the drill execution module 30 further includes:

[0129] The prompt push unit 304 is used to send a change window time conflict prompt to the cloud control platform when the data recovery drill time arrives, if the data recovery drill time conflicts with the change window time;

[0130] The second time changing unit 305 is used to receive the data recovery drill initiation time returned by the cloud control platform based on the change window time conflict prompt from the cloud control platform, and change the data recovery drill time of the backup database instance to the data recovery drill initiation time.

[0131] In a possible implementation manner, the data recovery drill plan further includes a plurality of business function instances associated with the backup database instance; and the drill execution module 30 is further used to:

[0132] The function modules associated with the business function instances associated with the backup database instance are called, and the data recovery drill tasks of the business function instances are performed through the function modules.

[0133] In a possible implementation, the drill verification module 40 includes:

[0134] A version number verification unit 401 is used to verify whether the database version numbers of the temporary database instance and the backup database instance are consistent. If the database version numbers of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful.

[0135] The location verification unit 402 is used to verify whether the location of the database log records of the temporary database instance is consistent with that of the backup database instance. If the location of the database log records of the temporary database instance is consistent with that of the backup database instance, it is determined that the recovery drill of the backup database instance is successful.

[0136] In a possible implementation manner, the data recovery drill device for the database further includes:

[0137] The clearing module 80 is used to clear the temporary database instance after the recovery drill of the backup database instance is successful.

[0138] In a possible implementation manner, the backup database instance is the first backup database instance in the database, and after the data recovery drill plan corresponding to the backup database instance is formulated according to the database instance information;

[0139] The acquisition module 110 is also used for:

[0140] When a second backup database instance of the database is detected, obtaining database instance information of the second backup database instance;

[0141] The exercise formulation module 20 is also used for:

[0142] Formulate a data recovery drill plan corresponding to the second backup database instance according to the database instance information of the second backup database instance;

[0143] Among them, the above-mentioned second backup database instance is a database instance in the above-mentioned database that is generated and backed up after the above-mentioned first backup database instance, and the data recovery drill time of the above-mentioned second backup database instance is after the data recovery drill time of the above-mentioned first backup database instance.

[0144] In a possible implementation manner, the report generating module 50 is further configured to:

[0145] Determine a generation time dimension of the data recovery drill report, and generate a data recovery drill report for the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database;

[0146] Among them, the above-mentioned generation time dimension includes year, quarter or month, and the above-mentioned one generation time dimension includes one year, one quarter or one month.

[0147] In a possible implementation manner, the report push module 60 further includes:

[0148] The receiving unit 601 is used to receive a drill report acquisition request from a service terminal, wherein the drill report acquisition request carries a push path and a target generation time dimension of the data recovery drill report;

[0149] The second determining unit 602 is used to determine from the database a target database recovery drill report generated within a target generation time dimension carried in the drill report acquisition request received by the receiving unit 601 .

[0150] The pushing unit 603 is configured to push the target database recovery drill report to the service terminal based on the pushing path carried in the drill report acquisition request received by the receiving unit 601 .

[0151] The specific implementation of the acquisition module 10, the drill formulation module 20, the drill execution module 30, the drill verification module 40, the report generation module 50, the report push module 60, the backup module 70 and the clearing module 80 can be referred to above. Figure 2 The description of steps S101 to S105 in the corresponding embodiment and / or the above Figure 3 The description of steps S201 to S206 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated.

[0152] For further information, see Figure 6 , Figure 6 Schematic diagram of a computer device provided by this application. Figure 6 As shown, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a transceiver 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 6 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a device control application program.

[0153] exist Figure 6 In the computer device 1000 shown, the network interface 1004 is mainly used for the user terminal to perform network communication; and the processor 1001 and the transceiver 1003 can be used to call the device control application stored in the memory 1005 to achieve:

[0154] The transceiver 1003 is used to obtain database instance information of a backup database instance of the database;

[0155] The processor 1001 is configured to formulate a data recovery drill plan corresponding to the backup database instance according to the database instance information, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance;

[0156] The processor 1001 is further configured to, when the data recovery drill time arrives, perform a recovery drill on the backup database instance based on the data recovery drill plan and generate a temporary database instance when the recovery drill is completed;

[0157] The processor 1001 is further configured to determine whether the recovery drill of the backup database instance is successful based on the backup database instance and the temporary database instance, and if the recovery drill of the backup database instance is successful, generate a data recovery drill report of the backup database instance.

[0158] The transceiver 1003 is also used to push the database recovery drill report generated by the processor 1001 to the service terminal of the backup database instance.

[0159] In a possible implementation manner, the processor 1001 is further configured to determine an environment type of a database, and if the environment type of the database is a production environment, back up the database instance of the database to obtain a backup database instance of the database.

[0160] In a possible implementation manner, when the data recovery drill time arrives, the processor 1001 is further configured to:

[0161] Determine whether the number of data recovery drill tasks in the data recovery availability zone in the current recovery time window is greater than or equal to the task number threshold;

[0162] If the number of data recovery drill tasks in the above data recovery available zone is less than the task number threshold, then executing the steps of performing a recovery drill on the above backup database instance based on the above data recovery drill plan and generating a temporary database instance when the recovery drill is completed;

[0163] If the number of data recovery drill tasks in the above data recovery availability zone is greater than or equal to the task number threshold, the data recovery drill time of the above backup database instance is changed to the next recovery time window of the current recovery time window.

[0164] In a possible implementation, when the data recovery drill time arrives, if the data recovery drill time conflicts with the change window time, the transceiver 1003 is further used to send a change window time conflict prompt to the cloud control platform, and receive the data recovery drill initiation time returned by the cloud control platform based on the change window time conflict prompt from the cloud control platform. The processor 1001 is further used to change the data recovery drill time of the backup database instance to the data recovery drill initiation time.

[0165] In a possible implementation manner, the data recovery drill plan further includes multiple business function instances associated with the backup database instance; and the processor 1001 is configured to:

[0166] The function modules associated with the business function instances associated with the backup database instance are called, and the data recovery drill tasks of the business function instances are performed through the function modules.

[0167] In a possible implementation manner, the processor 1001 is configured to verify whether the database version numbers of the temporary database instance and the backup database instance are consistent, and if the database version numbers of the temporary database instance and the backup database instance are consistent, determining that the recovery drill of the backup database instance is successful;

[0168] Alternatively, verify whether the locations of the database log records of the temporary database instance and the backup database instance are consistent. If the locations of the database log records of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful.

[0169] In a possible implementation manner, the processor 1001 is further configured to:

[0170] After the recovery drill of the above backup database instance is successful, clear the above temporary database instance.

[0171] In a possible implementation manner, the backup database instance is the first backup database instance in the database; after formulating the data recovery drill plan corresponding to the backup database instance according to the database instance information, the processor 1001 is further configured to:

[0172] When a second backup database instance of the database is detected, a data recovery drill plan corresponding to the second backup database instance is formulated according to the database instance information of the second backup database instance acquired by the transceiver 1003;

[0173] Among them, the above-mentioned second backup database instance is a database instance in the above-mentioned database that is generated and backed up after the above-mentioned first backup database instance, and the data recovery drill time of the above-mentioned second backup database instance is after the data recovery drill time of the above-mentioned first backup database instance.

[0174] In a possible implementation manner, the processor 1001 is further configured to:

[0175] Determine a generation time dimension of the data recovery drill report, and generate a data recovery drill report for the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database;

[0176] Among them, the above-mentioned generation time dimension includes year, quarter or month, and the above-mentioned one generation time dimension includes one year, one quarter or one month.

[0177] In a possible implementation manner, the transceiver 1003 is further configured to receive a drill report acquisition request from a service terminal, wherein the drill report acquisition request carries a push path and a target generation time dimension of the data recovery drill report;

[0178] The above-mentioned processor 1001 is also used to determine from the above-mentioned database the target database recovery drill report generated within the target generation time dimension carried in the drill report acquisition request received from the above-mentioned transceiver 1003, and the above-mentioned transceiver 1003 is also used to push the above-mentioned target database recovery drill report to the above-mentioned business terminal based on the above-mentioned push path.

[0179] It should be understood that the computer device 1000 described in this application can execute the above Figure 2 and / or Figure 3 The description of the data recovery drill method for the database in the corresponding embodiment can also be performed as described above. Figure 4 and / or Figure 5 The description of the data recovery training device for the database in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0180] In addition, it should be pointed out here that: the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data recovery drill device of the database mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above Figure 2 and / or Figure 3 The description of the data recovery drill method for the database in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, program instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0181] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned computer-readable storage medium can be a data recovery drill device for a database provided in any of the above-mentioned embodiments or an internal storage unit of the above-mentioned device, such as a hard disk or memory of an electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the electronic device. The above-mentioned computer-readable storage medium can also include a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory, etc. Further, the computer-readable storage medium can also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0182] The terms "first", "second", etc. in the claims, specification and drawings of the present invention are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" used in the specification and the appended claims of the present invention refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations.

[0183] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0184] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for data recovery drill of a database, characterized in that: The method comprises: Obtaining database instance information of a backup database instance of the database, and formulating a data recovery drill plan corresponding to the backup database instance according to the database instance information, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance; When the data recovery drill time arrives, a recovery drill is performed on the backup database instance based on the data recovery drill plan and a temporary database instance is generated when the recovery drill is completed; Determining whether the recovery drill of the backup database instance is successful according to the backup database instance and the temporary database instance; If the recovery drill of the backup database instance is successful, a data recovery drill report of the backup database instance is generated, and the data recovery drill report is pushed to the service terminal of the backup database instance; Wherein, when the data recovery drill time arrives, the method further includes: determining whether the number of data recovery drill tasks in the data recovery available zone in the current recovery time window is greater than or equal to the task number threshold; if the number of data recovery drill tasks in the data recovery available zone is less than the task number threshold, executing the steps of performing a recovery drill on the backup database instance based on the data recovery drill plan and generating a temporary database instance when the recovery drill is completed; if the number of data recovery drill tasks in the data recovery available zone is greater than or equal to the task number threshold, changing the data recovery drill time of the backup database instance to the next recovery time window of the current recovery time window; When the data recovery drill time arrives, the method further includes: if the data recovery drill time conflicts with the change window time, sending a change window time conflict prompt to the cloud control platform; receiving from the cloud control platform the data recovery drill initiation time returned by the cloud control platform based on the change window time conflict prompt, and changing the data recovery drill time of the backup database instance to the data recovery drill initiation time; The backup database instance is the first backup database instance in the database; after formulating a data recovery drill plan corresponding to the backup database instance according to the database instance information, the method further includes: when a second backup database instance of the database is detected, obtaining database instance information of the second backup database instance, and formulating a data recovery drill plan corresponding to the second backup database instance according to the database instance information of the second backup database instance; wherein the second backup database instance is a database instance in the database that is generated and backed up after the first backup database instance, and the data recovery drill time of the second backup database instance is after the data recovery drill time of the first backup database instance.

2. The method according to claim 1, characterized in that: The data recovery drill plan also includes multiple business function instances associated with the backup database instance; and the recovery drill on the backup database instance based on the data recovery drill plan includes: Each functional module associated with each business function instance associated with the backup database instance is called, and the data recovery drill task of each business function instance is performed through the each functional module.

3. The method according to claim 1, characterized in that: The determining whether the recovery drill of the backup database instance is successful according to the backup database instance and the temporary database instance includes: Verify whether the database version numbers of the temporary database instance and the backup database instance are consistent, and if the database version numbers of the temporary database instance and the backup database instance are consistent, determine that the recovery drill of the backup database instance is successful; Alternatively, verify whether the locations of the database log records of the temporary database instance and the backup database instance are consistent. If the locations of the database log records of the temporary database instance and the backup database instance are consistent, it is determined that the recovery drill of the backup database instance is successful.

4. The method according to claim 3, characterized in that The method further comprises: Determine a generation time dimension of the data recovery drill report, and generate a database recovery drill report of the database based on the data recovery drill reports of each backup database instance generated within a generation time dimension in the database; The generation time dimension includes year, quarter or month, and the one generation time dimension includes one year, one quarter or one month.

5. A data recovery drill device for a database, the device being used to execute the method according to any one of claims 1 to 4, characterized in that: include: An acquisition module, used to acquire database instance information of a backup database instance of data; A drill formulation module, used to formulate a data recovery drill plan corresponding to the backup database instance according to the database instance information obtained by the acquisition module, wherein the data recovery drill plan at least includes a data recovery drill time for the backup database instance; A drill execution module, used for, when the data recovery drill time arrives, performing a recovery drill on the backup database instance based on the data recovery drill plan and generating a temporary database instance when the recovery drill is completed; A drill verification module, used to determine whether the recovery drill of the backup database instance is successful based on the backup database instance and the temporary database instance generated by the drill execution module; A report generation module, configured to generate a data recovery drill report for the backup database instance when the drill verification module determines that the recovery drill for the backup database instance is successful; The report pushing module is used to push the data recovery drill report generated by the report generating module to the business terminal of the backup database instance.

6. A computer device, characterized in that: include: Processors, memories, transceivers, and network interfaces; The processor is connected to a memory, a transceiver and a network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the transceiver and the processor are used to call the program code to execute the method described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the method according to any one of claims 1 to 4 is executed.

Citation Information

Patent Citations

  • Database disaster tolerance exercise management control system

    CN106095614A

  • Data retracement method, apparatus, and system

    US20180307569A1

Cited By

  • Inventory data synchronization and consistency verification system supporting network disconnection fault tolerance

    CN121544163A