Cloud disaster recovery data processing method and system
By monitoring the network connection status and performing data synchronization, the problem of data loss caused by the power off of the backup machine in cloud disaster recovery data processing is solved, and the backup machine can quickly provide services and maintain data integrity in the event of a failure.
Patent Information
- Application Number
- CN202410645268.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing cloud disaster recovery data processing methods and systems, when the backup machine is powered off for a long time, the data is not synchronized, which may cause data loss when the host is switched to the backup machine.
Use the network monitoring module to monitor the network connection status of the active and standby nodes, stop or resume database replication synchronization when disconnected or restored, report and perform active and standby data synchronization when the node is offline for more than 3 days, and ensure data integrity, including stopping host database replication. , perform full data synchronization and binlog replication.
It realizes rapid data synchronization after the backup machine is powered on, avoids data loss, ensures business continuity and data consistency, and ensures that the backup machine can quickly take over services when the host fails.
Smart Images

Figure CN118567907A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud disaster recovery data processing methods and systems, and in particular to a cloud disaster recovery data processing method and system. Background Art
[0002] A disaster recovery system refers to the establishment of two or more systems with the same functions in remote locations that are far apart. One system is in normal operation and provides services to the outside world as the host, and the system that performs backup functions is called the standby. When the host system stops working due to an accident, it can switch to the standby system to provide services to the outside world, making the entire software system highly available. Disaster recovery can be divided into data-level disaster recovery and application-level disaster recovery. Data disaster recovery refers to the establishment of an off-site data system to replicate local key application data in real time and perform remote data backup. Application disaster recovery is to establish a complete backup application system equivalent to the local system in a remote location based on data disaster recovery. When the local system is affected by a disaster, it can quickly take over business operations to ensure business continuity.
[0003] However, an existing cloud disaster recovery data processing method and system have certain drawbacks when used. The standby machine is in a power-off state for a long time and is only powered on by the standby computer room during the flood disaster season. Since the data is not synchronized at ordinary times, synchronization is started after power-on. If data is not copied for more than a certain period of time, the host binlog has an automatic cleanup mechanism, so the binlog is incomplete, resulting in data loss when the standby machine is powered on and switched to the host. Summary of the invention
[0004] The main purpose of the present invention is to provide a cloud disaster recovery data processing method and system, which can effectively solve the problems in the background technology.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] A method for processing disaster recovery data, the method comprising: a network monitoring module monitors the network connection status of the master and standby machine nodes, confirms whether the database is synchronized according to the node network connection status, reports a master and standby machine data inconsistency warning if the node is not online for more than 3 days and runs simultaneously with the master and standby machine servers, and then executes master and standby machine data synchronization.
[0007] Preferably, the network monitoring module monitors the network connection status of the primary and standby nodes, including: the node network connection is disconnected, the node network connection is restored, and the node is offline for more than 3 days.
[0008] Preferably, the node network connection is disconnected, including: when the node network connection is disconnected, stopping database replication synchronization.
[0009] Preferably, the node network connection recovery includes: when the node network connection is recovered, confirming whether the primary and standby servers are running simultaneously.
[0010] Preferably, the confirming whether the primary and standby servers are running simultaneously includes: when the primary and standby servers are not running simultaneously, restoring database synchronization; when the primary and standby servers are running simultaneously, reporting a primary and standby data inconsistency warning and performing primary and standby synchronization.
[0011] Preferably, the node is offline for more than 3 days, including: when the node is offline for more than 3 days, reporting a master-slave machine data inconsistency warning, and performing master-slave machine synchronization.
[0012] Preferably, the execution of master-standby data synchronization includes: when executing master-standby data synchronization, first stop the host database replication, then perform full database data synchronization, authorization of replication permissions, then start binlog replication synchronization from the last position of the full synchronization, and finally restore the specified directory file library by rsyns synchronization, and the synchronization of the database ends.
[0013] A disaster recovery data processing system includes: a local server host that provides services to the outside world, and a remote server backup machine. When the local server host system stops working due to an accident, it can switch to the remote server backup machine system to provide services to the outside world, and can quickly take over business operations to ensure business continuity. In a production data center, there are disk arrays, and the data generated by various servers and clients will be uploaded to the local server host and the remote server backup machine.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] In the present invention, when the network monitoring module detects that the node network connection is disconnected, the database replication synchronization is stopped. When the node network connection is restored, it is determined whether the primary and standby servers are running simultaneously. If they are not running simultaneously, the database replication synchronization is restored. If they are running simultaneously, a primary and standby data inconsistency warning is first reported. When the node is not online for more than 3 days, a primary and standby data inconsistency warning is reported, and then the primary and standby data synchronization is executed. The host database replication is stopped first, and then the full database data synchronization is performed, and the replication authority is authorized. Subsequently, the binlog replication synchronization is started from the last position of the full synchronization. Finally, the rsyns synchronization specifies the directory file library recovery, and the synchronization of the database is completed. When the local server host stops working due to an accidental fire, flood, etc., the off-site server standby machine can achieve the effect of disaster recovery after powering on. After switching to the standby machine, services can be provided quickly, and the data is synchronized without data loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a process flow of a cloud disaster recovery data processing method of the present invention;
[0017] Figure 2 A schematic diagram of a master-slave data synchronization process of a cloud disaster recovery data processing method of the present invention;
[0018] Figure 3 The present invention is a schematic diagram of the overall structure of a cloud disaster recovery data processing system. DETAILED DESCRIPTION
[0019] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.
[0020] like Figure 1-3 As shown, a method for processing disaster recovery data includes: a network monitoring module monitors the network connection status of the master and standby nodes, confirms whether the database is synchronized according to the node network connection status, and reports a warning of inconsistent master and standby data if the node is not online for more than 3 days and runs simultaneously with the master and standby servers, and then performs master and standby data synchronization;
[0021] The network monitoring module monitors the network connection status of the master and standby nodes, including: the node network connection is disconnected, the node network connection is restored, and the node is offline for more than 3 days; the node network connection is disconnected, including: when the node network connection is disconnected, stopping database replication and synchronization; the node network connection is restored, including: when the node network connection is restored, confirming whether the master and standby servers are running simultaneously; the confirmation of whether the master and standby servers are running simultaneously includes: when the master and standby servers are not running simultaneously, restoring database synchronization, and when the master and standby servers are running simultaneously, reporting a master and standby data inconsistency warning, and executing master and standby synchronization; the node is offline for more than 3 days, including: when the node is offline for more than 3 days, reporting a master and standby data inconsistency warning, and executing master and standby synchronization; the execution of master and standby data synchronization includes: when executing master and standby data synchronization, first stop the host database replication, then perform full database data synchronization, copy permission authorization, and then start binlog replication and synchronization from the last position of the full synchronization, and finally restore the specified directory file library of rsyns synchronization, and the synchronization of the database ends.
[0022] A disaster recovery data processing system includes: a local server host that provides services to the outside world, and a remote server backup machine. When the local server host system stops working due to an accident, it can switch to the remote server backup machine system to provide services to the outside world, and can quickly take over business operations to ensure business continuity. In a production data center, there are disk arrays, and the data generated by various servers and clients will be uploaded to the local server host and the remote server backup machine.
[0023] It should be noted that the present invention is a cloud disaster recovery data processing method and system. When in use, when the network monitoring module detects that the node network connection is disconnected, the database replication synchronization is stopped. When the node network connection is restored, it is determined whether the primary and standby servers are running simultaneously. When they are not running simultaneously, the database replication synchronization is restored. When running simultaneously, a primary and standby data inconsistency warning is first reported. When the node is not online for more than 3 days, a primary and standby data inconsistency warning is reported, and then the primary and standby data synchronization is executed. The host database replication is stopped first, and then the full database data synchronization is performed, and the replication authority is authorized. Subsequently, the binlog replication synchronization is started from the last position of the full synchronization. Finally, the rsyns synchronization specifies the directory file library recovery, and the database synchronization ends. When the local server host stops working due to an accidental fire, flood, etc., the off-site server standby machine can achieve the disaster recovery effect after powering on. After switching to the standby machine, services can be provided quickly, and the data is synchronized, and there will be no data loss problem.
[0024] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A disaster recovery data processing method, characterized in that: The method includes: a network monitoring module monitors the network connection status of the master and standby nodes, confirms whether the database is synchronized according to the node network connection status, reports a master and standby data inconsistency warning if the node is not online for more than 3 days and runs simultaneously with the master and standby servers, and then executes master and standby data synchronization.
2. The method according to claim 1, characterized in that The network monitoring module monitors the network connection status of the primary and standby nodes, including: node network connection disconnection, node network connection recovery, and node offline for more than 3 days.
3. The method according to claim 2, characterized in that The node network connection is disconnected, including: when the node network connection is disconnected, stopping database replication synchronization.
4. The method according to claim 2, characterized in that: The node network connection recovery includes: when the node network connection is recovered, confirming whether the primary and backup servers are running simultaneously.
5. The method according to claim 4, characterized in that The confirming whether the master and standby servers are running simultaneously includes: when the master and standby servers are not running simultaneously, restoring database synchronization; when the master and standby servers are running simultaneously, reporting a master and standby data inconsistency warning and performing master and standby synchronization.
6. The method according to claim 2, characterized in that The node is offline for more than 3 days, including: when the node is offline for more than 3 days, reporting a master-slave machine data inconsistency warning, and performing master-slave machine synchronization.
7. The method according to claim 1, characterized in that The execution of master-slave data synchronization includes: when executing master-slave data synchronization, first stop the host database replication, then perform full database data synchronization, copy permission authorization, then start binlog replication synchronization from the last position of the full synchronization, and finally restore the specified directory file library by rsyns synchronization, and the synchronization of the database ends.
8. A disaster recovery data processing system, characterized in that: include: The local server host provides external services, and the remote server backup machine can switch to the remote server backup machine system to provide external services when the local server host system stops working due to an accident. It can quickly take over business operations and ensure business continuity. The production data center has disk arrays, and the data generated by various servers and clients will be uploaded to the local server host and the remote server backup machine.
