CN108647113B - Disaster recovery method and server - Google Patents

Disaster recovery method and server Download PDF

Info

Publication number
CN108647113B
CN108647113B CN201810290588.7A CN201810290588A CN108647113B CN 108647113 B CN108647113 B CN 108647113B CN 201810290588 A CN201810290588 A CN 201810290588A CN 108647113 B CN108647113 B CN 108647113B
Authority
CN
China
Prior art keywords
state
application server
disaster recovery
preset
disaster
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
CN201810290588.7A
Other languages
Chinese (zh)
Other versions
CN108647113A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201810290588.7A priority Critical patent/CN108647113B/en
Publication of CN108647113A publication Critical patent/CN108647113A/en
Application granted granted Critical
Publication of CN108647113B publication Critical patent/CN108647113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/1469Backup restoration techniques

Abstract

The embodiment of the specification provides a disaster recovery method and a server. The method comprises the following steps: detecting the state of the main warehouse, and judging whether to open disaster tolerance according to the detection result; when the judgment result is yes, switching the state of the application server associated with the master library to a first preset state; acquiring the state of the application server, and recovering the service when the states of the application server are all the first preset states; detecting whether the master library is recovered; if the master library is detected to be recovered, switching the state of the application server to a second preset state; and acquiring the state of the application server, and recovering the service when the states of the application server are all the second preset states.

Description

Disaster recovery method and server
Technical Field
The embodiment of the specification relates to the technical field of data processing, in particular to a disaster recovery method and a server.
Background
With the development of informatization, the stability of electronically stored data plays a critical role in the stable operation of electronic systems. Therefore, when the electronic data storage device fails or data is lost unexpectedly due to an unexpected disaster, the lost data needs to be found back in time, and the disaster loss is reduced.
The Disaster Recovery Planning (DRP) is the action taken in advance, in fact, and after a Disaster has caused a significant loss of information system resources. The disaster recovery technology is that two or more sets of IT systems with the same function are established in different places far away from each other, health status monitoring and function switching can be performed among the IT systems, and when one system stops working due to accidents (such as fire, earthquake and the like), the whole application system can be switched to the other system, so that the system can continue to work normally. The disaster recovery technology is a component of the high-availability technology of the system, and the disaster recovery system emphasizes the processing of the influence of the external environment on the system, particularly the influence of a catastrophic event on the whole IT node, and provides a node-level system recovery function.
In the existing disaster recovery technology, when an electronic data storage device sends a fault, development and operation and maintenance personnel verify the consistency of the application state of a server, the data consistency, the availability of a disaster recovery server and the like, and the risk of asset loss in the operation process cannot be avoided by manual operation. Therefore, a method for disaster recovery is needed to improve the efficiency of disaster recovery.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a disaster recovery method and a server, which can improve efficiency of disaster recovery.
The embodiment of the specification is realized by the following steps:
a method of disaster recovery, comprising:
detecting the state of the main warehouse, and judging whether to open disaster tolerance according to the detection result;
when the judgment result is yes, switching the state of the application server associated with the master library to a first preset state;
acquiring the state of the application server, and recovering the service when the states of the application server are all the first preset states;
detecting whether the master library is recovered;
if the master library is detected to be recovered, switching the state of the application server to a second preset state;
and acquiring the state of the application server, and recovering the service when the states of the application server are all the second preset states.
A server, comprising: the system comprises a main library detection module, a state switching module and a state consistency inspection module;
the master library detection module is used for detecting the state of the master library and judging whether to start disaster recovery according to the detection result; the system is also used for detecting whether the master library is recovered;
the state switching module is used for switching the state of the application server associated with the main library to a first preset state when the judgment result of judging whether the disaster recovery is started is yes; the application server is further used for switching the state of the application server to a second preset state when the master library is detected to be recovered; the state of the application server is used for representing a database for data operation of the application server; the first preset state is used for indicating that a database for data operation of the application server is a disaster recovery database; the second preset state is used for indicating that a database for data operation of the application server is a main database;
the state consistency checking module is used for acquiring the state of the application server; when the states of the application servers are all the first preset states, recovering the service; and when the states of the application servers are all the second preset states, recovering the service.
As can be seen from the above, in one or more embodiments of the present disclosure, by actively detecting the state of the master library to determine whether to start disaster recovery, it is possible to find out disaster recovery in time and speed up disaster recovery. Meanwhile, the database of the application server for data processing currently is represented by the state of the application server associated with the supervisor, the state of the application server is processed by the state machine, the application server can be automatically switched between the main library and the disaster recovery library, and the consistency of the application server can be determined by checking the consistency of the states. Therefore, the embodiments provided in this specification can realize a fully automatic disaster recovery process without manual intervention, and improve the disaster recovery efficiency. Meanwhile, because manual operation is not needed, the risk of asset loss in the disaster recovery process can be avoided.
Drawings
In order to more clearly illustrate one or more embodiments or prior art solutions of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art without inventive efforts.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for disaster recovery provided herein;
FIG. 2 is a timing diagram of an embodiment of a disaster recovery method provided by the present description;
FIG. 3 is a schematic block diagram illustrating one embodiment of a disaster recovery server provided by the present specification;
fig. 4 is a schematic block diagram of a server according to an exemplary embodiment of the present description.
Detailed Description
The embodiment of the specification provides a disaster recovery method and a server.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort shall fall within the protection scope of the present specification.
When the main library has a disaster, operation and maintenance personnel are required to switch the application route to the disaster recovery library, and research and development personnel perform data consistency check and data synchronization operation. After the main library is recovered, the operation and maintenance personnel switch the applied route to the main library, and meanwhile, research and development personnel carry out data consistency verification and data synchronization operation. For payment applications involving user capital security, extensive manual operations may not avoid the risk of asset loss during operation, and communication and the like during manual operations may increase recovery time required for disaster recovery. Based on this, the embodiment of the specification can automatically realize disaster recovery when a disaster occurs, avoid the risk of asset loss caused by manual operation, reduce recovery time and improve disaster recovery efficiency.
An embodiment of a method for disaster recovery according to the present specification is described below. Figure 1 is a schematic flow diagram of one embodiment of a method for disaster recovery provided herein, which provides the method operations as described in the embodiments or flowcharts, but may include more or fewer operations based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In actual implementation, the system or client product may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures. Figure 2 is a timing diagram illustrating an embodiment of a disaster recovery method provided by the present description. Specifically, as shown in fig. 1 and fig. 2, the method may include:
s102: and detecting the state of the main warehouse, and judging whether to start disaster recovery according to the detection result.
The state of the main library can be detected, and whether disaster recovery is started or not is judged according to the detection result.
Specifically, a connection request may be initiated to the master library at preset time intervals, and whether the master library responds to the connection request is detected. The detection result may include: the master library responds to the connection request, or the master library does not respond to the connection request.
The determining whether to open the disaster recovery according to the detection result may include: and when the frequency of the main library for responding the connection request reaches a first preset frequency, starting disaster recovery. The first preset times can be selected according to practical application. For example, 10, 20, etc. may be selected.
After disaster tolerance is started, the data operation of the application associated with the main library can be transferred to the disaster recovery library for execution. The application associated with the master library may be one or more.
In another embodiment, prior to detecting the master library state, the method may further comprise: and inquiring whether the data of the application server associated with the master library meets disaster recovery switching conditions. And if not, storing the application data. The data that does not satisfy the disaster recovery switching condition may specifically include: the data cannot be synchronized to the disaster recovery database. At this time, data that cannot satisfy the disaster recovery switching condition needs to be stored in the preset memory. The preset memory may not be the disaster recovery library.
S104: and when the judgment result is yes, switching the state of the application server associated with the master library to a first preset state.
And when the judgment result is yes, the disaster tolerance can be started.
State switching may be performed for application servers associated with the master library. The state of the application server associated with the master library may be used to represent a database in which the application server performs data operations.
The first preset state may be used to indicate that the database where the application server performs data operation is a disaster recovery database.
For example, the original state of the application server may be "Master", which indicates that the data operated by the application server is a Master library, and after disaster tolerance is opened, the state of the application server may be switched to a first preset state, for example, "Failover", and when the state of the application server is "Failover", the data operated by the application server may be a disaster recovery library.
The switching of the state of the application server to the first preset state may be implemented by using a state machine. Specifically, the triggering condition for switching to the first preset state may be preset to start disaster recovery. Then, after disaster tolerance is started, the state machine can automatically switch the state of the application server to a first preset state.
S106: and acquiring the state of the application server, and recovering the service when the states of the application server are all the first preset states.
The state of the application server may be obtained, and it is checked whether the states of the application server have all been switched to the first preset state. The state of the application server can be obtained by means of state broadcasting.
And when the states of the application servers associated with the master library are all the first preset states, recovering the service. At this time, the data operation applied after the service is recovered is performed in the disaster recovery database.
S108: detecting whether the master library is recovered.
It may be detected whether the master library is restored. Specifically, a connection request may be initiated to the master library at preset time intervals, and whether the master library responds to the connection request is detected. When the number of times that the master library responds to the connection request reaches a second preset number of times, it may be determined that the master library has been restored. The first preset times can be selected according to practical application.
S110: and if the master library is detected to be recovered, switching the state of the application server to a second preset state.
After the master library is recovered, the state of the application server may be switched to a second preset state.
The second preset state may be used to indicate that the database where the application server performs data operations is a master database.
The switching of the state of the application server to the second preset state may be implemented by using a state machine. Specifically, the trigger condition for switching to the second preset state may be preset as the master library recovery. Then, when it is detected that the master library is restored, the state machine may automatically switch the state of the application server to a second preset state.
S112: and acquiring the state of the application server, and recovering the service when the states of the application server are all the second preset states.
The state of the application server may be acquired and it is checked whether the state of the application server has been switched to a second preset state. And when the states of the application servers associated with the master library are all the second preset states, the service can be recovered. At this time, the data operation of the application after the service is restored is performed in the master library.
In another embodiment, the method may further comprise: and processing the disaster backup database data.
The processing of the disaster backup database data may include: and backing up and/or cleaning the disaster backup database data.
In another embodiment, the method may further comprise: disaster recovery information is recorded.
The disaster recovery information may include: time of disaster occurrence, disaster recovery flow, disaster recovery time, and business data during disaster recovery.
By recording disaster recovery information, the disaster recovery processing method can be further optimized based on the recorded disaster recovery information.
Therefore, in one or more embodiments of the disaster recovery method in the present specification, by actively detecting the state of the master library to determine whether to open the disaster recovery, the disaster recovery can be found in time, and the disaster recovery speed can be increased. Meanwhile, the database of the application server for data processing currently is represented by the state of the application server associated with the supervisor, the state of the application server is processed by the state machine, the application server can be automatically switched between the main library and the disaster recovery library, and the consistency of the application server can be determined by checking the consistency of the states. Therefore, the embodiment of the disaster recovery method provided by the specification can realize a full-automatic disaster recovery process without manual intervention, and the disaster recovery efficiency is improved. Meanwhile, because manual operation is not needed, the risk of asset loss in the disaster recovery process can be avoided.
In another aspect, a disaster recovery server is provided, and fig. 3 is a schematic structural diagram of an embodiment of the disaster recovery server provided in this specification, and as shown in fig. 3, the disaster recovery server may include: a master library detection module 202, a state switching module 204, and a state consistency check module 206.
The master library detection module 202 may be configured to detect a master library state, and determine whether to open a disaster tolerance according to a detection result. The master library detection module 202 may be further configured to detect whether the master library is recovered.
The state switching module 204 may be configured to switch the state of the application server associated with the master library to a first preset state when the determination result of determining whether to start disaster recovery is yes. The state switching module 204 may be further configured to switch the state of the application server to a second preset state when it is detected that the master library is recovered. The state of the application server associated with the master library may be used to represent a database in which the application server performs data operations. The first preset state may be used to indicate that the database where the application server performs data operation is a disaster recovery database. The second preset state may be used to indicate that the database where the application server performs data operations is a master database.
The state consistency check module 206 may be configured to obtain the states of the application servers, recover the service when the states of the application servers are all in a first preset state, and recover the service when the states of the application servers are all in a second preset state.
In another embodiment, the server may further include: and a disaster recovery switching condition checking module, configured to query whether application data associated with the master library meets a disaster recovery switching condition before the master library detecting module 202 detects the master library state. The data that does not satisfy the disaster recovery switching condition may include: the data cannot be synchronized to the disaster recovery database.
In another embodiment, the server may further include: and the disaster backup database data processing module is used for processing the disaster backup database data. The processing of the disaster backup database data may include: and backing up and/or cleaning the disaster backup database data.
In another embodiment, the server may further include: and the information recording module is used for recording the disaster recovery information. The disaster recovery information may include: time of disaster occurrence, disaster recovery flow, disaster recovery time, and business data during disaster recovery.
The disaster recovery method or the server provided in the embodiments of the present specification may be implemented in a computer by a processor executing corresponding program instructions, for example, implemented on a PC side using a c + + language of a windows operating system, or implemented on an intelligent terminal using, for example, android and iOS system programming languages, and implemented on a processing logic based on a quantum computer. As shown in fig. 4, fig. 4 is a schematic block diagram of a server according to an exemplary embodiment of the present description. At the hardware level, the server may include a processor, an internal bus, a transport module, and a memory. The memory may include memory as well as non-volatile memory. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the word string recognition device on the logic level. It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration, and is not a limitation to the structure of the server. For example, the server may also include more or fewer components than shown in fig. 4, and may also include other Processing hardware, such as a GPU (Graphics Processing Unit), for example, or have a different configuration than that shown in fig. 4. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Specifically, another aspect of the present specification further provides a server, including a processor and a memory, where the memory stores computer program instructions executed by the processor, and the processor executes the computer program instructions to implement the following steps:
detecting the state of the main warehouse, and judging whether to open disaster tolerance according to the detection result;
when the judgment result is yes, switching the state of the application server associated with the master library to a first preset state;
acquiring the state of the application server, and recovering the service when the states of the application server are all the first preset states;
detecting whether the master library is recovered;
if the master library is detected to be recovered, switching the state of the application server to a second preset state;
and acquiring the state of the application server, and recovering the service when the states of the application server are all the second preset states.
In the embodiment of the present disclosure, the processor may include a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU), and may also include other single-chip microcomputers, logic gates, integrated circuits, and the like with logic processing capability, or a suitable combination thereof. The memory according to the embodiment of the present application may be a memory device for storing information. In a digital system, the device capable of storing binary data may be a memory; in an integrated circuit, a circuit without an actual form and with a storage function can also be a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form may also be called a memory or the like. When the method is implemented, the memory can also be implemented in a cloud memory mode, and the specific implementation mode is not limited in this specification.
Therefore, the embodiment of the disaster recovery server provided by the specification and the embodiment of the method provided by the specification are based on the same innovative concept, and therefore, the embodiment of the disaster recovery server provided by the specification can achieve the technical effects of the embodiment of the method provided by the specification.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The apparatuses, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, apparatus or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.

Claims (16)

1. A method of disaster recovery, comprising:
detecting the state of the main warehouse, and judging whether to open disaster tolerance according to the detection result;
when the judgment result is yes, switching the state of the application server associated with the master library to a first preset state; the state of the application server is used for representing a database for data operation of the application server; the first preset state is used for indicating that a database for data operation of the application server is a disaster recovery database;
acquiring the state of the application server, and recovering the service when the states of the application server are all the first preset states;
detecting whether the master library is recovered;
if the master library is detected to be recovered, switching the state of the application server to a second preset state; the second preset state is used for indicating that a database for data operation of the application server is a main database;
and acquiring the state of the application server, and recovering the service when the states of the application server are all the second preset states.
2. The method of claim 1, wherein the detecting a master library state comprises: and initiating a connection request to the master library at preset time intervals, and detecting whether the master library responds to the connection request.
3. The method of claim 2, wherein the detection result comprises: the master library responds to the connection request, or the master library does not respond to the connection request.
4. The method of claim 3, wherein the determining whether to open the disaster recovery according to the detection result comprises: and when the frequency of the main library for responding the connection request reaches a first preset frequency, starting disaster recovery.
5. The method of claim 3, wherein the detecting whether the master library is restored comprises: and when the times of the main library responding to the connection request reach a second preset time, the main library is recovered.
6. The method of claim 1, wherein the switching the state of the application server to a first preset state and the switching the state of the application server to a second preset state is implemented using a state machine.
7. The method of claim 1, wherein prior to detecting the master library state, the method further comprises: and inquiring whether the data of the application server associated with the master library meets disaster recovery switching conditions.
8. The method of claim 7, wherein the data that does not satisfy the disaster-tolerant handover condition comprises: the data cannot be synchronized to the disaster recovery database.
9. The method of claim 1, further comprising: and processing the disaster backup database data.
10. The method of claim 9, wherein the processing disaster recovery database data comprises: and backing up and/or cleaning the disaster backup database data.
11. The method of claim 1, further comprising: disaster recovery information is recorded.
12. The method of claim 11, wherein the disaster recovery information comprises: time of disaster occurrence, disaster recovery flow, disaster recovery time, and business data during disaster recovery.
13. A server, comprising: the system comprises a main library detection module, a state switching module and a state consistency inspection module;
the master library detection module is used for detecting the state of the master library and judging whether to start disaster recovery according to the detection result; the system is also used for detecting whether the master library is recovered;
the state switching module is used for switching the state of the application server associated with the main library to a first preset state when the judgment result of judging whether the disaster recovery is started is yes; the application server is further used for switching the state of the application server to a second preset state when the master library is detected to be recovered; the state of the application server is used for representing a database for data operation of the application server; the first preset state is used for indicating that a database for data operation of the application server is a disaster recovery database; the second preset state is used for indicating that a database for data operation of the application server is a main database;
the state consistency checking module is used for acquiring the state of the application server; when the states of the application servers are all the first preset states, recovering the service; and when the states of the application servers are all the second preset states, recovering the service.
14. The server of claim 13, further comprising: and the disaster tolerance switching condition checking module is used for inquiring whether the application data associated with the master library meets the disaster tolerance switching condition or not before the master library detecting module detects the state of the master library.
15. The server according to claim 13, further comprising a disaster recovery database data processing module, configured to process the disaster recovery database data; the processing of the disaster backup database data comprises: and backing up and/or cleaning the disaster backup database data.
16. The server of claim 13, further comprising: the information recording module is used for recording disaster recovery information; the disaster recovery information includes: time of disaster occurrence, disaster recovery flow, disaster recovery time, and business data during disaster recovery.
CN201810290588.7A 2018-03-30 2018-03-30 Disaster recovery method and server Active CN108647113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810290588.7A CN108647113B (en) 2018-03-30 2018-03-30 Disaster recovery method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810290588.7A CN108647113B (en) 2018-03-30 2018-03-30 Disaster recovery method and server

Publications (2)

Publication Number Publication Date
CN108647113A CN108647113A (en) 2018-10-12
CN108647113B true CN108647113B (en) 2022-02-18

Family

ID=63745115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810290588.7A Active CN108647113B (en) 2018-03-30 2018-03-30 Disaster recovery method and server

Country Status (1)

Country Link
CN (1) CN108647113B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492013B (en) * 2018-11-02 2021-01-26 京东数字科技控股有限公司 Data processing method, device and system applied to database cluster

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
PT2053780E (en) * 2006-07-28 2015-01-05 Zte Corp A distributed master and standby managing method and system based on the network element
CN101876924B (en) * 2009-04-30 2013-10-30 升东网络科技发展(上海)有限公司 Database fault automatic detection and transfer method
CN102355414B (en) * 2011-09-21 2017-11-03 中兴通讯股份有限公司 Automatic protection switching state machine processing method and device
CN103226502B (en) * 2013-05-21 2015-08-19 中国工商银行股份有限公司 A kind of data calamity is for control system and data reconstruction method
CN104516966A (en) * 2014-12-24 2015-04-15 北京奇虎科技有限公司 High-availability solving method and device of database cluster
CN107196987A (en) * 2016-03-15 2017-09-22 中国移动通信集团河南有限公司 The switching method and server of a kind of pair of centring system
CN106815097A (en) * 2017-01-18 2017-06-09 北京许继电气有限公司 Database disaster tolerance system and method
CN107066354B (en) * 2017-04-18 2021-01-05 中国银联股份有限公司 Database switching method, master server and slave server

Also Published As

Publication number Publication date
CN108647113A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
JP6921206B2 (en) Database state determination method and device and consistency verification method and device
CN107577717B (en) Processing method and device for guaranteeing data consistency and server
CN109033127B (en) Synchronous data verification method, device and equipment
US9298567B2 (en) System availability in PPRC failover environments
US20170083419A1 (en) Data management method, node, and system for database cluster
CN110837457A (en) Task management method and device, electronic equipment and storage medium
CN111767009A (en) Disk cleaning method, device and equipment
US20150112946A1 (en) Computing device and data recovery method for distributed file system
CN115185755A (en) Abnormity detection method and device, storage medium and electronic equipment
CN108647113B (en) Disaster recovery method and server
CN108536613B (en) Data cleaning method and device and server
CN112965882B (en) Data fault analysis method and device
CN110908792B (en) Data processing method and device
CN107908370B (en) Data storage method and device
CN114168389A (en) Method and device for recovering CAD file, storage medium and processor
CN115391337A (en) Database partitioning method and device, storage medium and electronic equipment
CN111756602B (en) Communication timeout detection method in neural network model training and related product
CN114138615A (en) Service alarm processing method, device, equipment and storage medium
CN111159782B (en) Safety task processing method and electronic equipment
CN108255667B (en) Service monitoring method and device and electronic equipment
CN107135137B (en) Network group identification method and device
US20170147450A1 (en) Information processing device, information processing method, and program recording medium
US20200192761A1 (en) Load and Save Recovery Partition Using Mobile Device
CN107038077B (en) Message flood storage method and device
CN115629918B (en) Data processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200927

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200927

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant