CN116737464A - Backup failure handling method, apparatus, device, medium and program product - Google Patents

Backup failure handling method, apparatus, device, medium and program product Download PDF

Info

Publication number
CN116737464A
CN116737464A CN202310799486.9A CN202310799486A CN116737464A CN 116737464 A CN116737464 A CN 116737464A CN 202310799486 A CN202310799486 A CN 202310799486A CN 116737464 A CN116737464 A CN 116737464A
Authority
CN
China
Prior art keywords
backup
task
record
list
records
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
CN202310799486.9A
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 CN202310799486.9A priority Critical patent/CN116737464A/en
Publication of CN116737464A publication Critical patent/CN116737464A/en
Pending legal-status Critical Current

Links

Abstract

The disclosure provides a backup failure handling method, which can be applied to the technical field of information security. The backup failure handling method comprises the following steps: the backup failure handling method comprises the following steps: acquiring a task list, wherein the task list comprises N backup task records, and N is more than or equal to 1; performing preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and less than N; implementing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is less than N-M; and executing an alarm notification based on the alarm list. The present disclosure also provides a backup failure handling apparatus, device, storage medium, and program product.

Description

Backup failure handling method, apparatus, device, medium and program product
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to a backup failure handling method, apparatus, device, medium, and program product.
Background
The backup activity refers to an activity of implementing backup on a data object (or referred to as a backup object) to be backed up according to a backup policy specified in the previous stage, and the activity processes the backup object according to the characteristics of a backup tool, data copying, data packaging, encryption means and the like, so as to form a backup data set.
In the process of implementing the backup activity, the research and development personnel find that after the backup task is finished, the individual backup task is in a state of backup failure, namely, the result of the backup task is displayed as successful, but the backup task is actually in a failed state.
Therefore, in order to ensure the integrity and continuity of the backup, the identification and treatment of the backup task becomes a technical problem to be solved in the prior art.
Disclosure of Invention
In view of the foregoing, the present disclosure provides backup failure handling methods, apparatuses, devices, media, and program products that improve backup failure identification accuracy and handling efficiency.
According to a first aspect of the present disclosure, there is provided a backup failure handling method, including: acquiring a task list, wherein the task list comprises N backup task records, and N is more than or equal to 1; performing preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and less than N; implementing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is less than N-M; and executing an alarm notification based on the alarm list.
According to an embodiment of the present disclosure, the performing preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list includes: judging whether the backup data volume of one backup task record is smaller than or equal to a first threshold value or not; judging whether the number of files recorded by the backup task is smaller than a second threshold value or not under the condition that the backup data volume is smaller than or equal to the first threshold value; and marking the backup task record as the first backup task record and adding the alarm list under the condition that the number of files of the backup task record is smaller than a second threshold value.
According to an embodiment of the present disclosure, the backup task records include a directory list and backup contents, and the performing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the alarm list includes: for a backup task record, performing a first deep task analysis on the backup task record based on the catalog listing; and marking the backup task record as the second backup task record and adding the alarm list under the condition that the backup task record fails the first depth task analysis.
According to an embodiment of the disclosure, after the performing the first deep task analysis on the backup task record based on the directory listing, the method further includes: executing second depth task analysis on the backup task record based on the backup content under the condition that the backup task record passes the first depth task analysis; and marking the backup task as the second backup task record and adding the alarm list under the condition that the backup task record fails the second depth task analysis.
According to an embodiment of the disclosure, the performing, based on the directory listing, a first deep task analysis on the backup task record includes: judging whether the catalog list triggers a preset first invalid character or not; judging whether the data size of the catalog list is zero or not under the condition that the catalog list triggers a preset first invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the catalog list is zero.
According to an embodiment of the disclosure, the performing, based on the backup content, a second deep task analysis on the backup task record includes: judging whether the backup content triggers a preset second invalid character or not; judging whether the data size of the catalog list is zero or not under the condition that the backup content does not trigger a preset second invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the backup content is zero.
According to an embodiment of the disclosure, the backup task record is obtained after full backup and/or incremental backup is finished.
In a second aspect of the present disclosure, there is provided a backup failure handling apparatus including: the acquisition module is used for acquiring a task list, wherein the task list comprises N backup task records, and N is greater than or equal to 1; the primary task analysis module is used for carrying out primary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and M is less than N; the depth task analysis module is used for implementing depth task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is smaller than N-M; and an alarm module for executing alarm notification based on the alarm list.
According to an embodiment of the disclosure, the preliminary task analysis module is configured to determine, for one backup task record, whether an amount of backup data of the backup task record is less than or equal to a first threshold; judging whether the number of files recorded by the backup task is smaller than a second threshold value or not under the condition that the backup data volume is smaller than or equal to the first threshold value; and marking the backup task record as the first backup task record and adding the alarm list under the condition that the number of files of the backup task record is smaller than a second threshold value.
According to an embodiment of the disclosure, the backup task record includes a catalog list and backup content, and the deep task analysis module is configured to, for one backup task record, perform a first deep task analysis on the backup task record based on the catalog list; and marking the backup task record as the second backup task record and adding the alarm list under the condition that the backup task record fails the first depth task analysis.
According to an embodiment of the disclosure, the deep task analysis module is configured to perform a second deep task analysis on the backup task record based on the backup content if the backup task record passes the first deep task analysis; and marking the backup task as the second backup task record and adding the alarm list under the condition that the backup task record fails the second depth task analysis.
According to an embodiment of the disclosure, the deep task analysis module is configured to determine whether the directory listing triggers a preset first invalid character; judging whether the data size of the catalog list is zero or not under the condition that the catalog list triggers a preset first invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the catalog list is zero.
According to an embodiment of the disclosure, the deep task analysis module is configured to determine whether the backup content triggers a preset second invalid character; judging whether the data size of the catalog list is zero or not under the condition that the backup content does not trigger a preset second invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the backup content is zero.
According to an embodiment of the disclosure, the backup task record is obtained after full backup and/or incremental backup is finished.
In a third aspect of the present disclosure, there is provided 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 perform the backup failure handling method described above.
In a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the backup failure handling method described above.
In a fifth aspect of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the backup failure handling method described above.
In embodiments of the present disclosure, at least the following benefits may be achieved:
1. by automatically analyzing the generated backup task record after executing the backup task, the invalid backup is identified, and the situation that the backup cannot be restored due to the fact that the backup is not consistent is avoided.
2. By performing preliminary task analysis on the backup condition and then performing deep task analysis, partial invalid backup records are screened out according to simple analysis logic, and then the rest backup records are screened by adopting complex analysis logic, so that abnormal backup tasks can be rapidly and accurately found and backup management personnel can be timely informed to perform targeted inspection particularly when massive backup data are handled.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of backup failure handling according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a backup failure handling method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a preliminary task analysis method according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a depth task analysis method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a first depth task analysis method according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a second deep task analysis method in accordance with an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a backup failure handling apparatus according to an embodiment of the present disclosure; and
fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a backup failure method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Before the embodiments of the present disclosure are disclosed in detail, key technical terms related to the embodiments of the present disclosure are described one by one, as follows:
centralized backup software NBU: is centralized backup software produced by Veritas corporation. The backup system comprises a three-layer tool structure, a backup main control end, a backup server and a backup client. By setting a backup strategy at the backup main control end, the backup strategy calls tasks according to the strategy, forms backup activities, and stores backup data sets in a designated backup medium, such as a tape device or a disk device. The centralized backup tool indicated herein is software purchased by me, and does not belong to the system of the scheme. The initiation of the backup strategy can be deployed in the NBU software or can be invoked from outside through an interface provided by the software.
MySQL database: open-source relational databases.
PXB: (Percona Xtrabackup) is a backup tool, which can realize database backup and log (BINLOG) backup, and the self-contained backup tool PXB in the MySQL database can export the whole database and the BINLOG log of the database, thereby realizing the purpose of database backup. PXB will automatically calculate the BINLOG involved in the data update during the database full backup at export and automatically package these log files into a specified format into default directories and files. PXB currently only supports the placement of these backup files into the file system and cannot interface with the NBU backup system. Meanwhile, when the PXB performs the next data backup, the backup data directory structure generated for the unified database is consistent, which will cover the last backup data format.
Full back-up and incremental back-up. As the name suggests, full back-up is the time that files are all packaged for back-up. The file backup of the NBU backup is to package all the related files into a specific tar format file and store the file on a specified backup medium, namely a tape or a disk through network transmission. When in backup, the NBU can keep a metafile of the backup, namely, the list of all files. Meanwhile, relevant parameters of the backup, including information such as a backup server, a directory, a backup start time, a backup end time, a backup state, a backup data size and the like, are stored. All of this information can be queried through the NBU to an externally open interface. Incremental backups of NBU are mainly used for file systems where the overall volume of data is huge, but the volume of change is not great, and if the backup is full at a time, the backup medium is wasted. The incremental backup is realized by scanning the needed backup target environment by NBU and comparing the existing files with the object list of the previous backup when the backup is started, if the backup is not performed the previous time, the incremental backup is needed to be performed the present time, if the backup is performed the previous time, the last update date of the files is compared, if the backup is needed after the previous backup time, the file catalog needed to be backed up is packaged, and after the backup is completed, the information such as the files, the catalog, the size, the backup time and the like of the current backup are recorded into the NBU system for query of the system itself or an external open interface.
NBU (Veritas NetBackup) is currently mainly adopted as centralized backup software for backup activities. But the NBU backup software cannot effectively support the MySQL backup database at present, and the MySQL backup mode is realized by adopting two sections, namely, firstly, the whole or part of the database is backed up into a specific form of file and directory to a designated backup directory through the MySQL PXB software, and then, the actual backup operation is implemented on the backup data in the designated backup directory through deploying the NBU backup software.
In this case, the data center is at risk of data loss. The MYSQL stock environment with a large amount cannot check the MYSQL one by one in front of a large amount of scale. Therefore, a backup failure detection method in an NBU backup environment is needed to realize automatic and effective monitoring and inspection, and ensure that the display result of the backup task is consistent with the actual situation.
To solve the technical problems existing in the prior art, an embodiment of the present disclosure provides a backup failure handling method, including: acquiring a task list, wherein the task list comprises N backup task records, and N is more than or equal to 1; performing preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and less than N; implementing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is less than N-M; and executing an alarm notification based on the alarm list.
In embodiments of the present disclosure, at least the following benefits may be achieved:
1. by automatically analyzing the generated backup task record after executing the backup task, the invalid backup is identified, and the situation that the backup cannot be restored due to the fact that the backup is not consistent is avoided.
2. By performing preliminary task analysis on the backup condition and then performing deep task analysis, partial invalid backup records are screened out according to simple analysis logic, and then the rest backup records are screened by adopting complex analysis logic, so that abnormal backup tasks can be rapidly and accurately found and backup management personnel can be timely informed to perform targeted inspection particularly when massive backup data are handled.
Fig. 1 schematically illustrates an application scenario diagram of backup failure handling according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the backup failure handling method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the backup failure handling apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The backup failure handling method provided by the embodiments of the present disclosure may also be performed by a server or server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the backup failure handling apparatus provided by the embodiments of the present disclosure may also be provided in a server or server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The backup failure handling method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a backup failure handling method according to an embodiment of the disclosure.
As shown in fig. 2, the backup failure handling method of this embodiment includes operations S210 to S240, and the backup failure handling method may be performed by the server 105.
In operation S210, a task list is obtained, where the task list includes N backup task records, where N is greater than or equal to 1.
Specifically, according to a certain period, the record of the backup task of the MySQL database in the NBU system is called, and in the task record of successful backup, the related information of the backup task, namely the backup task record, is obtained. Wherein, the certain period is customized by the research personnel. It can be understood that the task record of successful backup is not all truly successful, wherein the result of the backup record is affected by the poor fusion of the NBU tool and MySQL database, and thus the result of the backup record is pseudo-successful, and the pseudo-successful backup record needs to be screened out.
For example, the adjustment period is set according to the backup policy of the actual MySQL, such as MySQL is typically full backup every week, incremental backup every day, and backup is typically performed at the evening business valley time every day. Therefore, the period of the task list can be set as one day, the historical backup condition starts to be checked every morning, and the relevant detection step is started. The task list can be acquired through a foreground interface and a background automatic call through Python and a foreground Tornado, and the related information of the NBU is acquired through interfacing with an API interface of the NBU system.
For another example, in the case of interfacing with an NBU, backup data for nearly two days is queried. Because the volume of part of MySQL databases is large, and the condition of cross-day backup exists, the successful backup logs of all MySQL backups in two days need to be queried out to form a list. It should be noted that the MySQL database will be handled as an out-of-date failure if the backup is looked up for 24 hours. Therefore, after the backup task list is formed, the backup task list is screened according to whether the backup strategy is MySQL or not and whether the backup strategy is successfully executed as a screening condition or not. And then comparing the system databases to remove the tasks processed in the previous backup cycle. Accordingly, a list of MySQL backup tasks that need to be processed for this inspection cycle is formed.
According to an embodiment of the disclosure, the backup task record is obtained after full backup and/or incremental backup is finished.
It can be appreciated that the embodiments of the present disclosure are highly adaptable, and may be applied to both full-scale backup scenarios and incremental backup scenarios.
Of course, in order to avoid the situation of repeated backup, an incremental backup mode using NBU may be selected for backup. Embodiments of the present disclosure will be described in detail below in the incremental backup mode:
in operation S220, a preliminary task analysis is performed on the N backup task records, M first backup task records are selected, and an alarm list is added, where M is greater than or equal to 0 and M is less than N.
Specifically, a preliminary analysis is carried out on the backup task, and backup task records with obvious failure characteristics are screened out.
Fig. 3 schematically illustrates a flow chart of a preliminary task analysis method according to an embodiment of the present disclosure.
As shown in fig. 3, the preliminary task analysis method of this embodiment includes operations S310 to S330, and the operations S310 to S330 may at least partially perform the above-described operation S220.
In operation S310, for one of the backup task records, it is determined whether the backup data amount of the backup task record is less than or equal to a first threshold.
In operation S320, if the backup data amount is equal to or less than the first threshold, it is determined whether the number of files recorded by the backup task is less than the second threshold.
The first threshold and the second threshold are defined by a developer according to an implementation environment of the backup activity, and are not described herein.
In operation S330, if the number of files of the backup task record is less than a second threshold, the backup task record is marked as the first backup task record, and the alarm list is added.
Specifically, in the preliminary task analysis step, task information is queried through an NBU interface according to the screened backup task and the unique task number thereof. Comprising the following steps: backup data size, number of tasks, etc.
For example, when the size of the backup data is less than or equal to 32KB (first threshold), the number of files contained in the backup needs to be continuously confirmed, and if the number of files is less than 2 (second threshold), the database indicating the related backup task adds the related backup task and the backed-up MySQL database to the alarm list. That is, the NBU indicates that the incremental backup did not find the updated file after the last backup when feeding back 32 KB.
In operation S230, a deep task analysis is performed on the N-M backup task records, K second backup task records are selected, and the alarm list is added, where K is greater than or equal to 0 and K is less than N-M.
Specifically, the deep task analysis is further implemented on the backup task from which the obvious failure feature is removed, so that the failed backup task record is checked out through the internal non-obvious data in the backup task record.
Fig. 4 schematically illustrates a flow chart of a deep task analysis method according to an embodiment of the present disclosure.
As shown in fig. 4, the deep task analysis method of this embodiment includes operations S410 to S440, and operations S410 to S440 may at least partially perform operation S230 described above.
According to an embodiment of the present disclosure, the backup task record includes a catalog listing and backup content.
It is found that when the PXB software exports an exception, the backup starts up failure, or the database exception cannot be exported by the PXB software, the incremental backup does not actually backup the data, but the incremental backup operation of the NBU is successful. The NBU cannot perceive whether the specified directory data is up-to-date data.
In operation S410, for a backup task record, a first deep task analysis is performed on the backup task record based on the catalog listing.
The first deep task analysis is analysis logic for the directory listing.
In operation S420, in the case that the backup task record does not pass the first depth task analysis, the backup task record is marked as the second backup task record, and the alarm list is added.
In operation S430, in case the backup task record passes the first deep task analysis, a second deep task analysis is performed on the backup task record based on the backup content.
The second deep task analysis is the analysis logic for the backup task record.
In operation S440, in case the backup task record fails the second deep task analysis, the backup task is marked as the second backup task record and the alarm list is added.
It should be noted that, the content of the current backup may be returned through the NBU interface according to the task number, and in the MySQL database, all files (or referred to as backup content) and directory lists of the current backup task, and the research staff finds that, when the backup plug-in is abnormal, the backup task may only backup the directory interface of the related backup set, and the actual data file backup set and the log backup set file are not generated. Meanwhile, because the NBU related strategy is in an incremental backup mode, the last backup time of data to be backed up is checked before backup, if the backup is not included in the current backup, the actual files cannot be backed up into a task set, and the situation that no actual files and only catalogues exist when the backup file list is queried through the task number can occur. The state of backup failure has occurred at this point, however, the NBU backup task has conventionally been shown to be successful and the amount of backup data is non-zero.
Fig. 5 schematically illustrates a flow chart of a first deep task analysis method in accordance with an embodiment of the present disclosure.
As shown in fig. 5, the first deep task analysis method of this embodiment includes operations S510 to S530, and operations S510 to S530 may at least partially perform operation S410 described above.
In operation S510, it is determined whether the directory listing triggers a preset first invalid character.
For example, the first invalid character may be "/".
In operation S520, in the case where the list trigger the preset first invalid character, it is determined whether the data size of the list is zero.
In operation S530, in the case where the data size of the directory listing is zero, the backup task record is marked as the second backup task record.
Fig. 6 schematically illustrates a flow chart of a second deep task analysis method in accordance with an embodiment of the present disclosure.
As shown in fig. 6, the second deep task analysis method of this embodiment includes operations S610 to S620, and the operations S610 to S620 may at least partially perform the above-described operation S430.
In operation S610, it is determined whether the backup content triggers a preset second invalid character.
For example, the second invalid character may be "/".
In operation S620, if the backup content does not trigger the preset second invalid character, it is determined whether the data size of the directory listing is zero.
In operation S630, in case that the data size of the backup content is zero, the backup task record is marked as the second backup task record.
For example, after obtaining the content list, by checking the program content one by one and counting the data backup content, the relevant counting result is recorded to two self-built lists (effective backup list and ineffective backup list respectively).
If the backup content is in a directory structure, i.e., the backup content ends with "/" and has a size of zero, an invalidation sequence is entered, and if the backup content is a file, i.e., the end is not "/", and has a size of zero, an invalidation sequence is entered. Other cases back up into the active sequence. After the traversal analysis is completed, if the effective sequence is 0, the backup exception is indicated, and the MySQL needs to be added into an alarm list.
In operation S240, an alarm notification is performed based on the alarm list.
For example, the backup information is studied to determine whether the backup task is actually successful or not, and whether the backup task is consistent with the task display condition or not. And when the actual situation of the task is failure, alarming the situation of the related MySQL database to a backup manager.
In embodiments of the present disclosure, at least the following benefits may be achieved:
1. by automatically analyzing the generated backup task record after executing the backup task, the invalid backup is identified, and the situation that the backup cannot be restored due to the fact that the backup is not consistent is avoided.
2. By performing preliminary task analysis on the backup condition and then performing deep task analysis, partial invalid backup records are screened out according to simple analysis logic, and then the rest backup records are screened by adopting complex analysis logic, so that abnormal backup tasks can be rapidly and accurately found and backup management personnel can be timely informed to perform targeted inspection particularly when massive backup data are handled.
Based on the backup failure handling method, the disclosure further provides a backup failure handling device. The device will be described in detail below in connection with fig. 7.
Fig. 7 schematically illustrates a block diagram of a backup failure handling apparatus according to an embodiment of the present disclosure.
As shown in fig. 7, the backup failure handling 700 of this embodiment includes an acquisition module 710, a preliminary task analysis module 720, a deep task analysis module 730, and an alarm module 740.
The obtaining module 710 is configured to obtain a task list, where the task list includes N backup task records, where N is greater than or equal to 1. In an embodiment, the obtaining module 710 may be configured to perform the operation S210 described above, which is not described herein.
The preliminary task analysis module 720 is configured to perform preliminary task analysis on the N backup task records, select M first backup task records, and add an alarm list, where M is greater than or equal to 0 and M is less than N. In an embodiment, the preliminary task analysis module 720 may be configured to perform the operation S220 described above, which is not described herein.
The deep task analysis module 730 is configured to implement deep task analysis on N-M backup task records, select K second backup task records, and add the K second backup task records to the alarm list, where K is greater than or equal to 0 and K is less than N-M. In an embodiment, the depth task analysis module 730 may be configured to perform the operation S230 described above, which is not described herein.
The alarm module 740 is configured to perform alarm notification based on the alarm list. In an embodiment, the alarm module 740 may be used to perform the operation S240 described above, which is not described herein.
In embodiments of the present disclosure, at least the following benefits may be achieved:
1. by automatically analyzing the generated backup task record after executing the backup task, the invalid backup is identified, and the situation that the backup cannot be restored due to the fact that the backup is not consistent is avoided.
2. By performing preliminary task analysis on the backup condition and then performing deep task analysis, partial invalid backup records are screened out according to simple analysis logic, and then the rest backup records are screened by adopting complex analysis logic, so that abnormal backup tasks can be rapidly and accurately found and backup management personnel can be timely informed to perform targeted inspection particularly when massive backup data are handled.
According to an embodiment of the disclosure, the preliminary task analysis module is configured to determine, for one backup task record, whether an amount of backup data of the backup task record is less than or equal to a first threshold; judging whether the number of files recorded by the backup task is smaller than a second threshold value or not under the condition that the backup data volume is smaller than or equal to the first threshold value; and marking the backup task record as the first backup task record and adding the alarm list under the condition that the number of files of the backup task record is smaller than a second threshold value.
According to an embodiment of the disclosure, the backup task record includes a catalog list and backup content, and the deep task analysis module is configured to, for one backup task record, perform a first deep task analysis on the backup task record based on the catalog list; and marking the backup task record as the second backup task record and adding the alarm list under the condition that the backup task record fails the first depth task analysis.
According to an embodiment of the disclosure, the deep task analysis module is configured to perform a second deep task analysis on the backup task record based on the backup content if the backup task record passes the first deep task analysis; and marking the backup task as the second backup task record and adding the alarm list under the condition that the backup task record fails the second depth task analysis.
According to an embodiment of the disclosure, the deep task analysis module is configured to determine whether the directory listing triggers a preset first invalid character; judging whether the data size of the catalog list is zero or not under the condition that the catalog list triggers a preset first invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the catalog list is zero.
According to an embodiment of the disclosure, the deep task analysis module is configured to determine whether the backup content triggers a preset second invalid character; judging whether the data size of the catalog list is zero or not under the condition that the backup content does not trigger a preset second invalid character; and marking the backup task record as the second backup task record under the condition that the data size of the backup content is zero.
According to an embodiment of the disclosure, the backup task record is obtained after full backup and/or incremental backup is finished.
Any of the acquisition module 710, the preliminary task analysis module 720, the deep task analysis module 730, and the alarm module 740 may be combined in one module to be implemented, or any of them may be split into a plurality of modules, according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the acquisition module 710, the preliminary task analysis module 720, the depth task analysis module 730, and the alarm module 740 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the acquisition module 710, the preliminary task analysis module 720, the depth task analysis module 730, and the alarm module 740 may be at least partially implemented as a computer program module that, when executed, may perform the corresponding functions.
Fig. 8 schematically illustrates a block diagram of an electronic device adapted to implement a backup failure method according to an embodiment of the disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. The electronic device 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or from a removable medium 811 via a communication portion 809. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A backup failure handling method, comprising:
acquiring a task list, wherein the task list comprises N backup task records, and N is more than or equal to 1;
Performing preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and less than N;
implementing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is less than N-M; and
and executing alarm notification based on the alarm list.
2. The method of claim 1, wherein performing a preliminary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, comprises:
judging whether the backup data volume of one backup task record is smaller than or equal to a first threshold value or not;
judging whether the number of files recorded by the backup task is smaller than a second threshold value or not under the condition that the backup data volume is smaller than or equal to the first threshold value; and
and marking the backup task record as the first backup task record and adding the first backup task record into the alarm list under the condition that the number of files of the backup task record is smaller than a second threshold value.
3. The method of claim 1 or 2, wherein the backup task record comprises a catalog listing and backup content,
And implementing deep task analysis on the N-M backup task records, selecting K second backup task records, and adding the alarm list, wherein the deep task analysis comprises the following steps:
for a backup task record, performing a first deep task analysis on the backup task record based on the catalog listing; and
and marking the backup task record as the second backup task record and adding the alarm list under the condition that the backup task record fails the first depth task analysis.
4. The method of claim 3, wherein after said performing a first deep task analysis on said backup task record based on said inventory, further comprising:
executing second depth task analysis on the backup task record based on the backup content under the condition that the backup task record passes the first depth task analysis; and
and marking the backup task as the second backup task record and adding the alarm list under the condition that the backup task record fails the second depth task analysis.
5. The method of claim 3, wherein the performing a first deep task analysis on the backup task record based on the inventory comprises:
Judging whether the catalog list triggers a preset first invalid character or not;
judging whether the data size of the catalog list is zero or not under the condition that the catalog list triggers a preset first invalid character; and
and marking the backup task record as the second backup task record under the condition that the data size of the catalog list is zero.
6. The method of claim 4 or 5, wherein the performing a second deep task analysis on the backup task record based on the backup content comprises:
judging whether the backup content triggers a preset second invalid character or not;
judging whether the data size of the catalog list is zero or not under the condition that the backup content does not trigger a preset second invalid character; and
and marking the backup task record as the second backup task record under the condition that the data size of the backup content is zero.
7. The method of any of claims 1, 2, 4, and 5, wherein the backup task record is based on a full backup and/or an incremental backup being completed.
8. A backup failure handling apparatus, comprising:
the acquisition module is used for acquiring a task list, wherein the task list comprises N backup task records, and N is greater than or equal to 1;
The primary task analysis module is used for carrying out primary task analysis on the N backup task records, selecting M first backup task records, and adding an alarm list, wherein M is greater than or equal to 0 and M is less than N;
the depth task analysis module is used for implementing depth task analysis on the N-M backup task records, selecting K second backup task records, and adding the K second backup task records into the alarm list, wherein K is greater than or equal to 0 and K is smaller than N-M; and
and the alarm module is used for executing alarm notification based on the alarm list.
9. An electronic device, comprising:
one or more processors;
storage means 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 perform the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310799486.9A 2023-06-30 2023-06-30 Backup failure handling method, apparatus, device, medium and program product Pending CN116737464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310799486.9A CN116737464A (en) 2023-06-30 2023-06-30 Backup failure handling method, apparatus, device, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310799486.9A CN116737464A (en) 2023-06-30 2023-06-30 Backup failure handling method, apparatus, device, medium and program product

Publications (1)

Publication Number Publication Date
CN116737464A true CN116737464A (en) 2023-09-12

Family

ID=87905924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310799486.9A Pending CN116737464A (en) 2023-06-30 2023-06-30 Backup failure handling method, apparatus, device, medium and program product

Country Status (1)

Country Link
CN (1) CN116737464A (en)

Similar Documents

Publication Publication Date Title
CN109032824B (en) Database verification method, database verification device, computer equipment and storage medium
US10152382B2 (en) Method and system for monitoring virtual machine cluster
US7743137B2 (en) Automatically targeting notifications about events on a network to appropriate persons
US10204016B1 (en) Incrementally backing up file system hard links based on change logs
US10911447B2 (en) Application error fingerprinting
US11093340B2 (en) Summary file change log for faster forever incremental backup
US20220263710A1 (en) Self-monitoring
US11036590B2 (en) Reducing granularity of backup data over time
CN105404581A (en) Database evaluation method and device
US11567756B2 (en) Causality determination of upgrade regressions via comparisons of telemetry data
US11940974B2 (en) Database lock
WO2019109519A1 (en) Service rule management method, apparatus and device, and computer-readable storage medium
US10891026B2 (en) Disk utilization analysis
CN111338834B (en) Data storage method and device
US20190197193A1 (en) Automated tagging application for maintaining up-to-date web analytics
CN114996057A (en) Data backup method and device, electronic equipment and computer readable storage medium
CN116737464A (en) Backup failure handling method, apparatus, device, medium and program product
CN114816470A (en) Metadata database management method and device, electronic equipment and medium
CN112445860B (en) Method and device for processing distributed transaction
CN113342619A (en) Log monitoring method and system, electronic device and readable medium
US9606892B2 (en) Workfile monitor
US20140136487A1 (en) Content management targeted rollback
CN117131018A (en) Data processing method and device, electronic equipment and storage medium
CN116955115A (en) Host performance monitoring method, device, computer equipment and storage medium
CN116821251A (en) Data processing method, data processing device, electronic equipment and storage medium

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