Data asynchronous backup processing system and method
By detecting and selecting target databases for asynchronous access through the front-end management program in the data center, the problem of data loss in existing technologies is solved, and automated data backup and recovery are achieved, improving the reliability and availability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GIGA COMPUTING TECHNOLOGY CO LTD
- Filing Date
- 2024-12-26
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309243A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a data backup processing system and method, and more particularly to a data asynchronous backup processing system and method. Background Technology
[0002] With the rise of the internet, the demand for information has also increased. Therefore, various network vendors have begun building their own data centers to provide users with a variety of network services. As the scale of network services increases with user demand, data centers need to continuously add servers and other equipment.
[0003] Most server-centric management systems on the market currently rely on a single server and database for centralized data storage. While they can regularly back up the database to prevent the loss of large amounts of data, the current data will still be lost if the management system experiences an abnormal situation that causes it to lose connection. Furthermore, users will need to manually debug the system to continue using it. Summary of the Invention
[0004] In view of this, in one embodiment, the aforementioned asynchronous data backup processing system is applied to data backup for multiple computers in a data center. The processing system includes a server cluster and a master server. The server cluster has multiple slave servers, each slave server having a backend program and a slave database. The master server connects to the server cluster and has a frontend management program and a master database. The master server receives access requests. The frontend management program detects the online or offline status of the master and slave databases. If the master database is offline, the frontend management program selects one of the slave databases as the target database. The frontend management program performs access to the target database according to the access request and generates access results. If the master database is online, the frontend management program performs access to the master database according to the access request and generates corresponding access results. After generating access results, the frontend management program synchronously writes the access results to the remaining slave databases.
[0005] The aforementioned asynchronous data backup processing system provides a front-end and back-end separation architecture. After the front-end master server receives the client's access request, the back-end server cluster performs synchronous processing of the access results. Therefore, changes to the slave servers will not affect the service of the front-end master server, and reduce the bottleneck of data access.
[0006] In one embodiment, after the front-end management program detects that the status of the main database has changed from offline to online, the front-end management program synchronizes the access results to the main database.
[0007] In one embodiment, the data stored in the master database is identical to the data stored in the slave database.
[0008] In one embodiment, the front-end management program sends a detection request to the slave server, the back-end program confirms the status of the slave database as online or offline based on the detection request, and the back-end program generates response information based on the confirmation result of the slave database.
[0009] In one embodiment, if the front-end management program does not receive a response from the server after a threshold time has elapsed, or if the response includes a status indicating that the database is offline, the front-end management program records the offline databases and the slave server to the synchronization list.
[0010] In one embodiment, when the database is changed from online to offline, the backend program sends recovery information to the frontend management program.
[0011] In one embodiment, the front-end management program determines whether the last update time of the master database and the slave database are the same. If the last update times of either database are different, the front-end management program synchronizes the data in the master database and the slave database.
[0012] In one embodiment, an asynchronous data backup processing method is applied to data backup between a master server and multiple slave servers in a data center. The asynchronous data backup processing method includes connecting a server cluster to the master server, the server cluster having slave servers; the master server detecting whether its master database and the slave databases of each slave server are online or offline; if the master database is offline, the master server selects one of the slave databases, the selected slave database being the target database; the master server accesses the target database according to the access request and generates an access result; if the master database is online, the master server accesses the master database according to the access request and generates a corresponding access result; the master server synchronizes the access result to the master server or the remaining slave servers.
[0013] In one embodiment, after the master server detects whether the status of its master database and the slave database of each slave server is online or offline, the process includes the master server sending a detection request to the slave server, the slave server confirming the status of the slave database as online or offline based on the detection request, the slave server generating response information based on the confirmation result of the slave database, and if the master server does not receive a response information from the slave server after a threshold time, or if the response information includes the status of the slave database as offline, the master server records the offline slave databases and slave servers to the synchronization list.
[0014] In one embodiment, after the step of selecting one of the slave databases from the slave databases if the master database is offline, the master server further includes the step of synchronizing the access results to the master database after detecting that the master database's status has changed from offline to online.
[0015] In one embodiment, the step of the master server synchronizing data to the master server or other slave servers based on the access results includes the master server determining whether the last update time of the master database and the slave database are the same; if any last update time is different, the master server synchronizes the data in the master database and the slave database.
[0016] The aforementioned asynchronous data backup processing system and method provide an asynchronous processing mechanism between the front-end and back-end, ensuring that the master server can synchronize access results to all databases. Furthermore, the addition or removal of slave servers does not affect the master server. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of a server cluster management system according to one embodiment.
[0018] Figure 1 This is a schematic diagram of an asynchronous data backup processing system architecture according to one embodiment.
[0019] Figure 2 This is a schematic diagram of the architecture of a master server and a slave server in one embodiment.
[0020] Figure 3 This is a schematic diagram of an embodiment of an asynchronous data backup processing method.
[0021] Figure 4 This is a schematic diagram of a processing system in one embodiment for normal writing to the main database.
[0022] Figure 5 This is a schematic diagram illustrating how a processing system, as one embodiment, synchronizes access results to each slave database.
[0023] Figure 6 This is a schematic diagram illustrating the selection of a target database for a processing system in one embodiment.
[0024] Figure 7 This is a schematic diagram of the synchronous access results of a processing system according to one embodiment.
[0025] Figure 8 This is a schematic diagram of the synchronization process after the main database responds to a processing system according to one embodiment.
[0026] The attached figures are labeled as follows:
[0027] 10: Processing System 110: Main Server
[0028] 111: First network unit; 112: First storage unit
[0029] 113: First Processing Unit; 114: Front-end Management Program
[0030] 115: Alarm Procedure 116: Synchronization List
[0031] 117: Master Database 118: Alarm Notification
[0032] 200: Server Cluster 210: Server Slave
[0033] 211: Second network unit; 212: Second storage unit
[0034] 213: Second processing unit; 221: Backend program
[0035] 222: From database 223: Target database
[0036] 240: Client 411: Detection Requirements
[0037] 412: Access Request 413: Access Result
[0038] S310, S320, S330, S340, S350, S360: Steps Detailed Implementation
[0039] Please refer to Figure 1 and Figure 2 The diagrams shown illustrate the architecture of an asynchronous data backup processing system 10 according to one embodiment, and the architecture of a master server 110 and a slave server 210 according to another embodiment. The asynchronous data backup processing system (hereinafter referred to as processing system 10) is applied in a data center to perform data backup processing on multiple computers within the data center. Processing system 10 includes a master server 110 and a server cluster 200. The master server 110 is connected to the server cluster 200. A client 240 can connect to the master server 110 via a network.
[0040] The main server 110 has a first network unit 111, a first storage unit 112, and a first processing unit 113. The first processing unit 113 is connected to the first network unit 111 and the first storage unit 112. The first network unit 111 is connected to the server cluster 200. The first network unit 111 includes a wired network interface, a wireless network interface, and a fiber optic communication interface. The wired network interface supports the Ethernet protocol, the wireless network interface supports Wi-Fi or cellular network communication (such as 4G / 5G), and the fiber optic communication interface supports fiber optic network protocols (such as GPON or 10G-EPON) to provide high-speed and stable data transmission capabilities. The first network unit 111 is used to transmit network packets for detection requests 411, receive new requests or access requests 412 (the processing of each request will be detailed later), and can automatically switch or select the most suitable network interface according to the needs of the communication environment.
[0041] The first storage unit 112 stores the front-end management program 114, the alarm program 115, the synchronization list 116, and the main database 117. The first processing unit 113 executes the front-end management program 114, the alarm program 115, or the main database 117. The front-end management program 114 can provide an operation interface to the client 240. The operation interface can be, but is not limited to, a webpage, a command line interface (CLI) via a secure channel (SSH), or a graphical user interface (GUI) via a remote desktop protocol (RDP).
[0042] The user interface allows the client 240 to view information provided by the front-end management program 114, or to access data on the main server 110. For example, the front-end management program 114 can provide data storage services, application server services, load balancing services, virtual machine management, network security management, firewall services, and processing of backup or power consumption-related operations or information displays. Hereinafter, the client 240's operations on the front-end management program 114 are collectively referred to as access requests 412. The main server 110 responds with corresponding access results 413 based on the access request 412; its operation will be described later. The alarm program 115 is used to generate alarm notifications 118. Alarm notifications 118 can be warning lights, speakers, emails, or communication software, etc.
[0043] Server cluster 200 has multiple slave servers 210, and a master server 110 is connected to each slave server 210. Each slave server 210 has a second network unit 211, a second storage unit 212, and a second processing unit 213. The second processing unit 213 is connected to the second network unit 211 and the second storage unit 212. The second storage unit 212 stores a backend program 221 and a slave database 222. The second network unit 211 is network connected to the master server 110. The second processing unit 213 executes the backend program 221 and the slave database 222.
[0044] After the slave server 210 boots, the second processing unit 213 executes the backend program 221. The backend program 221 begins listening for access requests 412, retrieving data, or storing access results 413 to ensure data consistency across all slave servers 210. The backend program 221 can determine whether its slave server 210 is "online" or "offline," and can also provide this information to the master server 110 to determine if the slave server 210 is "offline." An "online" status indicates that the slave server 210 is running and can provide data access. An "offline" status can indicate not only an error in the database 222, but also an interruption in communication between the slave server 210 and the master server 110.
[0045] In addition, the front-end management program 114 detects whether the status of the primary database 117 is "online" or "offline". When the status of the primary database 117 or the secondary database 222 is "offline", the primary server 110 will perform data backup processing. The following is a clear explanation of the overall operation of the processing system 10; please refer to it. Figure 3 The processing system 10 performs the following steps:
[0046] Step S310: Connect the server cluster to the master server. The server cluster has multiple slave servers.
[0047] Step S320: The master server checks the status of its master database and the slave database of each slave server to see if they are online or offline;
[0048] Step S330: If the master database is offline, the master server selects one of the slave databases, and the selected slave database is the target database;
[0049] Step S340: The master server accesses the target database according to the access requirements and generates access results;
[0050] Step S350: If the primary database is online, the primary server performs access requests according to the access requirements and generates corresponding access results; and
[0051] Step S360: The master server synchronizes the access results to the master server or the other slave servers.
[0052] First, the master server 110 is network connected to the server cluster 200 (corresponding to step S310). The server cluster 200 consists of multiple slave servers 210. The master server 110 can periodically send detection requests 411 to all slave servers 210, or it can send detection requests 411 to different slave servers 210 at different times. The backend program 221 of the slave server 210 confirms the status of its slave database 222 as online or offline based on the detection request 411. The frontend management program 114 of the master server 110 also periodically checks the status of the master database 117 (corresponding to step S320). When the status of a slave server 210 is "offline", the master server 110 records the slave server 210 in the synchronization list 116.
[0053] Please refer to Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8 The diagrams are as follows: a schematic diagram of the processing system 10 in one embodiment writing to the main database 117 normally; a schematic diagram of the processing system 10 in one embodiment synchronizing the access result 413 to each slave database 222; a schematic diagram of the processing system 10 in one embodiment selecting the target database 223; a schematic diagram of the processing system 10 in one embodiment synchronizing the access result 413; and a schematic diagram of the synchronization processing after the main database 117 of the processing system 10 in one embodiment responds.
[0054] In some embodiments, the front-end management program 114 may check the master database 117 and the slave database 222 at the same frequency. Alternatively, the front-end management program 114 may check the master database 117 and the slave database 222 at different frequencies. For ease of explanation, the "online" or "offline" operating status is indicated by dashed boxes on one side of the master database 117 and each slave database 222. Please refer to [reference needed]. Figure 4 and Figure 5 .
[0055] For example, the front-end management program 114 sends a detection request 411 to the main database 117 at the highest frequency to detect the status of the main database 117. Please refer to [reference needed]. Figure 4 and Figure 5 The front-end management program 114 sends detection requests 411 to each slave database 222 at a second frequency to detect the status of the slave databases 222. The first frequency is greater than the second frequency. Since the master server 110 provides relevant information to the client 240, the access order of the master server 110 and the master database 117 is higher than the order of access to other slave servers 210. Therefore, the front-end management program 114 detects the status of the master database 117 at the first frequency to ensure that the master server 110 can provide relevant data or operations to the client 240.
[0056] Upon receiving the detection request 411 from the slave server 210, the second processing unit 213 checks the status of the slave database 222. The second processing unit 213 generates a response message based on the status of the slave database 222 and transmits the response message to the master server 110. The front-end management program 114 can determine the status of the slave database 222 in the following ways: First, the back-end program 221 directly writes the "offline" information into the response message. Second, if the front-end management program 114 does not receive a response message from the slave server 210 after issuing the detection request 411 and a threshold time has elapsed, the front-end management program 114 will determine that the status of the slave server 210 and its slave database 222 is "offline." When the status of the slave database 222 is "offline," the master server 110 records the offline slave server 210 and its slave database 222 in the synchronization list 116.
[0057] If the status of the master database 117 is "offline", the front-end management program 114 selects one of the slave databases 222 with a status of "online" according to the synchronization list 116. The selected slave database 222 is called the target database 223 (corresponding to step S330). Please refer to [link / reference]. Figure 6 . Figure 6 The symbol "X" indicates that the connection between the front-end management program 114 and the main database 117 has been interrupted. The selection of the "online" slave database 222 can be based on, but is not limited to, selecting the slave server 210 with the packet time to live (TTL), the slave server 210 number, or specifying the slave server 210.
[0058] The front-end management program 114 performs data operations or accesses on the target database 223 according to the access request 412 from the client 240. After completing the data operation or access, the master server 110 stores the resulting data in the target database 223, and calls it access result 413 (corresponding to step S340). After the target database 223 completes the storage processing of access result 413, the front-end management program 114 synchronizes access result 413 to the other slave servers 210. Please refer to [link / reference]. Figure 7 .
[0059] If the status of the primary database 117 recovers from offline to online, the front-end management program 114 will read the access result 413 of the previous record from the target database 223 and synchronize the access result 413 to the primary database 117 (corresponding to step S360). Please refer to [link / reference]. Figure 8The data stored in the master database 117 is consistent with the data stored in the slave database 222. After completing the record of all access results 413 of the slave server 210, the master server 110 executes step S320 again to start a new round of judging the status of the master database 117 or the slave database 222.
[0060] Furthermore, if the primary database 117 is online, the primary server 110 accesses the primary database 117 according to the access request 412 and generates the corresponding access result 413 (corresponding to step S350). The primary server 110 synchronizes the access result 413 to all secondary servers 210 that are "online" (corresponding to step S360). Please refer to [link / reference needed]. Figure 5 .
[0061] In some embodiments, when the front-end management program 114 detects that the status of the master server 110 or the slave server 210 is "offline", the front-end management program 114 calls the alarm program 115 and causes the alarm program 115 to generate an alarm notification 118. The alarm program 115 sends the alarm notification 118 to a specified object, such as the client 240 or a back-end user.
[0062] In some embodiments, the backend program 221 may include the last update time of the slave database 222 in the response information. After receiving all response information, the frontend management program 114 compares the last update time of the master database 117 with the last update time of each slave database 222 and records it in the synchronization list 116. If any last update time differs, the frontend management program 114 selects the database with the most recent last update time. The frontend management program 114 uses the selected database as the master and synchronizes the other databases to ensure that the data in the master database 117 is consistent with the data in each slave database 222.
[0063] For example, synchronization list 116 may have, but is not limited to, the following fields: SlaveServer ID 210, Slave Database ID 222, Status, Last Detection Time, Last Synchronization Time, and Synchronization Status (see Table 1). The front-end management program 114 can use synchronization list 116 to confirm the operational status of the master database 117 and the slave database 222.
[0064] From server ID From database ID state Final detection time Last synchronization time Synchronization status Slave01 DB01 Offline 2024-04-2510:15:30 2024-04-2509:50:00 Synchronized Slave02 DB02 Online 2024-04-2510:16:00 2024-04-2510:00:00 Synchronized Slave03 DB03 Offline 2024-04-2510:17:45 2024-04-2509:55:00 Not synchronized
[0065] Table 1: Synchronization List
[0066] The aforementioned asynchronous data backup processing system 10 and method provide asynchronous processing between the front-end and back-end, ensuring that the master server 110 can synchronize the access results 413 to all databases. Furthermore, when slave servers 210 are added, removed, or modified, the master server 110 will not be affected by the aforementioned slave servers 210.
Claims
1. A processing system for data asynchronous backup, applied to data backup of a plurality of computers in a data center, characterized in that, The asynchronous backup processing system for this data includes: A server cluster has multiple slave servers, each slave server having a backend program and a slave database; and A master server is connected to a cluster of servers. The master server has a front-end management program and a master database. The master server receives an access request. The front-end management program detects whether the master database and the slave databases are online or offline. If the master database is offline, the front-end management program selects one of the slave databases as a target database. The front-end management program accesses the target database according to the access request and generates an access result. If the master database is online, the front-end management program accesses the master database according to the access request and generates the corresponding access result. After generating the access result, the front-end management program synchronously writes the access result to the remaining slave databases.
2. The material asynchronously backed-up processing system of claim 1, wherein, After the front-end management program detects that the status of the main database has changed from offline to online, it synchronizes the access results to the main database.
3. The material asynchronously redundant processing system of claim 1, wherein, The data stored in the master database is consistent with the data stored in the slave databases.
4. The material asynchronously redundant processing system of claim 1, wherein, The front-end management program sends a detection request to the slave servers. The back-end program confirms the status of the slave database as online or offline based on the detection request, and generates a response message based on the confirmation result of the slave database.
5. The material asynchronously redundant processing system of claim 4, wherein, If the front-end management program does not receive the response information from the slave server after a threshold time, or if the response information includes that the slave database is offline, the front-end management program records the offline slave database and the slave server into a synchronization list.
6. The material asynchronously redundant processing system of claim 1, wherein, When the database is switched to online, the backend program sends a recovery message to the frontend management program.
7. The asynchronous data backup processing system as described in claim 1, characterized in that, The front-end management program determines whether the last update time of the master database and the slave databases are the same. If any of the last update times are different, the front-end management program synchronizes the data of the master database and the slave databases.
8. A method for asynchronous data backup, applied to data backup between a master server and multiple slave servers in a data center, characterized in that, The asynchronous backup methods for this data include: A server cluster is connected to the master server, and the server cluster has the slave servers; The master server detects the status of its master database and each slave database of the slave server as online or offline. If the master database is offline, the master server selects one of the slave databases, and the selected slave database becomes the target database. The master server accesses the target database according to an access request and generates an access result; If the primary database is online, the primary server accesses the primary database according to the access request and generates the corresponding access result; and The master server synchronizes the access result to itself or the other slave servers.
9. The asynchronous data backup processing method as described in claim 8, characterized in that, The step following "the master server checks the status of the master database and each slave database of the slave server as online or offline" includes: The master server sends a detection request to the slave servers, and the slave servers confirm the status of the slave database as online or offline based on the detection request. The slave server generates a response message based on the confirmation result from the slave database; and If the master server does not receive the response from the slave server after a threshold time, or if the response includes the slave database being offline, the master server records the offline slave database and the slave server in a synchronization list.
10. The asynchronous data backup processing method as described in claim 8, characterized in that, The step following "If the master database is offline, the master server selects one of the slave databases, and the selected slave database becomes the target database" includes: After the master server detects that the status of the master database has changed from offline to online, the master server synchronizes the access result to the master database.
11. The asynchronous data backup processing method as described in claim 8, characterized in that, The step of "the master server synchronizing to the master server or the other slave servers based on the access result" includes: The master server determines whether the last update time of the master database is the same as that of the slave databases; and If any of the last update times differ, the master server synchronizes the data between the master database and the slave databases.