CN105389231A - Database dual-computer backup method and system - Google Patents

Database dual-computer backup method and system Download PDF

Info

Publication number
CN105389231A
CN105389231A CN201510712213.1A CN201510712213A CN105389231A CN 105389231 A CN105389231 A CN 105389231A CN 201510712213 A CN201510712213 A CN 201510712213A CN 105389231 A CN105389231 A CN 105389231A
Authority
CN
China
Prior art keywords
database
host
standby
resource manager
main frame
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
CN201510712213.1A
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 Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510712213.1A priority Critical patent/CN105389231A/en
Publication of CN105389231A publication Critical patent/CN105389231A/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/1448Management of the data involved in backup or backup restore
    • 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/1464Management of the backup or restore process for networked environments
    • 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

Abstract

The present invention discloses a database dual-computer backup method and system. The method comprises: a distributed replicated block device (DBRD) replicating database information on a host computer onto a standby computer in real time; and when detecting that a state of the host computer has a failure, a cluster resource manager stopping a database process on the host computer and starting a database process according to the database information stored by the standby computer. By means of the technical scheme provided by the present invention, the process of database dual-computer backup is simplified, and normal running of the database service is ensured.

Description

A kind of database two unit standby method and system
Technical field
The present invention relates to communication technical field, espespecially a kind of database two unit standby method and system.
Background technology
At present, be the inscriptions on bones or tortoise shells (Oracle) Database Systems widely at database field Application comparison.Oracle database system has the function of database dual-host backup and data syn-chronization, namely by by the image file stores synchronized of the Operation Log of main frame real time record and host data base to standby host, to realize when the fault such as network or hardware appears in main frame, host service function is switched to standby host to ensure the normal operation of data bank service.
But, the above-mentioned method utilizing the Operation Log fulfillment database dual-host backup of host record, the Operation Log stored owing to needing real-time guarantees standby host and the Operation Log Complete Synchronization of host record, thus its implementation procedure is comparatively complicated, if be switched in the process of standby host at host service function, also non-stores synchronized is to standby host for the Operation Log of host record, and the Operation Log that standby host is stored and the Operation Log of host record not Complete Synchronization, easily cause the interruption of data bank service.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of database two unit standby method and system, can the process of reduced data storehouse dual-host backup, ensure the normal operation of data bank service.
First aspect, the invention provides a kind of database two unit standby method, comprising: the database information on main frame copies on standby host by distributed copy block equipment DRBD in real time; Cluster resource manager, when detecting that Host Status exists fault, stops the database process on main frame, and according to the database information turn-on data storehouse process that standby host stores.
Further, cluster resource manager stops the database process on main frame, and according to the database information turn-on data storehouse process that standby host stores, specifically comprise: cluster resource manager stops the inspection cluster process on main frame, and open inspection cluster process according to the database information that standby host stores.
Further, cluster resource manager opens inspection cluster process according to the database information that standby host stores, and specifically comprises: the database information that cluster resource manager stores according to standby host, utilizes virtual network interconnection agreement IP address to open inspection cluster process.
Second aspect, the embodiment of the present invention provides a kind of database two-unit standby system, comprising: distributed copy block equipment DRBD and cluster resource manager, wherein: DRBD, for real-time, database information on main frame is copied to standby host; Cluster resource manager, for when detecting that Host Status exists fault, stopping the database process on main frame, and copying to the database information turn-on data storehouse process of standby host according to DRBD.
Further, cluster resource manager, specifically for: stop the inspection cluster process on main frame, and open inspection cluster process according to the database information that standby host stores.
Further, cluster resource manager, specifically for: the database information stored according to standby host, utilizes virtual network interconnection agreement IP address to open inspection cluster process.
The technical scheme of fulfillment database dual-host backup provided by the invention, comprising: the database information on main frame copies on standby host by distributed copy block equipment DRBD in real time; Cluster resource manager, when detecting that Host Status exists fault, stops the database process on main frame, and according to the database information turn-on data storehouse process that standby host stores.By technical scheme provided by the invention, simplify the process of database dual-host backup, ensure the normal operation of data bank service.
Accompanying drawing explanation
Accompanying drawing is used to provide the further understanding to technical solution of the present invention, and forms a part for instructions, is used from and explains technical scheme of the present invention, do not form the restriction to technical solution of the present invention with the embodiment one of the application.
Fig. 1 is the process flow diagram of a kind of database two unit standby method that the embodiment of the present invention proposes;
Fig. 2 is the structural representation of a kind of database two-unit standby system that the embodiment of the present invention proposes.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, hereinafter will be described in detail to embodiments of the invention by reference to the accompanying drawings.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually.
Can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing.Further, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
High Availabitity (HA, HighAvailability) group system is a kind of server cluster technology being used for reducing out of service time, and the business procedure of user can be protected externally to provide service incessantly.Wherein, cluster refers to a group node and computing machine, and cluster integrally can provide a group network resource to user, such as, provide data bank service.Specifically, HA group system comprises main frame and at least one standby host, and by the mutual backup of main frame and standby host, realizes, when main frame breaks down, to bear service role by standby host, ensure that HA group system externally provides service constantly.At present, the database dual-host backup function that HA group system mainly utilizes the Operation Log of host record to realize, namely the database two unit standby method that in prior art, oracle database system adopts, but, the method is owing to needing the Operation Log Complete Synchronization of Operation Log and the host record ensureing that standby host stores, thus its implementation procedure is comparatively complicated, and easily causes the interruption of data bank service.
The database two unit standby method that the embodiment of the present invention provides, based on existing HA group system, avoids the Operation Log using host record, simplifies the process of database dual-host backup, ensured the normal operation of data bank service.
Fig. 1 is the schematic diagram of a kind of database two unit standby method that the embodiment of the present invention proposes, and with reference to figure 1, method comprises:
Step 101: the database information on main frame copies on standby host by distributed copy block equipment (DRBD, DistributedReplicatedBlockDevice) in real time;
DRBD is made up of kernel module and associated script, for the storage replication of the mirror image block device content between main frame and standby host.In addition, main frame and standby host are provided with DRBD, and the DRBD in this step is the DRBD on main frame.It should be noted that, DRBD is the existing conventional means for mirror image block device content storage replication, is well-known to those skilled in the art, therefore no longer repeats the implementation of DRBD here.
Database information on main frame copies on standby host by DRBD in real time, ensure the consistance of host data library information and standby host database information, avoid the complicacy using Operation Log fulfillment database dual-host backup, simplify the process of database dual-host backup.
This step specifically comprises: DRBD detects the database information on main frame in real time, and when the database information on main frame produces change, copies on standby host by the database information after change; When standby host receives the database information after change, send confirmation so that main frame proceeds operation to main frame.
Step 102: cluster resource manager, when detecting that Host Status exists fault, stops the database process on main frame, and according to the database information turn-on data storehouse process that standby host stores;
Cluster resource manager, for carrying out fault detect to the equipment in HA group system, and manages the database process of main frame and standby host.The implementation of cluster resource manager comprises Pacemaker or Heartbeat, can utilize open source software to realize.In the prior art, cluster resource manager belongs to the resource management layer in HA group system, for deciding startup or the stopping of node serve according to the status information of node, such as, runs web services, the startup of IP address and http process or stopping.
In practical application, the Host Status that cluster resource manager detects, comprises the start and stop state of host data base process, DRBD by the process status etc. of host data base information reproduction to standby host.
When cluster resource manager detects that Host Status exists fault, such as, host data base process stops, or DRBD by host data base information reproduction to standby host process stop time, database process on main frame can be switched on standby host by cluster resource manager, namely utilizes standby host turn-on data storehouse process and then provides data bank service.
This step specifically comprises: cluster resource manager, when detecting that Host Status exists fault, stops the inspection cluster process on main frame, and opens inspection cluster process according to the database information that standby host stores.
Inspection cluster process, provide the basic function required for main frame running environment, such as, the heartbeat detection of main frame and resource take-over, the open state of monitoring host computer, suspended state, network connection state, receive this status information of equipment that other equipment are sent by heartbeat mode, and the status information of self is sent to standby host etc.The implementation of inspection cluster comprises Corosync, checks cluster can utilize open source software to realize in actual applications.
Further, cluster resource manager opens inspection cluster process according to the database information that standby host stores, specifically comprise: the database information that cluster resource manager stores according to standby host, virtual network interconnection agreement (IP, InternetProtocolip) address is utilized to open inspection cluster process.
Virtual ip address is the IP address be not connected with the network interface unit in particular host or standby host, for the connection redundancy between equipment.When main frame breaks down and externally cannot provide data bank service, standby host utilizes this virtual ip address externally to provide data bank service, makes cluster resource manager open inspection cluster process faster.
The database two unit standby method that the embodiment of the present invention provides, copies on standby host by the database information on main frame by DRBD in real time; Cluster resource manager is when detecting that Host Status exists fault, stop the database process on described main frame, and according to the database information turn-on data storehouse process that described standby host stores, simplify the process of database dual-host backup, ensured the normal operation of data bank service.
Fig. 2 is the structural representation of a kind of database two-unit standby system that the embodiment of the present invention proposes, and reference diagram goes 2, and this system comprises: DRBD201 and cluster resource manager 202, wherein:
Described DRBD201, copies to standby host for real-time by the database information on main frame;
Described cluster resource manager 202, for when detecting that Host Status exists fault, stops the database process on described main frame, and copies to the database information turn-on data storehouse process of described standby host according to described DRBD201.
Further, described cluster resource manager 202, specifically for: stop the inspection cluster process on described main frame, and open inspection cluster process according to the database information that described standby host stores.
Further, described cluster resource manager 202, specifically for: the database information stored according to standby host, utilizes virtual network interconnection agreement IP address to open inspection cluster process.
Although the embodiment disclosed by the present invention is as above, the embodiment that described content only adopts for ease of understanding the present invention, and be not used to limit the present invention.Those of skill in the art belonging to any the present invention; under the prerequisite not departing from the spirit and scope disclosed by the present invention; any amendment and change can be carried out in the form implemented and details; but scope of patent protection of the present invention, the scope that still must define with appending claims is as the criterion.

Claims (6)

1. a database two unit standby method, is characterized in that, comprising:
Database information on main frame copies on standby host by distributed copy block equipment DRBD in real time;
Cluster resource manager, when detecting that Host Status exists fault, stops the database process on described main frame, and according to the database information turn-on data storehouse process that described standby host stores.
2. database two unit standby method according to claim 1, is characterized in that, described cluster resource manager stops the database process on described main frame, and according to the database information turn-on data storehouse process that described standby host stores, specifically comprises:
Described cluster resource manager stops the inspection cluster process on described main frame, and opens inspection cluster process according to the database information that described standby host stores.
3. database two unit standby method according to claim 2, is characterized in that, described cluster resource manager opens inspection cluster process according to the database information that standby host stores, and specifically comprises:
The database information that described cluster resource manager stores according to standby host, utilizes virtual network interconnection agreement IP address to open inspection cluster process.
4. a database two-unit standby system, is characterized in that, comprising: distributed copy block equipment DRBD and cluster resource manager, wherein:
Described DRBD, copies to standby host for real-time by the database information on main frame;
Described cluster resource manager, for when detecting that Host Status exists fault, stops the database process on described main frame, and copies to the database information turn-on data storehouse process of described standby host according to described DRBD.
5. database two-unit standby system according to claim 4, is characterized in that, described cluster resource manager, specifically for:
Stop the inspection cluster process on described main frame, and open inspection cluster process according to the database information that described standby host stores.
6. database two-unit standby system according to claim 5, is characterized in that, described cluster resource manager, specifically for:
According to the database information that standby host stores, virtual network interconnection agreement IP address is utilized to open inspection cluster process.
CN201510712213.1A 2015-10-28 2015-10-28 Database dual-computer backup method and system Pending CN105389231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510712213.1A CN105389231A (en) 2015-10-28 2015-10-28 Database dual-computer backup method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510712213.1A CN105389231A (en) 2015-10-28 2015-10-28 Database dual-computer backup method and system

Publications (1)

Publication Number Publication Date
CN105389231A true CN105389231A (en) 2016-03-09

Family

ID=55421538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510712213.1A Pending CN105389231A (en) 2015-10-28 2015-10-28 Database dual-computer backup method and system

Country Status (1)

Country Link
CN (1) CN105389231A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209451A (en) * 2016-07-08 2016-12-07 深圳前海微众银行股份有限公司 DCN changing method and system
CN110535645A (en) * 2018-05-24 2019-12-03 上海赢亥信息科技有限公司 A kind of standby system and method for digital asset management device
CN110750480A (en) * 2019-10-18 2020-02-04 苏州浪潮智能科技有限公司 Dual-computer hot standby system
CN112286732A (en) * 2020-12-02 2021-01-29 上海英方软件股份有限公司 Method and system for recovering unsynchronized data to standby machine when database synchronization is abnormal
CN112685486A (en) * 2021-01-05 2021-04-20 腾讯科技(深圳)有限公司 Data management method and device for database cluster, electronic equipment and storage medium
CN112711632A (en) * 2019-12-27 2021-04-27 山东鲁能软件技术有限公司 Asynchronous data stream replication method and system for high-availability cluster

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098426A1 (en) * 2001-01-06 2004-05-20 Toshiba It-Solutions Corporation Backup system, backup method, program for backup, and backup service provision system
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
CN103546914A (en) * 2013-10-21 2014-01-29 大唐移动通信设备有限公司 HSS (home subscriber server) master-slave management method and HSS master-slave management device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098426A1 (en) * 2001-01-06 2004-05-20 Toshiba It-Solutions Corporation Backup system, backup method, program for backup, and backup service provision system
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
CN103546914A (en) * 2013-10-21 2014-01-29 大唐移动通信设备有限公司 HSS (home subscriber server) master-slave management method and HSS master-slave management device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209451A (en) * 2016-07-08 2016-12-07 深圳前海微众银行股份有限公司 DCN changing method and system
CN106209451B (en) * 2016-07-08 2019-08-20 深圳前海微众银行股份有限公司 DCN switching method and system
CN110535645A (en) * 2018-05-24 2019-12-03 上海赢亥信息科技有限公司 A kind of standby system and method for digital asset management device
CN110750480A (en) * 2019-10-18 2020-02-04 苏州浪潮智能科技有限公司 Dual-computer hot standby system
CN112711632A (en) * 2019-12-27 2021-04-27 山东鲁能软件技术有限公司 Asynchronous data stream replication method and system for high-availability cluster
CN112286732A (en) * 2020-12-02 2021-01-29 上海英方软件股份有限公司 Method and system for recovering unsynchronized data to standby machine when database synchronization is abnormal
CN112286732B (en) * 2020-12-02 2022-04-19 上海英方软件股份有限公司 Method and system for recovering unsynchronized data to standby machine when database synchronization is abnormal
CN112685486A (en) * 2021-01-05 2021-04-20 腾讯科技(深圳)有限公司 Data management method and device for database cluster, electronic equipment and storage medium
CN112685486B (en) * 2021-01-05 2023-10-24 腾讯科技(深圳)有限公司 Data management method and device for database cluster, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105389231A (en) Database dual-computer backup method and system
US9940206B2 (en) Handling failed cluster members when replicating a database between clusters
CN103077242B (en) The method of a kind of fulfillment database server two-node cluster hot backup
CN103226502B (en) A kind of data calamity is for control system and data reconstruction method
JP5562444B2 (en) System and method for failing over non-cluster aware applications in a cluster system
US9311328B2 (en) Reference volume for initial synchronization of a replicated volume group
US9753954B2 (en) Data node fencing in a distributed file system
JP5102901B2 (en) Method and system for maintaining data integrity between multiple data servers across a data center
US7689862B1 (en) Application failover in a cluster environment
JP2008059583A (en) Cluster system, method for backing up replica in cluster system, and program product
CN111327467A (en) Server system, disaster recovery backup method thereof and related equipment
CN112256477A (en) Virtualization fault-tolerant method and device
CN115878384A (en) Distributed cluster based on backup disaster recovery system and construction method
CN112153134A (en) Disaster tolerance drilling method, device, equipment and storage medium of disaster tolerance cloud host
CN111966467A (en) Method and device for disaster recovery based on kubernetes container platform
US9367413B2 (en) Detecting data loss during site switchover
CN106612314A (en) System for realizing software-defined storage based on virtual machine
CN116389233A (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN105159794A (en) Mirror image implementing system and method
WO2022227719A1 (en) Data backup method and system, and related device
US10372560B2 (en) Cloud storage write cache management system and method
CN107590032A (en) The method and storage cluster system of storage cluster failure transfer
CN115658390A (en) Container disaster tolerance method, system, device, equipment and computer readable storage medium
CN112202601B (en) Application method of two physical node mongo clusters operated in duplicate set mode
JP2009265973A (en) Data synchronization system, failure recovery method, and program

Legal Events

Date Code Title Description
C06 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: 20160309