CN109117314B - Anti-misoperation data rapid recovery method and system - Google Patents

Anti-misoperation data rapid recovery method and system Download PDF

Info

Publication number
CN109117314B
CN109117314B CN201811009102.4A CN201811009102A CN109117314B CN 109117314 B CN109117314 B CN 109117314B CN 201811009102 A CN201811009102 A CN 201811009102A CN 109117314 B CN109117314 B CN 109117314B
Authority
CN
China
Prior art keywords
updating
data
preset rule
source database
backup
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.)
Active
Application number
CN201811009102.4A
Other languages
Chinese (zh)
Other versions
CN109117314A (en
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.)
Fujian Suixing Software Co ltd
Original Assignee
Fujian Suixing Software Co ltd
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 Fujian Suixing Software Co ltd filed Critical Fujian Suixing Software Co ltd
Priority to CN201811009102.4A priority Critical patent/CN109117314B/en
Publication of CN109117314A publication Critical patent/CN109117314A/en
Application granted granted Critical
Publication of CN109117314B publication Critical patent/CN109117314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/1479Generic software techniques for error detection or fault masking
    • 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

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 invention discloses a method and a system for quickly recovering data with anti-misoperation, wherein the method comprises the following steps: acquiring all updating operations acting on a source database; comparing the updating operation with a preset rule; if the updating operation does not violate a preset rule, executing the updating operation in the backup data; if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation; if so, restoring the change of the related data of the source database caused by the operation; otherwise, the updating operation is executed in the backup data. Through the mode, the method and the device can shield the change caused by the error operation outside the backup database, and recover the change of the source database caused by the error operation, thereby ensuring that the data which is changed by the error due to various reasons can be recovered to the correct state before being changed.

Description

Anti-misoperation data rapid recovery method and system
The application is a divisional application of a parent application named as 'data recovery method and system against misoperation' with application number of 201510957661.8 and application date of 2015, 12 and 18.
Technical Field
The invention relates to the technical field of databases, in particular to a method and a system for quickly recovering data with misoperation prevention.
Background
In the use of the database, wrong database operation instructions are executed for various reasons, so that wrong changes (including deletion, addition, change and the like) occur to data in the database. The misoperation not only affects the accuracy of the data, but also can cause huge economic losses seriously, such as errors of order quantity, contract signing date and accounts receivable.
The accuracy, completeness and availability of the data have important significance. The common cold backup can only use the backup database to restore the source database to a normal state at a certain past time, and correct data change after the time cannot be restored. Although the common hot backup can ensure the basic synchronization of the data of the source database and the backup database, and recover the damaged source database by using the backup database, the real-time performance and the consistency of the data are ensured, if the operation itself has no error (no violation of grammar and the like), but only the behavior and the result of the operation are wrong, the system cannot judge the error and cannot recover at the moment.
In order to solve the problem, technical personnel provide a method for a database system consisting of a master database and a slave database (the master database and a source database and the slave database have the same function as a backup database), wherein the master database and the slave database have the same data initially, then the operations completed by the master database are obtained in time sequence, and after the operations are obtained each time, the same operations are executed on the slave database after a preset time delay is carried out on the basis of the currently obtained completion time of the operations; when the master library has an error, determining an error operation causing the error; determining whether the error operation has been performed on the slave library; if the error operation has not been performed on the slave library, recovering data of the master library using data of the slave library. However, when the error operation is determined, if the operation is executed on the slave library, the data still cannot be guaranteed to be accurate and error-free, and thus the function is limited.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the novel database backup method and system for preventing misoperation and quickly recovering are used for solving the problems that data of a database is inaccurate, incomplete and unavailable due to various reasons.
In order to solve the technical problems, the invention adopts the technical scheme that: the provided anti-misoperation data rapid recovery method comprises the following steps:
acquiring all updating operations acting on a source database;
comparing the updating operation with a preset rule;
if the updating operation does not violate a preset rule, executing the updating operation in the backup data;
if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation;
if so, restoring the change of the related data of the source database caused by the operation;
otherwise, the updating operation is executed in the backup data.
In order to solve the above problem, the present invention further provides a system for quickly recovering data from an incorrect operation, including:
the recording module is used for acquiring all updating operations acting on the source database;
the first judgment module is used for comparing the updating operation with a preset rule;
the backup module is used for executing the updating operation in backup data if the updating operation does not violate a preset rule;
the second judgment module is used for judging whether the updating operation is unreasonable operation or not if the updating operation violates a preset rule;
and the recovery module is used for recovering the change of the related data of the source database caused by the operation.
In order to solve the above problems, the present invention further provides a system for quickly recovering data with anti-misoperation, comprising a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the following process:
acquiring all updating operations acting on a source database;
comparing the updating operation with a preset rule;
if the updating operation does not violate a preset rule, executing the updating operation in the backup data;
if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation;
if so, restoring the change of the related data of the source database caused by the operation;
otherwise, the updating operation is executed in the backup data.
The invention has the beneficial effects that: different from the prior art, the method and the device have the advantages that all updating operations which act on the source database are obtained, the updating operations are compared with the preset rules, if the updating operations do not violate the preset rules, the updating operations are executed in the backup data, otherwise, whether the updating operations are reasonable operations or not is continuously judged, if the updating operations are reasonable operations, the updating operations are executed in the backup data, and otherwise, the changes caused by the updating operations are recovered. Through the mode, the method and the device can shield the change caused by the error operation outside the backup database, and recover the change of the source database caused by the error operation, thereby ensuring that the data which is changed by the error due to various reasons can be recovered to the correct state before being changed.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of the method of the present invention;
FIG. 2 is a schematic flow chart of a second embodiment of the method of the present invention;
fig. 3 is a flowchart illustrating a database backup method according to a first embodiment of the present invention;
fig. 4 is a first schematic structural diagram of a database backup system according to a second embodiment of the present invention;
fig. 5 is a second schematic structural diagram of a database backup system according to a second embodiment of the present invention;
fig. 6 is a third schematic structural diagram of a database backup system according to a second embodiment of the present invention;
fig. 7 is a schematic partial structural diagram of a database backup system according to a third embodiment of the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: by comparing the updating operation with the preset rule and further judging the rationality of the operation under the condition of rule violation, the incorrectly changed data caused by various reasons can be recovered to the correct state before being changed.
Referring to fig. 1, an embodiment of the present invention provides a method for fast recovering data with anti-misoperation, including:
s1: acquiring all updating operations acting on a source database;
s2: comparing the updating operation with a preset rule, and judging whether the updating operation violates the preset rule;
if the update operation does not violate the predetermined rule, go to step S3: executing the update operation in backup data;
if the update operation violates a predetermined rule, go to step S4: judging whether the updating operation is unreasonable operation or not;
if yes, go to step S5: restoring the change of the source database related data caused by the operation;
otherwise, step S3 is executed: and executing the updating operation in the backup data.
When step S1 is executed, specifically, the method includes:
recording all operations acting on the source database according to a time sequence;
update operations that may cause changes to the source database are extracted.
The preset rule is a rule which is set for a specific object and a specific operation in advance, and the preset rule is changeable. The corresponding step S4 may specifically be:
if the updating operation violates a preset rule, the system sends out a prompt;
acquiring a user instruction according to the prompt;
and judging whether the updating operation is unreasonable operation or not according to a user instruction.
Different from the prior art, the method and the device have the advantages that all updating operations which act on the source database are obtained, the updating operations are compared with the preset rules, if the updating operations do not violate the preset rules, the updating operations are executed in the backup data, otherwise, whether the updating operations are reasonable operations or not is continuously judged, if the updating operations are reasonable operations, the updating operations are executed in the backup data, and otherwise, the changes caused by the updating operations are recovered. Through the mode, the method and the device can shield the change caused by the error operation outside the backup database, and recover the change of the source database caused by the error operation, thereby ensuring that the data which is changed by the error due to various reasons can be recovered to the correct state before being changed.
As shown in fig. 2, a second embodiment of the present invention provides a system 100 for fast recovering data with anti-misoperation function, including:
the recording module 110 is configured to obtain all update operations acting on the source database;
a first determining module 120, configured to compare the update operation with a preset rule;
a backup module 130, configured to execute the update operation in backup data;
a second determining module 140, configured to determine whether the updating operation is an unreasonable operation if the updating operation violates a preset rule;
and a recovery module 150, configured to recover from the change of the source database related data caused by the operation.
Wherein, the partial structure in the system of the invention comprises a processor and a memory for storing the executable instructions of the processor; wherein the processor is configured to perform the following process:
acquiring all updating operations acting on a source database;
comparing the updating operation with a preset rule;
if the updating operation does not violate a preset rule, executing the updating operation in the backup data;
if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation;
if so, restoring the change of the related data of the source database caused by the operation;
otherwise, the updating operation is executed in the backup data.
The preset rule is a rule which is set for a specific object and a specific operation in advance, and the preset rule is changeable. And the step of judging whether the updating operation is unreasonable operation is specifically as follows:
if the updating operation violates a preset rule, the system sends out a prompt;
acquiring a user instruction according to the prompt;
and judging whether the updating operation is unreasonable operation or not according to a user instruction.
As shown in fig. 1 to 7, the present invention provides a new database backup method and system for preventing misoperation and fast recovery, including a database operation log generation method, a database backup method, a recovery method and a database backup system, so as to solve the problems of inaccurate, incomplete and unavailable data of a database due to various reasons. The present invention is applied to a situation where a source database and a backup database exist, and provides a database backup method and system, and for facilitating understanding of the method and system of the present invention, detailed descriptions are provided below through several specific embodiments.
The first aspect of the present invention provides a database backup method for preventing misoperation and fast recovery, assuming that the data of the original database and the backup database are the same at the beginning. The method comprises the following steps:
recording all operations of the source database in a time sequence, where the operations in the present invention refer to all operations of the source database after the operations are caused to be different from the source database before the operations, for example, a query operation does not cause a change of the source database data, and does not belong to an operation object discussed in the present invention, that is, the query operation may be recorded, but is not compared with a preset rule described below, and the like, and these operations may be recorded in an operation log.
Comparing the recorded operation acting on the source database with a preset rule; if the operation does not violate a preset rule, executing the operation in backup data; if the operation violates a preset rule, the system sends out a prompt; whether the operation really belongs to unreasonable operation or not can be judged manually according to the reminding information sent by the system; the system executes different tasks according to different results of manual judgment: and if the operation is judged to be correct manually, executing the operation in the backup data, and if the operation is judged not to be allowed manually, restoring the change of the data related to the source database caused by the operation.
The preset rule for comparing with all the operations acting on the source database is a rule set in advance for a specific object, a specific operation, and the like. Optionally, the preset rule may be changed at any time according to actual needs.
If the operation acting on the source database violates the preset rule, the system sends out a prompt, and the content of the prompt comprises detailed information of the operation violating the preset rule; the reminding mode may be one or more, in a preferred embodiment, at least one system interface reminding mode is included, and optionally, the method includes: sound reminding, window reminding and the like of a system interface, short message reminding, mailbox reminding and the like.
The manual judgment means that whether the operation is unreasonable is judged manually according to the reminding information sent by the system, that is, whether the operation meets the actual situation or not is judged, and the judgment result has two types: one is to confirm that the operation on the source database is correct, and one is to decide whether the operation on the source database is correct, that is, to decide not to allow the operation.
The system executes different tasks according to different results of manual judgment, which means that a person who makes correct or wrong judgment on an operation gives a correct or wrong judgment result to the system, and the system executes corresponding operations according to the correct or wrong judgment result, recorded operation information made on a source database and preset: if the judgment result received by the system is that the operation is correct, executing the operation on the backup database; and if the judgment result received by the system is that the operation is wrong, restoring the change of the related data of the source database caused by the operation.
The above-mentioned method for recovering the change of the source data related data caused by the operation can be various, and a specific system can be implemented by selecting one or more of the methods in combination.
A second aspect of the present invention is to provide a database backup system with fast recovery against misoperation, which assumes that initially the data of the system source database and the backup database are the same. The system comprises:
the source database operation recording module is used for acquiring and recording all operation information acting on the source database according to the time sequence, and triggering the judgment module after recording the operation each time;
the judging module is used for comparing the recorded operation information acting on the source database with a preset rule, if the operation is found not to violate the preset rule, the data backup module is triggered, and if the operation is found to violate the preset rule, the system reminding module is triggered;
the system reminding module is used for sending a reminder to a user (namely the above mentioned manual operation) when the operation applied to the source database does not accord with the preset rule, if the user does not process the operation judged to be wrong, the reminder in the system exists all the time until the user gives a manual judgment result of whether the operation of the system for reminding is correct or not;
the system reminding module can give a user judgment result selectable item (correct or wrong, but the system is not limited to the two words when being implemented, as long as the words express correct operation and wrong operation, for example, whether a certain operation is accepted or not, and the like, and the optional judgment result is yes or no), and meanwhile receives judgment result information, if the received judgment result is correct operation, the data backup module is triggered, and if the received judgment result is wrong operation, the data recovery module is triggered;
optionally, the system reminding module may include a system reminding setting sub-module, and the reminding rule may be set according to the setting module, including reminding times, time intervals, etc., and if the reminding is not processed within a certain time, the system may perform a second reminding;
the data backup module is used for executing the following two operations acting on the source database in the backup database: the operation that does not violate the preset rule is the first operation, and the operation that violates the preset rule but is manually judged to be correct is the second operation.
The data recovery module is used for recovering the changed related data of the source database caused by the operation which acts on the source database and violates the preset rule and is judged as error manually;
optionally, the system further includes a preset rule setting module, configured to modify a preset rule, and may define a specific object, a specific operation, and the like, including rules in two forms of permission and rejection.
A third aspect of the present invention is to provide a database backup system with fast recovery against misoperation, which assumes that initially, the data of the system source database and the backup database are the same. The system comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: recording all operations of the source data according to a time sequence; comparing the recorded operation acting on the source database with a preset rule; if the operation does not violate a preset rule, executing the operation in backup data; if the operation violates a preset rule, the system sends out a prompt; then the system receives the judgment result of whether the operation really belongs to the unreasonable operation or not by the manual work; the system executes different tasks according to different received results of manual judgment: and if the operation is judged to be correct manually, executing the operation in the backup data, and if the operation is judged not to be allowed, restoring the change of the data related to the source data caused by the operation.
The first embodiment is as follows:
fig. 3 provides a schematic flow chart of a database backup method for preventing misoperation and fast recovery, assuming that the data of the source database and the backup database are the same at the beginning. The method comprises the following steps:
step 101: recording all operations of the source database according to a time sequence;
the backup database can realize the operation in the source database according to the operation record, and the operation record contains the time information of the operation completion.
After the source database executes an operation, the operation information and the completion time can be acquired and recorded in sequence.
Step 102: and comparing the operation of the source database with a preset rule every time when the operation of the source database is recorded, and giving a comparison result: no violation of the preset rules, violation of the preset rules. The system can directly acquire or read the comparison result. The comparison result can be displayed in a manner that the user sees, such as characters; or simply a record that the system can capture or read. Different comparison results trigger different operations of the system.
Step 103: if the recorded operation of the source database does not violate the preset rule, the operation is executed in the backup database, which can be regarded as a backup process of the backup database.
Step 104: and if the operation violates a preset rule, the system sends out a prompt. And reminding the user to judge whether the operation is unreasonable operation.
The reminding mode can be one or more, but at least comprises a system interface reminding mode, and optionally comprises the following steps: sound reminding, window reminding and the like of a system interface, and other optional reminding modes comprise short message reminding, mailbox reminding and the like.
The reminder sent by the system comprises relevant operation information violating preset rules and optionally time information.
The reminding of the system interface is provided for the user at the same time with two judgment results: belongs to reasonable operation and does not belong to reasonable operation. Optionally, the two determination results are described in various ways, as long as whether the operation is allowed, reasonable, or correct is expressed.
Step 105: and the user judges whether the operation really belongs to unreasonable operation according to the reminding information sent by the system and gives a judgment result. The system can receive the judgment result of the user, wherein different judgment results trigger different operations.
Step 106: if the manual judgment result received by the system is correct operation, the operation is executed in the backup database, which can be regarded as a backup process of the backup database.
Step 107: and if the manual judgment result received by the system is that the operation is not allowed, restoring the change of the related data of the source database caused by the operation.
Step 103 and step 106 may be regarded as a process in which the backup database performs asynchronous backup on the source database, and the backup database performs the same operation as the source database. In step 103, the change of the backup database may be considered to be simultaneous with the source database, and in step 106, the change of the backup database occurs after receiving a judgment whether the operation occurring in the source database is reasonable or not, which may be delayed compared to the source database, and the length of the delay time is related to when the user handles the alert.
In step 107, the method for recovering the change of the source database related data caused by the disallowed operation may include, but is not limited to, the following: the first is to execute operations opposite to the disallowed operation in the source data in time sequence, for example, the disallowed operation is to change a field of a piece of information in a table from a to B (a is information before execution of an operation object of the operation, and B is information after the information is changed by the operation), then the recovery method is to change B information of the operation object to a in the source data; the second is to find data corresponding to the related information of the related object in the source data related to the operation in the backup database, and to use the corresponding data in the backup database to cover the related information in the source database after being changed, for example, if the disallowed operation is to delete a certain table in the source database, the recovery method is to find a table corresponding to the table in the backup database and create the table to the source database; the third recovery method is to combine the above two methods. The present embodiment does not limit the recovery method.
When the source database is damaged to cause data loss or unavailability and the like, the backup database can be used for recovering the source database, the reminder (or operation) which is not manually checked can still be processed continuously, and the correctness of the data is ensured by recording the operation of the source database. Even if the hardware such as the server where the worse source database is located is damaged, the situation that the hardware is recovered only after the new equipment is supplemented does not have a problem, at the moment, the backup database can be directly utilized, meanwhile, unprocessed reminding and operation can be continuously processed, correct operation can be directly executed, and wrong operation can be directly rejected; after the backup database is started, the backup database becomes a new source database, the new source database can record all changes of the new source database, when the condition is that the new backup database appears, the backup database can utilize the operation record to ensure the correctness of the data, at the moment, if the operation record is correct, the processing is not carried out, if the operation is wrong, the reverse operation is carried out on the new backup database for recovery, and then the new source database is recovered, or the reverse operation is carried out on the new source database for recovery; after the new backup database is started, the operation records recorded by the new source database can be processed according to the processing modes of the original source database and the backup database. Therefore, the accuracy, integrity and usability of the database data are ensured.
The second embodiment is as follows:
a second specific embodiment of the present invention provides a database backup system for anti-misoperation quick recovery based on the database backup method for anti-misoperation quick recovery in the first specific embodiment, as shown in fig. 4, fig. 4 is a schematic structural diagram of the database backup system for anti-misoperation quick recovery, which includes main functional modules, and the backup system may be an independent system, or may be integrated into other systems as a function or a subsystem, and the examples of the present invention do not limit this. Initially, the data of the source database is the same as the data of the backup database.
The system comprises:
the source database operation recording module 201: the system comprises a judging module, a data base and a data processing module, wherein the judging module is used for acquiring and recording all operation information of a source database according to a time sequence and triggering the judging module after recording the operation each time;
the judging module 202: the system comprises a data backup module, a system reminding module and a database management module, wherein the data backup module is used for comparing the recorded operation information acting on the source database with a preset rule, if the operation is found not to violate the preset rule, the data backup module is triggered, and if the operation is found to violate the preset rule, the system reminding module is triggered;
the system reminding module 203: when the operation applied to the source database does not accord with the preset rule, a prompt is sent to a user (namely, the manual operation mentioned above), if the user does not process the operation judged to be wrong, the prompt in the system exists all the time until the user gives a manual judgment result of whether the operation of the system for prompting is correct or not;
the system reminding module can give a user judgment result selectable item (correct or wrong, but the system is not limited to the two words when being implemented, as long as the words express correct operation and wrong operation, for example, whether a certain operation is accepted or not, and the like, and the optional judgment result is yes or no), and meanwhile receives judgment result information, if the received judgment result is correct operation, the data backup module is triggered, and if the received judgment result is wrong operation, the data recovery module is triggered;
optionally, as shown in fig. 5, the system reminding module 203 may include a system reminding setting sub-module 301, and according to the setting module, a reminding rule may be set, including reminding times, time intervals, and the like, and if the reminding is not processed within a certain time, the system may perform a second reminding;
data backup module 204: operations for acting on a source database in performing the following two cases in a backup database: the operation that does not violate the preset rule is the first operation, and the operation that violates the preset rule but is manually judged to be correct is the second operation.
The data recovery module 205: the method is used for recovering the relevant data of the source database which is changed due to the operation on the source database which violates the preset rule and is judged to be wrong manually.
Optionally, as shown in fig. 6, the system further includes a preset rule setting module 401, configured to modify a preset rule, and may define a specific object, a specific operation, and the like, including rules in two forms of permission and rejection;
generally, the rule is set for important objects (libraries, tables, fields, etc.), which are allowed to be modified, but are not easily modified or have a large influence due to modification errors, and an auditing mechanism is added, so that important data are protected. For objects which can not be modified absolutely, the objects which can not be modified can be directly set with the range which can not be modified or is allowed to be modified, so that the related operation in the source database can not be finished directly without adding a manual review mechanism, but the operation is not processed in a backup system.
The third concrete embodiment:
third embodiment of the present invention provides a database backup system with anti-misoperation quick recovery based on the database backup method with anti-misoperation quick recovery in the first embodiment, as shown in fig. 7. Fig. 7 is a schematic diagram of a partial structure of the database backup system for preventing the misoperation and fast recovering, assuming that the data of the system source database and the backup database are the same at the beginning.
The system comprises:
the processor 501: the processor is configured to: recording all operations of the source data according to a time sequence; comparing the recorded operation acting on the source database with a preset rule; if the operation does not violate a preset rule, executing the operation in backup data; if the operation violates a preset rule, the system sends out a prompt; then the system receives the judgment result of whether the operation really belongs to the unreasonable operation or not by the manual work; the system executes different tasks according to different received results of manual judgment: and if the operation is judged to be correct manually, executing the operation in the backup data, and if the operation is judged not to be allowed, restoring the change of the data related to the source data caused by the operation.
The memory 502: for storing processor executable commands.
In summary, the present invention sets the allowed or disallowed operations of the important objects (library, table, field, etc.), that is, the preset rules of the operations described herein, and after the operations of the source database are recorded in time sequence, the operations are compared with the preset rules to determine whether the operations meet the preset rules, if the operations meet the preset rules, the same operations are executed in the backup data, if the operations do not meet the preset rules, the system sends a prompt to manually determine whether the operations are reasonable, if the operations are reasonable, the same operations are executed in the backup data, and if the operations are not reasonable, the changes caused by the operations in the source database are restored. Therefore, the changes caused by the error operation are shielded outside the backup database, and the changes of the source database caused by the error operation are recovered. It is ensured that erroneously altered data due to various causes can be restored to the correct state before being altered.
When the source database is in error or damage, and data is lost or unavailable, the backup database can be used for recovering the source database, and meanwhile, because the operation before the source database is in error or damaged is recorded, even if the operation which is not manually checked exists, the operation can be continuously checked in the backup database, and the problem does not exist in recovering the source database before and after the checking is finished.
In a word, the database backup method and the database backup system provided by the invention can prevent risks caused by misoperation and adverse effects caused by errors or damages of the source database, and ensure the correctness, completeness and availability of the source database.
It should be understood that the important point of the present invention also includes providing a manual auditing mechanism between the source data and the backup database to audit whether the operation for the important object is correct, the correct operation is executed in the backup data, and the incorrect operation restores the change of the source database caused by the operation.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (7)

1. A fast data recovery method for preventing misoperation is characterized by comprising the following steps:
acquiring all updating operations acting on source data, wherein the updating operations can cause a source database after the updating operations to be different from a source database before the updating operations;
comparing the updating operation with a preset rule;
if the updating operation does not violate a preset rule, executing the updating operation in the backup data;
if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation;
if so, restoring the change of the related data of the source database caused by the operation;
otherwise, the updating operation is executed in the backup data.
2. The method for fast recovering data against misoperation according to claim 1, wherein the preset rule is a rule set in advance for a specific object and a specific operation, and the preset rule is changeable.
3. The method for quickly recovering data with anti-misoperation function according to claim 2, wherein if the update operation violates a preset rule, the step of determining whether the update operation is an unreasonable operation specifically comprises:
if the updating operation violates a preset rule, the system sends out a prompt;
acquiring a user instruction according to the prompt;
and judging whether the updating operation is unreasonable operation or not according to a user instruction.
4. A quick data recovery system for preventing misoperation is characterized by comprising:
the recording module is used for acquiring all updating operations acting on the source data, wherein the updating operations can cause that the source database after the updating operations is different from the source database before the updating operations;
the first judgment module is used for comparing the updating operation with a preset rule;
the backup module is used for executing the updating operation in backup data if the updating operation does not violate a preset rule;
the second judgment module is used for judging whether the updating operation is unreasonable operation or not if the updating operation violates a preset rule;
and the recovery module is used for recovering the change of the related data of the source database caused by the operation.
5. A data rapid recovery system for preventing misoperation is characterized by comprising a processor and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the following process:
acquiring all updating operations acting on source data, wherein the updating operations can cause a source database after the updating operations to be different from a source database before the updating operations;
comparing the updating operation with a preset rule;
if the updating operation does not violate a preset rule, executing the updating operation in the backup data;
if the updating operation violates a preset rule, judging whether the updating operation is unreasonable operation;
if so, restoring the change of the related data of the source database caused by the operation;
otherwise, the updating operation is executed in the backup data.
6. The system for rapidly recovering data against misoperation according to claim 5, wherein the preset rule is a rule set in advance for a specific object and a specific operation, and the preset rule is changeable.
7. The system for rapidly recovering data from an anti-misoperation system according to claim 6, wherein if the update operation violates a preset rule, the step of determining whether the update operation is an unreasonable operation specifically comprises:
if the updating operation violates a preset rule, the system sends out a prompt;
acquiring a user instruction according to the prompt;
and judging whether the updating operation is unreasonable operation or not according to a user instruction.
CN201811009102.4A 2015-12-18 2015-12-18 Anti-misoperation data rapid recovery method and system Active CN109117314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811009102.4A CN109117314B (en) 2015-12-18 2015-12-18 Anti-misoperation data rapid recovery method and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510957661.8A CN105528264B (en) 2015-12-18 2015-12-18 Fool proof data reconstruction method and its system
CN201811009102.4A CN109117314B (en) 2015-12-18 2015-12-18 Anti-misoperation data rapid recovery method and system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201510957661.8A Division CN105528264B (en) 2015-12-18 2015-12-18 Fool proof data reconstruction method and its system

Publications (2)

Publication Number Publication Date
CN109117314A CN109117314A (en) 2019-01-01
CN109117314B true CN109117314B (en) 2021-04-16

Family

ID=55770508

Family Applications (4)

Application Number Title Priority Date Filing Date
CN201811009101.XA Active CN109165121B (en) 2015-12-18 2015-12-18 Method and system for recovering misoperation data
CN201811009532.6A Active CN109240854B (en) 2015-12-18 2015-12-18 Method and system for recovering data of change caused by misoperation
CN201811009102.4A Active CN109117314B (en) 2015-12-18 2015-12-18 Anti-misoperation data rapid recovery method and system
CN201510957661.8A Active CN105528264B (en) 2015-12-18 2015-12-18 Fool proof data reconstruction method and its system

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN201811009101.XA Active CN109165121B (en) 2015-12-18 2015-12-18 Method and system for recovering misoperation data
CN201811009532.6A Active CN109240854B (en) 2015-12-18 2015-12-18 Method and system for recovering data of change caused by misoperation

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201510957661.8A Active CN105528264B (en) 2015-12-18 2015-12-18 Fool proof data reconstruction method and its system

Country Status (1)

Country Link
CN (4) CN109165121B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383900A (en) * 2016-09-29 2017-02-08 郑州云海信息技术有限公司 Method and system for preventing mistaken deletion of data files in Sybase database
CN108572885A (en) * 2017-03-10 2018-09-25 阿里巴巴集团控股有限公司 A kind of operation processing method, device and electronic equipment
CN109144772B (en) * 2017-06-15 2021-03-30 北京京东尚科信息技术有限公司 Method and device for backing up database data
CN112270019A (en) * 2020-10-23 2021-01-26 许继集团有限公司 Double tamper-proof method and system for key information table of database
CN114117539A (en) * 2022-01-24 2022-03-01 北京交研智慧科技有限公司 Data protection method and device
CN115599595B (en) * 2022-08-26 2023-04-11 北京万里开源软件有限公司 Physical backup method based on distributed database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209298A (en) * 2000-01-24 2001-08-03 Armat Corp Remote education management system
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN102567472A (en) * 2011-12-14 2012-07-11 海角先锋(北京)科技有限公司 Built-in database based high-efficient data deleting and restoring method
CN102693169A (en) * 2011-03-25 2012-09-26 国际商业机器公司 Method and device for recovering lessee data under multi-lessee environment, and database system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613806B2 (en) * 2001-06-28 2009-11-03 Emc Corporation System and method for managing replication sets of data distributed over one or more computer systems
CN100504905C (en) * 2007-11-16 2009-06-24 中国科学院软件研究所 Data-base malevolence transaction method and system thereof
CN100590599C (en) * 2007-12-06 2010-02-17 福建星网锐捷网络有限公司 Write-operation process method, system and apparatus of FLASH
CN101923573A (en) * 2010-08-09 2010-12-22 哈尔滨工程大学 Rapid database data recovery method aiming at data loss
CN101916215B (en) * 2010-08-09 2012-02-01 哈尔滨工程大学 Operation intercept based repentance method of distributed critical task system
CN102662798A (en) * 2012-04-12 2012-09-12 青岛海信移动通信技术股份有限公司 Data recovery method and terminal for Android system
US9122711B1 (en) * 2012-05-24 2015-09-01 Symantec Corporation Simplified system backup protection and recovery
CN103383698B (en) * 2013-06-27 2016-09-21 宇龙计算机通信科技(深圳)有限公司 The method of data deletion and mobile terminal thereof
CN103617277A (en) * 2013-12-09 2014-03-05 山东瀚高基础软件股份有限公司 Method for restoring data table content deleted mistakenly
CN103955421A (en) * 2014-05-06 2014-07-30 珠海市君天电子科技有限公司 Method and system for file deletion
CN104699551B (en) * 2015-02-15 2018-12-25 四川长虹电器股份有限公司 A kind of data reconstruction method and cloud server
CN105045678B (en) * 2015-07-09 2018-10-26 小米科技有限责任公司 Database restoring method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209298A (en) * 2000-01-24 2001-08-03 Armat Corp Remote education management system
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN102693169A (en) * 2011-03-25 2012-09-26 国际商业机器公司 Method and device for recovering lessee data under multi-lessee environment, and database system
CN102567472A (en) * 2011-12-14 2012-07-11 海角先锋(北京)科技有限公司 Built-in database based high-efficient data deleting and restoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
有效降低数据库批量操作失误风险的管控设计和系统实践;苏伟;《电子技术与软件工程》;20140819(第16期);200 *

Also Published As

Publication number Publication date
CN109240854B (en) 2021-04-09
CN109165121B (en) 2021-03-23
CN109240854A (en) 2019-01-18
CN109117314A (en) 2019-01-01
CN109165121A (en) 2019-01-08
CN105528264A (en) 2016-04-27
CN105528264B (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN109117314B (en) Anti-misoperation data rapid recovery method and system
CN111177165B (en) Method, device and equipment for detecting data consistency
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
CN112286728A (en) Data backup method, device, equipment and computer storage medium
CN112214411B (en) Disaster recovery system testing method, device, equipment and storage medium
US20160321143A1 (en) Database rollback using wal
CN109815697B (en) Method and device for processing false alarm behavior
US10635575B2 (en) Testing of enterprise resource planning systems
CN108121774B (en) Data table backup method and terminal equipment
US20210133179A1 (en) Method, system and apparatus for processing database updates
CN115730008A (en) Log analysis method, data synchronization system, electronic device and storage medium
CN109992476B (en) Log analysis method, server and storage medium
CN103440460A (en) Application system change validation method and system
CN108573015B (en) Method and device for changing table format, electronic equipment and readable storage medium
CN111413952B (en) Robot fault detection method and device, electronic equipment and readable storage medium
WO2019019701A1 (en) Processing method for blank invoices recycling, storage medium and server
CN116089394A (en) Data rollback method, storage medium and device of database
CN110807037B (en) Data modification method and device, electronic equipment and storage medium
US20130290385A1 (en) Durably recording events for performing file system operations
CN114371870A (en) Code scanning and submitting method, code scanning server, client and server
CN109992475B (en) Log processing method, server and storage medium
CN113704277A (en) Database-based breakpoint continuous transmission method and related device
CN113190531A (en) Database migration method, device, equipment and storage medium
CN112232768A (en) Merchant data processing method based on full life cycle management
CN106375354B (en) Data processing method and device

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
GR01 Patent grant
GR01 Patent grant