CN103049566A - Universal database backup and restoring method - Google Patents

Universal database backup and restoring method Download PDF

Info

Publication number
CN103049566A
CN103049566A CN2012105930027A CN201210593002A CN103049566A CN 103049566 A CN103049566 A CN 103049566A CN 2012105930027 A CN2012105930027 A CN 2012105930027A CN 201210593002 A CN201210593002 A CN 201210593002A CN 103049566 A CN103049566 A CN 103049566A
Authority
CN
China
Prior art keywords
data
file
database
data object
backup
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012105930027A
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.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
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 CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN2012105930027A priority Critical patent/CN103049566A/en
Publication of CN103049566A publication Critical patent/CN103049566A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a universal database backup and restoring method. The universal database backup and restoring method includes setting object types to be backed up including tables, test grams, storage process, functions or user-defined objects and the like according to user requirements; backing up one or more types or all types and realizing backup and restoring of fine grits of data objects; packaging a plurality of mainstream databases in a database engine, setting up a database to be backed up according the user requirements, and integrating an application system and multiple databases; and recording various error information during data backup, and searching and positioning error positions according to the error information when abnormalities appear.

Description

A kind of universal DB Backup and restoration methods
Technical field
The present invention relates to computer application field, be specifically related to a kind of universal DB Backup and restoration methods.
Background technology
For the data base backup recovery mode, each database manufacturer all provides the backup of application to recover instrument, the backup that these instruments can satisfy data to a certain extent recovers demand, major part can only back up by user mode, table mode and full storehouse mode, can not classify and carry out fine-grained backup and recover, and in backup rejuvenation, occur being difficult to the location errors present in unusual; In addition, these instruments are difficult to seamless being integrated in the application system.
Summary of the invention
In view of this, the invention provides a kind of universal DB Backup and restoration methods, can back up and recover multitype database.
A kind of universal DB Backup of the present invention and restoration methods comprise the steps:
Step 1, building database engine, the client protocol of the multiple Sybase of encapsulation in this data engine; The Database that database engine and client are needed rises and is connected, and reads all data objects of this database by data engine; Show data objects all in this database in the selection page that in data engine, generates for user selection, behind the user selection, the data object that back up of preservation user selection;
Step 2, set up the file read-write engine, be provided for storing the amount of capacity of the file of data to be grasped; According to the data object that the user who preserves in the step 1 will back up, the file read-write engine grasps data from this database, and order writes the content of the data object of crawl in the file body of file; In the file header of file, write simultaneously the essential information of this backup file with binary form by the file read-write engine;
Each file of file read-write engine real-time judge is the size of data writing, when the size of data equals the amount of capacity of file, stops to generate new file to the current file data writing, and data are continued to be written in the new file;
Described file read-write engine adopts and writes cache way with the data object writing in files, be specially: the file read-write engine is after database crawl data, first data object is temporarily stored into and writes the buffer zone, after writing data volume in the buffer zone and reaching this maximum size of writing buffer memory, in the described file of data one-time write wherein;
In above-mentioned crawl data procedures, at first read the dependence between each data object, according to grasping first the data object that is relied on by other data object, rear crawl is not relied on the order of data object, treats the crawl data object and writes caching process;
Step 3, according to the dependence between data object, data object order from file is read, and then return in the database; Wherein, in the process of recovering, if the data object that recovers is simple data mode, the index of data in the first deleted file then, pending data return to behind the database the again index of data reconstruction.
Database engine is periodically carried out the backup tasks of described step 2 according to the backup requirements of user to the data object.
Described data object is adopted cache way during from file to database recovery, namely first data object is temporarily stored into and writes the buffer zone, after writing the buffer zone data volume and reaching this maximum size of writing buffer memory, return in the database data wherein are disposable.
Various error messages in the record data backup procedure occur when unusual, according to error message Search and Orientation errors present.
The present invention has following beneficial effect:
The object type that 1) will back up according to the customer requirement setting comprises table, attempts, storing process, function or self-defined object etc., can only back up a class, multiclass or all, realizes fine-grained backup and the recovery of data object;
2) a plurality of Sybases of encapsulation in database engine are set up database to back up according to customer requirements, have realized the seamless integrated of application system and a plurality of databases;
3) the various error messages in the record data backup procedure occur when unusual, according to error message Search and Orientation errors present.
Embodiment
The below describes the present invention for embodiment.
The invention provides a kind of universal DB Backup and restoration methods, comprise the steps:
Step 1, building database engine encapsulate the client protocol of the multiple Sybases such as ORACLE, DB2, MySQL and MS SQL in this data engine; The Database that database engine and client are needed rises and is connected, and reads all data objects of this database by data engine, comprises table, view, storing process, function, self-defined object etc.; Show data objects all in this database in the selection page that in data engine, generates for user selection, behind the user selection, the data object that back up of preservation user selection;
Step 2, set up the file read-write engine, be provided for storing the amount of capacity of the file of data to be grasped; The data object that will back up according to the user who preserves in the step 1, the file read-write engine grasps data from this database, order writes the content of the data object of crawl in the file body of file, as builds predicative sentence, concrete data, storing process source code, what self-defined object factory statement of function source code etc.; In the file header of file, write simultaneously the essential information of this backup file with binary form by the file read-write engine, which file during such as BACKUP TIME, backup scope, this backup file sum and this document in this backup etc.;
Each file of file read-write engine real-time judge is the size of data writing, when the size of data equals the amount of capacity of file, stops to generate new file to the current file data writing, and data are continued to be written in the new file.So, can generate as required a certain size backup file, avoid some file size excessive.
In order to reduce the read-write frequency to disk, the file read-write engine adopts and writes cache way with the data object writing in files, be specially: the file read-write engine is after database crawl data, first data object is temporarily stored into and writes the buffer zone, after writing data volume in the buffer zone and reaching this maximum size of writing buffer memory, in the described file of data one-time write wherein, improve the write performance of database;
In some cases, in file rejuvenation, data object in certain database relies on other databases or object wherein, therefore, for fear of " also not creating; situation about just being relied on ", then need to recover first the data object that relied on this moment, recover again the data object do not relied on, so in above-mentioned crawl data procedures, at first read the dependence between each data object, according to grasping first the data object that is relied on by other data object, rear crawl is not relied on the order of data object, treats the crawl data object and writes caching process;
Step 3, according to the dependence between data object, data object order from file is read, and then return in the database; Wherein, in the process of recovering, if the data object that recovers is simple data mode, the index of data in the first deleted file then, pending data return to behind the database the again index of data reconstruction, so can improve the data loading performance.
Database engine is periodically carried out the backup tasks of described step 2 according to the backup requirements of user to the data object.
Described data object is adopted cache way during from file to database recovery, namely first data object is temporarily stored into and writes the buffer zone, after writing the buffer zone data volume and reaching this maximum size of writing buffer memory, return in the database data wherein are disposable.
Various error messages in the record data backup procedure occur when unusual, according to error message Search and Orientation errors present, are convenient to the customer analysis reason of makeing mistakes, and then deal with problems rapidly.
In sum, more than be preferred embodiment of the present invention only, be not for limiting protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (4)

1. a universal DB Backup and restoration methods is characterized in that, comprise the steps:
Step 1, building database engine, the client protocol of the multiple Sybase of encapsulation in this data engine; The Database that database engine and client are needed rises and is connected, and reads all data objects of this database by data engine; Show data objects all in this database in the selection page that in data engine, generates for user selection, behind the user selection, the data object that back up of preservation user selection;
Step 2, set up the file read-write engine, be provided for storing the amount of capacity of the file of data to be grasped; According to the data object that the user who preserves in the step 1 will back up, the file read-write engine grasps data from this database, and order writes the content of the data object of crawl in the file body of file; In the file header of file, write simultaneously the essential information of this backup file with binary form by the file read-write engine;
Each file of file read-write engine real-time judge is the size of data writing, when the size of data equals the amount of capacity of file, stops to generate new file to the current file data writing, and data are continued to be written in the new file;
Described file read-write engine adopts and writes cache way with the data object writing in files, be specially: the file read-write engine is after database crawl data, first data object is temporarily stored into and writes the buffer zone, after writing data volume in the buffer zone and reaching this maximum size of writing buffer memory, in the described file of data one-time write wherein;
In above-mentioned crawl data procedures, at first read the dependence between each data object, according to grasping first the data object that is relied on by other data object, rear crawl is not relied on the order of data object, treats the crawl data object and writes caching process;
Step 3, according to the dependence between data object, data object order from file is read, and then return in the database; Wherein, in the process of recovering, if the data object that recovers is simple data mode, the index of data in the first deleted file then, pending data return to behind the database the again index of data reconstruction.
2. a kind of universal DB Backup according to claim 1 and restoration methods is characterized in that, database engine is periodically carried out the backup tasks of described step 2 according to the backup requirements of user to the data object.
3. a kind of universal DB Backup according to claim 1 and restoration methods, it is characterized in that, described data object is adopted cache way during from file to database recovery, namely first data object is temporarily stored into and writes the buffer zone, after writing the buffer zone data volume and reaching this maximum size of writing buffer memory, return in the database data wherein are disposable.
4. a kind of universal DB Backup according to claim 1 and restoration methods is characterized in that, the various error messages in the record data backup procedure occur when unusual, according to error message Search and Orientation errors present.
CN2012105930027A 2012-12-31 2012-12-31 Universal database backup and restoring method Pending CN103049566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105930027A CN103049566A (en) 2012-12-31 2012-12-31 Universal database backup and restoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105930027A CN103049566A (en) 2012-12-31 2012-12-31 Universal database backup and restoring method

Publications (1)

Publication Number Publication Date
CN103049566A true CN103049566A (en) 2013-04-17

Family

ID=48062206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105930027A Pending CN103049566A (en) 2012-12-31 2012-12-31 Universal database backup and restoring method

Country Status (1)

Country Link
CN (1) CN103049566A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503904A (en) * 2014-12-12 2015-04-08 北京国双科技有限公司 Method and device for processing data stream
CN106571940A (en) * 2015-10-08 2017-04-19 中国移动通信集团广东有限公司 Method and device of fusing network management data and resource data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288534A1 (en) * 2006-06-07 2007-12-13 Dorota Zak Backup and recovery of integrated linked databases
CN102171661A (en) * 2008-09-30 2011-08-31 赛门铁克公司 Restoring selected objects from a monolithic database backup
CN102171660A (en) * 2008-09-30 2011-08-31 赛门铁克公司 Backing up and restoring selected versioned objects from a monolithic database backup
CN102495771A (en) * 2011-09-30 2012-06-13 奇智软件(北京)有限公司 Terminal object classified backup and recovery methods based on cloud architecture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288534A1 (en) * 2006-06-07 2007-12-13 Dorota Zak Backup and recovery of integrated linked databases
CN102171661A (en) * 2008-09-30 2011-08-31 赛门铁克公司 Restoring selected objects from a monolithic database backup
CN102171660A (en) * 2008-09-30 2011-08-31 赛门铁克公司 Backing up and restoring selected versioned objects from a monolithic database backup
CN102495771A (en) * 2011-09-30 2012-06-13 奇智软件(北京)有限公司 Terminal object classified backup and recovery methods based on cloud architecture

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503904A (en) * 2014-12-12 2015-04-08 北京国双科技有限公司 Method and device for processing data stream
CN104503904B (en) * 2014-12-12 2017-10-03 北京国双科技有限公司 The treating method and apparatus of data flow
CN106571940A (en) * 2015-10-08 2017-04-19 中国移动通信集团广东有限公司 Method and device of fusing network management data and resource data

Similar Documents

Publication Publication Date Title
US11226747B2 (en) System and method for copy on write on an SSD
US10146640B2 (en) Recovering a volume table and data sets
US10360182B2 (en) Recovering data lost in data de-duplication system
US8433867B2 (en) Using the change-recording feature for point-in-time-copy technology to perform more effective backups
US8635187B2 (en) Method and system of performing incremental SQL server database backups
US20140372383A1 (en) Log Access Method Storage Control Apparatus, Archive System, and Method of Operation
US10255235B2 (en) Database storage system based on jukebox and method using the system
US9996557B2 (en) Database storage system based on optical disk and method using the system
CN101777017B (en) Rapid recovery method of continuous data protection system
CN102591790B (en) Data based on solid state hard disc store snapshot implementing method and solid state hard disc
US20230251997A1 (en) Recovering the Metadata of Data Backed Up in Cloud Object Storage
US20130205084A1 (en) Stride based free space management on compressed volumes
CN109558213A (en) The method and apparatus for managing the virtual machine snapshot of OpenStack platform
CN104360914A (en) Incremental snapshot method and device
CN103034592A (en) Data processing method and device
CN104461773A (en) Backup deduplication method of virtual machine
US11977520B2 (en) Recovering from a pending uncompleted reorganization of a data set
CN103176868B (en) A kind of file status backup method
CN103049566A (en) Universal database backup and restoring method
CN107451014A (en) A kind of data reconstruction method and device
CN101634997B (en) Method for enhancing stability of FAT file system based on NAND flash
US8655892B2 (en) Data reorganization
CN108255642B (en) IO data management method in continuous data protection
CN109960460B (en) Distributed storage system
KR100775141B1 (en) An implementation method of FAT file system which the journaling is applied method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20160413

C20 Patent right or utility model deemed to be abandoned or is abandoned