CN116185706A - Data backup method and device, computing and storage medium and electronic equipment - Google Patents

Data backup method and device, computing and storage medium and electronic equipment Download PDF

Info

Publication number
CN116185706A
CN116185706A CN202211578596.4A CN202211578596A CN116185706A CN 116185706 A CN116185706 A CN 116185706A CN 202211578596 A CN202211578596 A CN 202211578596A CN 116185706 A CN116185706 A CN 116185706A
Authority
CN
China
Prior art keywords
backup
data
initial data
result
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211578596.4A
Other languages
Chinese (zh)
Inventor
殷天石
何宏烨
徐伟一
王海华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211578596.4A priority Critical patent/CN116185706A/en
Publication of CN116185706A publication Critical patent/CN116185706A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data backup method, a data backup device, a computing and storage medium and electronic equipment. Relates to the field of data storage. The method comprises the following steps: acquiring a backup log of initial data; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up. By the method and the device, the problems that after data backup errors occur in the related technology, the processing efficiency is low and the error backup and the missing backup are easy to occur when the data is manually backed up again are solved.

Description

Data backup method and device, computing and storage medium and electronic equipment
Technical Field
The present invention relates to the field of data storage, and in particular, to a data backup method, apparatus, computing and storage medium, and electronic device.
Background
In the related art, after the data backup is in error, the reproduction backup is usually performed by adopting a manual backup mode, but the manual processing efficiency is low, which can affect the timeliness of the backup data, and when the data volume of the error backup data is large, the manual re-backup is easy to cause error backup and miss backup, and the integrity of the data is affected.
Aiming at the problems of low processing efficiency and easy occurrence of false backup and missing backup when the data backup is carried out manually after the data backup is in error in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application provides a data backup method, a data backup device, a computing and storage medium and electronic equipment, and aims to solve the problems that in the related art, after data backup is in error, the processing efficiency is low, and error backup and missing backup are easy to occur when the data is manually backed up again.
According to one aspect of the present application, a data backup method is provided. The method comprises the following steps: acquiring a backup log of initial data; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up.
Optionally, the data type of the first backup result information is temporary data, wherein the first backup result information is cleared after the initial data is finished to be backed up again.
Optionally, based on the first backup result information, determining the backup result of the initial data includes: if the first backup result information further comprises a first backup result return code, if the first backup result return code is a number returned when the preset backup fails, the backup result of the initial data is the backup failure; or if the character at the preset character position in the first backup information mark is the corresponding character when the preset backup fails, the backup result of the initial data is the backup failure.
Optionally, based on the first processing countermeasure, re-backing up the initial data includes: determining target data needing to be backed up again in the initial data; writing the target data into the temporary file to obtain a target file; and re-backing up the initial data in a mode of backing up the target file.
Optionally, the method further comprises: obtaining second backup result information of the target file, wherein the second backup result information comprises a second backup result return code and a second backup information mark; judging the backup result of the target file based on the second backup result information; determining a second backup failure reason of the target file and a second processing countermeasure corresponding to the second backup failure reason from a preset processing rule based on a second backup information mark under the condition that the backup result of the target file is that the backup fails; and re-backing up the target file based on the second processing countermeasure.
Optionally, the method further comprises: in the case where the operation of re-backing up the target file reaches a predetermined number of repetitions, the re-backing up for the target file is stopped.
According to another aspect of the present application, a data backup apparatus is provided. The device comprises: the acquisition module is used for acquiring the backup log of the initial data; the scanning module is used for scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; the judging module is used for judging the backup result of the initial data based on the first backup result information; the determining module is used for determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on the first backup information mark under the condition that the backup result is that the backup fails; and the backup module is used for carrying out the backup on the initial data again based on the first processing countermeasure.
Optionally, the data type of the first backup result information is temporary data, wherein the first backup result information is cleared after the initial data is finished to be backed up again.
According to another aspect of the embodiment of the present invention, there is also provided a computer storage medium for storing a program, where the program controls a device in which the computer storage medium is located to perform a data backup method when running.
According to another aspect of embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions execute a data backup method when executed.
Through the application, the following steps are adopted: acquiring a backup log of initial data; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up, the problems that in the related art, after the data is backed up and is in error, the processing efficiency is low, the error backup and the missing backup are easy to occur when the data is manually re-backed up are solved, and further the effects that after the data is backed up and is in error, the data in error can be directly backed up automatically according to a preset processing rule table, each backup work is not needed to be manually interfered, the backup processing efficiency is improved, and the error backup and the missing backup are avoided are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a flow chart of a data backup method provided in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an automatic processing method for IBM mainframe data backup errors provided in accordance with an alternative embodiment of the present application;
FIG. 3 is a schematic diagram of a log reading module provided in accordance with an alternative embodiment of the present application;
FIG. 4 is a schematic diagram of a reason determination module provided according to an alternative embodiment of the present application;
FIG. 5 is a schematic diagram of a re-backup module provided in accordance with an alternative embodiment of the present application;
FIG. 6 is a schematic diagram of a data backup apparatus provided according to an embodiment of the present application;
fig. 7 is a schematic diagram of an electronic device provided according to the present embodiment.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
It should be noted that the data backup method, apparatus, computing and storage medium and electronic device determined by the present disclosure may be used in the field of data storage, and may also be used in any field other than the field of data storage, and the application fields of the data backup method, apparatus, computing and storage medium and electronic device determined by the present disclosure are not limited.
Aiming at the problems of low processing efficiency, easy occurrence of false backup and missing backup when the data is manually re-backed up after the data backup errors in the related technology, a good solution method is not available in the related technology:
based on this, the present application intends to provide a solution to the above technical problem, the details of which will be explained in the following embodiments.
According to an embodiment of the application, a data backup method is provided.
FIG. 1 is a flow chart of a data backup method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S102, obtaining a backup log of initial data;
step S104, scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark;
step S106, based on the first backup result information, judging the backup result of the initial data;
step S108, when the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on the first backup information mark;
step S110, based on the first processing countermeasure, the initial data is backed up again.
After the initial data is backed up, the first backup result information of the initial data can be obtained by scanning the backup log of the initial data, whether all the initial data is backed up successfully or not can be judged based on the first backup result information, and because the first backup result information is obtained by scanning the backup log of the initial data, the corresponding judged backup result can be detailed and comprehensive, for example, which data backup fails can be directly embodied in the backup result information, and in the case that the backup result is the backup failure, the reason of the backup failure of the initial data and the processing countermeasure corresponding to the reason can be determined from the preset processing rule based on the first backup information mark in the first backup result information, then the backup failure data in the initial data can be backed up again based on the processing countermeasure, after the data backup is in error, the backup error data can be directly backed up again according to the preset processing rule table, and each backup work is not required to be manually interfered, the backup processing efficiency is improved, the backup error and error problem of the data is solved when the backup error is easy to be carried out manually, and the error problem of the backup error is low is solved.
If the reason of the failure of the initial data backup and the processing countermeasure corresponding to the reason cannot be determined from the preset processing rule, the manual processing may be shifted to, for example, manually analyze whether the system can perform the re-backup processing by itself, and manually perform the re-backup if the system cannot perform the re-backup by itself.
It should be noted that, the foregoing preset processing rule may expand more backup failure reasons and corresponding processing countermeasures as the backup task proceeds.
Optionally, in the data backup method provided in the embodiment of the present application, the data type of the first backup result information is temporary data, where the first backup result information is cleared after the initial data is finished to be backed up again.
Since a plurality of backup tasks are performed simultaneously, if recording is performed using a regular file, naming of the file is complicated to avoid duplication, and a large number of intermediate files are generated, and cleaning process for these files is complicated after the backup tasks are finished.
In view of the foregoing, in this embodiment of the present application, a manner of making the data type of the first backup result information be temporary data is adopted, for example, log scan results (i.e., the first backup result information) are all set to be system temporary files, and the naming of the system temporary files is automatically generated by the system, so that naming efficiency is improved, and based on the naming of the files automatically generated by the system, the system temporary files can be used only for backup tasks, and after the backup tasks are finished, the system temporary files are automatically cleared without a complex clearing process.
Optionally, in the data backup method provided in the embodiment of the present application, the method for judging the backup result of the initial data may be multiple based on the first backup result information, for example, if the first backup result information further includes the first backup result return code, if the first backup result return code is a number returned when the preset backup fails, the backup result of the initial data is that the backup fails; or if the character at the preset character position in the first backup information mark is the corresponding character when the preset backup fails, the backup result of the initial data is the backup failure.
It should be noted that, the above-mentioned first backup result return code and the first backup information flag may be set according to the actual application requirement when the backup is successful or fails, for example, the first backup result return code may be set to 0 when the backup is completely successful without additional processing, and the first backup result return code may be set to any number (e.g., 8) greater than 0 when the backup is unsuccessful; the last character in the first backup information flag may be used to represent the backup result of the initial data, and different characters may be used to represent different backup conditions or error reasons, for example, character "I" represents that the backup is completed, character "W" represents that the backup is completed but has alarm information, character "E" represents that the backup is wrong, and so on.
It should be noted that, based on the method for judging the backup result, the integrity of the backup data can be improved by adopting a combination of two methods, so as to avoid missing the backup data, for example, after judging that the backup is completed according to the first backup result return code, the first backup information mark corresponding to each piece of data in the initial data can be continuously checked, and the initial data is judged to have completed the backup without error only when the first backup information mark corresponding to each piece of data indicates that the data is successfully backed up.
Optionally, in the data backup method provided in the embodiment of the present application, based on the first processing countermeasure, the re-backup of the initial data includes: determining target data needing to be backed up again in the initial data; writing the target data into the temporary file to obtain a target file; and re-backing up the initial data in a mode of backing up the target file. If the initial data has a backup error, all the initial data is not required to be backed up again, and only the data with failed backup is required to be backed up again, for example, the data corresponding to the first backup information mark containing characters representing the failure of backup or containing alarm information can be determined as target data, and the target data is backed up again.
It should be noted that, when the data volume of the re-backup is large, if the read data exceeds the limit, the direct reading of the target data may cause the error reporting of the backup task, so in the embodiment of the application, the data (i.e. the target data) to be re-backed up is written into the temporary file, and the re-backup is performed by reading the file, so as to avoid the error reporting of the backup task.
Optionally, the method further comprises: in the data backup method provided by the embodiment of the application, second backup result information of the target file is obtained, wherein the second backup result information comprises a second backup result return code and a second backup information mark; judging the backup result of the target file based on the second backup result information; determining a second backup failure reason of the target file and a second processing countermeasure corresponding to the second backup failure reason from a preset processing rule based on a second backup information mark under the condition that the backup result of the target file is that the backup fails; and re-backing up the target file based on the second processing countermeasure. After the re-backup is finished, in order to ensure the correct backup of the data, the backup condition of the target data can be checked again, and the method is similar to the processing of the initial data, the second backup result information can be obtained by obtaining the backup log of the target file, the backup result of the target file is judged according to the second backup result information, and the re-backup is carried out on the data which fails in backup again under the condition that the backup fails.
Optionally, in the data backup method provided in the embodiment of the present application, the method further includes: in the case where the operation of re-backing up the target file reaches a predetermined number of repetitions, the re-backing up for the target file is stopped. If the backup result is still the backup failure after the data which is failed in backup is backed up again for many times, the backup task is prevented from being trapped into long-time circulation by stopping the system to automatically re-backup and sending a method requiring manual intervention prompt in time, and the backup processing is performed manually, so that the complete backup of the data is ensured, and the timely completion of the backup of the data is ensured, so that the timeliness of the backup data is not influenced.
Based on the foregoing embodiment and the optional embodiments, an optional implementation manner is set forth in the present application, and is described below.
The IBM large-scale host data backup is an important link of daily backup of an information system, and is a safe and stable reliable foundation stone of the whole information system. The reasons for error in backup of host data are many, but most of them are due to redefinition of the data by deletion during the backup process. In the initial execution stage of the backup task, the task can read the corresponding relation between the data and the disk from the system and record the corresponding relation in the memory. Because the backup data volume is generally large, the backup tasks are time-consuming sequentially; meanwhile, the data backup is performed online and is completely transparent to the upper layer application. In the backup process, the data may be redefined after being deleted by the application program, so that the corresponding relationship between the data and the disk is changed. When the backup task performs backup, the corresponding relation stored in the memory in advance is read, and the data read from the disk fails to perform backup because the real corresponding relation is changed. The reason for this backup error covers the scenario of most backup errors. Of course, data backup is also subject to other reasons besides the most common backup error reasons, including artificial data name input errors, and the like.
The reasons for the backup errors are not the same, but generally are substantially the same for the post-error processing. In order to ensure the data integrity, the data which is not successfully backed up is backed up again. Based on the above facts, the alternative embodiment design of the present application develops an automatic processing method for data backup errors of an IBM mainframe, and fig. 2 is a flowchart of the automatic processing method for data backup errors of an IBM mainframe provided according to the alternative embodiment of the present application, and as shown in fig. 2, the method includes three modules of log reading, reason judging and re-backup, and the method effectively realizes the automatic processing function after the data backup errors. Meanwhile, in order to standardize the processing range of the backup error, the optional embodiment of the application sets a rule processing list. The list contains the information marks of backup errors which can be automatically processed and accumulated in long-term practice, and can be easily added and automatically matched by programs, so that the automatic backup range is continuously expanded.
The different modules in the method are described separately below.
(1) Module one: log reading module
Fig. 3 is a schematic diagram of a log reading module according to an alternative embodiment of the present application, where the module determines whether a data backup is successful by scanning a backup log. If the backup is completely successful, the backup task return code is automatically set to 0. If the backup task has any warning or error information, the backup task's return code will be greater than 0. According to the alternative embodiment of the application, the backup log is read and the situation of backup errors is analyzed aiming at the situation that the backup task return code is not 0.
Each record is successful or not in backup and generates a piece of information in the log. The information ends with a fixed character, "I" representing that the backup is complete; "W" represents that the backup is completed but there is alarm information; "E" represents a backup error. According to the rule, the completion of the backup is obtained preliminarily by scanning the log, and two types are roughly classified:
1) The backup is all successful while the module return code is set to 0. Since it is important to backup data, in order to avoid missing data, only if all the records of the data backup end with an "I", the backup is considered to be completely successful;
2) There is any backup record ending with "W" or "E", i.e., the backup is considered to fail. And the log result is scanned to obtain the data of the backup error and the corresponding backup error information, and meanwhile, the module return code is set to be 8.
Because the backup tasks are all performed simultaneously, if the conventional files are used for recording, the file naming is complex, a large number of intermediate files can be generated, and the subsequent cleaning is complex. In order to solve the problems, the log scanning results are set to be system temporary files by the log reading module, the system temporary file names are automatically generated by the system, the files can be ensured to be available only in the operation process of the backup task, the temporary files can be automatically cleared once the task is finished, and the temporary files can be shared and accessed by a plurality of modules in the whole operation process of the task.
(2) And a second module: reason judging module
Fig. 4 is a schematic diagram of a reason determining module according to an alternative embodiment of the present application, where the reason determining module mainly completes determining a log reading result, and forms a specific subsequent processing manner, so as to perform a next processing. According to the processing result of the log reading module, the optional embodiments of the present application respectively process:
1) If the module one return code is 0: the backup is completely successful, no additional processing is needed, the whole backup task return code is set to 0, the task is smoothly stopped, and no manual intervention is needed.
2) If the module one return code is 8: indicating that this backup was unsuccessful. In order to ensure that the data is backed up in the absence of errors, an automatic backup process is performed for the error conditions listed in the rule processing list. And according to the information marks corresponding to the data list with failed backup obtained by the log reading module, matching error information marks in the rule processing list one by one, and if each failed information mark belongs to the information mark of the rule processing list, considering that the backup task can automatically process the error backup data. If there is no perfect match, then human intervention is deemed necessary and the backup task return code is set to 13.
The rule processing list lists known scenarios for automatically processing backup errors. These scenarios are experience accumulation from long-term practice and can cover most error scenarios, and as mentioned above, the redefinition of data deletion is the main cause of error reporting of general data backup. After analysis and confirmation, the first data backup error can be automatically processed if the subsequent data backup error is considered to be automatically processed without manual intervention, and the first data backup error can be conveniently and continuously added into the rule processing list. The module automatically matches the rules in the list without excessive intervention.
For example, the error information mark included in the rule list may be ADR321E, ADR905E, ADR380E, etc., and if there is an information mark considered to be automatically processed, only the rule list needs to be added.
(3) And a third module: re-backup module
FIG. 5 is a schematic diagram of a re-backup module according to an alternative embodiment of the present application, although the reasons for the backup error are various, in order to ensure the integrity of the data, the processing manner after the error is to re-backup the data that is not successfully backed up. And the re-backup module performs first re-backup on the error file according to the result obtained by the reason judging module if the backup error can be automatically processed. If the first backup task is completely successful, the task return code is automatically set to 0, and the whole backup task is smoothly stopped without manual intervention.
When the data is re-backed up, if the data volume of the re-backup is larger, the direct reading can lead the read-in data to exceed the limit to cause the error reporting of the backup task. To solve this problem, alternative embodiments of the present application write the file that needs to be reprocessed into a temporary file, and the backup task avoids this problem by reading the temporary file.
And if the backup task return code of the first re-backup is not 0, performing the automatic processing again according to the processing principle. If the backup task of the second backup is still unsuccessful, the optional embodiment of the present application generally sets the entire backup task to return to 11, and the entire backup task is suspended, which indicates that manual intervention is required. The third and fourth re-backup can be performed, and the setting is generally performed according to the actual application requirement.
In summary, the optional implementation manner of the application provides an automatic processing method for backup errors under backup of IBM large-scale host files, which can automatically judge and automatically process various scenes after the backup errors, does not need manual intervention, and greatly improves backup efficiency and backup accuracy.
According to the data backup method, the backup log of the initial data is obtained; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up. The method solves the problems of low processing efficiency, easy error backup and missing backup when the data is manually re-backed up after the data backup is in error in the related technology. After the data backup is in error, the data in error can be automatically and re-backed up directly according to the preset processing rule table, each backup work is not needed to be manually interfered, the backup processing efficiency is improved, and the effects of error backup and missing backup are avoided.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a data backup device, and it should be noted that the data backup device of the embodiment of the application can be used for executing the data backup method provided by the embodiment of the application. The following describes a data backup device provided in an embodiment of the present application.
Fig. 6 is a schematic diagram of a data backup apparatus according to an embodiment of the present application. As shown in fig. 6, the apparatus includes: the device will be described below as an acquisition module 61, a scanning module 62, a judgment module 63, a determination module 64 and a backup module 65.
An obtaining module 61, configured to obtain a backup log of the initial data; the scanning module 62 is connected to the obtaining module 61, and is configured to scan the backup log to obtain first backup result information of the initial data, where the first backup result information includes a first backup information flag; a judging module 63, connected to the scanning module 62, for judging a backup result of the initial data based on the first backup result information; a determining module 64, connected to the judging module 63, configured to determine, based on the first backup information flag, a first backup failure cause of the initial data and a first processing countermeasure corresponding to the first backup failure cause from a preset processing rule, when the backup result is that the backup fails; the backup module 65 is connected to the determining module 64, and is configured to re-backup the initial data based on the first processing countermeasure.
Optionally, in the data backup device provided in the embodiment of the present application, the data type of the first backup result information is temporary data, where the first backup result information is cleared after the initial data is finished to be backed up again.
The data backup device provided by the embodiment of the application acquires the backup log of the initial data by adopting the acquisition module; scanning the backup log by adopting a scanning module to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information by adopting a judging module; adopting a determining module to determine a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark under the condition that the backup result is that the backup fails; the backup module is used for carrying out the re-backup on the initial data based on the first processing countermeasure, so that the problems of low processing efficiency, easy error backup and miss backup when the data is manually re-backed up after the data backup is in error in the related technology are solved, and the effects of directly carrying out the automatic re-backup on the data with error backup according to the preset processing rule table after the data backup is in error are achieved, each backup work is not needed to be manually interfered, the backup processing efficiency is improved, and the error backup and miss backup are avoided.
The data backup device includes a processor and a memory, the acquisition module 61, the scanning module 62, the judgment module 63, the determination module 64, the backup module 65, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and after the data backup is in error, the automatic re-backup can be directly carried out on the data in error according to a preset processing rule table by adjusting the kernel parameters, and each backup work is not needed to be manually interfered, so that the backup processing efficiency is improved, and the effects of error backup and missing backup are avoided.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a program that, when executed by a processor, implements the data backup method.
The embodiment of the invention provides a processor which is used for running a program, wherein the data backup method is executed when the program runs.
An embodiment of the present invention provides an electronic device, fig. 7 is a schematic diagram of the electronic device provided according to the present embodiment, and as shown in fig. 7, the electronic device 70 includes a processor 71, a memory 72, and a program stored on the memory and capable of running on the processor, where the processor implements the following steps when executing the program: acquiring a backup log of initial data; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up. The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: acquiring a backup log of initial data; scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark; judging the backup result of the initial data based on the first backup result information; under the condition that the backup result is that the backup fails, determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on a first backup information mark; based on the first processing countermeasure, the initial data is re-backed up.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method of data backup, comprising:
acquiring a backup log of initial data;
scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark;
judging the backup result of the initial data based on the first backup result information;
determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on the first backup information mark under the condition that the backup result is that the backup fails;
and carrying out re-backup on the initial data based on the first processing countermeasure.
2. The method of claim 1, wherein the data type of the first backup result information is temporary data, and wherein the first backup result information is cleared after the initial data is finished being re-backed up.
3. The method of claim 1, wherein the determining the backup result of the initial data based on the first backup result information comprises:
if the first backup result information further comprises a first backup result return code, if the first backup result return code is a number returned when the preset backup fails, the backup result of the initial data is that the backup fails;
or alternatively, the process may be performed,
and if the character at the preset character position in the first backup information mark is the corresponding character when the preset backup fails, the backup result of the initial data is the backup failure.
4. The method of claim 1, wherein the re-backing up the initial data based on the first processing countermeasure comprises:
determining target data needing to be backed up again in the initial data;
writing the target data into a temporary file to obtain a target file;
and re-backing up the initial data in a mode of backing up the target file.
5. The method according to claim 4, wherein the method further comprises:
acquiring second backup result information of the target file, wherein the second backup result information comprises a second backup result return code and a second backup information mark;
judging the backup result of the target file based on the second backup result information;
determining a second backup failure reason of the target file and a second processing countermeasure corresponding to the second backup failure reason from the preset processing rule based on the second backup information mark under the condition that the backup result of the target file is that the backup fails;
and re-backing up the target file based on the second processing countermeasure.
6. The method of claim 5, wherein the method further comprises:
and stopping the re-backup of the target file under the condition that the re-backup operation of the target file reaches the preset repeated times.
7. A data backup apparatus, comprising:
the acquisition module is used for acquiring the backup log of the initial data;
the scanning module is used for scanning the backup log to obtain first backup result information of the initial data, wherein the first backup result information comprises a first backup information mark;
the judging module is used for judging the backup result of the initial data based on the first backup result information;
the determining module is used for determining a first backup failure reason of the initial data and a first processing countermeasure corresponding to the first backup failure reason from a preset processing rule based on the first backup information mark when the backup result is that the backup fails;
and the backup module is used for carrying out the backup on the initial data again based on the first processing countermeasure.
8. The apparatus of claim 7, wherein the data type of the first backup result information is temporary data, and wherein the first backup result information is cleared after the initial data is finished being re-backed up.
9. A computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform the data backup method of any one of claims 1 to 6.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data backup method of any of claims 1-6.
CN202211578596.4A 2022-12-06 2022-12-06 Data backup method and device, computing and storage medium and electronic equipment Pending CN116185706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211578596.4A CN116185706A (en) 2022-12-06 2022-12-06 Data backup method and device, computing and storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211578596.4A CN116185706A (en) 2022-12-06 2022-12-06 Data backup method and device, computing and storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116185706A true CN116185706A (en) 2023-05-30

Family

ID=86445067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211578596.4A Pending CN116185706A (en) 2022-12-06 2022-12-06 Data backup method and device, computing and storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116185706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116594961A (en) * 2023-07-19 2023-08-15 安徽华云安科技有限公司 File processing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116594961A (en) * 2023-07-19 2023-08-15 安徽华云安科技有限公司 File processing method, device, equipment and storage medium
CN116594961B (en) * 2023-07-19 2023-09-22 安徽华云安科技有限公司 File processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
CN113051155A (en) Control system and control method of automatic test platform
CN109491834B (en) Data recovery method and device applied to database
CN115080398A (en) Automatic interface test system and method
CN116185706A (en) Data backup method and device, computing and storage medium and electronic equipment
CN109542341B (en) Read-write IO monitoring method, device, terminal and computer readable storage medium
CN111435327B (en) Log record processing method, device and system
CN109656825B (en) Method and device for processing art resources, electronic equipment and storage medium
CN110134615B (en) Method and device for acquiring log data by application program
CN116841653A (en) Execution method and device of operation and maintenance job, processor and electronic equipment
CN110928945B (en) Data processing method and device for database and data processing system
CN115617668A (en) Compatibility testing method, device and equipment
CN110471623B (en) Hard disk file writing method, device, computer equipment and storage medium
CN107885839B (en) Method and device for reading information in Word file
CN112286804B (en) System debugging method, device, equipment and medium
CN114936212B (en) Audit data synchronous processing method and device
CN111209206B (en) Automatic test method and system for software products
CN117407293A (en) Method, system, device, storage medium and electronic equipment for detecting target program
CN116108035A (en) Data recovery method and device, processor and electronic equipment
CN117056224A (en) Method, device, terminal equipment and storage medium for testing securities trade data
CN107479899B (en) File processing method and device, storage medium and processor
CN117785651A (en) Test case processing method, case management platform, electronic equipment and storage medium
CN115061845A (en) Method and device for confirming abnormal node in backup process and storage medium
CN116662317A (en) Data verification method and device, processor and electronic equipment
CN112506692A (en) Method and device for processing log information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination