CN106502835B - A kind of disaster-tolerant backup method and device - Google Patents

A kind of disaster-tolerant backup method and device Download PDF

Info

Publication number
CN106502835B
CN106502835B CN201610943435.9A CN201610943435A CN106502835B CN 106502835 B CN106502835 B CN 106502835B CN 201610943435 A CN201610943435 A CN 201610943435A CN 106502835 B CN106502835 B CN 106502835B
Authority
CN
China
Prior art keywords
node
backup
disaster
time
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.)
Active
Application number
CN201610943435.9A
Other languages
Chinese (zh)
Other versions
CN106502835A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201610943435.9A priority Critical patent/CN106502835B/en
Publication of CN106502835A publication Critical patent/CN106502835A/en
Application granted granted Critical
Publication of CN106502835B publication Critical patent/CN106502835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/1464Management of the backup or restore process for networked environments
    • 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/1479Generic software techniques for error detection or fault masking
    • G06F11/1489Generic software techniques for error detection or fault masking through recovery blocks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present invention provides a kind of disaster-tolerant backup method and device, the disaster-tolerant backup method includes:Judge whether backup node is in data sync break state;When backup node is in data sync break state, judge whether the time of final updating data and the time difference of system time are less than first time threshold in host node;If the time of final updating data and the time difference of system time are less than first time threshold in host node, start backup node synchrodata from host node;Poll detects backup node, when backup node, which completes data, to be synchronized, stops backup node synchrodata.Using disaster-tolerant backup method provided in an embodiment of the present invention and device, remote control can be carried out to each controlled end node, realize procedure and the automation of the duplication of strange land data and backup.

Description

A kind of disaster-tolerant backup method and device
Technical field
The present invention relates to field of communication technology more particularly to a kind of disaster-tolerant backup methods and device.
Background technology
With the fast development of information technology, information security increasingly becomes asking of being widely noticed in each field of every profession and trade Topic is realized although the development of computer provides the more more efficiently information service in real time than ever for people The automation of information storage and management, but hidden danger caused by the extensive use of computer is also very big.Once meter Calculation machine system is by irreversible destruction, it will leads to massive losses.For the fast quick-recovery data after calamity, in the prior art one As use data backup the methods of method, including manual backup, automated back-up, NetApp SnapMirror softwares have warp High efficiency, simplification and the reasonable cost of verification are crossed, therefore the software is always in various NetApp storage environments for many years It carries out replicating the one preferred technique with disaster recovery, although the strange land that data efficient may be implemented in NetApp SnapMirror is replicated And backup, but need manually to control the strange land transmission of data.
Invention content
In order to solve the above technical problems, the present invention provides a kind of disaster-tolerant backup method and devices.
One aspect of the present invention provides a kind of disaster-tolerant backup method, and the disaster-tolerant backup method includes:
Judge whether backup node is in data sync break state;
When the backup node is in data sync break state, judge in host node the time of final updating data with Whether the time difference of system time is less than first time threshold;
If the time of final updating data and the time difference of system time are less than first time threshold in the host node, Start the backup node from synchrodata from the host node;
Poll detects the backup node, and when the backup node, which completes data, to be synchronized, it is same to stop the backup node Step data.
In one embodiment, described if the backup node can not be stopped when the backup node, which completes data, to be synchronized Disaster-tolerant backup method further includes:Poll detects one preset time of host node, if the host node is in the preset time Interior stopping receives external data, then stops the backup node synchrodata.
In one embodiment, the disaster-tolerant backup method further includes:If the state of the host node is when described default It is interior not stop receiving external data, then warning information is sent out, disaster tolerance is carried out and reports an error.
In one embodiment, when the backup node, which completes data, to be synchronized, the disaster-tolerant backup method further includes:
Judge the time of the time of last synchrodata and final updating data in the host node in the backup node Time difference whether be less than second time threshold;
When the time of last synchrodata in the backup node and the time of final updating data in the host node When time difference is less than the second time threshold, stop the backup node synchrodata.
In one embodiment, the time of final updating data and the time difference of system time are less than the in the host node One time threshold, starts the backup node after synchrodata from the host node, and the disaster-tolerant backup method further includes:Sentence The backup node break whether still in data sync break state, if the backup node is still in data sync break shape State restarts the backup node and carries out data synchronization.
In one embodiment, the disaster-tolerant backup method further includes:Start timing after starting the backup node, and examines Survey the backup node currently carry out data synchronization overall time whether be more than third time threshold, if it is, sending out announcement Alert information carries out disaster tolerance and reports an error.
In one embodiment, the disaster-tolerant backup method further includes:Judge whether backup node is in data sync break When the result of state is no, warning information is sent out, disaster tolerance is carried out and reports an error.
In one embodiment, the disaster-tolerant backup method further includes:When last synchrodata in the backup node Between when being more than the second time threshold with time difference of the time of final updating data in the host node, make the backup section Point continues synchrodata.
On the other hand the embodiment of the present invention additionally provides a kind of disaster-tolerant backup device, the disaster-tolerant backup device includes:
Backup node access unit, for judging whether backup node is in data sync break state;
Host node access unit, for judging that the time of final updating data and the time difference of system time are in host node It is no to be less than first time threshold;
Backup node start unit, for when the time of final updating data and the time of system time in the host node When difference is less than first time threshold, start the backup node from synchrodata from the host node;
Polling system unit detects the backup node for poll, when the backup node, which completes data, to be synchronized, stops The only backup node synchrodata.
In one embodiment, described if the backup node can not be stopped when the backup node, which completes data, to be synchronized Polling system unit is additionally operable to:Poll detects one preset time of host node, if the host node is in the preset time Interior stopping receives external data, then stops the backup node synchrodata.
In one embodiment, the disaster-tolerant backup device further includes:Report an error unit, exists for the state when the host node Do not stop sending out warning information when receiving external data in the preset time, carries out disaster tolerance and report an error.
In one embodiment, the polling system unit further includes:
Time difference judgment module, for judging in the backup node in the time of last synchrodata and the host node Whether the time difference of the time of final updating data is less than second time threshold;
Node interrupts module, for when last in the time of last synchrodata in the backup node and the host node When the time difference of the time updated the data is less than the second time threshold, stop the backup node synchrodata.
In one embodiment, the polling system unit further includes:
Judgment module, after the backup node start unit starts backup node, for judging that the backup node is It is no still in data sync break state;
Module is restarted, is used for when the backup node is still in data sync break state, described in restarting Backup node carries out data synchronization.
In one embodiment, the disaster-tolerant backup device further includes a timing unit, for starting the backup node After start timing, and detect the backup node currently carry out data synchronization overall time whether be more than third time threshold, When the overall time that the backup node currently carries out data synchronization is more than the third time threshold, the unit hair that reports an error Go out warning information, carries out disaster tolerance and report an error.
In one embodiment, the unit that reports an error is additionally operable to when the output result of backup node access unit is no, hair Go out warning information, carries out disaster tolerance and report an error.
In one embodiment, the polling system unit further includes:Update module, for working as the time difference judgment module Output result when being no, so that the backup node is continued synchrodata.
In one embodiment, the disaster-tolerant backup device is set in the backup node, and the disaster-tolerant backup device is logical It crosses SSH and remotely accesses the host node, wherein SSH indicates safety shell protocol.
In one embodiment, the disaster-tolerant backup device is set in the host node, and the disaster-tolerant backup device passes through SSH remotely accesses the backup node.
In one embodiment, the disaster-tolerant backup is installed on except the backup node and host node and is independently arranged.
Using disaster-tolerant backup method provided in an embodiment of the present invention and device, each controlled end node can remotely be controlled System realizes procedure and the automation of the duplication of strange land data and backup.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow diagram of disaster-tolerant backup method of the embodiment of the present invention;
Fig. 2 is the flow diagram of the another disaster-tolerant backup method of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of disaster-tolerant backup device of the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of polling system of embodiment of the present invention unit 4;
Fig. 5 is the Organization Chart of disaster-tolerant backup device of the embodiment of the present invention;
Fig. 6 is the control structure figure of the another disaster tolerance system of the embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The present invention has supplied the embodiment of a disaster-tolerant backup method, as shown in Figure 1, this method mainly includes the following steps that:
Step S1, judge whether backup node is in data sync break state.
It such as crosses backup node and is currently at data sync break state, illustrate to meet the requirement for continuing synchrodata, if The output result of step S1 is no, illustrates that backup node does not meet the requirement for continuing synchrodata, needs to send out warning information, into Row disaster tolerance reports an error (step S6), no longer executes following steps.
Step S2, when backup node is in data sync break state, further judge final updating number in host node According to time and system time time difference whether be less than first time threshold.
External data is received by host node due to being at the beginning in the embodiment of the present invention, and backup node is from host node Middle replicate data, data source are host nodes, access host node by step S2, determine the time of host node final updating data Whether it is less than a preset time threshold with the time difference of system time, if it does, illustrating final updating data in host node Time and external data source basic synchronization, subsequent step can be executed.It may thus be appreciated that the main function of the step is to determine master Whether acquired external data is newest data in node.
In one embodiment, above-mentioned time threshold usually takes 15 minutes, that is, allows final updating data in host node The time difference of time and current time in system, in 15 minutes, warning information was then sent out more than 15 minutes, and progress disaster tolerance, which reports an error, (to be walked Rapid S6).
If step S3, the time of final updating data and the time difference of system time are less than first time threshold in host node Value starts backup node synchrodata from host node.
If time difference of the time of final updating data compared with the current time in system is no more than 15 minutes in host node, It can then start backup node using the external data of host node final updating as latest data and carry out data from host node It is synchronous.
Step S4, poll detects backup node, judges whether backup node completes data synchronization.
Step S5, when backup node, which completes data, to be synchronously completed, stop backup node synchrodata.
The embodiment of the present invention goes the external data obtained in host node by SSH remote control backup nodes, to ensure number According to being synchronized on backup node, when implementing the embodiment of the present invention, it is only necessary to be managed, manage to a backup node Object is simple, realizes procedure and the automation of strange land data duplication and backup.
In one embodiment, when backup node, which completes data, to be synchronized, normally can backup node be stopped by step S5, made Its state becomes data sync break state.But if host node is receiving external data at this time, i.e. host node is in number According to transmission state, even if backup node completes data synchronization at this time, it is also possible to can not be stopped, repeating to report in order to prevent Mistake has been preset a buffer time to host node, and poll detects the host node pre-set buffer time, if the state of host node is at this Idle state (stopping receiving external data) is converted in the pre-set buffer time, then being possible to be successfully closed backup section Point.If the state of host node does not stop receiving external data in above-mentioned preset time, warning information is sent out, carries out disaster tolerance It reports an error.
Fig. 2 is also the flow diagram of disaster-tolerant backup method provided in an embodiment of the present invention.As shown in Fig. 2, being examined in poll Still whether it further includes a judgment step S7 to survey between backup node and stopping backup node synchrodata, for judging backup node In data sync break state, if backup node still in data sync break state, illustrates that step S3 fails and opens Dynamic backup node needs to restart backup node progress data synchronization at this time.
As shown in Fig. 2, when backup node completes data synchronization, which further includes a step S8, is judged Whether the time difference of the time of final updating data is less than for the moment in the time of last synchrodata and host node in backup node Between threshold value, and the time difference of the time of final updating data is small in the time of last synchrodata and host node in the backup node When the time threshold, stop backup node synchrodata.The step is mainly used for replicating in standby node completion data laggard Row verification, it is ensured that the data of backup node final updating are the newest external datas in host node.When last same in backup node In the time of step data and host node the time difference of the time of final updating data be more than the time threshold when, make backup node after Continuous synchrodata.Wherein, time threshold herein can take 5 minutes, can also take 15 minutes, but typically no less than 5 minutes.
Disaster-tolerant backup method provided in an embodiment of the present invention further includes a timed process (being not shown in Fig. 2), standby when starting Part node from host node synchrodata when, in order to avoid backup node hangs up (i.e. hang is dead), the embodiment of the present invention is also set A time threshold is determined, has started timing while starting backup node, detection backup node currently carries out the whole of data synchronization Whether the body time is more than this time threshold, if so reports an error with regard to carrying out disaster tolerance.The time threshold usually takes 40 minutes, It should be controlled in 40 minutes that is, backup node carries out the time used in the overall process of data synchronization from host node, beyond at this time Between threshold value illustrate that special circumstances occurs in data synchronization process, the dead situations of hang, the inspection of this threshold value may occur for certain steps It is the bottom-line plan for ensureing that entire data synchronization process is controllable.
Based on inventive concept identical with Fig. 1 and disaster-tolerant backup method shown in Fig. 2, inventive embodiments additionally provide one kind Disaster-tolerant backup device, as described in following example.The principle and disaster-tolerant backup method solved the problems, such as due to the disaster-tolerant backup device It is similar, therefore the implementation of the disaster-tolerant backup device may refer to the implementation of disaster-tolerant backup method, overlaps will not be repeated.
Fig. 3 is the structural schematic diagram of disaster-tolerant backup device of the embodiment of the present invention, as shown in figure 3, the disaster-tolerant backup device packet It includes:Backup node access unit 1, host node access unit 2, backup node start unit 3 and polling system unit 4.Wherein, standby Part node visit unit 1 is for judging whether backup node is in data sync break state;Host node access unit 2 is for sentencing Whether the time of final updating data and the time difference of system time are less than first time threshold in disconnected host node;Backup node opens Moving cell 3 is used for when the time of final updating data in host node and the time difference of system time being less than first time threshold, Start backup node synchrodata from host node;Polling system unit 4 detects backup node for poll, when backup node is complete When being synchronized at data, stop backup node synchrodata.
In one embodiment, when backup node, which completes data, to be synchronized, if backup node can not be stopped, then above-mentioned poll Control unit 4 can be also used for poll detection one preset time of host node, if host node stops receiving in the preset time External data can then stop backup node synchrodata.
In one embodiment, above-mentioned disaster-tolerant backup device further includes reporting an error unit 5 for when the state of host node exists It states and does not stop sending out warning information when receiving external data in preset time, carry out disaster tolerance and report an error.
As shown in figure 4, above-mentioned polling system unit 4 includes a time difference judgment module 41 and node interrupts module 42. Time difference judgment module 41 is used to judge in backup node final updating data in the time of last synchrodata and host node Whether the time difference of time is less than second time threshold;Node interrupts module 42 is used for when last synchrodata in backup node When the time difference of time and the time of final updating data in host node are less than above-mentioned second time threshold, it is same to stop backup node Step data.Above-mentioned second time threshold can take not less than 5 minutes.
In one embodiment, polling system unit 4 further includes a judgment module 43 and one restarting module 44, judges mould Whether block 43 is used for after backup node start unit 3 starts backup node, for judging backup node still in data synchronization Interrupt status;It restarts module 44 to be used for when backup node is still in data sync break state, restarting backup section Row data are clicked through to synchronize.After backup node start unit 3 starts backup node, if it is determined that the judging result of module 43 is standby Part node remains as data sync break state, illustrates that backup node fails startups, needs restarting 44 duplicate removal of module It opens backup node and carries out data synchronization.
In one embodiment, above-mentioned calamity back-up device further includes a timing unit 6, and timing unit 6 is used for standby in startup Start timing after part node, and detects backup node and whether currently carry out the overall time of data synchronization more than third time threshold Value, when the overall time that backup node currently carries out data synchronization is more than second time threshold, the unit 5 that reports an error sends out alarm letter Breath carries out disaster tolerance and reports an error.
In one embodiment, (the initial state of backup node when the output result of backup node access unit 1 is no It is not data sync break state), the unit 6 that reports an error can send out warning information, carry out disaster tolerance and report an error.
In one embodiment, polling system unit 4 further includes a update module 45, for when time difference judgment module 41 When output result is no, backup node start unit 3 is jumped to, starts backup node and continues to the same step number from host node According to.
Using disaster-tolerant backup method provided in an embodiment of the present invention and device, each controlled end node can remotely be controlled System realizes procedure and the automation of the duplication of strange land data and backup.
Above-mentioned disaster-tolerant backup device can be arranged in backup node, can also be arranged in the master node, or also may be used To be independently disposed to except host node and backup node.When disaster-tolerant backup device is arranged in backup node, disaster-tolerant backup dress The host node can be remotely accessed by SSH (Secure Shell, safety shell protocol) by setting.Disaster-tolerant backup device is set to When in host node, backup node can be remotely accessed by SSH.When disaster-tolerant backup is installed on except backup node and host node solely It erects when setting, SSH can be passed through and remotely access host node and backup node.
Fig. 5 is the one of which configuration structure of disaster-tolerant backup device provided in an embodiment of the present invention.The present invention is only to hold Calamity back-up device not limits the invention independently of being illustrated for being arranged except host node, backup node.Such as figure Shown in 5, for host node for obtaining external source data, backup node is used for from host node replicate data to carry out data synchronization, Disaster-tolerant backup device except host node, backup node independently of being arranged, with backup node and host node respectively by network connection, It can respectively be accessed to active and standby part node by SSH, for controlling backup node replicate data from host node.
Disaster-tolerant backup method, server and the system that embodiment provides for a better understanding of the present invention, with reference to tool The example of body illustrates.
NetApp SnapMirror softwares have high efficiency, simplification and the reasonable cost by verification, therefore for many years The software is always to carry out replicating the one preferred technique with disaster recovery in various NetApp storage environments.It can utilize Network Appliance establish NetApp SnapMirror softwares on the basis of Data ONTAPP operating systems to build Backup node in disaster tolerant backup system and host node utilize disaster-tolerant backup assembly monitor and remote control NetApp Backup node in SnapMirror softwares and host node realize that teledata synchronizes according to control structure figure shown in Fig. 6.At this In inventive embodiments, respectively by NetApp SnapMirror software deployments in the node of Pekinese two:A nodes and B node difference As host node and backup node.
First, the relevant parameter for checking disaster-tolerant backup device further checks B node if parameter testing is normal Whether state is data sync break (i.e. broken_off) state.If B node is not broken_off states, reports an error and move back Go out, no longer executes following operation.
If B node is in broken_off states, meets the requirement for continuing synchrodata, further check A nodes Whether the time of final updating data and the time difference of system time are less than 15 minutes.If A node final updating data when Between it is slower than system time then continued poll A nodes 20 times more than 15 minutes, per minor tick 30 seconds, if A nodes are most after ten minutes The time updated the data afterwards was not still synchronized to current time within 15 minutes, then reported an error and exit.
If the time of A node final updating data and the time difference of system time are less than 15 minutes, or to A node wheels Find that the time of final updating data and the time difference of system time have been less than 15 minutes in A nodes, then illustrate that A is saved after asking repeatedly Point has obtained newest external data, continues to execute subsequent step, starts B node, starts to carry out data synchronization (i.e. from A nodes Start snapmirrior to replicate).
Start timing while starting B node, whether the overall time that detection B node carries out data synchronization is less than 40 points Clock then reports an error and exits if it exceeds it is dead to illustrate within 40 minutes that hang may occur for system certain module in data synchronization process.
If the overall time that B node carries out data synchronization is no more than 40 minutes, continue subsequent step, poll inspection Look into the state of B node and A nodes.Judge B node and A nodes whether be " snapmirrored&transferring " state (i.e. B node is in that data synchronously complete (snapmirrored) state and A nodes are in data transmission (transferring) shape State), if it is, wait for the state for going to check A nodes and B node for 1 minute again, this be in check B node and A node states it Before, need whether the overall time that the data to B node synchronize again was once judged again less than 40 minutes, only when B is saved The state of B node and A nodes is just checked again for when the overall data synchronization time of point was still less than 40 minutes.A nodes are in Transferring states refer to that external data is currently being received in A nodes, if stopping B node at this time, it is possible to it will not succeed, In order to ensure successfully to stop B node, the step of checking A nodes is added in the embodiment, this mode is to present invention side The further supplement of method and device related embodiment is not intended as the limitation of the present invention.
If B node and A nodes are not " snapmirrored&transferring " states, further B node is judged Whether it is that (i.e. B node is in snapmirrored states to " snapmirrored&idle " state and A nodes are in A nodes Idle (idle) state).It refers to that A nodes neither receive external data, while also not being passed to B node that A nodes, which are in idle states, Transmission of data will not there is a situation where do not stop if stopping B node at this time.
If the state of B node and A nodes is not " snapmirrored&idle " state, further judge B node and Whether A nodes are that (i.e. B node is in data sync break state to " broken_off&idle " state and A nodes are in the free time State), if B node and A nodes are " broken_off&idle " state, illustrate the not actuated success of B node, need to open again Dynamic B node carries out data synchronization.In the specific implementation, can also further judgement only be done to B node, when B node is data When sync break state, illustrate that B node fails startup, needs to restart B node and carry out synchrodata.
If the state of B node and A nodes is " snapmirrored&idle " state, illustrates that data synchronize and finish, into One step checks whether the time difference of the time with the time of A node final updating data of last synchrodata on B node are less than 5 points Clock then illustrated that data synchronized success if it is less than 5 minutes, then executed update (update) order if it is greater than 5 minutes, B is made to save Point continues from A node synchrodatas.When the time of the time of last synchrodata and final updating data in A nodes in B node Difference when being less than 5 minutes, it is generally recognized that B node newest data in successful synchronization A nodes.
The embodiment of the present invention is realized by the way that disaster tolerance application server and NetApp SnapMirror softwares to be combined Remote control of the administrative center to each controlled end node, and procedure and automation are realized, and it is automatically-monitored The data synchronous regime of NetApp SnapMirror softwares, the teledata for realizing high-efficient automatic synchronize, and make long-range SSH Data interaction becomes controllable, realizes the automated execution of remote command.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above example Explanation be merely used to help understand the present invention method and its core concept;Meanwhile for those of ordinary skill in the art, According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (19)

1. a kind of disaster-tolerant backup method, which is characterized in that the disaster-tolerant backup method includes:
Judge whether backup node is in data sync break state;
When the backup node is in data sync break state, the time of final updating data and system in host node are judged Whether the time difference of time is less than first time threshold;
If the time of final updating data and the time difference of system time are less than first time threshold in the host node, start The backup node is from synchrodata from the host node;
Poll detects the backup node, when the backup node, which completes data, to be synchronized, stops the same step number of the backup node According to.
2. disaster-tolerant backup method according to claim 1, which is characterized in that complete data when the backup node and synchronize When, if can not stop the backup node, the disaster-tolerant backup method further includes:Poll detects the host node one when presetting Between, if the host node stops receiving external data in the preset time, stop the backup node synchrodata.
3. disaster-tolerant backup method according to claim 2, which is characterized in that the disaster-tolerant backup method further includes:If The state of the host node does not stop receiving external data in the preset time, then sends out warning information, carries out disaster tolerance report It is wrong.
4. disaster-tolerant backup method according to claim 1 or 2, which is characterized in that when backup node completion data are same When step, the disaster-tolerant backup method further includes:
Judge in the backup node time of final updating data in the time of last synchrodata and the host node when Between difference whether be less than second time threshold;
When the time of the time of last synchrodata and the time of final updating data in the host node in the backup node When difference is less than the second time threshold, stop the backup node synchrodata.
5. disaster-tolerant backup method according to claim 1, which is characterized in that the final updating data in the host node Time and the time difference of system time are less than first time threshold, start the backup node from synchrodata from the host node Afterwards, the disaster-tolerant backup method further includes:The backup node is judged whether still in data sync break state, if described Backup node restarts the backup node and carries out data synchronization still in data sync break state.
6. disaster-tolerant backup method according to claim 1 or 5, which is characterized in that the disaster-tolerant backup method further includes: Start timing after starting the backup node, and detect the backup node currently carry out data synchronization overall time it is whether big In third time threshold, if it is, sending out warning information, carries out disaster tolerance and report an error.
7. disaster-tolerant backup method according to claim 1, which is characterized in that the disaster-tolerant backup method further includes:Judge When the result whether backup node is in data sync break state is no, warning information is sent out, disaster tolerance is carried out and reports an error.
8. disaster-tolerant backup method according to claim 4, which is characterized in that the disaster-tolerant backup method further includes:Work as institute The time difference for stating the time of final updating data in the time of last synchrodata and the host node in backup node is more than institute When stating second time threshold, the backup node is made to continue synchrodata.
9. a kind of disaster-tolerant backup device, which is characterized in that the disaster-tolerant backup device includes:
Backup node access unit, for judging whether backup node is in data sync break state;
Host node access unit, for judging whether the time of final updating data and the time difference of system time are small in host node In first time threshold;
Backup node start unit, for small when the time of final updating data in the host node and the time difference of system time When first time threshold, start the backup node from synchrodata from the host node;
Polling system unit detects the backup node for poll, when the backup node, which completes data, to be synchronized, stops institute State backup node synchrodata.
10. disaster-tolerant backup device according to claim 9, which is characterized in that complete data when the backup node and synchronize When, if can not stop the backup node, the polling system unit is additionally operable to:Poll detects the host node one when presetting Between, if the host node stops receiving external data in the preset time, stop the backup node synchrodata.
11. disaster-tolerant backup device according to claim 10, which is characterized in that the disaster-tolerant backup device further includes:Report Wrong unit, for sending out alarm letter when the state of the host node does not stop the when of receiving external data in the preset time Breath carries out disaster tolerance and reports an error.
12. disaster-tolerant backup device according to claim 9 or 10, which is characterized in that the polling system unit further includes:
Time difference judgment module, it is last in the time of last synchrodata and the host node for judging in the backup node Whether the time difference of the time updated the data is less than second time threshold;
Node interrupts module, for when the time of last synchrodata in the backup node and final updating in the host node When the time difference of the time of data is less than the second time threshold, stop the backup node synchrodata.
13. disaster-tolerant backup device according to claim 9, which is characterized in that the polling system unit further includes:
Judgment module, after the backup node start unit starts backup node, for judging the backup node whether still In data sync break state;
Module is restarted, for when the backup node is still in data sync break state, restarting the backup Node carries out data synchronization.
14. the disaster-tolerant backup device according to claim 9 or 13, which is characterized in that the disaster-tolerant backup device further includes One timing unit for starting timing after starting the backup node, and detects the backup node currently to carry out data same Whether the overall time of step is more than third time threshold, when the overall time that the backup node currently carries out data synchronization is more than When the third time threshold, the unit that reports an error sends out warning information, carries out disaster tolerance and reports an error.
15. disaster-tolerant backup device according to claim 11, which is characterized in that the unit that reports an error is additionally operable to when backup section When the output result of point access unit is no, warning information is sent out, disaster tolerance is carried out and reports an error.
16. disaster-tolerant backup device according to claim 12, which is characterized in that the polling system unit further includes:More New module, for when the output result of the time difference judgment module is no, the backup node being made to continue synchrodata.
17. disaster-tolerant backup device according to claim 9, which is characterized in that the disaster-tolerant backup device is set to described In backup node, the disaster-tolerant backup device remotely accesses the host node by SSH, wherein SSH indicates Secure Shell association View.
18. disaster-tolerant backup device according to claim 9, which is characterized in that the disaster-tolerant backup device is set to described In host node, the disaster-tolerant backup device remotely accesses the backup node by SSH.
19. disaster-tolerant backup device according to claim 9, which is characterized in that the disaster-tolerant backup is installed on the backup It is independently arranged except node and host node.
CN201610943435.9A 2016-10-26 2016-10-26 A kind of disaster-tolerant backup method and device Active CN106502835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610943435.9A CN106502835B (en) 2016-10-26 2016-10-26 A kind of disaster-tolerant backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610943435.9A CN106502835B (en) 2016-10-26 2016-10-26 A kind of disaster-tolerant backup method and device

Publications (2)

Publication Number Publication Date
CN106502835A CN106502835A (en) 2017-03-15
CN106502835B true CN106502835B (en) 2018-10-16

Family

ID=58321821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610943435.9A Active CN106502835B (en) 2016-10-26 2016-10-26 A kind of disaster-tolerant backup method and device

Country Status (1)

Country Link
CN (1) CN106502835B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632067B (en) * 2017-03-21 2020-12-08 华为技术有限公司 Disaster recovery deployment method, device and system
CN107995282A (en) * 2017-11-29 2018-05-04 北京悦畅科技有限公司 Method of data synchronization, device, system and server
CN113849328B (en) * 2018-05-22 2024-04-12 华为技术有限公司 Management method and device of disaster recovery system
CN109005246B (en) * 2018-09-12 2021-10-01 北京国电通网络技术有限公司 Data synchronization method, device and system
CN111176888B (en) * 2018-11-13 2023-09-15 浙江宇视科技有限公司 Disaster recovery method, device and system for cloud storage
CN110830591B (en) * 2019-11-22 2022-07-29 北京浪潮数据技术有限公司 Information synchronization method, system, electronic equipment and storage medium
CN112506707B (en) * 2020-12-10 2023-12-29 深信服科技股份有限公司 Disaster recovery returning method, system, equipment and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388759B (en) * 2007-09-10 2011-07-13 中兴通讯股份有限公司 Method and system for implementing from asynchronous copy to synchronous copy by data
CN103902617B (en) * 2012-12-28 2017-06-09 华为技术有限公司 Distributed data base synchronous method and system
GB2515501A (en) * 2013-06-25 2014-12-31 Ibm Replication for on-line hot-standby database
CN104504062B (en) * 2014-12-22 2018-06-05 浙江宇视科技有限公司 Master/slave data storehouse method of data synchronization and device
CN105138441B (en) * 2015-06-30 2018-05-08 中标软件有限公司 Highly available cluster system and alarm method, warning system based on the system

Also Published As

Publication number Publication date
CN106502835A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN106502835B (en) A kind of disaster-tolerant backup method and device
CA2733788C (en) Method and systems for redundant server automatic failover
CN105471622B (en) A kind of high availability method and system of the control node active-standby switch based on Galera
EP3185481B1 (en) A host-to-host test scheme for periodic parameters transmission in synchronous ttp systems
US20080281938A1 (en) Selecting a master node in a multi-node computer system
CN108023809B (en) System and method for enabling control of a device in a process control system
CN108270726B (en) Application instance deployment method and device
CN107634855A (en) A kind of double hot standby method of embedded system
CN109992571B (en) Online closed-loop checking system and checking method for configuration file of intelligent substation
CN106960060B (en) Database cluster management method and device
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN105306605B (en) A kind of double host server systems
CN105915391B (en) The distributed key assignments storage method of self-recovering function is submitted and had based on single phase
CN108551397A (en) The communication control method of network bridge device and application and more PLC master stations and more PLC slave stations
CN104821870A (en) Master station smart power grid scheduling technology support system-based clock synchronization method
CN113656175A (en) Method, apparatus and program product for training models based on distributed systems
CN116185697B (en) Container cluster management method, device and system, electronic equipment and storage medium
CN113190620A (en) Method, device, equipment and storage medium for synchronizing data between Redis clusters
CN107005434B (en) Method, device and equipment for synchronizing Virtual Network Function (VNF) state
CN116027705A (en) Main-standby switching and data synchronizing system and method for programmable controller
CN111338767A (en) PostgreSQL master-slave database automatic switching system and method
US11829266B2 (en) Computing device, redundant system, program, and method for constructing redundant configuration
CN115150263A (en) Service cluster deployment method
CN113472891A (en) SDN controller cluster data processing method, device and medium
CN112506459A (en) Data synchronization method and system for avionics system comprehensive display control unit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant