[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104376073A - Database recovery method and device - Google Patents

Database recovery method and device Download PDF

Info

Publication number
CN104376073A
CN104376073A CN201410646176.4A CN201410646176A CN104376073A CN 104376073 A CN104376073 A CN 104376073A CN 201410646176 A CN201410646176 A CN 201410646176A CN 104376073 A CN104376073 A CN 104376073A
Authority
CN
China
Prior art keywords
database
row
data
preset strategy
list structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410646176.4A
Other languages
Chinese (zh)
Inventor
杨威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201410646176.4A priority Critical patent/CN104376073A/en
Publication of CN104376073A publication Critical patent/CN104376073A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (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 database recovery method and device. The method includes the steps that database information of an old version is obtained; database information of a new version is obtained; whether a data table structure of a database of the old version and a data table structure of a database of the old version are consistent is judged according to first data table structure information and second data table structure information, if the answer is positive, the database of the old version is directly restored in the database of the new version, and if the answer is negative, the next step is executed; according to the first data table structure information and the second data table structure information, a change type of the database of the new version relative to the database of the old version is obtained; according to a preset strategy corresponding to the change type, the database of the old version is directly restored in the database of the new version. By means of the database recovery method and device, forward compatibility of database recovery can be achieved.

Description

A kind of database restoring method and device
Technical field
The present invention relates to database field, particularly relate to a kind of database restoring method and device.
Background technology
In prior art, the structural design of database often changes along with the change of functional module (comprising data list structure and data content), and the difference between each version of database may be larger.Install or more new database redaction after, need the database recovery of the legacy version of backup in redaction database.
The flow process of database restoring method of the prior art as shown in Figure 1, comprises the following steps:
110, legacy data storehouse is started.120, redaction database is started.130, the record of all tables in redaction database is emptied.Whether each tables of data 140, in artificial judgment legacy data storehouse and redaction database changes, if not, the Data Migration Tools then performing step 150, adopt data base management system (DBMS) to provide, moves in new database by the record of tables of data in legacy data storehouse; If so, then the Data Migration Tools performing step 160, adopt data base management system (DBMS) to provide, the type according to change makes different operations, is moved in new database by the record of tables of data in legacy data storehouse.The Data Migration Tools that this step 160 adopts data base management system (DBMS) to provide, for each tables of data not identical with new database data list structure in legacy data storehouse, judge which row needs is given up, which row needs to carry out the special strategies such as data type conversion, after selecting corresponding action type, record is moved in new database; If the record content of some tables of data also needs to carry out the requirement that special modification could meet redaction, then can perform a series of SQL statement, or perform some programs and process.
Due to data list structure between redaction database and legacy data storehouse and data content incompatible, time in the database of the existing redaction that the database recovery of the legacy version of backup is changed to database structure design, database is needed to quit work, online recovery can not be realized, and the method complex steps, operate more consuming time.
Summary of the invention
The present invention completes to solve above-mentioned deficiency of the prior art, the object of the invention is to propose a kind of database restoring method and device, and the method can solve prior art can not realize online recovery and problem consuming time.
For reaching this object, the present invention by the following technical solutions:
First aspect, the invention discloses a kind of database restoring method, comprising:
Obtain legacy data library information, described legacy data library information comprises the first data list structure information, data content and version number;
Obtain redaction database information, described redaction database information comprises the second data list structure information;
According to described first data list structure information and described second data list structure information, judge that whether the data list structure in described legacy data storehouse is consistent with the data list structure of described redaction database, if, then direct described legacy data storehouse is returned in described redaction database, if not, then perform next step;
According to described first data list structure information and described second data list structure information, obtain relative to described legacy data storehouse, the type of described redaction database change;
The preset strategy corresponding according to the type of described change, returns to described legacy data storehouse in described redaction database.
Further, described first data list structure information is the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type; Described second data list structure information is the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
Further, the type of described change comprises delete list, increase table, table renames, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type, and the preset strategy that described delete list is corresponding skips over the recovery to the table deleted; The preset strategy that described increase table is corresponding skips over the recovery to newly-increased table; The described table corresponding preset strategy that renames to be returned in the table that renames in described redaction database in described legacy data storehouse by the table renamed; The preset strategy that described delete columns is corresponding skips over the recovery to the row deleted; Described preset strategy corresponding to row that increase skips over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The described row corresponding preset strategy that renames to be returned in the row that rename in described redaction database in described legacy data storehouse by the row renamed; The preset strategy of described row change order correspondence is the order according to arranging in described redaction database, is returned to by the row in described legacy data storehouse in described redaction database; The preset strategy that described row change data type corresponding returns in described redaction database after the value in described legacy data storehouse is converted to new data type, if cannot change, then the row in described redaction database reverted to the value of specifying.
Further, described acquisition redaction database information, described redaction database information also comprises before comprising the second data list structure information:
Set up preset strategy configuration file, described preset strategy configuration file comprises the executive routine to the rule that described preset strategy configures, wherein, described table is renamed, increases row, row rename and arrange the executive routine of rule changing preset strategy configuration corresponding to data type and edited by user, the executive routine of the rule of preset strategy configuration corresponding to described delete list, increase table, delete columns and row change order is pre-set.
Further, the described described legacy data storehouse mode returned in described redaction database by backup is block copy mode.
Second aspect, the invention discloses a kind of database recovery device, comprising:
Legacy data library information acquisition module, for obtaining legacy data library information, described legacy data library information comprises the first data list structure information, data content and version number;
Redaction database information acquisition module, for obtaining redaction database information, described redaction database information comprises the second data list structure information;
Judge module, for according to described first data list structure information and described second data list structure information, judge that whether the data list structure in described legacy data storehouse is consistent with the data list structure of described redaction database, if, then direct described legacy data storehouse is returned in described redaction database, if not, then perform next step;
Change type acquisition module, for according to described first data list structure information and described second data list structure information, obtains relative to described legacy data storehouse, the type of described redaction database change;
Recover module, for the preset strategy corresponding according to the type of described change, described legacy data storehouse is returned in described redaction database.
Further, described first data list structure information is the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type; Described second data list structure information is the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
Further, the type of described change comprises delete list, increase table, table renames, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type, and the preset strategy that described delete list is corresponding skips over the recovery to the table deleted; The preset strategy that described increase table is corresponding skips over the recovery to newly-increased table; The described table corresponding preset strategy that renames to be returned in the table that renames in described redaction database in described legacy data storehouse by the table renamed; The preset strategy that described delete columns is corresponding skips over the recovery to the row deleted; Described preset strategy corresponding to row that increase skips over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The described row corresponding preset strategy that renames to be returned in the row that rename in described redaction database in described legacy data storehouse by the row renamed; The preset strategy of described row change order correspondence is the order according to arranging in described redaction database, is returned to by the row in described legacy data storehouse in described redaction database; The preset strategy that described row change data type corresponding returns in described redaction database after the value in described legacy data storehouse is converted to new data type, if cannot change, then the row in described redaction database reverted to the value of specifying.
Further, also comprise:
Preset strategy configuration file sets up module, for setting up preset strategy configuration file, described preset strategy configuration file comprises the executive routine to the rule that described preset strategy configures, wherein, described table is renamed, increases row, row rename and arrange the executive routine of rule changing preset strategy configuration corresponding to data type and edited by user, the executive routine of the rule of preset strategy configuration corresponding to described delete list, increase table, delete columns and row change order is pre-set.
Further, the described described legacy data storehouse mode returned in described redaction database by backup is block copy mode.
Database restoring method of the present invention and device are by analyzing the data list structure in legacy data storehouse and the data list structure of redaction database, obtain the type changed, again according to type and the corresponding preset strategy of change, the legacy data storehouse of backup is returned in redaction database, achieve the forward compatibility of database recovery, make during database recovery, not need database to quit work, can be implemented in line and recover, and step is simple, consuming time less.
Accompanying drawing explanation
In order to the technical scheme of exemplary embodiment of the present is clearly described, one is done to the accompanying drawing used required for describing in embodiment below and simply introduce.Obviously, the accompanying drawing introduced is the accompanying drawing of a part of embodiment that the present invention will describe, instead of whole accompanying drawings, for those of ordinary skill in the art, under the prerequisite not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of database restoring method in prior art.
Fig. 2 is the process flow diagram of the database restoring method that the embodiment of the present invention one provides.
Fig. 3 is the process flow diagram of the database restoring method that the embodiment of the present invention two provides.
Fig. 4 is the structural drawing of the database recovery device that the embodiment of the present invention three provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below with reference to the accompanying drawing in the embodiment of the present invention, by embodiment, technical scheme of the present invention is intactly described.Obviously; described embodiment is a part of embodiment of the present invention, instead of whole embodiments, based on embodiments of the invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all falls within protection scope of the present invention.
Database comprises multiple tables of data usually, and each tables of data is made up of multiple row, and each row have data structure.Following examples are all implemented based on the database of this structure.
Embodiment one:
Fig. 2 is the process flow diagram of the database restoring method that the present embodiment one provides.As shown in Figure 2, the method comprises the following steps:
Step 210, acquisition legacy data library information, legacy data library information comprises the first data list structure information, data content and version number.
In this step, can back up legacy data storehouse, and legacy data library information can be saved in the form of a file.Wherein, legacy data library information characterizes the information such as structural information and data type in legacy data storehouse, legacy data library information can comprise the first data list structure information, data content and version number, and the first data list structure information can be the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type.
Step 220, acquisition redaction database information, redaction database information comprises the second data list structure information.
In this step, redaction database information characterizes the information such as structural information and data type of redaction database, it can comprise the second data list structure information, and the second data list structure information can be the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
Step 230, according to the first data list structure information and the second data list structure information, judge that whether the data list structure in legacy data storehouse is consistent with the data list structure of redaction database, if, then perform step 240, directly legacy data storehouse returned in redaction database, if not, then perform following steps: step 250, according to the first data list structure information and the second data list structure information, obtain relative to legacy data storehouse, the type of redaction database change; Step 260, the preset strategy corresponding according to the type of change, return to legacy data storehouse in redaction database.
In step 230, according to the data list structure information of legacy data storehouse and redaction database, comprise the combination of any one or at least two kinds in database name, table name, row name, row length and column data type, can judge whether redaction database there occurs change relative to legacy data storehouse relatively easily, wherein, change comprises the change of structural change and data type.
In step 240, the mode directly returned in legacy data storehouse in redaction database can be block copy mode, under this mode, and the speed of database recovery.
In step 250, the type of change can be delete list, increase table, table rename, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type.
In step 260, the preset strategy that delete list is corresponding can be skip over the recovery to the table deleted; The preset strategy that increase table is corresponding can be skip over the recovery to newly-increased table; The table corresponding preset strategy that renames can be to be returned in the table that renames in redaction database in legacy data storehouse by the table renamed; The preset strategy that delete columns is corresponding can be skip over the recovery to the row deleted; Increasing preset strategy corresponding to row can be skip over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The row corresponding preset strategy that renames can be to be returned in the row that rename in redaction database in legacy data storehouse by the row renamed; The preset strategy of row change order correspondence can be the order according to arranging in redaction database, is returned to by the row in legacy data storehouse in redaction database; The preset strategy that row change data type corresponding can be return in redaction database after the value in legacy data storehouse is converted to new data type, if cannot change, then the row in redaction database is reverted to the value of specifying.The mode returned in legacy data storehouse in redaction database can be block copy mode, under this mode, and the speed of database recovery.
The database restoring method that the embodiment of the present invention one provides is by analyzing the data list structure in legacy data storehouse and the data list structure of redaction database, obtain the type changed, again according to type and the corresponding preset strategy of change, the legacy data storehouse of backup is returned in redaction database, achieve the forward compatibility of database recovery, make during database recovery, not need database to quit work, can be implemented in line and recover, and step is simple, consuming time less.
Embodiment two:
Fig. 3 is the process flow diagram of the database restoring method that the present embodiment two provides.As shown in Figure 3, the method comprises the following steps:
Step 301, backup legacy data storehouse, obtain legacy data library information, obtain backup file.
In this step, backup operation is performed in legacy data storehouse, the first data list structure information of the tables of data of backup, data content and current versions number of needing all in legacy data storehouse are exported as file, unified be put in an independent file, this file is backup file, can have the structural information of multiple tables of data in first data list structure information, the first data list structure information can be the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type.
Step 302, set up preset strategy configuration file, preset strategy configuration file comprises the executive routine of preset strategy.
In this step, for redaction database, set up preset strategy configuration file, by all treatment steps of manual intervention that needs with in specific rule write preset strategy configuration file, by preset strategy with in specific rule write preset strategy configuration file.If all difference is all can automatically identify in rejuvenation, then preset strategy configuration file can be set to null value.Wherein, table renames, increases row, row rename and the executive routine that arranges preset strategy corresponding to change data type can be edited by user, by can be suitable for the demand of different user better to the editor of this part; The executive routine of the preset strategy configuration that delete list, increase table, delete columns and row change order are corresponding can pre-set, pre-set by this part, do not need user to be configured, the burden of user operation can be alleviated and the speed of quickening recovery.This preset strategy configuration file can be XML file, uses XML file that user can be facilitated to edit.
Wherein, rule can be the combination of any one or at least two in following four rules: row alteration ruler: the value of the row of specifying in redaction database used as default; Row deletion rule: the value of the row of specifying in redaction database is arranged to null value; Table alteration ruler: the combination multiple row in the table in redaction database being adopted row alteration ruler and row deletion rule; Aftertreatment rule: by Backup and Restore on the basis of redaction database, by perform executive routine (SQL statement or special code segment) to revise in the data in redaction database.
In this step, set up preset strategy configuration file, can make in database recovery process below, by resolving preset strategy configuration file, performing executive routine can return to legacy data storehouse in redaction database.
Step 303, backup file to be imported in redaction database.
In this step, backup file step 301 obtained imports in redaction database so that performing database recovery operation.
The record of step 304, all data table related emptied in redaction database.
In this step, the record of relevant tables of data all in redaction database is emptied, so that performing database recovery operation.
Step 305, acquisition redaction database information.
In this step, obtain the second data list structure information of the tables of data of redaction database, can have the structural information of multiple tables of data in this second data list structure information, the second data list structure information can be the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
Step 306, judge that whether the data list structure in legacy data storehouse is consistent with the data list structure of redaction database, and in determination strategy configuration file, whether have the executive routine of preset strategy,
If consistent and there is no executive routine, then perform following steps: step 307, directly return in redaction database by legacy data storehouse; Step 308, judge whether there is next data list structure information in the first data list structure information, if so, then perform step 306, if not, then perform step 309, exit database recovery process;
If inconsistent or have executive routine, then perform following steps: step 310, according to the executive routine in the type of change and policy configuration file corresponding to change type, to be returned in legacy data storehouse in redaction database; Unenforced executive routine whether is had in step 311, determination strategy configuration file,
If so, then following steps are performed: step 312, perform unenforced executive routine; Step 308, judge whether there is next data list structure information in the first data list structure information;
If not, then perform step 308, judge whether there is next data list structure information in the first data list structure information.
In step 306, read the first data list structure information in backup file, and compare with the second data list structure information, judge that whether the data list structure in legacy data storehouse is consistent with the data list structure of redaction database; Whether be the executive routine that null value carrys out whether to have in determination strategy configuration file preset strategy by determination strategy configuration file, if policy configuration file is null value, the then executive routine of Non-precondition strategy in policy configuration file, if policy configuration file is not null value, then there is the executive routine of preset strategy in policy configuration file.
In step 307, the mode directly returned in legacy data storehouse in redaction database can be block copy mode.
In step 308, by judging whether there is next data list structure information in the first data list structure information and performs later steps, each tables of data can be processed successively, tables of data recovered that needs all in legacy data storehouse can be returned in redaction database.
In step 310, the rule strategically configured in configuration file, performs executive routine, is returned in legacy data storehouse in redaction database, and its mode recovered can be block copy mode.Wherein, the type of change and the preset strategy of correspondence are as described in embodiment one.
In step 311, in policy configuration file, unenforced executive routine can be sql like language, also can be command code.
In step 312, performing unenforced program in the process of database recovery, can modify the data in legacy data storehouse, makes the data returned in redaction database be amended version.
The mode that the database restoring method that the present embodiment two provides utilizes database recovery process and policy configuration file to combine carrys out the recovery of process database, by Establishment strategy configuration file make in rejuvenation by need in legacy data storehouse revise content revise, make the data returned in redaction database be amended data.And user can freely collocation strategy configuration file, meets the demand of various user well.
Embodiment three:
Fig. 4 gives the structural drawing of the database recovery device that the embodiment of the present invention three provides.As shown in Figure 4, this device comprises:
Legacy data library information acquisition module 401, for obtaining legacy data library information, legacy data library information comprises the first data list structure information, data content and version number.
In the present embodiment, the first data list structure information can be the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type.
Redaction database information acquisition module 402, for obtaining redaction database information, redaction database information comprises the second data list structure information.
In the present embodiment, the second data list structure information can be the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
Judge module 403, for according to the first data list structure information and the second data list structure information, judge that whether the data list structure in legacy data storehouse is consistent with the data list structure of redaction database, if, then direct legacy data storehouse is returned in redaction database, if not, then perform next step.
In the present embodiment, directly by legacy data storehouse, the mode returned in redaction database can be block copy mode, and this mode can improve the speed of database recovery.
Change type acquisition module 404, for according to the first data list structure information and the second data list structure information, obtains relative to legacy data storehouse, the type of redaction database change.
In the present embodiment, the type of change can comprise delete list, increase table, table renames, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type.
Preset strategy configuration file sets up module 405, for setting up preset strategy configuration file, preset strategy configuration file comprises the executive routine of preset strategy, wherein, table renames, increase row, arrange the executive routine renaming and arrange preset strategy corresponding to change data type can be edited by user, and the executive routine of the preset strategy configuration that delete list, increase table, delete columns and row change order are corresponding can pre-set.
Recover module 406, for the preset strategy corresponding according to the type of change, legacy data storehouse is returned in redaction database.
In the present embodiment, the preset strategy that delete list is corresponding can be skip over the recovery to the table deleted; The preset strategy that increase table is corresponding can be skip over the recovery to newly-increased table; The table corresponding preset strategy that renames can be to be returned in the table that renames in redaction database in legacy data storehouse by the table renamed; The preset strategy that delete columns is corresponding can be skip over the recovery to the row deleted; Increasing preset strategy corresponding to row can be skip over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The row corresponding preset strategy that renames can be to be returned in the row that rename in redaction database in legacy data storehouse by the row renamed; The preset strategy of row change order correspondence can be the order according to arranging in redaction database, is returned to by the row in legacy data storehouse in redaction database; The preset strategy that row change data type corresponding can be return in redaction database after the value in legacy data storehouse is converted to new data type, if cannot change, then the row in redaction database is reverted to the value of specifying.
In the present embodiment, the mode returned in legacy data storehouse in redaction database can be block copy mode, and this mode can improve the speed of database recovery.
The present in database recovery system that the embodiment of the present invention three provides is by analyzing the data list structure in legacy data storehouse and the data list structure of redaction database, obtain the type changed, again according to type and the corresponding preset strategy of change, the legacy data storehouse of backup is returned in redaction database, achieve the forward compatibility of database recovery, make during database recovery, not need database to quit work, can be implemented in line and recover, and step is simple, consuming time less.
The know-why that above are only preferred embodiment of the present invention and use.The invention is not restricted to specific embodiment described here, the various significant changes can carried out for a person skilled in the art, readjust and substitute all can not depart from protection scope of the present invention.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by the scope of claim.

Claims (10)

1. a database restoring method, is characterized in that, comprising:
Obtain legacy data library information, described legacy data library information comprises the first data list structure information, data content and version number;
Obtain redaction database information, described redaction database information comprises the second data list structure information;
According to described first data list structure information and described second data list structure information, judge that whether the data list structure in described legacy data storehouse is consistent with the data list structure of described redaction database, if, then direct described legacy data storehouse is returned in described redaction database, if not, then perform next step;
According to described first data list structure information and described second data list structure information, obtain relative to described legacy data storehouse, the type of described redaction database change;
The preset strategy corresponding according to the type of described change, returns to described legacy data storehouse in described redaction database.
2. database restoring method according to claim 1, it is characterized in that, described first data list structure information is the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type; Described second data list structure information is the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
3. database restoring method according to claim 1, it is characterized in that, the type of described change comprises delete list, increase table, table renames, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type, and the preset strategy that described delete list is corresponding skips over the recovery to the table deleted; The preset strategy that described increase table is corresponding skips over the recovery to newly-increased table; The described table corresponding preset strategy that renames to be returned in the table that renames in described redaction database in described legacy data storehouse by the table renamed; The preset strategy that described delete columns is corresponding skips over the recovery to the row deleted; Described preset strategy corresponding to row that increase skips over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The described row corresponding preset strategy that renames to be returned in the row that rename in described redaction database in described legacy data storehouse by the row renamed; The preset strategy of described row change order correspondence is the order according to arranging in described redaction database, is returned to by the row in described legacy data storehouse in described redaction database; The preset strategy that described row change data type corresponding returns in described redaction database after the value in described legacy data storehouse is converted to new data type, if cannot change, then the row in described redaction database reverted to the value of specifying.
4. database restoring method according to claim 3, is characterized in that, described acquisition redaction database information, and described redaction database information also comprises before comprising the second data list structure information:
Set up preset strategy configuration file, described preset strategy configuration file comprises the executive routine of described preset strategy, wherein, described table renames, increase row, arrange the executive routine renaming and arrange preset strategy corresponding to change data type is edited by user, and the executive routine of the preset strategy configuration that described delete list, increase table, delete columns and row change order are corresponding pre-sets.
5. according to the arbitrary described database restoring method of claim 1-4, it is characterized in that, the described described legacy data storehouse mode returned in described redaction database by backup is block copy mode.
6. a database recovery device, is characterized in that, comprising:
Legacy data library information acquisition module, for obtaining legacy data library information, described legacy data library information comprises the first data list structure information, data content and version number;
Redaction database information acquisition module, for obtaining redaction database information, described redaction database information comprises the second data list structure information;
Judge module, for according to described first data list structure information and described second data list structure information, judge that whether the data list structure in described legacy data storehouse is consistent with the data list structure of described redaction database, if, then direct described legacy data storehouse is returned in described redaction database, if not, then perform next step;
Change type acquisition module, for according to described first data list structure information and described second data list structure information, obtains relative to described legacy data storehouse, the type of described redaction database change;
Recover module, for the preset strategy corresponding according to the type of described change, described legacy data storehouse is returned in described redaction database.
7. database recovery device according to claim 6, it is characterized in that, described first data list structure information is the combination of any one or at least two kinds in the first database name, the first data table name, first row name, first row length and first row data type; Described second data list structure information is the combination of any one or at least two kinds in the second database name, the second data table name, secondary series name, secondary series length and secondary series data type.
8. database recovery device according to claim 6, it is characterized in that, the type of described change comprises delete list, increase table, table renames, delete columns, increase row, row rename, arrange the combination that change order and row change any one or at least two kinds in data type, and the preset strategy that described delete list is corresponding skips over the recovery to the table deleted; The preset strategy that described increase table is corresponding skips over the recovery to newly-increased table; The described table corresponding preset strategy that renames to be returned in the table that renames in described redaction database in described legacy data storehouse by the table renamed; The preset strategy that described delete columns is corresponding skips over the recovery to the row deleted; Described preset strategy corresponding to row that increase skips over default value, null value or the indicated value preset the recovery of newly-increased row or be set to by newly-increased row; The described row corresponding preset strategy that renames to be returned in the row that rename in described redaction database in described legacy data storehouse by the row renamed; The preset strategy of described row change order correspondence is the order according to arranging in described redaction database, is returned to by the row in described legacy data storehouse in described redaction database; The preset strategy that described row change data type corresponding returns in described redaction database after the value in described legacy data storehouse is converted to new data type, if cannot change, then the row in described redaction database reverted to the value of specifying.
9. database recovery device according to claim 8, is characterized in that, also comprise:
Preset strategy configuration file sets up module, for setting up preset strategy configuration file, described preset strategy configuration file comprises the executive routine of described preset strategy, wherein, described table renames, increase row, arrange the executive routine renaming and arrange preset strategy corresponding to change data type is edited by user, and the executive routine of the preset strategy configuration that described delete list, increase table, delete columns and row change order are corresponding pre-sets.
10. according to the arbitrary described database recovery device of claim 6-9, it is characterized in that, the described described legacy data storehouse mode returned in described redaction database by backup is block copy mode.
CN201410646176.4A 2014-11-14 2014-11-14 Database recovery method and device Pending CN104376073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410646176.4A CN104376073A (en) 2014-11-14 2014-11-14 Database recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410646176.4A CN104376073A (en) 2014-11-14 2014-11-14 Database recovery method and device

Publications (1)

Publication Number Publication Date
CN104376073A true CN104376073A (en) 2015-02-25

Family

ID=52554980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410646176.4A Pending CN104376073A (en) 2014-11-14 2014-11-14 Database recovery method and device

Country Status (1)

Country Link
CN (1) CN104376073A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715041A (en) * 2015-03-24 2015-06-17 深圳市乾华数据科技有限公司 Database recovery method and system
CN106503019A (en) * 2015-09-08 2017-03-15 中兴通讯股份有限公司 A kind of method and apparatus for obtaining databases comparison information
CN106714328A (en) * 2016-12-23 2017-05-24 深圳市万普拉斯科技有限公司 LTE (Long Term Evolution) based network recovery method and device and mobile terminal
CN107924344A (en) * 2015-09-01 2018-04-17 微软技术许可有限责任公司 With the interoperability of old-fashioned client
CN108009049A (en) * 2017-11-28 2018-05-08 厦门市美亚柏科信息股份有限公司 The offline restoration methods of MYISAM storage engines deletion records, storage medium
CN109582504A (en) * 2018-12-05 2019-04-05 深圳软牛科技有限公司 A kind of data reconstruction method and device for apple equipment
CN109918386A (en) * 2019-01-31 2019-06-21 北京明略软件系统有限公司 A kind of data reconstruction method and device, computer readable storage medium
CN112925743A (en) * 2021-02-07 2021-06-08 中国工商银行股份有限公司 File generation method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN101464895A (en) * 2009-01-21 2009-06-24 阿里巴巴集团控股有限公司 Method, system and apparatus for updating internal memory data
US7756818B1 (en) * 1999-07-07 2010-07-13 Computer Associates Think, Inc. Database table recovery system
CN101908064A (en) * 2010-07-20 2010-12-08 中兴通讯股份有限公司 Data base backup recovery method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7756818B1 (en) * 1999-07-07 2010-07-13 Computer Associates Think, Inc. Database table recovery system
CN1659522A (en) * 2002-04-19 2005-08-24 电脑联合想象公司 Method and system for disaster recovery
CN101464895A (en) * 2009-01-21 2009-06-24 阿里巴巴集团控股有限公司 Method, system and apparatus for updating internal memory data
CN101908064A (en) * 2010-07-20 2010-12-08 中兴通讯股份有限公司 Data base backup recovery method and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104715041A (en) * 2015-03-24 2015-06-17 深圳市乾华数据科技有限公司 Database recovery method and system
CN104715041B (en) * 2015-03-24 2018-09-14 深圳市乾华数据科技有限公司 A kind of database restoring method and system
CN107924344A (en) * 2015-09-01 2018-04-17 微软技术许可有限责任公司 With the interoperability of old-fashioned client
CN107924344B (en) * 2015-09-01 2022-04-19 微软技术许可有限责任公司 Method for interoperating with old client and server system
CN106503019A (en) * 2015-09-08 2017-03-15 中兴通讯股份有限公司 A kind of method and apparatus for obtaining databases comparison information
CN106714328A (en) * 2016-12-23 2017-05-24 深圳市万普拉斯科技有限公司 LTE (Long Term Evolution) based network recovery method and device and mobile terminal
CN106714328B (en) * 2016-12-23 2019-10-29 深圳市万普拉斯科技有限公司 Network recovery method, device and mobile terminal based on LTE communication
CN108009049A (en) * 2017-11-28 2018-05-08 厦门市美亚柏科信息股份有限公司 The offline restoration methods of MYISAM storage engines deletion records, storage medium
CN109582504A (en) * 2018-12-05 2019-04-05 深圳软牛科技有限公司 A kind of data reconstruction method and device for apple equipment
CN109918386A (en) * 2019-01-31 2019-06-21 北京明略软件系统有限公司 A kind of data reconstruction method and device, computer readable storage medium
CN109918386B (en) * 2019-01-31 2021-04-30 北京明略软件系统有限公司 Data recovery method and device and computer readable storage medium
CN112925743A (en) * 2021-02-07 2021-06-08 中国工商银行股份有限公司 File generation method and device and storage medium

Similar Documents

Publication Publication Date Title
CN104376073A (en) Database recovery method and device
KR101556435B1 (en) Database backing-up and recovering method and device
CN103309797B (en) User interface automated testing method and device
CN102279749B (en) Method and equipment for merging codes
CN103514295B (en) historical data archiving method and historical data archiving device
CN105302533A (en) Code synchronizing method and apparatus
CN104331285A (en) Automatic code generation method and system
CN105683940A (en) Processing a data flow graph of a hybrid flow
CN103514231A (en) File naming method and electronic device
CN102682127B (en) Data version control method
CN107479881B (en) Method for synchronizing difference codes, storage medium, electronic device and system
CN103246549B (en) A kind of method and system of data conversion storage
CN103473076A (en) Issuing method and issuing system for code version
CN103914458A (en) Mass data migration method and device
CN106484892A (en) Data manipulation method and device
US9037539B2 (en) Data synchronization
CN103645905A (en) Incremental data acquisition method and device
CN105373631A (en) SQLSever-based automatic upgrading method for database structure
CN105373636A (en) Enterprise Windchill system based ProE standard part library construction method
CN102043853A (en) Method and device for updating stored data
CN110673849B (en) Method and device for presetting file security contexts in batches
CN110019128A (en) A kind of system of the synchronization MSSQL data of EXCEL application
CN106897434A (en) A kind of data lead-in method, apparatus and system
CN103309899A (en) Data protection system file index structure and updating and positioning methods
CN110333906B (en) Method, system, device and storage medium for rapidly processing reserved equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150225

WD01 Invention patent application deemed withdrawn after publication