CN106326041A - Second-level recovery method for database - Google Patents

Second-level recovery method for database Download PDF

Info

Publication number
CN106326041A
CN106326041A CN201610800038.6A CN201610800038A CN106326041A CN 106326041 A CN106326041 A CN 106326041A CN 201610800038 A CN201610800038 A CN 201610800038A CN 106326041 A CN106326041 A CN 106326041A
Authority
CN
China
Prior art keywords
data
snapshot
database
time point
content
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
CN201610800038.6A
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.)
Hangzhou Wo Qu Polytron Technologies Inc
Original Assignee
Hangzhou Wo Qu Polytron Technologies Inc
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 Hangzhou Wo Qu Polytron Technologies Inc filed Critical Hangzhou Wo Qu Polytron Technologies Inc
Priority to CN201610800038.6A priority Critical patent/CN106326041A/en
Publication of CN106326041A publication Critical patent/CN106326041A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of computer information security, and discloses a second-level recovery method for a database. The method includes the steps that 1, a main database is used, or a backup database is created, and data and log files sent by the main database are continuously received, wherein the content of the standby database should be consistent with that of the main database; 2, a snapshot is regularly made for a volume where the data of the database is located; 3, when the data needs to be recovered, according to a designated time point, the snapshot point closest to the time before the time point is found, and data recovery is carried out with the snapshot point; 4, when the log files are read, the data of the database is recovered to the designated time point. The method is implemented based on the snapshot technology and database logs and has the advantages that data recoverability is continuously checked; backup continuity is achieved, no time interval exists, and all data can be recovered; the recovery process just lasts for seconds, and the time is unrelated to the total number of databases.

Description

A kind of method for data base's second level restoration
Technical field
The present invention relates to field of computer information security, particularly relate to a kind of method for data base's second level restoration.
Background technology
Along with developing rapidly of office automation and ecommerce, enterprise is more and more higher to the dependency of information system, number Important role is taken on as the core of information system according to storehouse.Especially at some to the highest industry of data reliability requirement such as Bank, security, telecommunications etc., if it occur that hang-up or its loss of loss of data can be the most heavy.For this data base administrator Detailed DB Backup and disaster recovery strategy should be formulated for concrete business need, and can to every kind by simulated failure The situation of energy is strictly tested, the only in this way high availability of guarantee data.The backup of data base be one long-term Process, and recover only to carry out after having an accident, recover can be regarded as the inverse process of backup, the quality of the degree of recovery is the biggest The situation of backup is depended in degree.Additionally, data base administrator steps taken correctness when recovering also directly affects Final restoration result.
Existing database reset mode, its operational approach is to read the backup file derived in early days, imports clear data storehouse, Thus obtain complete recovery data.There are the following problems for which:
1, backup file restorability is unknown, it is possible to verifies during recovering and makes mistakes.
2, there is time interval between multiple backup files, the data produced in interval cannot be recovered.
3, needing to import total data, recovery process is of long duration, and lengthens according to the growth of data volume.
Summary of the invention
The present invention is directed in prior art database data hold recovery time for a long time, verify error-prone shortcoming, it is provided that one Plant the method for data base's second level restoration.
In order to solve above-mentioned technical problem, the present invention is addressed by following technical proposals.
A kind of method for data base's second level restoration, comprises the steps:
(1) use MDL, or create backup database, persistently accept data and daily record literary composition that MDL sends Part, backup database content should be consistent with MDL;
(2) the data place of data base is rolled up, make a snapshot;Snapshot is realized by copy-on-write, i.e. writes in data When entering to certain storage position, first original content is read out, write as in the reserved memory space of snapshot, the most again Write data in storage device;Or it is hiding to make marks in original content, and new content writes unappropriated storage Position, then points to the position of new content by the pointer in original content;
(3) when needing to recover data, according to the time point specified, find with this time point before nearest snapshot point, and Use this snapshot to click on row data to recover;
(4) when reading journal file, the content in journal file is applied in the middle of data base by data base one by one, until referring to Fixed time point stops, and with this completion snapshot point to the data specified between time point, makes database data recovery to specifying Time point.
As preferably, snapshot is the completely available copy specifying data acquisition system, and this copy includes that corresponding data is at certain The reflection of individual time point.
Due to the fact that and have employed above technical scheme that there is significant technique effect: this method based on snapping technique and Database journal realizes, and has the advantage that
1, data restorability persistently verifies.
2, persistently back up, there is not time interval, whole data can be recovered.
3, only several seconds recovery process persistent period, and the most unrelated with data base's total amount.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of method for data base's second level restoration of the present invention.
Detailed description of the invention
With embodiment, the present invention is described in further detail below in conjunction with the accompanying drawings.
As it is shown in figure 1, a kind of method for data base's second level restoration, comprise the steps:
(1) use MDL, or create backup database, persistently accept data and daily record literary composition that MDL sends Part, backup database content should be consistent with MDL;
(2) the data place of data base is rolled up, make a snapshot;Snapshot is realized by copy-on-write, i.e. writes in data When entering to certain storage position, first original content is read out, write as in the reserved memory space of snapshot, the most again Write data in storage device;Or it is hiding to make marks in original content, and new content writes unappropriated storage Position, then points to the position of new content by the pointer in original content;
(3) when needing to recover data, according to the time point specified, find with this time point before nearest snapshot point, and Use this snapshot to click on row data to recover;
(4) when reading journal file, the content in journal file is applied in the middle of data base by data base one by one, until referring to Fixed time point stops, and with this completion snapshot point to the data specified between time point, makes database data recovery to specifying Time point.
Snapshot is the completely available copy specifying data acquisition system, and this copy includes that corresponding data is at certain time point Reflection.
Embodiment 1
Assume, now with a MDL first, to elapse over time, constantly produce new data and journal file.
During 10:00, first creates a snapshot, entitled snapshot 1 to data place volume, this process time consume the soonest less than 1 second.
During 10:20, there is maloperation in operator, delete a table in first, entitled table 1.
During 10:25, management personnel find this maloperation, need to use the data of first 10:19 to get the table by mistake deleted 1。
Management personnel, first by database software, read snapshot 1, recover the data of first 10:00.Read snapshot 1 Content is almost without time loss.
Read the content of journal file one by one and be applied in the middle of data base, until 10:19 stops, thus getting first 10: The partial data of 19, can complete the soonest within 1 second.
Derived table 1 from the data base recovered, and import first.Data have been recovered.
In a word, the foregoing is only presently preferred embodiments of the present invention, all equalizations made according to scope of the present invention patent Change and modification, all should belong to the covering scope of patent of the present invention.

Claims (2)

1. the method for data base's second level restoration, it is characterised in that comprise the steps:
(1) use MDL, or create backup database, persistently accept data and journal file that MDL sends, standby Part data-base content should be consistent with MDL;
(2) the data place of data base is rolled up, make a snapshot;Snapshot is realized by copy-on-write, is i.e. written in data During certain storage position, first original content is read out, write as in the reserved memory space of snapshot, the most again by number According to being written in storage device;Or it is hiding to make marks in original content, and new content writes unappropriated storage position, Then the pointer in original content is pointed to the position of new content;
(3) when needing to recover data, according to the time point specified, find with this time point before nearest snapshot point, and use This snapshot clicks on row data and recovers;
(4), when reading journal file, the content in journal file is applied in the middle of data base by data base one by one, until specify Time point stops, and with this completion snapshot point to the data specified between time point, makes database data recovery to the time specified Point.
A kind of method for data base's second level restoration the most according to claim 1, it is characterised in that: snapshot is for specifying number According to a completely available copy of set, this copy includes the corresponding data reflection at certain time point.
CN201610800038.6A 2016-08-31 2016-08-31 Second-level recovery method for database Pending CN106326041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610800038.6A CN106326041A (en) 2016-08-31 2016-08-31 Second-level recovery method for database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610800038.6A CN106326041A (en) 2016-08-31 2016-08-31 Second-level recovery method for database

Publications (1)

Publication Number Publication Date
CN106326041A true CN106326041A (en) 2017-01-11

Family

ID=57786449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610800038.6A Pending CN106326041A (en) 2016-08-31 2016-08-31 Second-level recovery method for database

Country Status (1)

Country Link
CN (1) CN106326041A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038153A (en) * 2017-12-04 2018-05-15 北京小度信息科技有限公司 The online data moving method and device of Hbase
CN108958880A (en) * 2017-05-24 2018-12-07 财团法人工业技术研究院 Data processing method, data processing system and computer program product
CN109885427A (en) * 2019-01-31 2019-06-14 郑州云海信息技术有限公司 A kind of database short-term data guard method, device, memory and equipment
CN110096476A (en) * 2019-04-08 2019-08-06 平安科技(深圳)有限公司 Data back up method, device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040267835A1 (en) * 2003-06-30 2004-12-30 Microsoft Corporation Database data recovery system and method
US20050235017A1 (en) * 2004-04-15 2005-10-20 Jeff Ashman System and method for high availability of data in a disaster recovery system
CN101436207A (en) * 2008-12-16 2009-05-20 浪潮通信信息系统有限公司 Data restoring and synchronizing method based on log snapshot
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device
CN105843707A (en) * 2016-03-28 2016-08-10 上海上讯信息技术股份有限公司 Quick recovery method and equipment of database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040267835A1 (en) * 2003-06-30 2004-12-30 Microsoft Corporation Database data recovery system and method
US20050235017A1 (en) * 2004-04-15 2005-10-20 Jeff Ashman System and method for high availability of data in a disaster recovery system
CN101436207A (en) * 2008-12-16 2009-05-20 浪潮通信信息系统有限公司 Data restoring and synchronizing method based on log snapshot
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device
CN105843707A (en) * 2016-03-28 2016-08-10 上海上讯信息技术股份有限公司 Quick recovery method and equipment of database

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958880A (en) * 2017-05-24 2018-12-07 财团法人工业技术研究院 Data processing method, data processing system and computer program product
CN108038153A (en) * 2017-12-04 2018-05-15 北京小度信息科技有限公司 The online data moving method and device of Hbase
CN109885427A (en) * 2019-01-31 2019-06-14 郑州云海信息技术有限公司 A kind of database short-term data guard method, device, memory and equipment
CN110096476A (en) * 2019-04-08 2019-08-06 平安科技(深圳)有限公司 Data back up method, device and computer readable storage medium
CN110096476B (en) * 2019-04-08 2023-06-09 平安科技(深圳)有限公司 Data backup method, device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10503616B2 (en) Periodic data replication
US7634679B2 (en) Remote location failover server application
CN104850598B (en) A kind of real-time data base back-up restoring method
CN103019890B (en) Block-level disk data protection system and method thereof
CN106407356A (en) Data backup method and device
CN101784996A (en) Emulated storage system
CN106326041A (en) Second-level recovery method for database
US10146633B2 (en) Data recovery from multiple data backup technologies
CN103914359A (en) Data recovery method and device
WO2015167603A1 (en) Maintaining files in a retained file system
US8600937B1 (en) System and method for fast volume cloning
US10809922B2 (en) Providing data protection to destination storage objects on remote arrays in response to assignment of data protection to corresponding source storage objects on local arrays
US10976942B2 (en) Versioning a configuration of data storage equipment
CN105593829A (en) Excluding file system objects from raw image backups
US11741005B2 (en) Using data mirroring across multiple regions to reduce the likelihood of losing objects maintained in cloud object storage
CN114416665B (en) Method, device and medium for detecting and repairing data consistency
CN107273449B (en) Breakpoint processing method and system based on memory database
CN104978241B (en) A kind of data reconstruction method and device of COW type file systems
US8595271B1 (en) Systems and methods for performing file system checks
CN107402841B (en) Data restoration method and device for large-scale distributed file system
CN103761156B (en) A kind of online restorative procedure for file system
CN104407932A (en) Data backup method and device
US11023333B2 (en) Online recovery approach to space accounting
US11341159B2 (en) In-stream data load in a replication environment
US10514988B2 (en) Method and system of migrating applications to a cloud-computing environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170111