Data recovery method and system
Through an integrated operation interface and automated call instruction triggering function module, the data recovery process is simplified, the high cost and inefficiency problems caused by manual operations are solved, and efficient data recovery is achieved.
Patent Information
- Application Number
- CN202211663215.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-12-23
AI Technical Summary
There are a lot of manual operations in the existing data recovery process, resulting in high labor costs, prone to errors and low recovery efficiency.
The integrated operation interface is adopted, and the corresponding functional modules are automatically triggered through the control bar to edit file names and dates, JCL jobs, backup library identification, backup job selection and recovery job generation, simplifying the operation process.
It reduces manual operation steps, reduces labor costs, avoids operational errors, shortens data recovery time, and improves recovery efficiency.
Smart Images

Figure CN115840666B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of file systems, and in particular to a data recovery method and system. Background Art
[0002] Currently, data recovery mainly involves manually searching the corresponding backup job library for the file to be recovered based on the date of the file to be recovered, determining the file name of the backup job corresponding to the file to be recovered, and then searching the file management system for the volume label corresponding to the file name of the backup job based on the file name of the backup job. Then, fill in the file name to be recovered, the file name of the backup job, and the volume label information in the recovery job template to obtain a recovery job, thereby realizing data recovery.
[0003] Since there are a lot of manual operations in the entire data recovery process, not only is the labor cost high, but there is also the possibility of some manual errors in the operation process, resulting in data recovery failure or data recovery errors. In addition, a large number of manual operations result in a longer data recovery time, which reduces the efficiency of data recovery. Summary of the Invention
[0004] In view of this, an embodiment of the present invention provides a data recovery method and system to achieve the purpose of improving data recovery efficiency.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of an embodiment of the present invention discloses a data recovery method, comprising:
[0007] Invoking an integrated operation interface, wherein a control bar is provided on the integrated operation interface, wherein the control bar is used to input different call instructions, each call instruction corresponding to a pre-built functional module, and each call instruction triggers the execution of a function of the corresponding functional module;
[0008] If the input is the first call instruction, the editing function is triggered to edit the file name and recovery date to be restored;
[0009] If the input is the second call instruction, the JCL job is triggered to execute, and the library to which the target backup library belongs is identified and determined according to the file name to be restored and the restoration date;
[0010] Searching for the corresponding database and determining the target backup database based on the recovery date;
[0011] Traversing the target backup repository, screening the backup jobs that match the file name to be restored, and storing them in an output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job;
[0012] If the input is the third call instruction, the output file editing function is triggered to check whether all the to-be-restored file names in the output file correspond to the backup file names. If they do correspond, the backup job to be output corresponding to the backup file name is obtained;
[0013] If the input is the fourth call instruction, the recovery function is triggered to execute, the volume label to which the backup job to be output belongs is traversed, the obtained volume label information, the name of the file to be restored and the backup file name are input into the recovery job template, the recovery job is generated, and the recovery job is output to the result library;
[0014] If the input is the fifth call instruction, a renaming function is triggered to rename the result library.
[0015] Optionally, the process of pre-building a corresponding functional module for each call instruction includes:
[0016] Edit the command lines and configure the function description for each command line. Each command line corresponds to a call instruction.
[0017] Editing underlying functional modules based on the functional description of the command line configuration, wherein the underlying functional modules include an editing functional module, a JCL job execution module, an output file editing functional module, a restore functional module, and a rename functional module;
[0018] The underlying functional modules indicating the same function are associated with the calling instructions, so that each calling instruction triggers the execution of the function of the corresponding functional module.
[0019] Optionally, if the input is a second call instruction, triggering the execution of a JCL job, identifying and determining the library to which the target backup library belongs based on the file name to be restored and the restoration date includes:
[0020] If the input is the second call instruction, the JCL job is triggered to call the background REXX program to identify the first extension HLQ in the file name to be restored;
[0021] Determining whether the first extension HLQ indicates a domestic file or a foreign file;
[0022] If the instruction is for a domestic file, determine that the target backup repository belongs to a domestic repository;
[0023] If the instruction is for a foreign file, make sure that the target backup library belongs to a foreign library.
[0024] Optionally, searching for the corresponding repository and determining the target backup repository based on the recovery date includes:
[0025] Search for the corresponding library and output all backup job libraries containing the library name of the target backup library to an array;
[0026] Traversing the backup job libraries in the array based on the restoration date, and obtaining a first backup job library whose backup date is greater than or equal to the restoration date;
[0027] Determining whether the first backup operation library is a normal library;
[0028] If so, determining the first backup operation repository as the target backup repository;
[0029] If not, continue traversing the array.
[0030] Optionally, determining whether the first backup job repository is a normal repository includes:
[0031] Determining whether the number of data sets in the first backup job library exceeds 60;
[0032] If it exceeds, determining that the first backup operation library is a normal library;
[0033] If not, it is determined that the first backup operation library is an abnormal library.
[0034] Optionally, traversing the target backup repository, screening the backup jobs that match the file name to be restored, and storing them in the output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job, including:
[0035] Traversing the target backup repository, and outputting all jobs in the target backup repository to a data set array;
[0036] Traverse the dataset array, read the content of each job row by row and write it into the job array;
[0037] Loop through the job array, obtain each line of the job in each loop, and determine the backup job based on each line of the read content;
[0038] Determining whether the backup job matches the file name to be restored;
[0039] If there is a match, find and locate the row where the backup file name of the backup job is located, and obtain the backup file name from the row;
[0040] The data is stored in the output file in the format of the to-be-restored file name, the restoration date, and the backup file name of the backup job.
[0041] Optionally, also include:
[0042] If the file name to be restored does not correspond to the backup file name, the editing function is triggered to re-edit the file name to be restored.
[0043] A second aspect of an embodiment of the present invention discloses a data recovery system, including:
[0044] An interface control module is used to call up an integrated operation interface. A control bar is provided on the integrated operation interface. The control bar is used to input different call instructions. Each call instruction corresponds to a pre-built function module. Each call instruction triggers the execution of the function of the corresponding function module. If the input is the first call instruction, the editing function module is executed;
[0045] The editing function module is used to trigger the execution of the editing function, edit the file name to be restored and the restoration date, and if the input is the second call instruction, execute the JCL job module;
[0046] The JCL job module is used to trigger the execution of the JCL job, identify and determine the library to which the target backup library belongs based on the file name to be restored and the restoration date, search the library to which it belongs, determine the target backup library based on the restoration date, traverse the target backup library, screen the backup jobs that match the file name to be restored, and store them in the output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job; if the input is a third call instruction, execute the output file editing function module;
[0047] The output file editing function module is used to trigger the execution of the output file editing function, check whether all the to-be-restored file names in the output file correspond to the backup file names, and if so, obtain the backup job to be output corresponding to the backup file name, and if the input is a fourth call instruction, execute the recovery function module;
[0048] The recovery function module is used to trigger the execution of the recovery function, traverse the volume label of the backup job to be output, input the obtained volume label information, the file name to be restored and the backup file name into the recovery job template, generate the recovery job, output it to the result library, and execute the rename function module if the input is the fifth call instruction;
[0049] The renaming function module is used to trigger the execution of the renaming function to rename the result library.
[0050] Optionally, when the input is a second call instruction, triggering the execution of a JCL job, identifying and determining the library to which the target backup library belongs based on the file name to be restored and the restoration date, the JCL job module is specifically configured to:
[0051] If the input is the second call instruction, the JCL job is triggered to call the background REXX program to identify the first extension HLQ in the file name to be restored, and determine whether the first extension HLQ indicates a domestic file or a foreign file. If it indicates a domestic file, the library to which the target backup library belongs is determined to be a domestic library. If it indicates a foreign file, the library to which the target backup library belongs is determined to be a foreign library.
[0052] Optionally, when searching for the corresponding library and determining the target backup library based on the recovery date, the JCL job module is specifically configured to:
[0053] Search for the corresponding library, output all backup job libraries containing the library name of the target backup library to an array, traverse the backup job libraries in the array based on the recovery date, and when a first backup job library with a backup date greater than or equal to the recovery date is obtained, determine whether the first backup job library is a normal library. If so, determine that the first backup job library is the target backup library. If not, continue traversing the array.
[0054] Based on the above-mentioned embodiment of the present invention, a data recovery method and system are provided, which includes: calling up an integrated operation interface, a control bar is set on the integrated operation interface, the control bar is used to input different call instructions, each call instruction corresponds to a pre-built functional module, and each call instruction triggers the execution of the function of the corresponding functional module; if the input is a first call instruction, the execution of the editing function is triggered to edit the file name and recovery date to be restored; if the input is a second call instruction, the execution of the JCL job is triggered, and the library to which the target backup library belongs is identified and determined based on the file name and recovery date to be restored; searching for the library to which it belongs, and determining the target backup library based on the recovery date; traversing the target backup library, and screening the files that meet the requirements A backup job of the file name to be restored is stored in the output file in the format of the file name to be restored, the restoration date and the backup file name of the backup job; if the input is the third call instruction, the output file editing function is triggered to check whether all the file names to be restored in the output file correspond to the backup file names, and if they do correspond, the backup job to be output corresponding to the backup file name is obtained; if the input is the fourth call instruction, the recovery function is triggered to traverse the volume label to which the backup job to be output belongs, and the obtained volume label information, the file name to be restored and the backup file name are input into the recovery job template to generate a recovery job, and output it to the result library; if the input is the fifth call instruction, the renaming function is triggered to rename the result library.
[0055] In an embodiment of the present invention, different call instructions input in the control bar based on the integrated operation interface trigger the execution of functions of different functional modules, which can quickly generate recovery jobs and output them to the result library, thereby completing data recovery, simplifying the manual operation steps in the data recovery process, and reducing labor costs. At the same time, different call instructions input in the control bar based on the integrated operation interface automatically trigger the execution of functions of corresponding functional modules, avoiding manual operation errors, shortening the data recovery time, and thus improving the efficiency of data recovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0057] Figure 1 A flowchart of a data recovery method provided by an embodiment of the present invention;
[0058] Figure 2 For specific implementation Figure 1 Flowchart of S11 in FIG.
[0059] Figure 3 A schematic structural diagram of another data recovery system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0061] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0062] like Figure 1 A data recovery method provided by an embodiment of the present invention is shown, and the data recovery method includes:
[0063] S11: calling up the integrated operation interface, and setting a control bar on the integrated operation interface.
[0064] In S11 , the control bar is used to input different calling instructions, each calling instruction corresponds to a pre-built functional module, and each calling instruction triggers the execution of a function of the corresponding functional module.
[0065] In S11, different call instructions can be pre-set with different numerical indications, for example, the first call instruction is 1, the second call instruction is 2, and so on.
[0066] In the specific execution process of S11, EX is input before the integrated operation interface entry file MAIN to call the integrated operation interface, that is, to open the integrated operation interface. A control bar is displayed on the integrated operation interface, and a number is input in the control bar to trigger the execution of the corresponding call instruction.
[0067] S12: If the input is the first call instruction, the editing function is triggered to edit the file name and the recovery date to be restored.
[0068] In the specific execution process of S12, based on the first call instruction input in the control bar of the integrated operation interface, the editing function is triggered, and the file name and restoration date to be restored separated by spaces are obtained based on the editing bar.
[0069] S13: If the input is the second call instruction, the JCL job is triggered to execute, and the library to which the target backup library belongs is identified and determined according to the file name to be restored and the restoration date.
[0070] During the specific execution of S13, based on the second call instruction input in the control bar of the integrated operation interface, the JCL job is triggered to execute, and the library to which the target backup library belongs is identified and determined according to the file name to be restored and the restoration date.
[0071] In S13, the library can be a domestic library or a foreign library.
[0072] In one embodiment of the present invention, the specific process of triggering the execution of a JCL job, identifying and determining the library to which the target backup library belongs based on the file name to be restored and the restoration date is as follows:
[0073] First, the execution of the JCL job is triggered according to the second calling instruction, and the background REXX program is called to identify the first extension HLQ in the file name to be restored.
[0074] Then, determine whether the first extension HLQ indicates a domestic file or a foreign file. If it indicates a domestic file, determine that the target backup library belongs to a domestic library; if it indicates a foreign file, determine that the target backup library belongs to a foreign library.
[0075] For example, the latest domestic library is named BMC.APP.SYS.JCL, and the historical domestic library is named BMC.APP.SYS.JCL.DXXXXXX, where XXXXXX is a date in the yymmdd format.
[0076] Taking the 2209013 backup job as an example, if the 2209013 backup job is modified, a copy of the library to which the 2209013 backup job belongs before the modification will be backed up with the name BMC.APP.SYS.JCL.D220912, and the library name of the library to which the 2209013 backup job belongs after the modification will be used as the latest library name BMC.APP.SYS.JCL.
[0077] For example, the latest foreign library is named BMC.APP.SYS.JCL.NOBS, and the historical foreign library is named BMC.APP.SYS.JCL.NOBS.DXXXXXX. Similarly, XXXXXX is the date in the yymmdd format.
[0078] By executing S13 , it is possible to determine in which library to perform subsequent query based on the first extension HLQ in the file name to be restored.
[0079] S14: Search for the corresponding library and determine the target backup library based on the recovery date.
[0080] During the specific execution of S14, the domestic library or the foreign library is determined based on the execution of S13, all backup libraries in the library are searched, and the target backup library is determined based on the recovery date.
[0081] In one embodiment of the present invention, the specific process of searching for the corresponding repository and determining the target backup repository based on the recovery date is as follows:
[0082] First, find the owning library and output all backup job libraries containing the library name of the target backup library to an array.
[0083] Among them, when the library to which it belongs is a domestic library, the domestic library is searched, and through the "LISTDSLVL" domestic library, all backup job libraries (PDS) containing the library name of the target backup library are traversed and output to the array.
[0084] Then, the backup job libraries in the array are traversed based on the recovery date, and the first backup job library with a backup date greater than or equal to the recovery date is obtained.
[0085] Specifically, the backup job libraries in the array are looped based on the recovery date until the first backup job library with a date greater than or equal to the recovery date is found, and the backup job library is used as the first backup job library.
[0086] Then, it is determined whether the first backup operation library is a normal library. If so, the first backup operation library is determined to be the target backup library. If not, the array is traversed continuously until all arrays are traversed or the target backup library is obtained.
[0087] The normal library refers to the backup job library that contains full backup jobs.
[0088] In one embodiment of the present invention, determining whether the first backup job repository is a normal repository includes:
[0089] It is determined whether the number of data sets in the first backup operation library exceeds 60. If so, the first backup operation library is determined to be a normal library; if not, the first backup operation library is determined to be an abnormal library.
[0090] It's important to note that for occasional special production backups, host operations personnel will back up special repositories. These repositories are also known as non-normal repositories, and they may not have daily backup jobs. Therefore, it's necessary to determine whether the first backup job repository contains a complete backup job and is a complete repository. Since backup jobs all begin with "K," determining whether the first backup job repository is complete is determined by the number of jobs beginning with "K."
[0091] S15: traverse the target backup repository, select the backup job that matches the file name to be restored, and store it in the output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job.
[0092] In S15 , the backup job that matches the name of the file to be restored is the backup job that matches the name of the file to be restored.
[0093] In one embodiment of the present invention, the specific implementation process of traversing the target backup repository, screening the backup jobs that match the file name to be restored, and storing them in the format of the file name to be restored, the restoration date, and the backup file name of the backup job is as follows:
[0094] First, traverse the target backup library and output all jobs in the target backup library to the dataset array.
[0095] Specifically, the target backup library is traversed through the "LISTDSMEMBERS" command, and all jobs in the target backup library are output to the MEMBER array, that is, to the dataset array.
[0096] Then, iterate over the dataset array, reading and writing the contents of each job row by row into the job array.
[0097] Specifically, execute the "EXECIO*DISKRIN" command to read each job content into the job array line by line.
[0098] Then, loop through the job array, get each line of the job each time through the loop, and determine the backup job based on each line read.
[0099] Specifically, the "INDEX(row, 'PGM=ADRDSSU')" command is executed to match the backup job PGM to determine whether it is a backup job, thereby determining the backup job.
[0100] Among them, PGM is the JCL program in the Z / OS system. Each step of the JCL job must define a PGM. Each type of PGM has a relatively fixed format. The PGM of all backup jobs is defined as ADRDSSU. Whether it is a backup job is determined by whether the PGM in the backup job is 'PGM = ADRDSSU'.
[0101] Then, determine whether the backup job matches the file name to be restored. If so, find and locate the line where the backup job's backup file name is located, and obtain the backup file name from that line.
[0102] Specifically, the "INDEX (row, file name to be restored)" command is executed to match the file name to be restored to determine whether the backup job includes the file to be restored.
[0103] It should be noted that a backup job will have an include definition. The include definition of each backup job determines which specific files are backed up by this backup job. Since the host system file volume stored in the backup job is very large, the file name here generally contains wildcard characters such as % or * to adapt to related files.
[0104] After processing the files to be restored, compare them with the included parts in the backup job to check whether the backup job has backed up the files to be restored.
[0105] For example, if a backup job backs up the file FCND1AFT.ULADTP.TBAFARL0.PS.A*1, and the file to be restored is the file named FCND1AFT.ULADTP.TBAFARL0.PS.A001, it will match FCND1AFT.ULADTP.TBAFARL0.PS. Therefore, it can be considered that the backup job contains the file to be restored.
[0106] Specifically, if there is a match, execute the "INDEX(row,'DSN=')" command to find the row where the backup file name of the backup job is located, then locate the row where the backup file name of the backup job is located through POS('DSN=',row) and POS('D%%ODATE',row), and finally SUBSTR intercepts the backup file name according to the row.
[0107] Finally, the file is stored in the output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job.
[0108] Specifically, it is stored in the output file in the format of the file to be restored + space + restoration date + space + backup file name.
[0109] It should be noted that, during the execution of S15 , if the file name to be restored does not correspond to the backup file name, the editing function is triggered to re-edit the file name to be restored.
[0110] S16: If the input is the third call instruction, the output file editing function is triggered to check whether all the names of the files to be restored in the output file correspond to the backup file names.
[0111] During the specific execution of S16, based on the third call instruction input in the control bar of the integrated operation interface, the output file editing function is triggered to check whether all the names of the files to be restored in the output file correspond to the backup file names.
[0112] S17: If both are corresponding, obtain the backup job to be output corresponding to the backup file name.
[0113] S18: If the input is the fourth call instruction, the recovery function is triggered, the volume label of the backup job to be output is traversed, the obtained volume label information, the file name to be restored and the backup file name are input into the recovery job template, the recovery job is generated, and output to the result library.
[0114] In S18 , the result library is pre-built and used to store current or historical recovery jobs.
[0115] The file name to be restored is the file name with wildcard characters in the backup job include. The file name to be restored can be manually modified according to the specific file name to be restored. Try to minimize wildcard characters for accurate recovery to avoid restoring a large number of invalid files and occupying disk space.
[0116] During the specific execution of S18, the fourth call instruction entered in the control bar of the integrated operation interface triggers the execution of the recovery function, executes JCL to call REXX of the background job generation, traverses the backup job to be output, operates on each line, and searches for the backup file name in the file management system, traverses the volume label to which the backup job to be output belongs, and inputs the obtained volume label information, the file name to be restored and the backup file name into the recovery job template to generate a complete recovery job, which is output to the result library.
[0117] S19: If the input is the fifth call instruction, the rename function is triggered to rename the result library.
[0118] During the specific execution of S19, the fifth call instruction entered in the control bar of the integrated operation interface triggers the execution of the renaming function, and renames the result library by adding the suffix ".P*". * will automatically increase by 1 and will not overwrite the existing result library, avoiding overwriting of the generated results and supporting simultaneous use by multiple people.
[0119] It should be noted that during data recovery, call instructions are entered sequentially, and the next call instruction is executed after the previous call instruction is completed. That is, the first call instruction, the second call instruction, the third call instruction, the fourth call instruction, and the fifth call instruction are executed in sequence, and jumps are made based on the functions triggered by each call instruction.
[0120] In an embodiment of the present invention, different call instructions input in the control bar based on the integrated operation interface trigger the execution of functions of different functional modules, which can quickly generate recovery jobs and output them to the result library, thereby completing data recovery, simplifying the manual operation steps in the data recovery process, and reducing labor costs. At the same time, different call instructions input in the control bar based on the integrated operation interface automatically trigger the execution of functions of corresponding functional modules, avoiding manual operation errors, shortening the data recovery time, and thus improving the efficiency of data recovery.
[0121] Based on the data recovery method provided by the above embodiment of the present invention, Figure 1 In step S11 shown, the process of pre-building a corresponding functional module for each call instruction includes the following steps: Figure 2 The process shown specifically includes:
[0122] S21: Edit the command lines and configure a function description for each command line, where each command line corresponds to a calling instruction.
[0123] During the specific execution of S21 , CMD generates function description interfaces 1 to 6, so that different command lines correspond to call instructions with different numbers.
[0124] For example: Command line "1" corresponds to the first call instruction. Command line "2" corresponds to the second call instruction. Command line "3" corresponds to the third call instruction. Command line "4" corresponds to the fourth call instruction. Command line "5" corresponds to the fourth call instruction.
[0125] S22: Edit the underlying functional modules based on the functional description of the command line configuration.
[0126] In S22, the bottom functional modules include an editing functional module, a JCL job execution module, an output file editing functional module, a recovery functional module and a renaming functional module.
[0127] In the specific execution process of S22, editing the underlying functional module includes: establishing a backup job library (PDS) for input of the second call instruction (2); generating REXX and JCL of the search function; establishing a search result file for input of the second call instruction (2) and the fourth call instruction (4); generating a job JCL; building a renaming library and automatically superimposing it for input of the fifth call instruction (5); and viewing the 5-name library.
[0128] S23: Associating the underlying functional modules indicating the same function with the calling instructions, so that each calling instruction triggers the execution of the function of the corresponding functional module.
[0129] For example, the editing function module is associated with the first calling instruction, so as to trigger the execution of the function of the editing function module based on the first calling instruction input in the control bar of the integrated operation interface.
[0130] The JCL job module execution is associated with the second call instruction, so as to trigger the function of executing the JCL job module based on the second call instruction input in the control bar of the integrated operation interface.
[0131] The output file editing function module is associated with the third calling instruction, so as to trigger the function of the execution file editing function module based on the third calling instruction input in the control bar of the integrated operation interface.
[0132] The recovery function module is associated with the fourth calling instruction, so as to trigger the execution of the function of the recovery function module based on the fourth calling instruction input in the control bar of the integrated operation interface.
[0133] The renaming function module is associated with the fifth calling instruction to trigger the execution of the function of the renaming function module based on the integrated operation interface.
[0134] In the embodiment of the present invention, by associating different calling instructions with functional modules, the function of automatically triggering the execution of corresponding functional modules based on different calling instructions is achieved, which greatly simplifies manual operations.
[0135] Based on the data recovery method provided by the above embodiment of the present invention, the embodiment of the present invention also provides a corresponding data recovery system, such as Figure 3 As shown, the data recovery system includes:
[0136] The interface control module 31 is used to call up the integrated operation interface. A control bar is set on the integrated operation interface. The control bar is used to input different call instructions. Each call instruction corresponds to a pre-built functional module. Each call instruction triggers the execution of the function of the corresponding functional module. If the input is the first call instruction, the editing function module 32 is executed.
[0137] The editing function module 32 is used to trigger the execution of the editing function to edit the file name and the recovery date to be restored. If the input is the second calling instruction, the JCL operation module 33 is executed.
[0138] The JCL job module 33 is used to trigger the execution of the JCL job, identify and determine the library to which the target backup library belongs based on the name of the file to be restored and the restoration date, search the library to which it belongs, determine the target backup library based on the restoration date, traverse the target backup library, filter the backup jobs that meet the file name to be restored, and store them in the output file in the format of the file name to be restored, the restoration date and the backup file name of the backup job. If the input is the third call instruction, the output file editing function module 34 is executed.
[0139] The output file editing function module 34 is used to trigger the execution of the output file editing function, check whether all the names of the files to be restored in the output file correspond to the backup file names, and if so, obtain the backup job to be output corresponding to the backup file name. If the input is the fourth call instruction, execute the recovery function module 35.
[0140] In one embodiment of the present invention, the output file editing function module 34 is used to return to the editing function module 32 if the file name to be restored does not correspond to the backup file name, trigger the editing function, and re-edit the file name to be restored.
[0141] The recovery function module 35 is used to trigger the execution of the recovery function, traverse the volume label to which the backup job to be output belongs, input the obtained volume label information, the file name to be restored and the backup file name into the recovery job template, generate the recovery job, and output it to the result library. If the input is the fifth call instruction, the rename function module 36 is executed.
[0142] The renaming function module 36 is used to trigger the execution of the renaming function and rename the result library.
[0143] In one embodiment of the present invention, the data recovery system further includes a pre-configuration module.
[0144] The pre-configuration module is used to edit command lines and configure a function description for each command line, where each command line corresponds to a call instruction; based on the function description configured in the command line, the underlying function modules are edited, where the underlying function modules include an editing function module, a JCL job execution module, an output file editing function module, a recovery function module, and a renaming function module; and the underlying function modules indicating the same function are associated with the call instruction so that each call instruction triggers the execution of the function of the corresponding function module.
[0145] In one embodiment of the present invention, when the input is the second call instruction, triggering the execution of the JCL job, identifying and determining the library to which the target backup library belongs based on the file name to be restored and the restoration date, the JCL job module 33 is specifically configured to:
[0146] If the input is the second call instruction, the JCL job is triggered to call the background REXX program to identify the first extension HLQ in the file name to be restored, and determine whether the first extension HLQ indicates a domestic file or a foreign file. If it indicates a domestic file, the target backup library is determined to be a domestic library. If it indicates a foreign file, the target backup library is determined to be a foreign library.
[0147] In one embodiment of the present invention, when searching for the corresponding repository and determining the target backup repository based on the recovery date, the JCL job module 33 is specifically configured to:
[0148] Search for the corresponding library and output all backup libraries containing the target backup library's library name to an array. Traverse the backup libraries in the array based on the recovery date. When the first backup library with a backup date greater than or equal to the recovery date is obtained, determine whether the first backup library is a normal library. If so, determine that the first backup library is the target backup library. If not, continue traversing the array.
[0149] Specifically, when determining whether the first backup job library is a normal library, the JCL job module 33 is specifically used to determine whether the number of data sets in the first backup job library exceeds 60; if it exceeds, the first backup job library is determined to be a normal library; if not, the first backup job library is determined to be an abnormal library.
[0150] In one embodiment of the invention, a JCL job module 33 is configured to traverse the target backup repository, filter backup jobs that match the file name to be restored, and store the files in the format of the file name to be restored, the restoration date, and the backup file name of the backup job to an output file. The module is specifically configured to traverse the target backup repository, output all jobs in the target backup repository to a data set array; traverse the data set array, read the content of each job by line, and write it into a job array; loop through the job array, obtain the content of each line of the job each time through the loop, and determine the backup job based on the content of each line read; determine whether the backup job matches the file name to be restored; if so, find and locate the line where the backup file name of the backup job is located, and obtain the backup file name from the line where the backup file name is located; and store the files in the format of the file name to be restored, the restoration date, and the backup file name of the backup job to an output file.
[0151] In an embodiment of the present invention, different call instructions input in the control bar based on the integrated operation interface trigger the execution of functions of different functional modules, which can quickly generate recovery jobs and output them to the result library, thereby completing data recovery, simplifying the manual operation steps in the data recovery process, and reducing labor costs. At the same time, different call instructions input in the control bar based on the integrated operation interface automatically trigger the execution of functions of corresponding functional modules, avoiding manual operation errors, shortening the data recovery time, and thus improving the efficiency of data recovery.
[0152] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0153] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0154] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data recovery system, characterized in that: include: An interface control module is used to call up an integrated operation interface. A control bar is provided on the integrated operation interface. The control bar is used to input different call instructions. Each call instruction corresponds to a pre-built function module. Each call instruction triggers the execution of the function of the corresponding function module. If the input is the first call instruction, the editing function module is executed; The editing function module is used to trigger the execution of the editing function, edit the file name to be restored and the restoration date, and if the input is the second call instruction, execute the JCL job module; The JCL job module is used to trigger the execution of the JCL job, identify and determine the library to which the target backup library belongs based on the file name to be restored and the restoration date, search the library to which it belongs, determine the target backup library based on the restoration date, traverse the target backup library, screen the backup jobs that match the file name to be restored, and store them in the output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job; if the input is a third call instruction, execute the output file editing function module; The output file editing function module is used to trigger the execution of the output file editing function, check whether all the to-be-restored file names in the output file correspond to the backup file names, and if so, obtain the backup job to be output corresponding to the backup file name, and if the input is a fourth call instruction, execute the recovery function module; The recovery function module is used to trigger the execution of the recovery function, traverse the volume label of the backup job to be output, input the obtained volume label information, the file name to be restored and the backup file name into the recovery job template, generate the recovery job, output it to the result library, and execute the rename function module if the input is the fifth call instruction; The renaming function module is used to trigger the execution of the renaming function to rename the result library.
2. The data recovery system according to claim 1, wherein: When the input is the second call instruction, triggering the execution of the JCL job, identifying and determining the library to which the target backup library belongs based on the file name to be restored and the restoration date, the JCL job module is specifically configured to: If the input is the second call instruction, the JCL job is triggered to call the background REXX program to identify the first extension HLQ in the file name to be restored, and determine whether the first extension HLQ indicates a domestic file or a foreign file. If it indicates a domestic file, the library to which the target backup library belongs is determined to be a domestic library. If it indicates a foreign file, the library to which the target backup library belongs is determined to be a foreign library.
3. The data recovery system according to claim 1, wherein: When searching for the corresponding library and determining the target backup library based on the recovery date, the JCL job module is specifically used to: Search for the corresponding library, output all backup job libraries containing the library name of the target backup library to an array, traverse the backup job libraries in the array based on the recovery date, and when a first backup job library with a backup date greater than or equal to the recovery date is obtained, determine whether the first backup job library is a normal library. If so, determine that the first backup job library is the target backup library. If not, continue traversing the array.
4. A data recovery method, characterized in that: The data recovery system according to any one of claims 1 to 3, wherein the data recovery method comprises: Invoking an integrated operation interface, wherein a control bar is provided on the integrated operation interface, wherein the control bar is used to input different call instructions, each call instruction corresponding to a pre-built functional module, and each call instruction triggers the execution of a function of the corresponding functional module; If the input is the first call instruction, the editing function is triggered to edit the file name and recovery date to be restored; If the input is the second call instruction, the JCL job is triggered to execute, and the library to which the target backup library belongs is identified and determined according to the file name to be restored and the restoration date; Searching for the corresponding database and determining the target backup database based on the recovery date; Traversing the target backup repository, screening the backup jobs that match the file name to be restored, and storing them in an output file in the format of the file name to be restored, the restoration date, and the backup file name of the backup job; If the input is the third call instruction, the output file editing function is triggered to check whether all the to-be-restored file names in the output file correspond to the backup file names. If they do correspond, the backup job to be output corresponding to the backup file name is obtained; If the input is the fourth call instruction, the recovery function is triggered to execute, the volume label to which the backup job to be output belongs is traversed, the obtained volume label information, the name of the file to be restored and the backup file name are input into the recovery job template, the recovery job is generated, and the recovery job is output to the result library; If the input is the fifth call instruction, a renaming function is triggered to rename the result library.
5. The method according to claim 4, characterized in that The process of pre-building a corresponding functional module for each call instruction includes: Edit the command lines and configure the function description for each command line. Each command line corresponds to a call instruction. Editing underlying functional modules based on the functional description of the command line configuration, wherein the underlying functional modules include an editing functional module, a JCL job execution module, an output file editing functional module, a restore functional module, and a rename functional module; The underlying functional modules indicating the same function are associated with the calling instructions, so that each calling instruction triggers the execution of the function of the corresponding functional module.
6. The method according to claim 4, characterized in that If the input is the second call instruction, the JCL job is triggered to execute, and the target backup library is identified and determined according to the file name to be restored and the restoration date. The library includes: If the input is the second call instruction, the JCL job is triggered to call the background REXX program to identify the first extension HLQ in the file name to be restored; Determining whether the first extension HLQ indicates a domestic file or a foreign file; If the instruction is for a domestic file, determine that the target backup repository belongs to a domestic repository; If the instruction is for a foreign file, make sure that the target backup library belongs to a foreign library.
7. The method according to claim 4, characterized in that Find the corresponding repository and determine the target backup repository based on the recovery date, including: Search for the corresponding library and output all backup job libraries containing the library name of the target backup library to an array; Traversing the backup job libraries in the array based on the restoration date, and obtaining a first backup job library whose backup date is greater than or equal to the restoration date; Determining whether the first backup operation library is a normal library; If so, determining the first backup operation repository as the target backup repository; If not, continue traversing the array.
8. The method according to claim 7, characterized in that Determining whether the first backup job repository is a normal repository includes: Determining whether the number of data sets in the first backup job library exceeds 60; If it exceeds, determining that the first backup operation library is a normal library; If not, it is determined that the first backup operation library is an abnormal library.
9. The method according to claim 4, characterized in that Traversing the target backup repository, screening the backup jobs that match the file name to be restored, and storing them in the format of the file name to be restored, the restoration date, and the backup job's backup file name to an output file, including: Traversing the target backup repository, and outputting all jobs in the target backup repository to a data set array; Traverse the dataset array, read the content of each job row by row and write it into the job array; Loop through the job array, obtain each line of the job in each loop, and determine the backup job based on each line of the read content; Determining whether the backup job matches the file name to be restored; If there is a match, find and locate the row where the backup file name of the backup job is located, and obtain the backup file name from the row; The data is stored in the output file in the format of the to-be-restored file name, the restoration date, and the backup file name of the backup job.
10. The method according to any one of claims 4 to 9, characterized in that Also includes: If the file name to be restored does not correspond to the backup file name, the editing function is triggered to re-edit the file name to be restored.
Citation Information
Patent Citations
Data backup and recovery methods and devices
CN104166600A
Data recovery method and device
CN113448777A