CN102063491A - Data structure capable of realizing data back-up and restoration of different types of databases and realization method - Google Patents

Data structure capable of realizing data back-up and restoration of different types of databases and realization method Download PDF

Info

Publication number
CN102063491A
CN102063491A CN 201010613619 CN201010613619A CN102063491A CN 102063491 A CN102063491 A CN 102063491A CN 201010613619 CN201010613619 CN 201010613619 CN 201010613619 A CN201010613619 A CN 201010613619A CN 102063491 A CN102063491 A CN 102063491A
Authority
CN
China
Prior art keywords
data
database
content
txt
name
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
CN 201010613619
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.)
Inspur Group Shandong General Software Co Ltd
Original Assignee
Inspur Group Shandong General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Group Shandong General Software Co Ltd filed Critical Inspur Group Shandong General Software Co Ltd
Priority to CN 201010613619 priority Critical patent/CN102063491A/en
Publication of CN102063491A publication Critical patent/CN102063491A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a data structure capable of realizing data back-up and restoration of different types of databases and a realization method, belonging to the application field of the databases. The data structure comprises the following properties of system number, data object name, data structure, type, chart serial number, turn rows and turn line number and is used for recording data chart information of a database which needs to be copied and restored. Every line of data in the data structure identifies the figure in the data base which needs to be copied. Compared with the prior art, the data structure capable of realizing data back-up and restoration of different types of databases and the realization method have the characteristics of being simple and universal and not being limited by development platforms and the like, are wildly applied to the back-up and restoration work of the database of an enterprise information system and have favorable popularization and application values.

Description

Can realize striding the data structure and the implementation method of distinct type data-base data backup restoration
Technical field
The present invention relates to the database application field, specifically a kind of data structure and implementation method that realizes striding the distinct type data-base data backup restoration.
Background technology
The business management software user will often carry out Database Backup and recover, and these backups usually also is selectively, need be able to customize.Carry out the integration across database release migration of data when also usually having the user that database need be changed.It all is the whole backup of database that the backup of database itself recovers instrument, and backup content client can't customize, and the more important thing is between different vendor's database and can not back up recovery, can not carry out the integration across database migration.
Summary of the invention
Technical assignment of the present invention is at above-mentioned the deficiencies in the prior art, and a kind of data structure and implementation method that realizes striding the distinct type data-base data backup restoration is provided.But utilize this method can customize ground integration across database type and carry out data backup restoration.
Technical assignment of the present invention is realized in the following manner: the data structure (table name is LSTABN) that can realize striding the distinct type data-base data backup restoration, be characterized in, this data structure comprises following attribute: system's numbering, data object name, table identification name, type, table sequence number, produce row, produce line number (seeing Table one), be used for needing backup and data recovered table information in the database of record, need the table that backs up in this data structure in database of each line data sign.
Can realize striding the implementation method of distinct type data-base data backup restoration, comprise:
A, by one group of data structure, be used for the information of database of record table, this data structure comprises: system's numbering, data table name, show identification name, type, table sequence number, produce row, produce line number; Data structure LSTABN list structure as shown in Table 1;
B, tables of data information classification in the database is stored in the data structure;
C, backed up data table data are stored by document with fixed format; This group file comprises LSTABLE.TXT, LSTABN.TXT, Fxxxxxxx.TXT, LSBOLB.txt, Txxxxxxx.cnt;
D, recover by storage file resolve being realized the integration across database data.
Figure BSA00000403550000021
Table one
Furtherly,
The attribute that data structure among the A is shown in can database of record, recorded content comprises that affiliated system, object identity name, the object of database table comprise row identification name, data type, sequence number, backed up data row and record number.
Document with fixed format among the C comprises:
A:LSTABLE.TXT is used for needing to back up in the stored data base object of recovery, and the storage file of the content of these data object correspondences and content correspondence, and each line data content comprises:
System's numbering The data object name The file of storage data object The storage file sequence number Data object is created definition
Separate with comma in the middle of each column data;
B:LSTABN.TXT, the content of store data structure LSTABN, in restore data and the target database correspondence, the content that each line data comprises:
System's numbering The data object name The table identification name Type The table sequence number Produce row Produce line number
Separate with tab in the middle of each column data;
Totally seven of C:Fxxxxxxx.TXT, xxxxxxx are the numeral numbers of storage file, and this document is used for storing the content of data object, a line item of each each table of line item, and the centre separates with tab;
The D:LSBOLB.txt file, the big text data content in the stored data base, big text are with the binary type storage in database, the backup restore data is wanted individual processing, the content that each row comprises:
Figure BSA00000403550000022
Separate with tab in the middle of the content of each row;
Totally seven of E:Txxxxxxx.cnt, xxxxxxx are the digital numbers of file, and what this document was stored is the content of big text, stores with binary format.
According to the definition of data content of user, database data is stored in several files of above explanation during Backup Data at LSTABN.During restore data, utilize the content that exists in these files, form the SQL statement of creating data object and inserting data, in target database, carry out, thereby realize the purpose that data are recovered.
The data structure and the implementation method of striding the distinct type data-base data backup restoration of realizing of the present invention compared with prior art has following outstanding beneficial effect:
This method can customize, and can stride distinct type data-base and back up recovery.The client not only can customize as required oneself will back up data recovered, also can utilize it to carry out the migration of data.Solve the database of enterprise practical in using and change the integration across database type of bringing and carry out the data backup restoration problem, can very big saving user change the cost of data, avoid the risk of loss of data.While allows the user to customize in the backup restore data, can remove the junk data that does not have practical use, dwindles the size of data file, convenient storage and reservation.
Description of drawings
Accompanying drawing 1 can realize striding the FB(flow block) of the implementation method of distinct type data-base data backup restoration for the present invention.
Embodiment
Explain below with embodiment and embodiment the data structure that realizes striding the distinct type data-base data backup restoration of the present invention and implementation method being done.
Embodiment:
As shown in Figure 1, the present invention can realize striding in the implementation method of distinct type data-base data backup restoration, needs the table LSTABN of the information of the table that backs up to store one group of data storage file in the data based database of record in the source database; Target database according to the information analysis data storage file of the needs recovery table that writes down among the LSTABN in the database, returns to target database again.
Embodiment:
1, definition LSTABN list structure, this table is used for depositing customization need back up the data recovered content.
Specify as follows:
System's numbering (F_XTBH): which system is identified data object belong to, and is convenient to Classification Management.
Data object (F_TABN): need back up data recovered object name, for example: person chart, credentials table;
F_TABN and F_XTBH constitute LSTABN table unique index.
Table identification name (F_NAME): to explanation and the description of F_TABN.
Table sequence number (F_ORDE): the serial number when backup recovers.
Produce row (F_COLS): definition need be carried out the row of the table of data backup restoration, if all row are represented with *.
Produce line number (F_RANG): this table produces the maximum number of lines of the storage file of data line one-tenth.
Type (F_TYPE): need backup data recovered object type, six altogether all is 0/1 yard, attribute of each identified data object, and whether first bit-identify is view; Whether second bit-identify is storing process; Whether the 3rd bit-identify contains big text data; Whether the 4th bit-identify carries out data backup restoration according to the F_COLS row content of definition; The 5th is whether data report; Whether the 6th bit-identify data back up.For example: 000101, represent that this data object is a common table, need backup to recover, when recovering, backup only handles the data of the row of F_COLS definition.
2, Backup Data is pressed set form to data in the database and is formed data file according to the LSTABN customized content.Utilize computing machine the file layout formation local file of the data object data that in 1, define among the LSTABN by the set form of requirement of the present invention.Process is as follows:
(1) to from database, read LSTABN table content earlier, form the LSTABN.TXT file.
(2) the backed up data object that needs of definition in the LSTABN table is formed the LSTABLE.TXT file.
(3) content that needs the backed up data object of definition in the LSTABN table is formed the Fxxxxxxx.txt file
(4) if there are the data of big text, write the relevant information of these tables among the LSBOLB.txt.Simultaneously big content of text is stored in the Txxxxxxx.cnt file.
3, restore data is carried out dissection process according to backing up the file of coming out, and forms the SQL statement of creating data object and inserting data, utilizes SQL statement realization data to recover.Process is as follows in the processing:
(1) to arrive the content that LSTABN.TXT finds the data object that needs restore data and needs to recover earlier.
(2) in LSTABLE.TXT, find the establishment definition of object that data object is created.
(3) in LSTABLE.TXT, obtain the file of storing data, data are formed SQL statement be inserted in the data object.
(4),, the content of depositing among the Txxxxxxx.cnt is updated in the table by SQL UPDAET statement according to the table and the index column of the record among the LSBOLB.txt if there are the data of big text.Embodiment: (backup of the voucher tables of data of ledgers module recovers definition for example)
(1) LSTABN data definition:
System's numbering The data object name The table identification name Type The table sequence number Produce row Produce line number
ZW ZWPZK Credentials table 000101 001 * 3000
The LSTABLE.TXT that forms when (2) backing up (separating with tab between each row)
Figure BSA00000403550000051
(3) when backup F1440001.TXT (separating with tab between each row) F1440001.TXT (separating with tab between each row) that the ZWPZK content is formed
1 2002 10 20021001 90001 4 2 test01 test02 test01 The financial executive 1 1 1 0 0 GDJZZB
10 2002 10 20021005 30005 3 1 test01 test02 test01 The financial executive 1 1 1 0 0 GDJZZB
11 2002 10 20021005 20002 2 1 test01 test02 test01 The financial executive 1 1 1 0 0 GDJZZB
(4) also comprising the data of big text in this table, is exactly big the text field at the ZWPZK_DYGS row, needs to form LSBOLB.txt
Figure BSA00000403550000052
Simultaneously ZWPZK_DYGS is listed as content stores to a Txxxxxxx.cnt file of depositing.
When (5) carrying out the data recovery, at first determine to recover the ZWPZK table according to the LSTABN.TXT content, utilize the LSTABLE.TXT content to form CREATE TABLE SQL statement then and create the ZWPZK table, then the data of corresponding stored file F1440001.TXT are formed INSERT INTO SQL statement and be inserted in the ZWPZK table.Consider big text at last again, press the content of LSBLOB.TXT record, form the ZWPZK_DYGS field that the UPDATE statement upgrades the ZWPZK table.

Claims (4)

1. can realize striding the data structure of distinct type data-base data backup restoration, it is characterized in that, this data structure comprises following attribute: system's numbering, data object name, table identification name, type, table sequence number, produce row, produce line number, be used for needing backup and data recovered table information in the database of record, need the table that backs up in this data structure in database of each line data sign.
2. can realize striding the implementation method of distinct type data-base data backup restoration, it is characterized in that,
A, by one group of data structure, be used for the information of database of record table, this data structure comprises: system's numbering, data table name, show identification name, type, table sequence number, produce row, produce line number;
B, tables of data information classification in the database is stored in the data structure;
C, backed up data table data are stored by document with fixed format; This group file comprises LSTABLE.TXT, LSTABN.TXT, Fxxxxxxx.TXT, LSBOLB.txt, Txxxxxxx.cnt;
D, recover by storage file resolve being realized the integration across database data.
3. the implementation method that realizes striding the distinct type data-base data backup restoration according to claim 2, it is characterized in that, the attribute that data structure among the A is shown in can database of record, recorded content comprises that affiliated system, object identity name, the object of database table comprise row identification name, data type, sequence number, backed up data row and record number.
4. the implementation method that realizes striding the distinct type data-base data backup restoration according to claim 2 is characterized in that, the document with fixed format among the C comprises:
Document with fixed format among the C comprises:
A:LSTABLE.TXT, be used for needing to back up in the stored data base object of recovery, and the storage file of the content of these data object correspondences and content correspondence, each line data content comprises: file, storage file sequence number and the data object of system's numbering, data object name, storage data object are created definition, separate with comma in the middle of each column data;
B:LSTABN.TXT, the content of store data structure LSTABN, for in restore data and the target database correspondence, each line data content comprises: system's numbering, data object name, table identification name, type, table sequence number, produce row and produce line number, separates with tab in the middle of each column data;
Totally seven of C:Fxxxxxxx.TXT, xxxxxxx are the numeral numbers of storage file, and this document is used for storing the content of data object, a line item of each each table of line item, and the centre separates with tab;
The D:LSBOLB.txt file, big text data content in the stored data base, big text is to store with binary type in database, the backup restore data is wanted individual processing, the content that each row comprises: comprise big text table name, big text row name, the index column of unique identification one line item of corresponding tables energy, the field type of index column, wherein, the field type of index column separates with branch, separates with tab in the middle of the content of each row;
Totally seven of E:Txxxxxxx.cnt, xxxxxxx are the digital numbers of file, and what this document was stored is the content of big text, stores with binary format.
CN 201010613619 2010-12-30 2010-12-30 Data structure capable of realizing data back-up and restoration of different types of databases and realization method Pending CN102063491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010613619 CN102063491A (en) 2010-12-30 2010-12-30 Data structure capable of realizing data back-up and restoration of different types of databases and realization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010613619 CN102063491A (en) 2010-12-30 2010-12-30 Data structure capable of realizing data back-up and restoration of different types of databases and realization method

Publications (1)

Publication Number Publication Date
CN102063491A true CN102063491A (en) 2011-05-18

Family

ID=43998766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010613619 Pending CN102063491A (en) 2010-12-30 2010-12-30 Data structure capable of realizing data back-up and restoration of different types of databases and realization method

Country Status (1)

Country Link
CN (1) CN102063491A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938862A (en) * 2012-10-17 2013-02-20 深圳Tcl新技术有限公司 Television and user interface customizing method and device for television
CN103294724A (en) * 2012-03-05 2013-09-11 百度在线网络技术(北京)有限公司 Method for managing database structures and system for method
CN103425551A (en) * 2013-07-31 2013-12-04 清华大学 Database concentrated backup method
CN103942125A (en) * 2014-05-06 2014-07-23 南宁博大全讯科技有限公司 Automatic backup method and system
CN104281704A (en) * 2014-10-22 2015-01-14 新华瑞德(北京)网络科技有限公司 Database data copying method and device
CN105068888A (en) * 2015-08-03 2015-11-18 四川效率源信息安全技术有限责任公司 Oracle database based data recovery method
CN105068887A (en) * 2015-08-03 2015-11-18 四川效率源信息安全技术有限责任公司 SQLServer database based data recovery method
CN106227710A (en) * 2016-07-26 2016-12-14 浪潮通用软件有限公司 A kind of data file transition collocation method based on EXCEL
CN103678520B (en) * 2013-11-29 2017-03-29 中国科学院计算技术研究所 A kind of multi-dimensional interval query method and its system based on cloud computing
CN106547646A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of data backup and restoration methods, data backup and recovery device
CN106708830A (en) * 2015-08-03 2017-05-24 四川效率源信息安全技术有限责任公司 Data recovery method based on large database
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN110928899A (en) * 2019-11-29 2020-03-27 中孚安全技术有限公司 Universal database backup method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729735A (en) * 1995-02-08 1998-03-17 Meyering; Samuel C. Remote database file synchronizer
CN1549128A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Databank back-up method
CN101789021A (en) * 2010-02-24 2010-07-28 浪潮通信信息系统有限公司 Universal configurable database data migration method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5729735A (en) * 1995-02-08 1998-03-17 Meyering; Samuel C. Remote database file synchronizer
CN1549128A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Databank back-up method
CN101789021A (en) * 2010-02-24 2010-07-28 浪潮通信信息系统有限公司 Universal configurable database data migration method

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294724A (en) * 2012-03-05 2013-09-11 百度在线网络技术(北京)有限公司 Method for managing database structures and system for method
CN102938862A (en) * 2012-10-17 2013-02-20 深圳Tcl新技术有限公司 Television and user interface customizing method and device for television
CN103425551A (en) * 2013-07-31 2013-12-04 清华大学 Database concentrated backup method
CN103678520B (en) * 2013-11-29 2017-03-29 中国科学院计算技术研究所 A kind of multi-dimensional interval query method and its system based on cloud computing
CN103942125A (en) * 2014-05-06 2014-07-23 南宁博大全讯科技有限公司 Automatic backup method and system
CN104281704A (en) * 2014-10-22 2015-01-14 新华瑞德(北京)网络科技有限公司 Database data copying method and device
CN105068887A (en) * 2015-08-03 2015-11-18 四川效率源信息安全技术有限责任公司 SQLServer database based data recovery method
CN105068888A (en) * 2015-08-03 2015-11-18 四川效率源信息安全技术有限责任公司 Oracle database based data recovery method
CN106708830A (en) * 2015-08-03 2017-05-24 四川效率源信息安全技术有限责任公司 Data recovery method based on large database
CN105068888B (en) * 2015-08-03 2018-08-14 四川效率源信息安全技术股份有限公司 A kind of data reconstruction method based on oracle database
CN105068887B (en) * 2015-08-03 2019-02-12 四川效率源信息安全技术股份有限公司 It is a kind of based on the data reconstruction method for being damaged SQLServer database
CN106708830B (en) * 2015-08-03 2020-08-14 四川效率源信息安全技术股份有限公司 Data recovery method based on large database
CN106547646A (en) * 2015-09-23 2017-03-29 阿里巴巴集团控股有限公司 A kind of data backup and restoration methods, data backup and recovery device
CN106547646B (en) * 2015-09-23 2020-06-16 菜鸟智能物流控股有限公司 Data backup and recovery method and data backup and recovery device
CN106227710A (en) * 2016-07-26 2016-12-14 浪潮通用软件有限公司 A kind of data file transition collocation method based on EXCEL
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN110928899A (en) * 2019-11-29 2020-03-27 中孚安全技术有限公司 Universal database backup method and system
CN110928899B (en) * 2019-11-29 2023-06-20 中孚安全技术有限公司 Universal database backup method and system

Similar Documents

Publication Publication Date Title
CN102063491A (en) Data structure capable of realizing data back-up and restoration of different types of databases and realization method
CN102521225B (en) Incremental data extraction device and incremental data extraction method
CN104040481B (en) Method and system for merging, storing and retrieving incremental backup data
US8601361B2 (en) Automatically populating and/or generating tables using data extracted from files
CN100429628C (en) Method for rebuilding directory structure and recovering data in NTFS volume
CN104239443B (en) A kind of storage method of serialized data operation log
JP5102838B2 (en) Migration apparatus and method for converting mainframe system database to database suitable for open system
WO1998035285A2 (en) Database/template driven file selection for backup programs
CN104376091A (en) Method and device for recovering deleted data in SQLite
CN104714859A (en) Rapid backup and recovery method of mass files
CN102388369B (en) Be derived from the life cycle of the granularity application data of single backup
CN101504672A (en) Method and system for dynamically configuring physical data table
WO2011075610A1 (en) System and method for creating a de-duplicated data set
US8943024B1 (en) System and method for data de-duplication
CN102402562A (en) Database remote disaster tolerant method and system
CN108319645B (en) Multi-version file view management method and device in heterogeneous storage environment
CN107885616A (en) A kind of mass small documents back-up restoring method based on file system parsing
CN104461773A (en) Backup deduplication method of virtual machine
CN103838780A (en) Data recovery method of database and relevant device
US8065277B1 (en) System and method for a data extraction and backup database
CN103176867A (en) Fast file differential backup method
CN106155838A (en) A kind of database back-up data restoration methods and device
CN1791873B (en) Undrop objects and dependent objects in a database system
AL-Msie'deen et al. Detecting commonality and variability in use-case diagram variants
CN106648474A (en) Virtual machine disk recovery method based on logical volume

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110518