CN112506707A - Disaster recovery method, system, equipment and computer readable storage medium - Google Patents

Disaster recovery method, system, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112506707A
CN112506707A CN202011434808.2A CN202011434808A CN112506707A CN 112506707 A CN112506707 A CN 112506707A CN 202011434808 A CN202011434808 A CN 202011434808A CN 112506707 A CN112506707 A CN 112506707A
Authority
CN
China
Prior art keywords
backup data
time
backup
node
migration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011434808.2A
Other languages
Chinese (zh)
Other versions
CN112506707B (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202011434808.2A priority Critical patent/CN112506707B/en
Publication of CN112506707A publication Critical patent/CN112506707A/en
Application granted granted Critical
Publication of CN112506707B publication Critical patent/CN112506707B/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/1464Management of the backup or restore process for networked environments
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a disaster recovery method, a system, a device and a computer medium, which are applied to a standby node and comprise the following steps: determining first backup data of the first migration, and transmitting the first backup data to the main node; sending out prompt information for prompting a user to shut down; and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node. In the application, the backup node can transmit the first backup data to the main node firstly, so that direct interruption of services can be avoided, the service interruption time is shortened, then the shutdown initiative right is given to a user, the required service termination can be avoided artificially, the second backup data of the current migration can be determined through cyclic iteration and transmitted to the main node, the stability of disaster recovery migration is guaranteed, the remaining third backup data is transmitted to the main node after shutdown, the integrity of the disaster recovery migration is guaranteed, and compared with the prior art, the user experience is good.

Description

Disaster recovery method, system, equipment and computer readable storage medium
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a disaster recovery method, system, device, and computer-readable storage medium.
Background
With the development of communication technology and the arrival of the big data era, in order to ensure the security of data and the service continuity, a disaster recovery technology may be used to store data, for example, a different-place disaster recovery technology is used to construct active and standby nodes in different regions, and when the data of a master node is lost, the data of the standby node may be recovered.
In the data recovery process, the standby node can be directly shut down to recover the data, but the shutdown operation can cause service interruption, and when the amount of data needing to be backed up and recovered is large, the service interruption time is too long, so that the user experience is influenced; all backup and recovered data can be directly transmitted to the main node by the backup node to avoid service interruption, but in the process, new service data may be generated and backup transmission is needed, so that the main node and the backup node are always in the data recovery process, and user experience is influenced.
In summary, how to improve the user experience in the disaster recovery migration process is a problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a disaster recovery method which can solve the technical problem of improving user experience in the disaster recovery process to a certain extent. The application also provides a disaster recovery system, an electronic device and a computer readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
a disaster recovery relocation method is applied to a standby node and comprises the following steps:
determining first backup data of first migration, and transmitting the first backup data to a main node;
sending out prompt information for prompting a user to shut down;
and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node.
Preferably, the determining the first backup data of the first migration includes:
and creating the first backup data based on a preset data magnitude value.
Preferably, the determining and transmitting the second backup data of the current migration to the master node by the loop iteration includes:
judging whether a loop iteration exit condition is met;
if the loop iteration exit condition is not met, creating the second backup data of the current return, transmitting the second backup data to the main node, and returning to the step of judging whether the loop iteration exit condition is met;
the type of the loop iteration exit condition comprises that the shutdown instruction is received, the disaster recovery and migration cancel instruction is received, and the loop iteration frequency is larger than a preset value.
Preferably, the creating the second backup data of the current migration includes:
judging whether the second backup data is successfully created last time;
if the last second backup data is failed to be created, judging whether the time difference between the current time and the last creation time of the second backup data is larger than or equal to a first preset value or not;
if the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to the first preset value, generating and executing a creation backup event for representing the creation of the second backup data of the current migration;
and if the last second backup data is successfully created, generating a creating backup event for representing the second backup data which is moved back at the current time and executing the creating backup event when the time difference between the current time and the creating time of the last second backup data is greater than or equal to the first preset value and the data amount to be backed up is greater than or equal to the second preset value.
Preferably, the judging whether the loop iteration exit condition is satisfied includes:
counting a first number of times of the second backup data creation failure;
judging whether the first time number is larger than a first preset time value or not;
and if the first time is less than or equal to the first preset time value, judging that the loop iteration exit condition is not met, and if the first time is greater than the first preset time value, judging that the loop iteration exit condition is met.
Preferably, the transmitting the second backup data to the master node includes:
judging whether the second backup data is transmitted successfully last time;
if the transmission of the second backup data at the last time fails, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the time difference between the current time and the transmission time of the second backup data at the last time is greater than or equal to a third preset value;
and if the last transmission of the second backup data is successful, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the data volume of the current second backup data is greater than or equal to a fourth preset value.
Preferably, the judging whether the loop iteration exit condition is satisfied includes:
counting a second number of times of transmission failure of the second backup data;
judging whether the second time number is larger than a second preset time value or not;
if the second time is less than or equal to the second preset time value, judging that the loop iteration exit condition is not met; and if the second time is greater than the second preset time value, judging that the loop iteration exit condition is met.
A disaster recovery and migration system is applied to a standby node and comprises:
the first determining module is used for determining first backup data of the first time of migration and transmitting the first backup data to the main node;
the first prompting module is used for sending out prompting information for prompting a user to shut down;
and the first execution module is used for determining the second backup data of the current migration through loop iteration and transmitting the second backup data to the main node, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node.
An electronic device applied to a standby node, comprising:
a memory for storing a computer program;
a processor, configured to implement the steps of any of the disaster recovery migration methods when executing the computer program.
A computer-readable storage medium for a backup node, the computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the steps of any of the disaster recovery migration methods described above.
The application provides a disaster recovery migration method, which is applied to a standby node and comprises the following steps: determining first backup data of the first migration, and transmitting the first backup data to the main node; sending out prompt information for prompting a user to shut down; and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node. In the application, the backup node can transmit the first backup data to the main node firstly, so that direct service interruption can be avoided, the service interruption time is shortened, then the user is informed of shutdown through the prompt message, the shutdown initiative right is given to the user, the required service termination can be avoided artificially, in the process, the second backup data of the current migration can be determined in a circulating iteration mode and transmitted to the main node, the stability of disaster recovery migration is guaranteed, the remaining third backup data are transmitted to the main node after shutdown, the integrity of the disaster recovery migration is guaranteed, and compared with the prior art, the user experience is good. The disaster recovery and migration system, the electronic device and the computer readable storage medium provided by the application also solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a first flowchart of a disaster recovery method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a backup node creating second backup data of a current migration;
FIG. 3 is a diagram illustrating a backup node transmitting second backup data to a primary node;
fig. 4 is a schematic structural diagram of a disaster recovery and migration system according to an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware component structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a first flowchart of a disaster recovery method according to an embodiment of the present disclosure.
The disaster recovery relocation method provided in the embodiment of the present application, applied to a standby node, may include the following steps:
step S101: and determining first backup data of the first migration, and transmitting the first backup data to the main node.
In practical application, when the backup node performs disaster recovery, because in most cases, the difference data between the main node and the backup node is the largest when the backup task is just executed, if the backup node is directly turned off, the service interruption time is too long due to too large data transmission of the backup node, and in order to avoid this situation, the backup node in the application may transmit the primary backup data to the main node, that is, the backup node may determine the primary backup data of the primary recovery and transmit the primary backup data to the main node.
It should be noted that the determination principle of the first backup data may be determined according to actual needs, for example, the first backup data may be determined according to a duration that the service is not interrupted, that is, a transmission duration of the first backup data should be greater than or equal to the duration that the service is not interrupted, or the first backup data may be determined according to a size of the data to be backed up, and the like, which is not specifically limited herein.
Step S102: and sending out prompt information for prompting the user to shut down.
In practical application, because the standby node determines the first backup data and transmits the first backup data to the master node, and the standby node is in a power-on state in this period, the standby node reduces the service interruption time through the transmission of the first backup data, and then the standby node can be powered off to complete disaster recovery.
It should be noted that the manner in which the standby node sends the prompt message for prompting the user to shut down may be determined according to actual needs, for example, the standby node may send the prompt message in a manner of voice prompt, text prompt, light prompt, or the like.
Step S103: and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node.
In practical application, after sending a prompt message prompting a user to shut down, the standby node may not issue a shutdown instruction at the first time, so the standby node may be in a process of waiting for receiving the shutdown instruction, in the process, the standby node may determine second backup data of the current migration through cyclic iteration and transmit the second backup data to the main node, so as to ensure normal operation of disaster recovery migration, because the cyclic iteration means cyclic execution, the standby node may execute the step of determining the second backup data of the current migration and transmitting the second backup data to the main node as many times as needed, in the process, if the standby node receives the shutdown instruction, the standby node may respond to the shutdown instruction to shut down, and then transmit the remaining third backup data to the main node, so as to complete the entire disaster recovery migration; and the amount of the remaining third backup data is generally small, so the shutdown duration of the standby node is not too long, and the user can predict the shutdown duration, so that the user can conveniently know the shutdown duration information, and certainly, the standby node can predict the shutdown information according to the amount of the third backup data and feed the shutdown information back to the user, thereby further improving the user experience.
It should be noted that the amount of the second backup data migrated back each time may be the same or different, and the present application is not specifically limited herein; in the process of shutdown in response to the shutdown instruction, in order to ensure that the second backup data transmitted at the current time can be transmitted, the shutdown instruction can be responded to perform shutdown after the second backup data transmitted at the current time is transmitted; in addition, because the backup node transmits the first backup data to reduce the service interruption time, and transmits the second backup data to perform disaster recovery while waiting for the shutdown instruction, from this point of view, in a specific application scenario, the amount of the first backup data of the first recovery may be set to be larger, and the amount of the second backup data of each recovery may be set to be smaller, and the like.
In a specific application scenario, after the backup node transmits all data to be backed up to the main node, because differential data within a period of time are backed up, the backup data are chained, the main node can perform data recovery from node to node according to the backup data, and because the amount of the backup data is generally small, the main node can perform rapid recovery; and then the main node can be started immediately after recovery, thereby reducing the service interruption time.
The application provides a disaster recovery migration method, which is applied to a standby node and comprises the following steps: determining first backup data of the first migration, and transmitting the first backup data to the main node; sending out prompt information for prompting a user to shut down; and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node. In the application, the backup node can transmit the first backup data to the main node firstly, so that direct service interruption can be avoided, the service interruption time is shortened, then the user is informed of shutdown through the prompt message, the shutdown initiative right is given to the user, the required service termination can be avoided artificially, in the process, the second backup data of the current migration can be determined in a circulating iteration mode and transmitted to the main node, the stability of disaster recovery migration is guaranteed, the remaining third backup data are transmitted to the main node after shutdown, the integrity of the disaster recovery migration is guaranteed, and compared with the prior art, the user experience is good.
In the disaster recovery migration method provided in the embodiment of the present application, in order to determine the first backup data, the backup node may create the first backup data based on a preset data quantity value in the process of determining the first backup data of the first migration. For example, the standby node may determine the data to be backed up, which has a data size equal to a preset data size, as the first backup data.
In the disaster recovery migration method provided by the embodiment of the application, because the loop iteration process often needs to set a loop iteration exit condition, the standby node can judge whether the loop iteration exit condition is met or not in the process of determining the second backup data of the current migration through loop iteration and transmitting the second backup data to the main node; if the loop iteration exit condition is not met, creating second backup data of the current return, transmitting the second backup data to the main node, and returning to execute the step of judging whether the loop iteration exit condition is met; the type of the loop iteration exit condition comprises a shutdown instruction received, a disaster recovery and migration cancellation instruction received, the loop iteration frequency is larger than a preset value, and the like.
That is, in practical applications, the loop iteration exit condition under which the standby node exits loop iteration to determine the second backup data of the current migration and transmits the second backup data to the main node may be a step in which a shutdown instruction is received, a disaster recovery migration cancellation instruction is received, the number of loop iterations is greater than a preset value, and the like, and accordingly, the standby node executes a shutdown in response to the shutdown instruction after receiving the shutdown instruction, and transmits the remaining third backup data to the main node; after receiving the disaster recovery relocation cancel instruction, the standby node exits the process of determining the second backup data of the current relocation through loop iteration and transmitting the second backup data to the main node, and can end the disaster recovery relocation task and the like; in a specific application scenario, the standby node is not allowed to continuously and circularly iterate to determine the second backup data of the current migration and transmit the second backup data to the main node, so that the standby node can determine whether to end the circular iteration process by comparing the circular iteration number with a preset value, for example, after the circular iteration number is greater than the preset value, the circular iteration process is ended, and the disaster recovery migration task is exited.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a backup node creating second backup data of a current migration.
In the disaster recovery migration method provided in the embodiment of the present application, in the process of creating the second backup data of the current migration by the standby node, the method may include the following steps:
step S201: judging whether the second backup data is successfully created last time; if the last second backup data creation fails, step S202 is executed; if the last second backup data is successfully created, step S204 is executed.
In practical applications, because the success or failure of the last creation of the second backup data may affect the current creation of the second backup data, for example, the failure of the last creation of the second backup data may result in a relatively large amount of data to be backed up, and the success of the last creation of the second backup data may result in a relatively small amount of data to be backed up, the standby node may first determine whether the last creation of the second backup data is successful, and execute a corresponding operation according to a determination result.
Step S202: judging whether the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to a first preset value or not; if the time difference between the current time and the creation time of the last second backup data is greater than or equal to the first preset value, executing step S205; if the time difference between the current time and the creation time of the last second backup data is smaller than the first preset value, step S206 is executed.
Step S203: judging whether the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to a first preset value or not; if the time difference between the current time and the creation time of the last second backup data is greater than or equal to a first preset value, executing step S204; if the time difference between the current time and the creation time of the last second backup data is smaller than the first preset value, step S206 is executed.
Step S204: judging whether the data volume to be backed up is larger than or equal to a second preset value or not; if the amount of data to be backed up is greater than or equal to the second preset value, executing step S205; if the amount of data to be backed up is smaller than the second preset value, step S206 is executed.
Step S205: and generating and executing a creating backup event for characterizing the second backup data creating the current return.
Step S206: waiting for the next creation of the second backup data.
In practical application, in order to further improve user experience in the disaster recovery migration process, a user may control a condition for creating the second backup data by the backup node, for example, the user may control a time interval and a data volume for generating the second backup data, and correspondingly, when the last creation of the second backup data fails, the backup node may determine whether a time difference between a current time and a last creation time of the second backup data is greater than or equal to a first preset value; if the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to a first preset value, generating a creation backup event for representing the creation of the second backup data of the current migration and executing the creation backup event; when the last second backup data is successfully created, when the time difference between the current time and the creation time of the last second backup data is greater than or equal to a first preset value and the amount of the data to be backed up is greater than or equal to a second preset value, a creation backup event for representing creation of the second backup data which is moved back at the current time is generated and executed, and when the time difference between the current time and the creation time of the last second backup data is smaller than the first preset value or the amount of the data to be backed up is smaller than the second preset value, the next creation of the second backup data is waited, and the like.
In practical application, the failure of creating the second backup data also affects the stability of the disaster recovery migration process, so that the backup node can count the first times of the failure of creating the second backup data in the process of judging whether the loop iteration exit condition is met; judging whether the first time number is larger than a first preset time value or not; and if the first time is less than or equal to a first preset time value, judging that the loop iteration exit condition is not met, and if the first time is greater than the first preset time value, judging that the loop iteration exit condition is met.
It should be noted that specific values of the first preset value, the second preset value, and the first preset sub-value may be determined according to actual needs, and the present application is not limited specifically herein.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a backup node transmitting second backup data to a primary node.
In the disaster recovery relocation method provided in the embodiment of the present application, in a process in which the backup node transmits the second backup data to the master node, the method may include the following steps:
step S301: judging whether the last second backup data is transmitted successfully or not; if the transmission of the second backup data of the last time fails, executing step S302; if the last second backup data is successfully transmitted, step S303 is executed.
In practical applications, because the transmission success or failure of the last second backup data may affect the transmission of the second backup data at the current time, for example, the transmission failure of the second backup data at the last time may result in a relatively large amount of data to be transmitted, and the transmission success of the last second backup data may result in a relatively small amount of data to be transmitted, the standby node may first determine whether the transmission of the last second backup data is successful, and execute a corresponding operation according to the determination result.
Step S302: judging whether the time difference between the current time and the transmission time of the last second backup data is greater than or equal to a third preset value or not; if the time difference between the current time and the transmission time of the last second backup data is greater than or equal to a third preset value, executing step S304; if the time difference between the current time and the transmission time of the last second backup data is smaller than the third preset value, step S305 is executed.
Step S303: judging whether the data volume of the current second backup data is larger than or equal to a fourth preset value or not; if the data size of the current second backup data is greater than or equal to the fourth preset value, executing step S304; if the data size of the current second backup data is smaller than the fourth preset value, step S305 is executed.
Step S304: and generating a backup synchronization event for characterizing the transmission of the second backup data to the master node and executing.
Step S305: waiting for the next creation of the second backup data.
In practical application, in order to further improve user experience in the disaster recovery migration process, a user may control a condition for transmitting the second backup data by the backup node, for example, the user may control a time interval for transmitting the second backup data and a data volume to be transmitted, and correspondingly, when the last transmission of the second backup data fails, the backup node may generate and execute a backup synchronization event for representing that the second backup data is transmitted to the master node when a time difference between a current time and a last transmission time of the second backup data is greater than or equal to a third preset value; when the last second backup data is successfully transmitted, when the data amount of the second backup data of the current time is greater than or equal to a fourth preset value, a backup synchronization event for representing the transmission of the second backup data to the main node is generated and executed, and when the time difference between the current time and the transmission time of the last second backup data is smaller than the third preset value or the data amount of the second backup data of the current time is smaller than the fourth preset value, the next creation of the second backup data is waited, and the like.
In practical application, the transmission failure of the second backup data also affects the stability of the disaster recovery migration process, so that the backup node can count the second times of transmission failure of the second backup data in the process of judging whether the loop iteration exit condition is met; judging whether the second time is greater than a second preset time value; if the second time is less than or equal to a second preset time value, judging that the loop iteration exit condition is not met; and if the second time is greater than a second preset time value, judging that the loop iteration exit condition is met.
It should be noted that specific values of the third preset value, the fourth preset value and the second preset value may be determined according to actual needs, and the present application is not limited specifically herein.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a disaster recovery system according to an embodiment of the present application.
The disaster recovery relocation system provided in the embodiment of the present application, applied to a standby node, may include:
a first determining module 101, configured to determine first backup data migrated back for the first time, and transmit the first backup data to the master node;
the first prompting module 102 is configured to send a prompting message for prompting a user to shut down;
and the first execution module 103 is configured to determine, through loop iteration, second backup data of the current migration and transmit the second backup data to the master node, and if a shutdown instruction is received, respond to the shutdown instruction to perform shutdown, and transmit remaining third backup data to the master node.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first determining module may include:
the first creating unit is used for creating first backup data based on a preset data magnitude value.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first execution module may include:
the first judgment unit is used for judging whether a loop iteration exit condition is met or not; if the loop iteration exit condition is not met, creating second backup data of the current return, transmitting the second backup data to the main node, and returning to execute the step of judging whether the loop iteration exit condition is met; the type of the loop iteration exit condition comprises that a shutdown instruction is received, a disaster recovery and migration cancel instruction is received, and the loop iteration frequency is larger than a preset value.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first determining unit may specifically be configured to: judging whether the second backup data is successfully created last time; if the last second backup data is failed to be created, judging whether the time difference between the current time and the creation time of the last second backup data is larger than or equal to a first preset value; if the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to a first preset value, generating a creation backup event for representing the creation of the second backup data of the current migration and executing the creation backup event; and if the last second backup data is successfully created, when the time difference between the current time and the creation time of the last second backup data is greater than or equal to a first preset value and the data volume to be backed up is greater than or equal to a second preset value, generating a creation backup event for representing the creation of the second backup data which is transferred back at the current time and executing.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first determining unit may specifically be configured to: counting a first number of times of the second backup data creation failure; judging whether the first time number is larger than a first preset time value or not; and if the first time is less than or equal to a first preset time value, judging that the loop iteration exit condition is not met, and if the first time is greater than the first preset time value, judging that the loop iteration exit condition is met.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first determining unit may specifically be configured to: judging whether the last second backup data is transmitted successfully or not; if the transmission of the last second backup data fails, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the time difference between the current time and the transmission time of the last second backup data is greater than or equal to a third preset value; and if the last second backup data is successfully transmitted, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the data volume of the current second backup data is greater than or equal to a fourth preset value.
The disaster recovery relocation system provided in the embodiment of the present application is applied to a standby node, and the first determining unit may specifically be configured to: counting a second number of times of transmission failure of the second backup data; judging whether the second time is greater than a second preset time value; if the second time is less than or equal to a second preset time value, judging that the loop iteration exit condition is not met; and if the second time is greater than a second preset time value, judging that the loop iteration exit condition is met.
Based on the hardware implementation of the program module, and in order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides an electronic device, fig. 5 is a schematic diagram of a hardware composition structure of the electronic device according to the embodiment of the present invention, and as shown in fig. 5, the electronic device includes:
a communication interface 1 capable of information interaction with other devices such as network devices and the like;
and the processor 2 is connected with the communication interface 1 to realize information interaction with other equipment, and is used for executing the disaster recovery method provided by one or more technical schemes when running a computer program. And the computer program is stored on the memory 3.
In practice, of course, the various components in the electronic device are coupled together by the bus system 4. It will be appreciated that the bus system 4 is used to enable connection communication between these components. The bus system 4 comprises, in addition to a data bus, a power bus, a control bus and a status signal bus. For the sake of clarity, however, the various buses are labeled as bus system 4 in fig. 5.
The memory 3 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program for operating on an electronic device.
It will be appreciated that the memory 3 may be either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 2 described in the embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The method disclosed by the above embodiment of the present invention can be applied to the processor 2, or implemented by the processor 2. The processor 2 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 2. The processor 2 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 2 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 3, and the processor 2 reads the program in the memory 3 and in combination with its hardware performs the steps of the aforementioned method.
When the processor 2 executes the program, the corresponding processes in the methods according to the embodiments of the present invention are realized, and for brevity, are not described herein again.
In an exemplary embodiment, the present invention further provides a storage medium, i.e. a computer storage medium, in particular a computer readable storage medium, for example comprising a memory 3 storing a computer program, which is executable by a processor 2 to perform the steps of the aforementioned method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, terminal and method may be implemented in other manners. The above-described device embodiments are only illustrative, for example, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
For a description of a relevant part in the disaster recovery system, the electronic device, and the computer-readable storage medium provided in the embodiments of the present application, reference is made to detailed descriptions of a corresponding part in the disaster recovery method provided in the embodiments of the present application, and details are not repeated here. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A disaster recovery relocation method is applied to a backup node, and comprises the following steps:
determining first backup data of first migration, and transmitting the first backup data to a main node;
sending out prompt information for prompting a user to shut down;
and determining the second backup data of the current migration and transmitting the second backup data to the main node through loop iteration, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node.
2. The method of claim 1, wherein determining the first backup data of the first migration comprises:
and creating the first backup data based on a preset data magnitude value.
3. The method of claim 1, wherein the loop iterating to determine and transmit the second backup data of the current migration to the primary node comprises:
judging whether a loop iteration exit condition is met;
if the loop iteration exit condition is not met, creating the second backup data of the current return, transmitting the second backup data to the main node, and returning to the step of judging whether the loop iteration exit condition is met;
the type of the loop iteration exit condition comprises that the shutdown instruction is received, the disaster recovery and migration cancel instruction is received, and the loop iteration frequency is larger than a preset value.
4. The method of claim 3, wherein the creating the second backup data of the current migration comprises:
judging whether the second backup data is successfully created last time;
if the last second backup data is failed to be created, judging whether the time difference between the current time and the last creation time of the second backup data is larger than or equal to a first preset value or not;
if the time difference between the current time and the creation time of the second backup data of the last time is greater than or equal to the first preset value, generating and executing a creation backup event for representing the creation of the second backup data of the current migration;
and if the last second backup data is successfully created, generating a creating backup event for representing the second backup data which is moved back at the current time and executing the creating backup event when the time difference between the current time and the creating time of the last second backup data is greater than or equal to the first preset value and the data amount to be backed up is greater than or equal to the second preset value.
5. The method of claim 4, wherein the determining whether a loop iteration exit condition is satisfied comprises:
counting a first number of times of the second backup data creation failure;
judging whether the first time number is larger than a first preset time value or not;
and if the first time is less than or equal to the first preset time value, judging that the loop iteration exit condition is not met, and if the first time is greater than the first preset time value, judging that the loop iteration exit condition is met.
6. The method of claim 3, wherein the transmitting the second backup data to the primary node comprises:
judging whether the second backup data is transmitted successfully last time;
if the transmission of the second backup data at the last time fails, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the time difference between the current time and the transmission time of the second backup data at the last time is greater than or equal to a third preset value;
and if the last transmission of the second backup data is successful, generating a backup synchronization event for representing the transmission of the second backup data to the main node and executing the backup synchronization event when the data volume of the current second backup data is greater than or equal to a fourth preset value.
7. The method of claim 6, wherein the determining whether a loop iteration exit condition is satisfied comprises:
counting a second number of times of transmission failure of the second backup data;
judging whether the second time number is larger than a second preset time value or not;
if the second time is less than or equal to the second preset time value, judging that the loop iteration exit condition is not met; and if the second time is greater than the second preset time value, judging that the loop iteration exit condition is met.
8. A disaster recovery migration system is applied to a backup node, and comprises:
the first determining module is used for determining first backup data of the first time of migration and transmitting the first backup data to the main node;
the first prompting module is used for sending out prompting information for prompting a user to shut down;
and the first execution module is used for determining the second backup data of the current migration through loop iteration and transmitting the second backup data to the main node, responding to a shutdown instruction to shut down if the shutdown instruction is received, and transmitting the remaining third backup data to the main node.
9. An electronic device, applied to a standby node, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the disaster recovery method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium for a backup node, wherein a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the disaster recovery migration method according to any one of claims 1 to 7.
CN202011434808.2A 2020-12-10 2020-12-10 Disaster recovery returning method, system, equipment and computer readable storage medium Active CN112506707B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011434808.2A CN112506707B (en) 2020-12-10 2020-12-10 Disaster recovery returning method, system, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011434808.2A CN112506707B (en) 2020-12-10 2020-12-10 Disaster recovery returning method, system, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112506707A true CN112506707A (en) 2021-03-16
CN112506707B CN112506707B (en) 2023-12-29

Family

ID=74970502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011434808.2A Active CN112506707B (en) 2020-12-10 2020-12-10 Disaster recovery returning method, system, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112506707B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502835A (en) * 2016-10-26 2017-03-15 中国银联股份有限公司 A kind of disaster-tolerant backup method and device
CN111090549A (en) * 2019-12-27 2020-05-01 航天壹进制(南京)数据科技有限公司 Volume CBT drive-based method for incrementally migrating volume-level data back to original machine
CN111124615A (en) * 2019-12-22 2020-05-08 北京浪潮数据技术有限公司 Virtual machine migration method, device, equipment and computer readable storage medium
CN111142802A (en) * 2019-12-27 2020-05-12 南京壹进制信息科技有限公司 Method and system for migrating back volume-level data based on virtual block device storage
US10693817B1 (en) * 2017-11-30 2020-06-23 Open Invention Network Llc VNFM resolution of split-brain virtual network function components

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502835A (en) * 2016-10-26 2017-03-15 中国银联股份有限公司 A kind of disaster-tolerant backup method and device
US10693817B1 (en) * 2017-11-30 2020-06-23 Open Invention Network Llc VNFM resolution of split-brain virtual network function components
CN111124615A (en) * 2019-12-22 2020-05-08 北京浪潮数据技术有限公司 Virtual machine migration method, device, equipment and computer readable storage medium
CN111090549A (en) * 2019-12-27 2020-05-01 航天壹进制(南京)数据科技有限公司 Volume CBT drive-based method for incrementally migrating volume-level data back to original machine
CN111142802A (en) * 2019-12-27 2020-05-12 南京壹进制信息科技有限公司 Method and system for migrating back volume-level data based on virtual block device storage

Also Published As

Publication number Publication date
CN112506707B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
CN114637475A (en) Distributed storage system control method and device and readable storage medium
CN111190766A (en) HBase database-based cross-machine-room cluster disaster recovery method, device and system
CN111143132A (en) BIOS recovery method, device, equipment and readable storage medium
CN112307045A (en) Data synchronization method and system
US8719622B2 (en) Recording and preventing crash in an appliance
CN111541762A (en) Data processing method, management server, device and storage medium
TWI518680B (en) Method for maintaining file system of computer system
CN110597660A (en) Data backup method, device, equipment and medium for virtual machine
CN112261164B (en) Logic clock synchronization method and device and central time service cluster
CN113867807A (en) Method, device, equipment and storage medium for shortening power-on time of server
JPWO2008136107A1 (en) Switching processing program, switching processing method, and complete duplex system
WO2017080362A1 (en) Data managing method and device
CN112506707A (en) Disaster recovery method, system, equipment and computer readable storage medium
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
CN111090537A (en) Cluster starting method and device, electronic equipment and readable storage medium
CN111158963A (en) Server firmware redundancy starting method and server
CN110708203A (en) Fault tolerance method, device and equipment
CN114189429A (en) System, method, device and medium for monitoring server cluster faults
CN104504348A (en) Data protecting method based on high availability storage system
CN109753292B (en) Method and device for deploying multiple applications in multiple single instance database service
CN113778331A (en) Data processing method, main node and storage medium
CN113821384A (en) Cross-data-center and same-city disaster recovery method, device and equipment based on cloud platform
JP7363617B2 (en) Communication devices, information processing methods, and systems
CN114422521B (en) Method and device for determining master node, 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
GR01 Patent grant
GR01 Patent grant