CN104679614A - Database disaster backup system - Google Patents

Database disaster backup system Download PDF

Info

Publication number
CN104679614A
CN104679614A CN201510147765.2A CN201510147765A CN104679614A CN 104679614 A CN104679614 A CN 104679614A CN 201510147765 A CN201510147765 A CN 201510147765A CN 104679614 A CN104679614 A CN 104679614A
Authority
CN
China
Prior art keywords
server
database
master server
snapshot
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510147765.2A
Other languages
Chinese (zh)
Other versions
CN104679614B (en
Inventor
朱贤文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Civil And Military Information Technology Co Ltd In Chengdu
Original Assignee
Civil And Military Information Technology Co Ltd In Chengdu
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 Civil And Military Information Technology Co Ltd In Chengdu filed Critical Civil And Military Information Technology Co Ltd In Chengdu
Priority to CN201510147765.2A priority Critical patent/CN104679614B/en
Publication of CN104679614A publication Critical patent/CN104679614A/en
Application granted granted Critical
Publication of CN104679614B publication Critical patent/CN104679614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention relates to the field of databases, and in particular relates to a database disaster backup system; the disaster backup system comprises a master server and a slave server; each of the master server and the slave server comprises snapshots of a database; when the database operates normally, the master server and the slave server respectively snapshot the database at pre-set interval time or according to instructions; when the master server is in fault, the slave server is used for replacing the master server to work; when data of the master server are recovered, self data are recovered to an appointed snapshot before failure occurrence; then, data not existing in the appointed snapshot are replicated in the main server from the slave server; and then, the main server rejoins a cluster. The disaster backup system disclosed by the invention is capable of creating a time window capable of carrying out backup at any time for an application without a backup time window; furthermore, the normal operation of the database and the application of the database is not influenced; the problems due to log branches can be solved; the disaster backup system disclosed by the invention can be rapidly integrated in an existing application environment and used for testing; and in addition, the continuous operation of an existing system is not influenced.

Description

A kind of Database Disaster Backup/Recover
Technical field
The present invention relates to database field, particularly a kind of Database Disaster Backup/Recover.
Background technology
Database is the core of all IT system, saves the partial data run in operation system, and during the collapse of Database Systems equipment, the journal recovery of database concerns important.At present, the calamity of reply Database Systems equipment collapse mostly is as shown in Figure 1 for device, be made up of two servers, master server primary, from server standalone, externally provide service by master server under normal circumstances, accept the operations such as application program Du ﹑ Xie ﹑ Geng Gai ﹑ deletion, standalone provides read-only operation; As shown in Figure 2, the data of master server copy in real time from server, and receive the data of master server from server, and returned to from database, the data that master server follows server have certain residual quantity t ' all the time.
And when master server is delayed machine, continue to provide service from server, will the situation of occurrence log branch, namely from the up-to-date daily record that the daily record of server is not database master server, but master server is delayed machine reception to last daily record place bring into operation, so cause daily record that branch occurs, as shown in Figure 3.
Can not return in cluster after this just causes master server reparation.
Existing solution is by recovering last backup, it is made to return to the time point of last backup, because last BACKUP TIME point is certainly than the time point old (more earlier) from Server switching being normal mode, so the database after backup can be joined cluster.But backup database required time is huge, as the data volume of 20T, calculate according to current main flow optical fiber 8Gb, 20T=20*1024*1024M=20971520M, 8Gb=8Gb/8=1GB=1024MB, due to optical fiber packet header bag tail and transmission efficiency factor, the real speed 1024*0.8=819.2MB transmitted also to be converted to, so need release time ideally 20*1024*1024/819.2 about to need 7.1 hour release time.This situation is unacceptable for key business.
Summary of the invention
The object of the invention is to overcome the problem that current Database Disaster Backup/Recover date restoring needs overlong time, the Database Disaster Backup/Recover that a kind of release time is extremely short is provided, comprise master server with from server, described master server and all include the snapshot of database from server.
When database normally runs, master server and from server interval Preset Time or carry out snapshot to database according to instruction respectively.
When master server breaks down, carry out work by from server generation for master server.
When master server recovers data, first its data is returned to fault occur before appointment snapshot, then from from server by the data Replica that do not have in described appointment snapshot to master server, master server rejoins cluster.
Further, when database normally runs, from server, data are that in master server, data are copied in real time by optical fiber or Ethernet.
Further, when database normally runs, master server externally accepts reading and writing, changes and deletion action; Only externally read-only operation is provided from server.
Further, when master server can not normally run, immediately by externally providing reading and writing from server, changing and deletion action.
Preferably, described snapshot stores for adopting ZFS file system or vxfs file system.
Compared with prior art, beneficial effect of the present invention:
Owing to taking snapping technique to back up for master and slave server, therefore the present invention is the application not possessing BACKUP TIME window by setting arbitrarily snapshot interval time, create the time window carrying out at any time backing up, and do not affect the normal operation of database and application.Simultaneously when database recovers, by selecting to return to the problem of specifying the mode quick solution daily record branch of snapshot to produce.The present invention can realize only doing less change (increase database snapshot) to traditional database calamity for equipment both can be integrated into current application environment rapidly for test, and did not affect current system continuation operation.
Accompanying drawing illustrates:
Fig. 1 is traditional disaster recovery and backup systems schematic diagram.
Fig. 2 is that traditional disaster recovery and backup systems principal and subordinate server transaction data store schematic diagram.
Fig. 3 be traditional disaster recovery and backup systems delay machine laggard row date restoring time occurrence log branch schematic diagram.
Fig. 4 is Database Disaster Backup/Recover schematic diagram provided by the invention.
Principal and subordinate's snapshot server schematic diagram in Fig. 5 embodiment of the present invention 1.
Fig. 6 is that in the embodiment of the present invention 1, master server recovers schematic diagram data.
Principal and subordinate's snapshot server schematic diagram in Fig. 7 embodiment of the present invention 2.
Fig. 8 is that in the embodiment of the present invention 2, master server recovers schematic diagram data.
Embodiment
Below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.But this should be interpreted as that the scope of the above-mentioned theme of the present invention is only limitted to following embodiment, all technology realized based on content of the present invention all belong to scope of the present invention.
Embodiment 1: the object of the invention is to overcome the problem that current Database Disaster Backup/Recover date restoring needs overlong time, the Database Disaster Backup/Recover that a kind of release time is extremely short is provided, as shown in Figure 4, comprise master server with from server, described master server and all include the snapshot of database from server; (should be noted, in this area, host node, master server all refer to same technological concept, similar, from server, standby server, from node also for same technological concept) master server and can select to be linked together by optical fiber or Ethernet between server, the snapshot of database can be selected to adopt ZFS file system or vxfs file system.
When database normally runs, from server, data are that in master server, data are copied in real time by optical fiber or Ethernet; Now, master server externally accepts reading and writing to database, changes and deletion action; Only externally read-only operation is provided from server.
Master server and from server interval Preset Time or carry out snapshot to the data-base content of self according to instruction respectively, it should be noted that, the regular hour is needed from server because data conduct to from master server, therefore at synchronization, all the time certain residual quantity t ' (as shown in Figure 2) is there is in master server with data from server, therefore, even if master server with at synchronization, snapshot is carried out to its data all the time from server, the snapshot contents of its synchronization is not identical yet; Therefore, master server and the snapshot interval time from server can be set completely according to actual needs respectively, the snapshot of master server interval time can be identical for interval time with the snapshot from server, also can completely different (namely master server can be selected to carry out snapshot at one time all the time with from server, also can carry out snapshot at different time).
In the present embodiment, master server and adopt from server and carry out snapshot (i.e. master server and carry out snapshot at one time all the time from server) identical interval time respectively, when setting server normally runs, master server, from server the snapshot of 4 different times be respectively as shown in Figure 5 T1, T2, T3, T4 and T1 ', T2 ', T3 ', T4 ', now, master server snapshot with all there is residual quantity t ' from snapshot server content, namely all residual quantity t ' is existed for snapshot T1 and T1 ', T2 and T2 ' of synchronization, T3 and T3 ', T4 and T4 '.When master server breaks down (as machine of delaying) after snapshot T4, by a moment occurs fault, carry out work from server generation for master server; Namely when master server can not normally run, immediately by externally providing database reading and writing from server, changing and deletion action, and from server still according to carrying out snapshot former default interval time and producing snapshot T5 ' (as shown in Figure 6).
And after master server reparation, need to rejoin cluster, now need first to carry out date restoring to main service, recovering step is as follows:
(master server its data is first returned to the appointment snapshot before fault generation by 1, after fault occurs in snapshot T4, any one in T1, T2, T3, T4 can be selected in theory to recover, but owing to selecting the Snapshot time of recovery more forward, the data restore time then needed is longer, and selects the Snapshot time recovered too when fault-time, during as returned to T4, due to the existence of data residual quantity t ' between T4 and T4 ', daily record branch problem can not be eliminated.Therefore select in the present embodiment to return to snapshot T2, namely ensure to select the snapshot data content recovered early than the data content from server during master server fault.
(master server snapshot data and snapshot data from server compare by 2, and data Replica later for T2 snapshot time from server is returned master server, and master server rejoins cluster.
Adopt the data restore time needed for Database Disaster Backup/Recover provided by the invention to be mainly after master server returns to and specify snapshot (in the present embodiment for snapshot T2), master server is from the data produced after copy this appointment snapshot from server; Compared with traditional disaster recovery and backup systems need whole database data to copy, before only copying fault sometime after the obvious spended time of data to lack many.
Embodiment 2: the present embodiment and embodiment 1 difference are, master server carries out snapshot with the time of presetting according to self separately from server, as shown in Figure 7, at one time in section, the snapshot of setting master server is respectively T1, T2, T3, T4, T5, is T1 ', T2 ', T3 ', T4 ' from the snapshot of server.
In the present embodiment, and after master server fault restoration, when needing to rejoin cluster, now need first to carry out date restoring to main service, recovering step is as follows:
(master server its data is first returned to the appointment snapshot before fault generation by 1, suppose that master server breaks down after snapshot T5, for eliminating daily record branch problem, ensure to select the snapshot data content recovered early than the data content from server during master server fault, therefore master server is returned to snapshot T3 (as shown in Figure 8) in the present embodiment.
(master server snapshot data and snapshot data from server compare by 2, and data Replica later for T3 snapshot time from server is returned master server, and master server rejoins cluster.

Claims (5)

1. a Database Disaster Backup/Recover, is characterized in that, comprise master server with from server, described master server and all include the snapshot of database from server;
When database normally runs, master server and from server interval Preset Time or carry out snapshot to database according to instruction respectively;
When master server breaks down, carry out work by from server generation for master server;
When master server recovers data, first its data is returned to fault occur before appointment snapshot, then from from server by the data Replica that do not have in described appointment snapshot to master server, master server rejoins cluster.
2. Database Disaster Backup/Recover as claimed in claim 1, it is characterized in that, when database normally runs, from server, data are that in master server, data are copied in real time by optical fiber or Ethernet.
3. Database Disaster Backup/Recover as claimed in claim 1, it is characterized in that, when database normally runs, master server externally accepts reading and writing, changes and deletion action; Only externally read-only operation is provided from server.
4. the extensive disaster recovery and backup systems of data as claimed in claim 1, is characterized in that, when master server can not normally run, immediately by externally providing reading and writing from server, changing and deletion action.
5. the extensive disaster recovery and backup systems of data as claimed in claim 1, is characterized in that, described snapshot stores for adopting ZFS file system or vxfs file system.
CN201510147765.2A 2015-03-31 2015-03-31 A kind of Database Disaster Backup/Recover Active CN104679614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510147765.2A CN104679614B (en) 2015-03-31 2015-03-31 A kind of Database Disaster Backup/Recover

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510147765.2A CN104679614B (en) 2015-03-31 2015-03-31 A kind of Database Disaster Backup/Recover

Publications (2)

Publication Number Publication Date
CN104679614A true CN104679614A (en) 2015-06-03
CN104679614B CN104679614B (en) 2018-03-27

Family

ID=53314704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510147765.2A Active CN104679614B (en) 2015-03-31 2015-03-31 A kind of Database Disaster Backup/Recover

Country Status (1)

Country Link
CN (1) CN104679614B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117165A (en) * 2015-07-17 2015-12-02 浪潮(北京)电子信息产业有限公司 Dual-controller snapshot taking-over and switching-back method and apparatus
CN105487940A (en) * 2015-11-18 2016-04-13 华为技术有限公司 Disaster recovery side, production side and data recovery method between disaster recovery side and production side
CN105955989A (en) * 2015-12-31 2016-09-21 无锡华云数据技术服务有限公司 Method for establishing master and slave servers of cloud platform database
CN106919473A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 A kind of data disaster recovery and backup systems and method for processing business
CN107015883A (en) * 2016-01-28 2017-08-04 中国移动通信集团上海有限公司 A kind of dynamic data backup method and device
CN107657055A (en) * 2017-10-18 2018-02-02 国网福建省电力有限公司 A kind of back-up system method of data synchronization based on distribution main website
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium
CN111209139A (en) * 2019-12-29 2020-05-29 航天信息股份有限公司 Disaster recovery method and device based on version control management system
CN112286733A (en) * 2020-12-23 2021-01-29 深圳市科力锐科技有限公司 Method, device and equipment for determining backup data recovery time and storage medium
WO2022110425A1 (en) * 2020-11-27 2022-06-02 上海上讯信息技术股份有限公司 Snapshot-based master-slave architecture deployment method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5101492A (en) * 1989-11-03 1992-03-31 Compaq Computer Corporation Data redundancy and recovery protection
CN1642030A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method for realizing network management duoble computer disaster-tolerance back-up
CN1818880A (en) * 2006-03-10 2006-08-16 四川大学 Long-distance data fast restoring method of network information system
CN101179437A (en) * 2007-11-29 2008-05-14 上海华为技术有限公司 Method and apparatus for implementing preactivation of batch configuration
CN101668048A (en) * 2009-09-28 2010-03-10 武汉大学 Data protection method and system for supporting any time data access and modification
CN102710752A (en) * 2012-05-13 2012-10-03 徐州易存信息技术有限公司 Disaster recovery storage system
CN103226502A (en) * 2013-05-21 2013-07-31 中国工商银行股份有限公司 Data disaster backup control system and data recovery method
CN203149553U (en) * 2013-03-28 2013-08-21 中国大唐集团财务有限公司 Remote disaster recovery system with data safety verification function
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5101492A (en) * 1989-11-03 1992-03-31 Compaq Computer Corporation Data redundancy and recovery protection
CN1642030A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method for realizing network management duoble computer disaster-tolerance back-up
CN1818880A (en) * 2006-03-10 2006-08-16 四川大学 Long-distance data fast restoring method of network information system
CN101179437A (en) * 2007-11-29 2008-05-14 上海华为技术有限公司 Method and apparatus for implementing preactivation of batch configuration
CN101668048A (en) * 2009-09-28 2010-03-10 武汉大学 Data protection method and system for supporting any time data access and modification
CN102710752A (en) * 2012-05-13 2012-10-03 徐州易存信息技术有限公司 Disaster recovery storage system
CN103914359A (en) * 2012-12-31 2014-07-09 中国移动通信集团浙江有限公司 Data recovery method and device
CN203149553U (en) * 2013-03-28 2013-08-21 中国大唐集团财务有限公司 Remote disaster recovery system with data safety verification function
CN103226502A (en) * 2013-05-21 2013-07-31 中国工商银行股份有限公司 Data disaster backup control system and data recovery method

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117165A (en) * 2015-07-17 2015-12-02 浪潮(北京)电子信息产业有限公司 Dual-controller snapshot taking-over and switching-back method and apparatus
CN105487940B (en) * 2015-11-18 2019-04-05 华为技术有限公司 The standby end of calamity, the manufacturing side and data reconstruction method between the two
CN105487940A (en) * 2015-11-18 2016-04-13 华为技术有限公司 Disaster recovery side, production side and data recovery method between disaster recovery side and production side
CN109783277B (en) * 2015-11-18 2023-12-29 华为技术有限公司 Disaster recovery end, production end and data recovery method between disaster recovery end and production end
CN109783277A (en) * 2015-11-18 2019-05-21 华为技术有限公司 The standby end of calamity, the manufacturing side and data reconstruction method between the two
CN106919473B (en) * 2015-12-28 2020-10-30 创新先进技术有限公司 Data disaster backup system and service processing method
CN106919473A (en) * 2015-12-28 2017-07-04 阿里巴巴集团控股有限公司 A kind of data disaster recovery and backup systems and method for processing business
CN105955989A (en) * 2015-12-31 2016-09-21 无锡华云数据技术服务有限公司 Method for establishing master and slave servers of cloud platform database
CN107015883A (en) * 2016-01-28 2017-08-04 中国移动通信集团上海有限公司 A kind of dynamic data backup method and device
CN107015883B (en) * 2016-01-28 2020-07-17 中国移动通信集团上海有限公司 Dynamic data backup method and device
CN107657055A (en) * 2017-10-18 2018-02-02 国网福建省电力有限公司 A kind of back-up system method of data synchronization based on distribution main website
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium
CN108416040B (en) * 2018-03-14 2020-10-27 上海达梦数据库有限公司 Database repair method and device, terminal equipment and storage medium
CN111209139A (en) * 2019-12-29 2020-05-29 航天信息股份有限公司 Disaster recovery method and device based on version control management system
WO2022110425A1 (en) * 2020-11-27 2022-06-02 上海上讯信息技术股份有限公司 Snapshot-based master-slave architecture deployment method and device
US11966296B2 (en) 2020-11-27 2024-04-23 Shanghai Suninfo Information Technology Co., Ltd. Master-slave architecture deployment method and device based on snapshot
CN112286733A (en) * 2020-12-23 2021-01-29 深圳市科力锐科技有限公司 Method, device and equipment for determining backup data recovery time and storage medium
CN112286733B (en) * 2020-12-23 2021-04-06 深圳市科力锐科技有限公司 Method, device and equipment for determining backup data recovery time and storage medium

Also Published As

Publication number Publication date
CN104679614B (en) 2018-03-27

Similar Documents

Publication Publication Date Title
CN104679614A (en) Database disaster backup system
CN110209726B (en) Distributed database cluster system, data synchronization method and storage medium
US9563655B2 (en) Zero and near-zero data loss database backup and recovery
CN101706795B (en) Method for synchronizing data of database in active/standby server
CN105069160A (en) Autonomous controllable database based high-availability method and architecture
US9542468B2 (en) Database management system and method for controlling synchronization between databases
CN106815097A (en) Database disaster tolerance system and method
CN105955836A (en) Cold-hot backup automatic walkthrough multifunction system
CN101739313B (en) Method for protecting and restoring continuous data
KR20180101941A (en) Apparatus and method for replicating changed data in a source database management system to a target database management system in real time
CN109189860A (en) A kind of active and standby increment synchronization method of MySQL based on Kubernetes system
CN103838646A (en) System and method for big data remote disaster recovery backup of ground application
CN103294787A (en) Multi-copy storage method and multi-copy storage system for distributed database system
CN103336728A (en) Disk data recovery method
CN106657169A (en) Main and slave node data synchronization method in Redis
CN107229540A (en) A kind of database restoring method and system based on time point
CN104765889A (en) Switching method and device of high-availability frame based on database
WO2017014814A1 (en) Replicating memory volumes
US20200341861A1 (en) Method, device, and computer-readable storage medium for managing storage system
CN109347655B (en) Network data based fault recovery system and method and storage medium
CN105956207A (en) Binlog-based configurable mysql database real-time synchronization method
US10007567B2 (en) Method and device for recovering data replication between storage devices
CN103581262A (en) Master-and-backup data synchronizing method, device and system
CN110489491B (en) Full data synchronization device suitable for A/B network double clusters
CN110716828A (en) Real-time database backup 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
GR01 Patent grant
GR01 Patent grant