CN106155838A - A kind of database back-up data restoration methods and device - Google Patents

A kind of database back-up data restoration methods and device Download PDF

Info

Publication number
CN106155838A
CN106155838A CN201510200558.9A CN201510200558A CN106155838A CN 106155838 A CN106155838 A CN 106155838A CN 201510200558 A CN201510200558 A CN 201510200558A CN 106155838 A CN106155838 A CN 106155838A
Authority
CN
China
Prior art keywords
data
logic
journal
database
database journal
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.)
Granted
Application number
CN201510200558.9A
Other languages
Chinese (zh)
Other versions
CN106155838B (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.)
China Mobile Group Henan Co Ltd
Original Assignee
China Mobile Group Henan 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 China Mobile Group Henan Co Ltd filed Critical China Mobile Group Henan Co Ltd
Priority to CN201510200558.9A priority Critical patent/CN106155838B/en
Publication of CN106155838A publication Critical patent/CN106155838A/en
Application granted granted Critical
Publication of CN106155838B publication Critical patent/CN106155838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of database back-up data restoration methods and device, including: from database log file, it is successively read the database journal after the daily record of loss;If the execution operation of described database journal record is update, then produces new system banner number for described database journal, and set up the mapping relations between the new system banner number of described database journal and old system banner number;Then, according to mapping relations, database journal is carried out the logic recovery of bad data.Therefore, ensure that during data base backup recovery, even if lost daily record, it also is able to skip the daily record lost in database log file, database journal after the daily record lost proceeds to recover the operation of data, thus can ensure that database recovery arrives up-to-date state, and then also ensure that during data base is recovered, that reduces data to greatest extent loses quantity to reduce the loss of enterprise.

Description

A kind of database back-up data restoration methods and device
Technical field
The present invention relates to technical field of data processing, particularly to a kind of database back-up data restoration methods and Device.
Background technology
Data base is the warehouse organizing, store and managing data according to data structure so that can utilize meter Calculation machine realizes the automated management of creation data, and therefore, data base is widely used to each in each enterprise Production management in department.
Along with data base's importance in enterprise, data base is carried out backup and demonstrates more and more heavier with recovery The status wanted.A complete DB Backup can include full backup, differential backup and incremental backup, but Being that incremental backup quantity that may be present is very big, file is the most broken, and the probability gone wrong is the biggest.Special It not that existing recovery scheme can only be to data base's day the journal file of incremental backup goes out active when Database journal before the daily record lost in will file recovers, and is i.e. using existing recovery scheme Time, it is impossible to the database journal after the daily record lost in database log file is recovered.Therefore, The daily record distance current time lost in database log file is the longest, and the incremental data of loss is the most, and Losing incremental data, either to business, still loss to enterprise all would is that immeasurable.
Summary of the invention
The embodiment of the present invention provides a kind of database back-up data restoration methods and device, in order to solve existing skill Database journal before the daily record lost in database log file can only be recovered by art, and can not The technical problem that database journal after the daily record lost in database log file is recovered.
The embodiment of the present invention provides a kind of database back-up data restoration methods, and the method includes:
The database journal after the daily record of loss, described data base it is successively read from database log file The corresponding system banner number of each daily record in journal file;
If the execution operation of described database journal record is update, then produce for described database journal Tissue regeneration promoting system banner number, and set up between the new system banner number of described database journal and old system banner number Mapping relations;Using described new system banner number as the system banner number of described database journal and according to change After database journal carry out bad data logic recover;
If the execution operation of described database journal record is for updating or deletion action, then according to described data base The system banner number of daily record, looks into the mapping relations of described old system banner number from described new system banner number Asking and whether there are mapping relations, if there are mapping relations, then described new system banner number being replaced with described number According to storehouse daily record system banner number and according to change after database journal carry out bad data logic recover;If There are not mapping relations, then carry out the logic recovery of bad data according to described database journal.
It is also preferred that the left the method also includes:
From described database log file, it is successively read the database journal before the daily record of loss, and utilizes Described database journal carries out the logic of normal data and recovers;
Bad data after normal data after logic being recovered is recovered with logic is integrated, and completes described data The data in storehouse are recovered.
It is also preferred that the left after the described logic utilizing described database journal to carry out normal data is recovered, also include:
Start the normal data after logic is recovered, obtain the system of the daily record belonging to bad data after logic is recovered The value of checkpoint SCN, and start described bad data is carried out logic from the value of described systems inspection point SCN Recover.
If it is also preferred that the left the execution operation of described database journal record is deletion action, then using described change After database journal after more carries out logic recovery, also include: delete the system banner of described database journal Number corresponding mapping relations.
It is also preferred that the left described database log file is the journal file of incremental backup.
The embodiment of the present invention also provides for a kind of database back-up data recovery device, and this device includes:
Acquisition module, for being successively read the data base's day after the daily record of loss from database log file Will, the corresponding system banner number of each daily record in described database log file;
First recovers module, for operating as update, then pin in the execution of described database journal record Described database journal is produced new system banner number, and sets up the new system banner number of described database journal And the mapping relations between old system banner number;Using described new system banner number as described database journal it is System identification number and according to change after database journal carry out bad data logic recover;
Second recovers module, for operating as updating or deletion action in the execution of described database journal record Time, according to the system banner number of described database journal, from described new system banner number and described old system mark The mapping relations of knowledge number inquire about whether there are mapping relations, if there are mapping relations, then by described new system Identification number replaces with the system banner number of described database journal and carries out according to the database journal after change The logic of bad data is recovered;If there are not mapping relations, then carry out bad data according to described database journal Logic is recovered.
It is also preferred that the left this device also includes: the 3rd recovers module and integrate module;
Described acquisition module, is additionally operable to: be successively read from described database log file loss daily record it Front database journal
Described 3rd recovers module, recovers for the logic utilizing described database journal to carry out normal data;
Described integration module, the bad data after the normal data after logic being recovered is recovered with logic is carried out Integrating, the data completing described data base are recovered.
It is also preferred that the left described acquisition module, it is additionally operable to: carry out normal data utilizing described database journal Logic recover after, start logic recover after normal data, obtain logic recover after bad data belonging to The value of systems inspection point SCN of daily record, and start described bad from the value of described systems inspection point SCN Data carry out logic recovery.
It is also preferred that the left described second recover module, be additionally operable to: if described database journal record perform operation For deletion action, then, after the database journal after using described change carries out logic recovery, delete described number According to the mapping relations that the system banner number of storehouse daily record is corresponding.
It is also preferred that the left described database log file is the journal file of incremental backup.
The database back-up data restoration methods of above-described embodiment offer and device, including: from database journal File is successively read the database journal after the daily record of loss, each in described database log file The corresponding system banner number of daily record;If the execution operation of described database journal record is update, then Produce new system banner number for described database journal, and set up the new system banner of described database journal Number and old system banner number between mapping relations;Using described new system banner number as described database journal System banner number and according to change after database journal carry out bad data logic recover;If described data base The execution operation of log recording is for updating or deletion action, then according to the system banner of described database journal Number, from described new system banner number with the mapping relations of described old system banner number, inquire about whether there is mapping Relation, if there are mapping relations, then replaces with the system of described database journal by described new system banner number Identification number and according to change after database journal carry out bad data logic recover;If there is not mapping to close System, then carry out the logic recovery of bad data according to described database journal, thereby it is ensured that data base During Backup and Restore, even if lost daily record, it is also possible to skip the day lost in database log file Will, proceeds to recover the behaviour of data to the database journal after the daily record lost in database log file Make, thus can ensure that database recovery arrives up-to-date state, and then also ensure that data base is being recovered During, that reduces data to greatest extent loses quantity to reduce the loss of enterprise.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below The accompanying drawing used is needed to briefly introduce, it should be apparent that, the accompanying drawing in describing below is only the present invention's Some embodiments, from the point of view of those of ordinary skill in the art, in the premise not paying creative work Under, it is also possible to other accompanying drawing is obtained according to these accompanying drawings.
The flow chart of the database back-up data restoration methods that Fig. 1 provides for the embodiment of the present invention;
The structural representation of the database back-up data recovery device that Fig. 2 provides for the embodiment of the present invention.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to this Bright it is described in further detail, it is clear that described embodiment is only a part of embodiment of the present invention, Rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing Go out all other embodiments obtained under creative work premise, broadly fall into the scope of protection of the invention.
Fig. 1, for the flow chart of the database back-up data restoration methods that the embodiment of the present invention provides.As schemed Showing, the method comprises the steps that
Database journal after S101, the daily record being successively read loss from database log file, data The corresponding system banner number of each daily record in the journal file of storehouse.
Concrete, system banner number can be a mark of each record in data store internal record, should Mark represents every data relative physical address in the data file, a record in location database A relative unique address value, it is generally the case that this value is determined when the row data are inserted into tables of data And it is unique.Such as, the system banner number in Oracle (inscriptions on bones or tortoise shells) data base is ROWID, and ROWID Can be numbered by data object, reference number of a document, block number and line number form.
The type performing operation of the database journal after the daily record of the loss that S102, judgement are read, if The execution operation of database journal record is update, then go to step S103;If database journal record Execution operation for update or deletion action, then go to step S104.
S103, produce new system banner number for database journal, and set up the new system mark of database journal Mapping relations between knowledge number and old system banner number;Using new system banner number as the system mark of database journal Know number and according to change after database journal carry out bad data logic recover.
S104, system banner number according to database journal, from new system banner number and old system banner number Mapping relations being inquired about and whether there are mapping relations, if there are mapping relations, then going to step S105;If no There are mapping relations, then go to step S106.
S105, new system banner number is replaced with described database journal system banner number and according to change after Database journal carry out bad data logic recover.
S106, carry out according to described database journal bad data logic recover.
Further, for the database journal before the daily record of the loss in database log file, can adopt By prior art, its logic carrying out normal data is recovered.Such as, for losing in database log file Lose daily record before database journal in perform operation be DDL (Data Definition Language, Database definition language) operation, such as, in DDL operation for creating table, deleting table and amendment table knot During the operation such as structure, can be by automatically safeguarding that a data dictionary carries out the recovery application of data, wherein, data Dictionary is definition and the document of attribute of an automatic or manual storage data element, and data dictionary is most important The instrument functioning as the analysis phase, the in store letter relevant with database journal in data dictionary Breath, carries out DML (Data Manipulation Language, DML) behaviour after DDL The when of work, corresponding data can be found according to the information relevant with database journal preserved in data dictionary The data lost are carried out recovering application by dictionary again.Wherein, DML operation can be Insert (insertion), Update (renewal) or Delete (deletion) operation.
After the logic utilizing database journal to carry out normal data is recovered, after also can starting logic recovery Normal data, and obtain SCN (the System Check of daily record belonging to the bad data after the daily record of loss Number, systems inspection point) value, and start bad data is carried out logic recovery from the value of SCN.
In step S101, the database journal after the daily record of loss is analyzed by the available software that replicates, And will lose daily record after database journal generate transaction data cached.
Database journal before the daily record by the loss in database log file, uses prior art pair Its logic carrying out normal data is recovered, and the database journal after the daily record that will lose uses above-mentioned After the method that embodiment provides is recovered, the daily record of the loss in database log file after recovering Database journal after database journal before and the daily record of loss is integrated, and the number after integrating According to re-applying in database server.Further, from above-mentioned steps S104 to step S106, If in database journal, the execution operation of record is deletion action, then can be according to the system banner of database journal Number, from new system banner number with the mapping relations of old system banner number, inquire about whether there are mapping relations, if There are mapping relations, then new system banner number is replaced with the system banner number of database journal and according to change After database journal carry out wrong books note logic recover, and according to change after database journal carrying out bad After the logic recovery of data i.e. performs the deletion action of data, also need to delete the described system mark of database journal Know number corresponding mapping relations.If there is not mapping relations, the most not replacement system identification number, directly carry out Database application the most directly performs the deletion action of data, can complete the logic to bad data and recover.
Further, the database log file that above-described embodiment provides can be the journal file of incremental backup.
From the foregoing, it will be observed that, the database back-up data provided by the embodiment of the present invention is recovered Method, the when of occurring that daily record is lost, can skip in database log file in data base's recovery process The daily record lost, recovers the database journal after the daily record lost in database log file, because of This, it is possible to ensure during data base backup recovery, even if lost daily record, it is also possible to skip data The daily record lost in the journal file of storehouse, to the database journal after the daily record lost in database log file Proceed to recover the operation of data, thus can ensure that database recovery arrives up-to-date state, and then also can protect Card is during recovering data base, and that reduces data to greatest extent loses quantity to reduce enterprise Loss.
Below by a specific example, the database back-up data restoration methods that above-described embodiment is provided Utilization carry out detailed explanation.
Assume in the ORACLE Database Systems carry out incremental backup lose a journal file, and After the journal file lost, having five operations, these five operations are respectively as follows:
Article 1, the ROWID of operation is: AAASPQAAEAAABEjAAA, and action type is: insert Enter;
The ROWID of Article 2 operation is: AAASPQAAEAAABEjAAB, action type is: more Newly;
The ROWID of Article 3 operation is: AAASPQAAEAAABEjAAC, action type is: delete Remove;
The ROWID of Article 4 operation is: AAASPQAAEAAABEjAAA, action type is: more Newly;
The ROWID of Article 5 operation is: AAASPQAAEAAABEjAAA, action type is: delete Remove.
Operate for above-mentioned Article 1, lose in the method using data loading to apply is to database log file The when that database journal after the daily record lost recovering, owing to action type is for inserting, therefore can produce A raw new ROWID, it is assumed that the new ROWID of generation is AAASPQAAEAAABEjBBB, And by new ROWID i.e. AAASPQAAEAAABEjBBB and the original ROWID produced be AAASPQAAEAAABEjAAA sets up mapping relations.Assume to operate for Article 1, carrying out data The when of loading application, the mapping relations set up between newly generated ROWID and original ROWID are A1, then in A1, AAASPQAAEAAABEjAAA and AAASPQAAEAAABEjBBB Corresponding.
Operate for above-mentioned Article 2, lose in the method using data loading to apply is to database log file Database journal after the daily record lost is when recover, owing to action type is for updating, then according to the Article two, whether the ROWID i.e. AAASPQAAEAAABEjAAB inquiry of operation exists mapping relations, by In the mapping relations that the ROWID operated according to Article 2 i.e. AAASPQAAEAAABEjAAB is inquired about Do not exist, then use the i.e. AAASPQAAEAAABEjAAB of original ROWID to perform to update operation.
Operate for above-mentioned Article 3, lose in the method using data loading to apply is to database log file Database journal after the daily record lost is when recover, owing to action type is for deleting, then according to the Article three, whether the ROWID i.e. AAASPQAAEAAABEjAAC inquiry of operation exists mapping relations, by In the mapping relations that the ROWID operated according to Article 3 i.e. AAASPQAAEAAABEjAAC is inquired about Do not exist, then use the i.e. AAASPQAAEAAABEjAAC of original ROWID to perform deletion action.
Operate for above-mentioned Article 4, lose in the method using data loading to apply is to database log file Database journal after the daily record lost is when recover, owing to action type is for updating, then according to the Article four, whether the ROWID i.e. AAASPQAAEAAABEjAAA inquiry of operation exists mapping relations, The mapping inquired about due to the ROWID i.e. AAASPQAAEAAABEjAAA operated according to Article 4 Relation is A1, and in A1, AAASPQAAEAAABEjAAA with AAASPQAAEAAABEjBBB is corresponding, therefore use in mapping relations A1 with original ROWID ROWID corresponding for i.e. AAASPQAAEAAABEjAAA i.e. AAASPQAAEAAABEjBBB Perform to update operation.
Operate for above-mentioned Article 5, lose in the method using data loading to apply is to database log file Database journal after the daily record lost is when recover, owing to action type is for deleting, then according to the Article five, whether the ROWID i.e. AAASPQAAEAAABEjAAA inquiry of operation exists mapping relations, The mapping inquired about due to the ROWID i.e. AAASPQAAEAAABEjAAA operated according to Article 5 Relation is A1, and in A1, AAASPQAAEAAABEjAAA with AAASPQAAEAAABEjBBB is corresponding, therefore use in mapping relations A1 with original ROWID ROWID corresponding for i.e. AAASPQAAEAAABEjAAA i.e. AAASPQAAEAAABEjBBB Perform deletion action.
ROWID i.e. AAASPQAAEAAABEjAAA owing to operating according to Article 5 is inquired about Mapping relations are A1, and the type of above-mentioned Article 5 operation is for deleting, and therefore, are using mapping relations A1 In the ROWID corresponding with original ROWID i.e. AAASPQAAEAAABEjAAA i.e. After AAASPQAAEAAABEjBBB performs deletion action, also mapping relations A1 can be deleted.
According to the example above, it can be seen that the database back-up data provided by the embodiment of the present invention is recovered The when that method occurring that daily record is lost in data base's recovery process, can skip in database log file and lose The daily record lost, recovers the database journal after the daily record lost in database log file, therefore, Ensure that during data base backup recovery, even if lost daily record, it is also possible to skip data base's day The daily record lost in will file, continues the database journal after the daily record lost in database log file Carry out recovering the operation of data, thus can ensure that database recovery arrives up-to-date state, and then also ensure that During recovering data base, that reduces data to greatest extent loses quantity to reduce the damage of enterprise Lose.
Based on identical technology design, the embodiment of the present invention also provides for a kind of database back-up data and recovers dress Putting, this device can perform said method embodiment.
Fig. 2, for the structural representation of the database back-up data recovery device that the embodiment of the present invention provides.As Shown in Fig. 2, this device comprises the steps that
Acquisition module 201, for being successively read the data after the daily record of loss from database log file Storehouse daily record, the corresponding system banner number of each daily record in described database log file;
First recovers module 202, is update for operating in the execution of described database journal record, Then produce new system banner number for described database journal, and set up the new system mark of described database journal Mapping relations between knowledge number and old system banner number;Using described new system banner number as described database journal System banner number and according to change after database journal carry out bad data logic recover;
Second recovers module 203, for operating as updating or deleting in the execution of described database journal record During operation, according to the system banner number of described database journal, from described new system banner number and described old system System identification number mapping relations in inquire about whether there are mapping relations, if there are mapping relations, then by described newly System banner number replaces with the system banner number of described database journal and according to the database journal after change The logic carrying out bad data is recovered;If there are not mapping relations, then carry out bad number according to described database journal According to logic recover.
It is also preferred that the left this device may also include that the 3rd recovery module (not shown) and integrates module (figure Not shown in).
Acquisition module 201, is additionally operable to: be successively read from described database log file loss daily record it Front database journal;
Described 3rd recovers module, recovers for the logic utilizing described database journal to carry out normal data;
Described integration module, the bad data after the normal data after logic being recovered is recovered with logic is carried out Integrating, the data completing described data base are recovered.
It is also preferred that the left acquisition module 201, it is additionally operable to: carry out normal data utilizing described database journal After logic is recovered, start the normal data after logic is recovered, obtain belonging to the bad data after logic is recovered The value of systems inspection point SCN of daily record, and start described bad from the value of described systems inspection point SCN Data carry out logic recovery.
It is also preferred that the left second recover module 203, be additionally operable to: if described database journal record perform operation For deletion action, then, after the database journal after using described change carries out logic recovery, delete described number According to the mapping relations that the system banner number of storehouse daily record is corresponding.
It is also preferred that the left described database log file is the journal file of incremental backup.
In view of the foregoing it is apparent that, the database back-up data restoration methods provided by the embodiment of the present invention And device, the when of occurring that daily record is lost in data base's recovery process, can skip database log file The daily record of middle loss, recovers the database journal after the daily record lost in database log file, Thereby it is ensured that during data base backup recovery, even if lost daily record, it is also possible to skip number According to the daily record lost in the journal file of storehouse, to the data base's day after the daily record lost in database log file Will proceeds to recover the operation of data, thus can ensure that database recovery arrives up-to-date state, and then also may be used Ensureing during recovering data base, that reduces data to greatest extent loses quantity to reduce enterprise Loss.
The present invention is with reference to method, equipment (system) and computer program product according to embodiments of the present invention The flow chart of product and/or block diagram describe.It should be understood that can by computer program instructions flowchart and / or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/ Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embedding The processor of formula datatron or other programmable data processing device is to produce a machine so that by calculating The instruction that the processor of machine or other programmable data processing device performs produces for realizing at flow chart one The device of the function specified in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or the process of other programmable datas can be guided to set In the standby computer-readable memory worked in a specific way so that be stored in this computer-readable memory Instruction produce and include the manufacture of command device, this command device realizes in one flow process or multiple of flow chart The function specified in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes Sequence of operations step must be performed to produce computer implemented place on computer or other programmable devices Reason, thus the instruction performed on computer or other programmable devices provides for realizing flow chart one The step of the function specified in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know base This creativeness concept, then can make other change and amendment to these embodiments.So, appended right is wanted Ask and be intended to be construed to include preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention Bright spirit and scope.So, if the present invention these amendment and modification belong to the claims in the present invention and Within the scope of its equivalent technologies, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a database back-up data restoration methods, it is characterised in that the method includes:
The database journal after the daily record of loss, described data base it is successively read from database log file The corresponding system banner number of each daily record in journal file;
If the execution operation of described database journal record is update, then produce for described database journal Tissue regeneration promoting system banner number, and set up between the new system banner number of described database journal and old system banner number Mapping relations;Using described new system banner number as the system banner number of described database journal and according to change After database journal carry out bad data logic recover;
If the execution operation of described database journal record is for updating or deletion action, then according to described data base The system banner number of daily record, looks into the mapping relations of described old system banner number from described new system banner number Asking and whether there are mapping relations, if there are mapping relations, then described new system banner number being replaced with described number According to storehouse daily record system banner number and according to change after database journal carry out bad data logic recover;If There are not mapping relations, then carry out the logic recovery of bad data according to described database journal.
2. the method for claim 1, it is characterised in that the method also includes:
From described database log file, it is successively read the database journal before the daily record of loss, and utilizes Described database journal carries out the logic of normal data and recovers;
Bad data after normal data after logic being recovered is recovered with logic is integrated, and completes described data The data in storehouse are recovered.
3. method as claimed in claim 2, it is characterised in that described utilize described database journal to enter After the logic of row normal data is recovered, also include:
Start the normal data after logic is recovered, obtain the system of the daily record belonging to bad data after logic is recovered The value of checkpoint SCN, and start described bad data is carried out logic from the value of described systems inspection point SCN Recover.
4. the method for claim 1, it is characterised in that if the holding of described database journal record Row operation is deletion action, then, after the database journal after using described change carries out logic recovery, also wrap Include: delete the mapping relations that the system banner number of described database journal is corresponding.
5. the method for claim 1, it is characterised in that described database log file is increment The journal file of backup.
6. a database back-up data recovery device, it is characterised in that this device includes:
Acquisition module, for being successively read the data base's day after the daily record of loss from database log file Will, the corresponding system banner number of each daily record in described database log file;
First recovers module, for operating as update, then pin in the execution of described database journal record Described database journal is produced new system banner number, and sets up the new system banner number of described database journal And the mapping relations between old system banner number;Using described new system banner number as described database journal it is System identification number and according to change after database journal carry out bad data logic recover;
Second recovers module, for operating as updating or deletion action in the execution of described database journal record Time, according to the system banner number of described database journal, from described new system banner number and described old system mark The mapping relations of knowledge number inquire about whether there are mapping relations, if there are mapping relations, then by described new system Identification number replaces with the system banner number of described database journal and carries out according to the database journal after change The logic of bad data is recovered;If there are not mapping relations, then carry out bad data according to described database journal Logic is recovered.
7. device as claimed in claim 6, it is characterised in that also include: the 3rd recovers module and whole Compound module;
Described acquisition module, is additionally operable to: be successively read from described database log file loss daily record it Front database journal;
Described 3rd recovers module, recovers for the logic utilizing described database journal to carry out normal data;
Described integration module, the bad data after the normal data after logic being recovered is recovered with logic is carried out Integrating, the data completing described data base are recovered.
8. device as claimed in claim 7, it is characterised in that described acquisition module, is additionally operable to: After the logic utilizing described database journal to carry out normal data is recovered, start the normal number after logic is recovered According to, obtain the value of the systems inspection point SCN of the daily record belonging to bad data after logic is recovered, and from described The value of systems inspection point SCN starts described bad data is carried out logic recovery.
9. device as claimed in claim 6, it is characterised in that described second recovers module, is additionally operable to: If the execution operation of described database journal record is deletion action, the then data base after using described change After daily record carries out logic recovery, delete the mapping relations that the system banner number of described database journal is corresponding.
10. device as claimed in claim 6, it is characterised in that described database log file is increment The journal file of backup.
CN201510200558.9A 2015-04-24 2015-04-24 A kind of database back-up data restoration methods and device Active CN106155838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510200558.9A CN106155838B (en) 2015-04-24 2015-04-24 A kind of database back-up data restoration methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510200558.9A CN106155838B (en) 2015-04-24 2015-04-24 A kind of database back-up data restoration methods and device

Publications (2)

Publication Number Publication Date
CN106155838A true CN106155838A (en) 2016-11-23
CN106155838B CN106155838B (en) 2019-03-22

Family

ID=57346774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510200558.9A Active CN106155838B (en) 2015-04-24 2015-04-24 A kind of database back-up data restoration methods and device

Country Status (1)

Country Link
CN (1) CN106155838B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241700A (en) * 2016-12-23 2018-07-03 南京壹进制信息技术股份有限公司 A kind of method of the fast quick-recovery MySQL backup logics based on data reforming
CN110673987A (en) * 2019-09-27 2020-01-10 江苏国泰新点软件有限公司 Database recovery method, device, equipment and storage medium
CN110874287A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Method and device for backing up and recovering data in database and electronic equipment
CN111488243A (en) * 2020-03-19 2020-08-04 北京金山云网络技术有限公司 MongoDB database backup and recovery method and device, electronic equipment and storage medium
CN112988458A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Data backup method and device, electronic equipment and storage medium
CN117494146A (en) * 2023-12-29 2024-02-02 山东街景智能制造科技股份有限公司 Model database management system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5778388A (en) * 1994-09-19 1998-07-07 Hitachi, Ltd. Method of processing a synchronization point in a database management system to assure a database version using update logs from accumulated transactions
CN101067818A (en) * 2007-06-06 2007-11-07 中国工商银行股份有限公司 Data incremental backup and recovery method applied to data bank
CN103699548A (en) * 2012-09-27 2014-04-02 阿里巴巴集团控股有限公司 Method and equipment for recovering database data by using logs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5778388A (en) * 1994-09-19 1998-07-07 Hitachi, Ltd. Method of processing a synchronization point in a database management system to assure a database version using update logs from accumulated transactions
CN101067818A (en) * 2007-06-06 2007-11-07 中国工商银行股份有限公司 Data incremental backup and recovery method applied to data bank
CN103699548A (en) * 2012-09-27 2014-04-02 阿里巴巴集团控股有限公司 Method and equipment for recovering database data by using logs

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108241700A (en) * 2016-12-23 2018-07-03 南京壹进制信息技术股份有限公司 A kind of method of the fast quick-recovery MySQL backup logics based on data reforming
CN108241700B (en) * 2016-12-23 2020-04-24 南京壹进制信息科技有限公司 Method for rapidly recovering MySQL logic backup based on data reformation
CN110874287A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Method and device for backing up and recovering data in database and electronic equipment
CN110874287B (en) * 2018-08-31 2023-05-02 阿里巴巴集团控股有限公司 Backup and recovery method and device for data in database and electronic equipment
CN110673987A (en) * 2019-09-27 2020-01-10 江苏国泰新点软件有限公司 Database recovery method, device, equipment and storage medium
CN112988458A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Data backup method and device, electronic equipment and storage medium
CN111488243A (en) * 2020-03-19 2020-08-04 北京金山云网络技术有限公司 MongoDB database backup and recovery method and device, electronic equipment and storage medium
CN111488243B (en) * 2020-03-19 2023-07-07 北京金山云网络技术有限公司 Backup and recovery method and device for MongoDB database, electronic equipment and storage medium
CN117494146A (en) * 2023-12-29 2024-02-02 山东街景智能制造科技股份有限公司 Model database management system
CN117494146B (en) * 2023-12-29 2024-04-26 山东街景智能制造科技股份有限公司 Model database management system

Also Published As

Publication number Publication date
CN106155838B (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN106155838A (en) A kind of database back-up data restoration methods and device
US9953051B2 (en) Multi-version concurrency control method in database and database system
CN102982085B (en) Data mover system and method
CN106933703B (en) Database data backup method and device and electronic equipment
CN109871373B (en) Data storage method and device and computer readable storage medium
CN106777270A (en) A kind of Heterogeneous Database Replication parallel execution system and method based on submission point time line locking
CN104423960A (en) Continuous project integration method and continuous project integration system
CN105808653B (en) A kind of data processing method and device based on user tag system
CN105787058B (en) A kind of user tag system and the data delivery system based on user tag system
CN105989160A (en) Memory data persistence method and apparatus for Redis database
US10459804B2 (en) Database rollback using WAL
CN109063005B (en) Data migration method and system, storage medium and electronic device
JPH04139544A (en) Data restoring method
CN110263095A (en) Backup and recovery method, apparatus, computer equipment and storage medium
CN106802928B (en) Power grid historical data management method and system
CN106682017B (en) Database updating method and device
CN110597821B (en) Method and device for changing database table structure
CN106571940A (en) Method and device of fusing network management data and resource data
CN109101368B (en) Data processing method and device
CN113821382B (en) Real-time database data processing method, system and equipment
CN103399921B (en) A kind of based on oracle database unanimously put catching method
CN111143323A (en) MPP database management method, device and system
CN102929976B (en) Backup data access method and device
CN109828865A (en) Data reconstruction method, device and electronic equipment
CN103645967A (en) Read-only snapshot rollback method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant