Database automatic recovery verification platform and method based on NetBackup
By designing a database automated recovery verification platform based on NetBackup backup, the problem of high environmental cost and time-consuming in the data recovery process is solved, efficient and reliable data recovery and verification are achieved, and the risk of data loss is reduced.
Patent Information
- Application Number
- CN202411876392.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the recovery environment built by data recovery is expensive and has a long cycle, the recovery process is difficult and time-consuming, and the inability to restore the backup can easily lead to permanent data loss and serious losses.
Design a database automated recovery verification platform based on NetBackup backup, including production environment and backup testing environment. Through the coordinated work of management nodes and recovery nodes, it realizes automated recovery and verification, and uses the NetBackup backup system and nmfast components for data authentication and encryption.
It significantly improves the reliability and efficiency of data recovery, reduces the cost and time of the recovery process, reduces the risk of data loss, improves the security of data and the intelligence of the recovery system.
Smart Images

Figure CN119829331A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of database recovery platforms, and in particular is a database automatic recovery verification platform and method based on NetBackup backup. Background Art
[0002] As the ultimate barrier of data protection, data backup is of great importance. If the backup cannot be successfully restored, it may lead to permanent data loss, which in turn brings immeasurable losses. However, in actual operation, although many systems perform daily backups, they rarely conduct recovery operation drills. Once a system fails, whether the backup data can be successfully restored becomes a major risk, so regular recovery verification is one of the essential links in the closed loop of backup system management.
[0003] On the other hand, data recovery is a time-consuming, labor-intensive, costly but ineffective task. The diversity of software and hardware configurations in the production environment makes it costly and time-consuming to build a corresponding recovery environment. Data recovery involves a wide range of areas, high technical complexity, and high operational difficulty, and usually requires experienced senior engineers to be competent. The recovery of large databases often takes hours or even days, which consumes a lot of time and energy. Therefore, it is urgently necessary to invent and design a database automatic recovery verification platform and method based on NetBackup backup to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a database automatic recovery verification platform based on NetBackup backup, which solves the problems that the corresponding recovery environment built for the above-mentioned existing data recovery is high in cost and has a long cycle, the recovery process is difficult and time-consuming, and the failure of backup to be restored can easily lead to permanent loss of data and cause serious losses.
[0005] To solve the above technical problems, the present invention provides a database automatic recovery verification platform based on NetBackup backup, including a production environment and a backup test environment, wherein a database is set in the production environment,
[0006] The backup test environment includes a management node and multiple recovery nodes that can be dynamically expanded horizontally, and the recovery node is connected to the management node through an agreed port.
[0007] The management node is used to configure, schedule and manage the recovery nodes in the backup test environment;
[0008] Each of the recovery nodes is used to recover, verify and desensitize the data in the database under the scheduling and management of the management node;
[0009] The management node and the recovery node are both connected to the port of the database, and the management node is connected to the NetBackup client component through the port of the RESTful framework;
[0010] A database recovery component and a plurality of backup domains connected to the database recovery component are installed in each recovery node, a NetBackup backup system is installed in the database recovery component, the NetBackup backup system (323) is provided with open source software with a nmfast component, the nmfast component is provided with a fastAPI, the fastAPI is provided with a key authentication module and an encryption algorithm module for authenticating and encrypting the database, and the encryption algorithm module is connected to the key authentication module.
[0011] Furthermore, the database recovery component has a built-in recovery template for automatically recovering the database.
[0012] Furthermore, the open source software is a combination of fast api open source software and nmfast components.
[0013] Furthermore, each of the recovery nodes is provided with a data extraction module.
[0014] Furthermore, the encryption algorithm module is provided with a SHA256 encryption algorithm.
[0015] Furthermore, the agreed port is the listening port 9307.
[0016] A database automatic recovery and verification method based on NetBackup backup uses a database automatic recovery and verification platform based on NetBackup backup to perform recovery and verification. The specific steps of the recovery and verification method are as follows:
[0017] S1. Recovery strategy
[0018] The administrator configures the corresponding parameters according to the type of recovery data and saves the recovery policy parameters in the database built into the production environment;
[0019] S2. Automated recovery
[0020] The management node generates a public key and a parent key through the operating system interface of the NetBackup client component or by sending a key generation command line to decode the database, pair the generated parent key with the public key, and authenticate through the key. After authentication, the recovery instruction of the data in the database is sent to the recovery node. The recovery node receives the recovery request through the API port in the nmfast component. The recovery node recovers, verifies, and desensitizes the data in the database through the data extraction module, the desensitization module, and the database port.
[0021] When the database needs to be restored, the operating system controls the database to be restored to the nomount state. In the nomount state, the operating system is used to create one or more empty databases that do not contain any valid data. The backup database interface and sqlplus command are used to call the backup data of the database and restore the control file in the database. During the recovery process, the newly created single empty data file or multiple empty data files will be renamed so that the restored database has a unique directory path and file name to avoid overwriting the original database. The recovery archive log is created and the temporary table space is rebuilt. After the reconstruction is completed, the database is encrypted using the SHA256 encryption algorithm and returned after encryption.
[0022] S3, Validation and Reporting
[0023] After rebuilding the temporary tablespace, open the database for verification and verify the progress and results of database recovery. You can also view detailed logs through the management node.
[0024] Furthermore, a recovery strategy in step S1 is composed of multiple parameters, including a custom recovery strategy name, label, Master Server name, source client, data type, backup strategy, recovery server, recovery target time point, additional parameters, recovery start time point, number of days for recovery data retention, script file, cyclic recovery interval, shutdown after recovery, and deletion after recovery.
[0025] Furthermore, the type of the database in step S1 is one or more of Oracle, DB2, Informix, Sql Server or MySQL.
[0026] Furthermore, the public key and the parent key in step S2 are Hash keys.
[0027] Beneficial effects of the present invention: The database automatic recovery verification platform of the present invention can enable users to control multiple recovery nodes in a one-to-many manner through a management node, so that a highly intelligent recovery verification platform can be built with minimal investment and cost, so that backup system management forms a closed loop, significantly improves the reliability and efficiency of data recovery, and effectively reduces potential risks and losses;
[0028] At the same time, the NetBackup backup system can be installed in the database recovery component, and the NetBackup backup system is directly connected to the NetBackup client component, so that the backup system can be directly controlled through the NetBackup client component to reduce cumbersome steps; and at the same time, the NetBackup backup system authenticates and encrypts data through the nmfast component in the open source software to improve the confidentiality and authority of the restored data, so as to avoid accidental deletion that makes it impossible for people to recover, which may cause economic losses in serious cases;
[0029] The open source software is a combination of the fast api open source software and the nmfast component, so that the open source software has the function of being compatible with the fast api, and can also provide a secure communication function based on the SHA256 encryption algorithm in the encryption algorithm module;
[0030] The setting of the recovery and verification method process can establish a recovery strategy for the database in the production environment, so that the recovery object, recovery process and recovery time can be effectively controlled according to the parameters of the recovery strategy to improve the reliability and efficiency of recovery, and the recovery data can be decoded, authenticated and encrypted by generating hash keys to improve the security of database data and system. At the same time, the system can also have high performance and low latency functions.
[0031] The database automatic recovery verification platform of the present invention can implement automatic recovery for different types of backup objects (such as files, databases, virtual machines, etc.), and supports flexible job scheduling methods (such as instant recovery, scheduled recovery, periodic recovery, etc.), thereby realizing the "self-service" data recovery function. At the same time, the platform also provides a detailed recovery log for users to conduct auditing and tracing. These functional characteristics significantly improve the operation and maintenance efficiency and reduce the operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 It is an overall schematic diagram of a database automatic recovery verification platform based on NetBackup backup of the present invention;
[0034] Figure 2 It is a schematic diagram of a backup test environment of a database automatic recovery verification platform based on NetBackup backup of the present invention;
[0035] Figure 3 It is an automated recovery flow chart of a database automated recovery verification method based on NetBackup backup of the present invention;
[0036] Figure 4 It is a flowchart of decoding, authentication and encryption of a database automatic recovery verification method based on NetBackup backup of the present invention;
[0037] In the figure: 1-production environment, 3-backup test environment, 31-management node, 32-recovery node, 34-RESTful framework, 321-backup domain, 323-NetBackup backup system, 324-data extraction module. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings of the present invention specification to clearly and completely describe the technical solutions in the embodiments of the invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In a specific embodiment of the present invention, Figure 1-Figure 4 As shown, a database automatic recovery verification platform based on NetBackup backup is specifically disclosed, including a production environment 1 and a backup test environment 3. A database 11 is set in the production environment 1, and the type of the database 11 is one or more of Oracle, DB2, Informix, Sql Server or MySQL.
[0040] The backup test environment 3 includes a management node 31 and multiple recovery nodes 32 that can be dynamically expanded horizontally. The recovery node 32 is connected to the management node 31 through an agreed port, and the agreed port is a listening port 9307;
[0041] The management node 31 is used to configure, schedule and manage the recovery node 32 in the backup test environment 3;
[0042] Each recovery node 32 is used to recover, verify and desensitize the data in the database 11 under the scheduling and management of the management node 31;
[0043] The management node 31 and the recovery node 32 are both connected to the port of the database 11, and the management node 31 is connected to the NetBackup client component through the port of the RESTful framework 34;
[0044] A database recovery component and multiple backup domains 321 connected to the database recovery component are installed in each recovery node 32. A NetBackup backup system 323 is installed in the database recovery component. The NetBackup backup system 323 is provided with open source software with a nmfast component. The nmfast component is provided with a fastAPI. The fastAPI is provided with a key authentication module and an encryption algorithm module for authenticating and encrypting the database 11. The encryption algorithm module is connected to the key authentication module. The encryption algorithm module is provided with a SHA256 encryption algorithm. The open source software is a combination of the fast api open source software and the nmfast component. The open source software is a setting based on the combination of the fast api open source software and the nmfast component, so that the open source software has the function of being compatible with the fast api, and can also provide a secure communication function based on the SHA256 encryption algorithm in the encryption algorithm module.
[0045] By installing NetBackup backup system 323 in the database recovery component, NetBackup backup system 323 is directly connected to the NetBackup client component, so that the backup system can be directly controlled through the NetBackup client component to reduce cumbersome steps; and at the same time, NetBackup backup system 323 authenticates and encrypts data through the nmfast component in the open source software to improve the confidentiality and authority of the restored data, so as to avoid the problem of accidental deletion that makes it impossible for people to recover, which may cause economic losses in serious cases;
[0046] Each recovery node 32 is provided with a database recovery component, and the database recovery component has a built-in recovery template for automatically recovering the database.
[0047] Each recovery node 32 is provided with a data extraction module 324 , which can selectively extract specified data from the database 11 according to the specific needs of the user, thereby effectively improving the utilization rate and value of the data.
[0048] A database automation method based on NetBackup backup uses a database automation recovery verification platform based on NetBackup backup to perform recovery and verification. The specific steps of the recovery and verification method are as follows:
[0049] Recovery strategy:
[0050] The administrator configures corresponding parameters according to the type of data to be restored, and saves the recovery strategy parameters in the database 11 built into the production environment 1. A recovery strategy is composed of multiple parameters, including a custom recovery strategy name, label, Master Server name, source client, data type, backup strategy, recovery server, recovery target time point, additional parameters, recovery start time point, number of days to retain the restored data, script file, cyclic recovery interval, shutdown after recovery, and deletion after recovery. ;
[0051] Automated recovery:
[0052] The management node 31 generates a public key and a parent key through the operating system interface of the NetBackup client component or by sending a key generation command line. The public key and the parent key are hash keys, so as to decode the database 11, pair the generated parent key with the public key, and authenticate through the key. After authentication, the data in the database 11 is sent to the recovery node 32 for recovery instructions. The recovery node 32 receives the recovery request through the API port in the nmfast component. The recovery node 32 recovers, verifies and desensitizes the data in the database 11 through the data extraction module 324 and the desensitization module and the port of the database 11.
[0053] When the database 11 needs to be restored, the operating system controls the database 11 to be restored to the nomount state. In the nomount state, the operating system is used to create one or more empty databases 11 that do not contain any valid data. The backup database 11 interface and the sqlplus command are used to call the backup data of the database 11, and the control file in the database 11 is restored. During the recovery process, the newly created single empty data file or multiple empty data files will be renamed so that the restored database 11 has a unique directory path and file name to avoid overwriting the original database 11, and a recovery archive log is created and a temporary table space is rebuilt. After the reconstruction is completed, the database 11 is encrypted by the SHA256 encryption algorithm and returned after encryption;
[0054] The setting of the recovery and verification method process can establish a recovery strategy for the database 11 of the production environment 1, so that the recovery object, recovery process and recovery time can be effectively controlled according to the parameters of the recovery strategy to improve the reliability and efficiency of the recovery, and the recovery data can be decoded, authenticated and encrypted by generating a hash key to improve the security of the database data and the platform. At the same time, the platform can also have high performance and low latency functions.
[0055] Currently, the recovery verification platform supports five databases, including Oracle, DB2, Informix, Sql Server, and MySQL11. Taking Oracle as an example, the recovery process and method are described as follows:
[0056] Oracle's backup and recovery interface is called rman. The entire recovery process controls the database 11 to be restored to the nomount state through the operating system. This process only creates an empty database without any valid data and a general recovery strategy parameter file for use. Of course, the recovery strategy parameters can also be customized; then a series of operations such as restoring the control file and restoring the database file are performed. Dozens of rman and sqlplus commands are required in the recovery process, and these commands are connected in series through a preset automated recovery process. The data files will be renamed during the recovery process to ensure that the restored database 11 has a unique directory path and file name. This approach can not only avoid overwriting the original database, but also restore multiple databases 11 at the same time.
[0057] Verification and reporting:
[0058] After the temporary table space is rebuilt, the database 11 is opened for verification, and the recovery process and results of the database 11 are verified. The detailed log can also be viewed through the management node 31.
[0059] When the SHA256 encryption algorithm is used to decode, authenticate or encrypt the database 11, the SHA256 encryption algorithm will generate a 256-bit hash value for the collected data of any length in the database 11, which is called a key string. This key string is usually an array of 32 bytes in length, with each byte being 8 bits, and 32*8 being 256 bits in total. The process of the encryption algorithm module performing hash encryption on the data is as follows:
[0060] No matter how large the data blocks in the database 11 are, they can be divided into 1 to n databases (blocks). A block is the smallest storage and processing unit in the database 11, and contains the header information data or PL / SQL code of the block itself. After encrypting these data using the SHA256 encryption algorithm, a 256-bit key string will be obtained. This key string is used to verify data integrity.
[0061] When a small change is made to the data block data in the database 11, the generated Hash key will change greatly, for example:
[0062] The key string obtained by using the hash function SHA256 after 1122334455667788 (original data) is:
[0063] 1DCE6604591EFB439D5E87418A1D00DBFD014327D8C4DEA862815714B76AE9A5
[0064] The key string obtained by using the hash function SHA256 after 0122334455667788 (modified data) is:
[0065] 2B85738907AB2C4C39DFFFDD5328A694F4DF04B75E6F482F832279C6BBFE8530
[0066] From the above data, it can be seen that the encryption algorithm module in the nmfast component of the present application only needs to change one digit of the original data, which will make the generated Hash key string form a completely different long string, so that a large amount of data can be named, stored and restored without duplication, thereby effectively avoiding the problem of key string overlap and replacement of the original data.
[0067] The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A database automatic recovery verification platform based on NetBackup backup, characterized in that: It comprises a production environment (1) and a backup test environment (3), wherein the production environment (1) is provided with a database (11). The backup test environment (3) includes a management node (31) and a plurality of recovery nodes (32) capable of dynamic horizontal expansion, wherein the recovery node (32) is connected to the management node (31) via an agreed port. The management node (31) is used to configure, schedule and manage the recovery node (32) in the backup test environment (3); Each of the recovery nodes (32) is used to recover, verify and desensitize the data in the database (11) under the scheduling and management of the management node (31); The management node (31) and the recovery node (32) are both connected to the port of the database (11), and the management node (31) is connected to a NetBackup client component via a port of a RESTful framework (34); A database recovery component and a plurality of backup domains (321) connected to the database recovery component are installed in each recovery node (32); a NetBackup backup system (323) is installed in the database recovery component; open source software with a nmfast component is installed in the NetBackup backup system (323); the nmfast component is provided with a fastAPI; the fast API is provided with a key authentication module and an encryption algorithm module for authenticating and encrypting the database (11); the encryption algorithm module is connected to the key authentication module.
2. The database automatic recovery verification platform based on NetBackup backup according to claim 1 is characterized in that: The database recovery component has a built-in recovery template, and the recovery template is used to automatically recover the database.
3. The database automatic recovery verification platform based on NetBackup backup according to claim 1 is characterized in that: The open source software is a combination of fast api open source software and nmfast components.
4. The database automatic recovery verification platform based on NetBackup backup according to claim 1, characterized in that: Each of the recovery nodes (32) is provided with a data extraction module (324).
5. The database automatic recovery verification platform based on NetBackup backup according to claim 1 is characterized in that: The encryption algorithm module is provided with a SHA256 encryption algorithm.
6. The database automatic recovery verification platform based on NetBackup backup according to claim 1, characterized in that: The agreed port is listening port 9307.
7. A method for automatically restoring and verifying a database based on NetBackup backup adopts a database automatically restoring and verifying platform based on NetBackup backup as described in any one of claims 1 to 6, characterized in that: The specific steps of the recovery and verification method are as follows: S1. Recovery strategy The administrator configures corresponding parameters according to the type of recovery data, and saves the recovery strategy parameters in a database (11) built into the production environment (1); S2. Automated recovery The management node (31) generates a public key and a mother key through the operating system interface of the NetBackup client component or by sending a key generation command line to decode the database (11), pair the generated mother key with the public key, authenticate through the key, and after authentication, send a recovery instruction for the data in the database (11) to the recovery node (32), the recovery node (32) receives the recovery request through the API port in the nmfast component, and the recovery node (32) recovers, verifies and desensitizes the data in the database (11) through the data extraction module (324) and the desensitization module and the port of the database (11); When the database (11) needs to be restored, the operating system controls the database (11) to be restored to the nomount state. In the nomount state, the operating system is used to create one or more empty databases (11) that do not contain any valid data. The backup database (11) interface and the sqlplus command are used to call the backup data of the database (11), and the control file in the database (11) is restored. During the recovery process, the newly created single empty data file or multiple empty data files will be renamed so that the restored database (11) has a unique directory path and file name to avoid overwriting the original database (11). A recovery archive log is created and a temporary table space is rebuilt. After the reconstruction is completed, the database (11) is encrypted using the SHA256 encryption algorithm and returned after encryption. S3, Validation and Reporting After the temporary table space is rebuilt, open the database (11) for verification, and verify the progress and results of the database (11) recovery. You can also view detailed logs through the management node (31).
8. The method for automatic database recovery verification based on NetBackup backup according to claim 7, characterized in that: A recovery strategy in step S1 is composed of multiple parameters, including a custom recovery strategy name, label, Master Server name, source client, data type, backup strategy, recovery server, recovery target time point, additional parameters, recovery start time point, number of days to retain recovery data, script file, cyclic recovery interval, shutdown after recovery, and deletion after recovery.
9. The method for automatic database recovery verification based on NetBackup backup according to claim 7, characterized in that: The type of the database (11) in step S1 is one or more of Oracle, DB2, Informix, Sql Server or MySQL.
10. The method for automatic database recovery verification based on NetBackup backup according to claim 7, characterized in that: The public key and the parent key in step S2 are Hash keys.