CN114610526B - Data disaster tolerance method, system, device and equipment - Google Patents
Data disaster tolerance method, system, device and equipment Download PDFInfo
- Publication number
- CN114610526B CN114610526B CN202011423819.0A CN202011423819A CN114610526B CN 114610526 B CN114610526 B CN 114610526B CN 202011423819 A CN202011423819 A CN 202011423819A CN 114610526 B CN114610526 B CN 114610526B
- Authority
- CN
- China
- Prior art keywords
- server
- data
- disaster recovery
- main
- state value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a data disaster tolerance method, a system, a device and equipment, wherein the method comprises the following steps: when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, and asynchronously copying data written by the executed write-in operations to the disaster recovery server so that the disaster recovery server generates a disaster recovery state value of the write-in operations corresponding to the operation sequence; generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying; and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing mode, so that the disaster recovery server acquires the main state value from the auxiliary server when the main server fails, determines target operation corresponding to the data which is asynchronously copied but not copied to the disaster recovery server according to the main state value and the disaster recovery state value, and performs data disaster recovery according to the target operation, the suspended data, the copied data and the operation sequence.
Description
Technical Field
The present invention relates to the field of network security technologies, and in particular, to a method, a system, a device, and an apparatus for data disaster recovery.
Background
In the related art, the common data disaster recovery methods mainly include: synchronous data replication disaster tolerance and asynchronous data replication disaster tolerance.
The synchronous data replication disaster tolerance is to send the write action to the main node and the disaster recovery node simultaneously before the write is finally completed, so that the data on the disaster recovery node and the data on the main node are completely consistent. If the main node has a disaster, the data can be recovered from the disaster recovery node without loss.
As can be seen from this, the synchronous data replication disaster recovery can perform data disaster recovery well, but since real-time synchronization of the write operation is required, the synchronous data replication disaster recovery has a high requirement on network conditions, and thus a high network construction cost is required when performing data disaster recovery using the synchronous data replication disaster recovery.
The asynchronous data replication and disaster recovery can be performed on the disaster recovery node after the main node completes writing, and the main node and the disaster recovery node do not need to be written simultaneously, so that the network construction cost can be reduced.
Disclosure of Invention
Embodiments of the present invention provide a data disaster recovery method, system, device, and apparatus, so as to solve a problem in the related art that network construction cost is high due to synchronous data replication and disaster recovery, and a problem that data of a disaster backup node is inconsistent with data of a host node before a failure due to asynchronous data replication and disaster recovery.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, a data disaster tolerance method is provided, which is applied to a main server in a data disaster tolerance system, where the data disaster tolerance system further includes a disaster recovery server and an auxiliary server, and the method includes:
when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, and asynchronously copying data written by the executed write-in operations to the disaster recovery server, so that the disaster recovery server generates a disaster recovery state value of the write-in operation corresponding to the operation sequence; the disaster recovery state value is used for representing whether the written data is copied to the disaster recovery server or not;
generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying; the main state value is used for representing whether the written data are asynchronously copied to the disaster recovery server or not;
and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing manner, so that the disaster recovery server obtains the main state value from the auxiliary server when the main server fails, determines a target operation corresponding to target data which has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server when the main server fails according to the main state value and the disaster recovery state value, and performs data disaster recovery according to the target operation, currently suspended data, copied data and the operation sequence.
In a second aspect, a data disaster recovery method is provided, where the method is applied to an auxiliary server in a data disaster recovery system, the data disaster recovery system further includes a main server and a disaster recovery server, and the method includes:
receiving an operation sequence of a plurality of write operations and a main state value of the write operation corresponding to the operation sequence, which are sent by the main server in a storage sharing mode when the main server detects the plurality of write operations; the main state value is generated by the main server according to the operation sequence and the write operation which is executed in the plurality of write operations and is asynchronously copied to the disaster recovery server;
when the main server fails, sending the main state value to the disaster recovery server, so that the disaster recovery server determines, according to the main state value and the disaster recovery state value, that a target operation corresponding to target data which has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server has failed, and performs data disaster recovery according to the target operation, currently suspended data, specified data copied to the disaster recovery server by the main server in an asynchronous copying manner, and an operation sequence copied by the main server in a synchronous copying manner when detecting a plurality of write operations;
the disaster recovery state value is determined by the disaster recovery server according to the operation sequence synchronously copied by the main server and the write operation corresponding to the write data copied to the disaster recovery server by the main server in an asynchronous copying manner; the specified data is data written by the executed write operation on the main server.
In a third aspect, a data disaster recovery method is provided, where the method is applied to a disaster recovery server in a data disaster recovery system, the data disaster recovery system further includes a primary server and a secondary server, and the method includes:
receiving an operation sequence of a plurality of write operations transmitted by the main server in a synchronous copying mode when the main server detects the plurality of write operations, and designated data transmitted in an asynchronous copying mode; the specified data is data written by the executed write operation on the main server;
generating a disaster recovery state value of the write-in operation corresponding to the operation sequence according to the operation sequence and the write-in operation corresponding to the specified data; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
when the main server fails, acquiring a main state value of the write operation corresponding to the operation sequence from the auxiliary server; the main state value is used for representing whether the written data is subjected to asynchronous copying or not; the main state value is generated by the main server according to the operation sequence and the write operation which is subjected to asynchronous copying and is synchronized to the auxiliary server in a storage sharing mode;
and determining target operation corresponding to target data which is asynchronously copied but not copied when the main server fails according to the main state value and the disaster recovery state value, and performing data disaster recovery according to the target operation, the currently suspended data, the copied data and the operation sequence.
In a fourth aspect, a data disaster recovery system is provided, which includes a main server, a disaster recovery server, and an auxiliary server:
the main server is used for: when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, transmitting the operation sequence to the auxiliary server in a storage sharing mode, and asynchronously copying data written by the executed write-in operations to the disaster recovery server;
generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying, and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing mode; the main state value is used for representing whether the written data are asynchronously copied to the disaster recovery server or not;
the auxiliary server is configured to: receiving the operation sequence sent by the main server and a main state value of the write operation corresponding to the operation sequence, and sending the main state value to the disaster recovery server when the main server fails;
the disaster recovery server is used for: receiving the operation sequence of the plurality of write operations and the data written by the executed write operations sent by the main server, and generating a disaster recovery state value of the write operation corresponding to the operation sequence according to the operation sequence and the executed write operations; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
when the main server fails, acquiring a main state value of the write operation corresponding to the operation sequence from the auxiliary server, determining a target operation corresponding to target data which is asynchronously copied but not copied when the main server fails according to the main state value and the disaster recovery state value, and performing data disaster recovery according to the target operation, currently suspended data, copied data and the operation sequence.
In a fifth aspect, a server is provided, including: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first or second or third aspect.
A sixth aspect provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to the first or second or third aspect.
The at least one technical scheme provided by the embodiment of the invention can achieve the following technical effects:
when the main server detects the write operation, the operation sequence can be synchronously copied to the disaster recovery server, and because the data volume of the operation sequence is small, the operation sequence does not need to have higher requirements on a network when being synchronously copied, so that the problem of high network construction cost caused by synchronous data copying disaster tolerance in the related technology can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a data disaster recovery method according to an embodiment of the present invention;
fig. 2 is a second schematic flow chart of a data disaster recovery method according to an embodiment of the present invention;
fig. 3 is a third schematic flow chart of a data disaster recovery method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a data disaster recovery system according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a data disaster recovery device 500 according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a module composition of a data disaster recovery device 600 according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of a data disaster recovery device 700 according to an embodiment of the present invention;
fig. 8 is a schematic hardware structure diagram of a data disaster recovery device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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 invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data disaster recovery method according to an embodiment of the present invention, which is applied to a primary server in a data disaster recovery system, where the data disaster recovery system further includes a disaster recovery server and a secondary server, as shown in fig. 1, the method includes the following steps:
step 102: when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, and asynchronously copying data written by the executed write-in operations to the disaster recovery server, so that the disaster recovery server generates a disaster recovery state value of the write-in operation corresponding to the operation sequence; the disaster recovery state value is used for representing whether the written data is copied to the disaster recovery server.
Step 104: generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying; the main state value is used for representing whether the written data are asynchronously copied to the disaster recovery server.
Step 106: and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing mode, so that the disaster recovery server acquires the main state value from the auxiliary server when the main server fails, determines a target operation corresponding to target data which has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server when the main server fails according to the main state value and the disaster recovery state value, and performs data disaster recovery according to the target operation, currently suspended data, copied data and the operation sequence.
In this embodiment, when the main server detects a plurality of write operations, the operation sequence of the plurality of write operations may be obtained, the obtained operation sequence is synchronously copied to the disaster recovery server, and data written by the executed write operations is asynchronously copied to the disaster recovery server, so that the disaster recovery server generates a disaster recovery state value of the write operations corresponding to the operation sequence, where the disaster recovery state value may be used to represent whether the written data has been copied to the disaster recovery server.
In one embodiment, when the host server detects a write operation (e.g., an IO write operation performed by an application program through an operating system, etc.), the host server may obtain an operation sequence of the write operation, store the operation sequence, and simultaneously copy the operation sequence to the disaster recovery server through a network, such as a wide area network.
In one embodiment, the host server may preset a storage area to store the operation sequence of the write operation, for example, the specified storage area may be preset to store the operation sequence of the write operation.
In the above embodiment, the main server may store the operation sequence of the write operation in a preset storage area, and when the preset storage area is stored to full and cannot store a new operation sequence, the storage sequence of the stored operation sequence may be used to round the relevant space of the corresponding data block.
When the write operation for the primary server is completed, the primary server may asynchronously copy the data written by the performed write operation to the disaster recovery server.
In one embodiment, when data written by the executed write operation is asynchronously copied to the disaster recovery server, the asynchronous copy may be performed in a queue, which may be a first-in-first-out queue. I.e. data that enters the queue first is transmitted first. Because the main server synchronously copies the operation sequence to the disaster recovery server, the data written by the executed write operation can be directly transmitted through the first-in first-out queue without considering the sequence when the data is transmitted, so that the bandwidth of a transmission link is greatly utilized, and the transmission time is shortened.
In the above embodiment, when the network link is good, the data entering the queue may be transmitted to the disaster recovery server in a first-in first-out manner; when the network link is bad or congested, the data entering the queue may be queued in the queue.
In this embodiment, the master server may generate a master status value of the write operation corresponding to the operation order according to the operation order and the write operation that has been asynchronously copied. The master status value may be used to characterize whether the written data has been asynchronously replicated to the disaster recovery server.
In one example, the master server may preset a master status table, wherein the master status table may include the operation sequence and the corresponding relationship between the status values. After generating the main state value of the write operation corresponding to the operation order, the main server may update the main state value into the main state table according to the operation order.
In the above example, the master status table may be as shown in table 1:
TABLE 1
As can be seen from table 1, the data written by the write operations with the operation sequences of 0001 and 0002 has been synchronized to the disaster recovery server by asynchronous replication; and the data written by the write operation with the operation sequence of 0003 is not synchronized with the disaster recovery server in an asynchronous replication mode.
In another example, the master state table may also include a synchronization state of the operation sequence, e.g., as shown in table 2:
TABLE 2
As can be seen from table 2, the operation sequences of the write operations with the operation sequences 0001, 0002, and 0003 have been synchronized on the primary server, the secondary server, and the disaster recovery server.
In one embodiment, the primary server may determine whether the operation sequence is synchronized to the disaster recovery server according to an operation sequence synchronization feedback message returned by the disaster recovery server after the operation sequence is synchronously copied. Since the main server can directly access the designated storage space of the auxiliary server for storing the operation sequence, the main server can directly access and determine whether the operation sequence is synchronized to the disaster recovery server according to the access result. Of course, the secondary server may also send an operation sequence synchronization feedback message to the primary server, so that the primary server determines whether the operation sequence has been synchronized to the secondary server according to the feedback message.
In yet another example, the master status table may also include data blocks used by the order of operations, for example, as shown in table 3:
TABLE 3
As can be seen from table 3, the data blocks B003 and B002 have respectively completed the synchronization of the operation sequence and asynchronously copy the write operation that has been performed on the primary server to the disaster recovery server. While data block B001 completes the synchronization of the operation sequence, the write operation that has been executed on the primary server has not yet been asynchronously replicated to the disaster recovery server.
In one example, in polling data blocks, data blocks that complete sequential synchronous as well as asynchronous data replication may be polled. As shown in table 3, the spaces associated with data blocks B003 and B002 may be used in round robin fashion, and the space associated with data block B001 may be used in round robin fashion when data block B001 completes the asynchronous replication of the data.
After generating the main state value of the write operation corresponding to the operation sequence, the main server may transmit the operation sequence and the main state value to the auxiliary server in a storage sharing manner, so that the disaster recovery server obtains the main state value from the auxiliary server, performs a corresponding target operation according to the main state value and the disaster recovery value, and completes the replication according to the operation, the currently suspended data
As can be seen from the above, in this embodiment, when the main server detects a write operation, the operation sequence may be synchronously copied to the disaster recovery server, and since the data size of the operation sequence is small, there is no need to have a high requirement on the network when the operation sequence is synchronously copied, and therefore, the problem of high network construction cost caused by disaster recovery of synchronous data copying in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Referring to fig. 2, fig. 2 is a second schematic flow chart of a data disaster recovery method according to an embodiment of the present invention, which is applied to an auxiliary server in a data disaster recovery system, where the data disaster recovery system further includes a main server and a disaster recovery server, as shown in fig. 2, the method includes the following steps:
step 202: and receiving an operation sequence of the plurality of write operations transmitted by the storage sharing mode and a main state value of the write operation corresponding to the operation sequence when the master server detects the plurality of write operations.
Step 204: when the main server fails, the main state value is sent to the disaster recovery server, so that the disaster recovery server determines that the main server has asynchronously copied to the disaster recovery server but has not copied to a target operation corresponding to target data of the disaster recovery server according to the main state value and the disaster recovery state value when the main server fails, and performs data disaster recovery according to the target operation, currently suspended data, specified data copied to the disaster recovery server by the main server in an asynchronous copying mode, and an operation sequence copied by the main server in a synchronous copying mode when a plurality of write-in operations are detected.
In this embodiment, the auxiliary server may communicate with the main server and the disaster recovery server, respectively.
The auxiliary server may be disposed around the main server, such as in an adjacent room, etc. The communication link between the secondary server and the primary server is short because it is located around the primary server.
In one embodiment, the designated storage area of the secondary server may be directly imported or mounted on the designated storage area of the primary server in a general storage sharing manner, so that when the primary server writes data into the local designated storage area, the written data may be synchronized into the designated storage area of the secondary server in a storage sharing manner. The primary server may also directly access a designated storage area on the secondary server.
In this embodiment, the secondary server may receive an operation sequence of the plurality of write operations transmitted by the primary server in a storage sharing manner when the plurality of write operations are detected, and a primary status value of the write operation corresponding to the operation sequence. The main status value may be generated by the main server according to the operation sequence and the write operation that has been executed in the plurality of write operations and has been asynchronously copied to the disaster recovery server.
After receiving the operation sequence and the main state value sent by the main server, the auxiliary server may store the operation sequence and the main state value.
The auxiliary server may preset an initial main state table, where the initial main state table may include an initial operation sequence and an initial main state value, and after the main server sends the operation sequence and the main state value, the auxiliary server may update the initial main state table according to the received operation sequence and main state value.
Of course, the secondary server may not set the primary status table, but receive and store the primary status table synchronized by the primary server.
After the main state table is stored, the auxiliary server can directly update the main state table according to the synchronous main state table of the main server; the updating of the master status table may also be performed based on feedback information from the master server, such as feedback information that the order of operations has been synchronized.
Since the related content of the main status table has been described in detail in the previous embodiment, the detailed description of the embodiment is omitted.
When the main server fails, the auxiliary server may send the main state value to the disaster recovery server, so that the disaster recovery server determines, according to the main state value and the disaster recovery state value, that a target operation corresponding to target data that has been asynchronously copied to the disaster recovery server but has not yet been copied to the disaster recovery server has been performed on the main server at the time of the failure, and performs data disaster recovery according to the target operation, currently suspended data, specified data that the main server copied to the disaster recovery server in an asynchronous copying manner, and an operation sequence that the main server copied in a synchronous copying manner when detecting a plurality of write operations.
As can be seen from the above, in this embodiment, when the main server detects a write operation, it only needs to synchronously copy the operation sequence to the disaster recovery server, and because the data volume of the operation sequence is small, there is no need to have a high requirement on the network when synchronously copying the operation sequence, and therefore, the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Referring to fig. 3, fig. 3 is a third schematic flow chart of a data disaster recovery method according to an embodiment of the present invention, which is applied to a disaster recovery server in a data disaster recovery system, where the data disaster recovery system further includes a main server and an auxiliary server, and as shown in fig. 3, the method includes the following steps:
step 302: receiving the operation sequence of the plurality of write operations transmitted by the synchronous copying mode and the specified data transmitted by the asynchronous copying mode when the main server detects the plurality of write operations.
Step 304: and generating a disaster recovery state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation corresponding to the specified data.
Step 306: when the main server fails, acquiring a main state value of a write operation corresponding to an operation sequence from the auxiliary server; the main state value is used for representing whether the written data is subjected to asynchronous copying or not; the main state value is generated by the main server according to the operation sequence and the write operation which is asynchronously copied, and is synchronized to the auxiliary server in a storage sharing mode.
Step 308: and determining target operation corresponding to target data which is asynchronously copied but not copied when the main server fails according to the main state value and the disaster recovery state value, and performing data disaster recovery according to the target operation, the currently suspended data, the copied data and the operation sequence.
In this embodiment, the disaster recovery server may communicate with the primary server and the secondary server in the data disaster tolerance system.
In one embodiment, the disaster recovery server may receive an operation sequence of a plurality of write operations transmitted by the primary server in a synchronous replication manner when the primary server detects the plurality of write operations, and receive designated data transmitted by the primary server in an asynchronous replication manner, where the designated data may be data written by a write operation that has been performed on the primary server.
After the operation sequence and the designated data are received, a disaster recovery status value of the write operation corresponding to the operation sequence may be generated according to the operation data and the write operation corresponding to the designated data, where the disaster recovery status value may be used to characterize whether the written data has been asynchronously copied.
In an example, the disaster recovery server may preset a disaster recovery status table, where the disaster recovery status table may include a correspondence between an operation sequence and a status value. After generating the disaster recovery state value of the write operation corresponding to the operation sequence, the disaster recovery server may update the disaster recovery state value into the disaster recovery state table according to the operation sequence.
In the above example, the disaster recovery status table may be as shown in table 4:
TABLE 4
As can be seen from table 4, the data written by the write operations with the operation sequences of 0001 and 0002 has been copied to the disaster recovery server by means of asynchronous copy, that is, the asynchronous copy has been completed; and the data written by the write operation with the operation sequence of 0003 is not copied to the disaster recovery server in an asynchronous copying manner, i.e. the asynchronous copying is not completed.
When the primary server fails, the disaster recovery server may obtain a primary state value of the write operation corresponding to the operation sequence from the secondary server, where the primary state value may be used to represent whether the written data has been asynchronously copied, and the primary state value may be generated by the primary server according to the operation sequence and the write operation that has been asynchronously copied and synchronized to the secondary server in a storage sharing manner.
After the main state value is obtained, the disaster recovery server may determine, according to the main state value and the disaster recovery state value, a target operation corresponding to target data that has been asynchronously copied but has not yet been copied when the main server fails.
In one example, the disaster recovery server may determine, as a target operation corresponding to target data that has been asynchronously replicated but has not yet been replicated when the primary server fails, a write operation in which the primary status value and the disaster recovery status value are inconsistent.
For example, if the main state value corresponding to the same operation sequence acquired by the disaster recovery server may be "in queue" and the disaster recovery state value may be "not copied", the operation corresponding to the operation sequence may not be determined as the target operation; if the main state value corresponding to the same operation sequence acquired by the disaster recovery server may be "copied" and the disaster recovery state value may be "not copied", it may be determined that the data corresponding to the operation sequence is the target data that has been asynchronously copied but has not been copied, and at this time, the operation corresponding to the target data may be determined as the target operation.
After the target operation is determined, the disaster recovery server can perform data disaster recovery according to the target operation, the currently suspended data, the copied data and the operation sequence.
In one example, the disaster recovery server may perform a write operation on currently suspended data according to the received operation sequence and the determined target operation, and then may perform data disaster recovery according to the data written after the write operation is performed on the currently suspended data and the copied data. In this example, the data obtained by adding the data that has been copied to the data written after the write operation is performed on the currently suspended data may be consistent with the data before the failure of the primary server.
As can be seen from the above, in this embodiment, when the main server detects a write operation, it is only necessary to synchronously copy the operation sequence to the disaster recovery server, and since the data volume of the operation sequence is small, there is no need to have a high requirement on the network when synchronously copying the operation sequence, and therefore, the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Referring to fig. 4, fig. 4 is a schematic diagram of a data disaster recovery system according to an embodiment of the present invention.
As shown in fig. 4, the data disaster recovery system may include a primary server, a secondary server, and a disaster recovery server.
The main server, the auxiliary server and the disaster recovery server can be mutually connected in data, and data transmission is carried out based on the data connection.
The specified storage area of the auxiliary server can be directly imported or mounted on the specified storage area of the main server in a general storage sharing mode, so that when the main server writes data into the local specified storage area, the written data can be synchronized into the specified storage area of the auxiliary server in the storage sharing mode. The primary server may also directly access a designated storage area on the secondary server.
In one embodiment, the secondary server may be located closer to the primary server such that the communication link between the secondary server and the primary server is shorter.
The disaster recovery server can perform data backup on the data on the main server, so that data disaster recovery is performed according to the backed-up data when the main server fails.
In this embodiment, when the primary server detects multiple write operations, the primary server may synchronously copy the operation sequences of the multiple write operations to the disaster recovery server, transmit the operation sequences to the secondary server in a storage sharing manner, and asynchronously copy data written by the executed write operations to the disaster recovery server.
The primary server may generate a primary state value of the write operation corresponding to the operation order according to the operation order and the write operation that has been asynchronously copied, and transmit the operation order and the primary state value to the secondary server in a storage sharing manner. The main state value can be used to represent whether the written data is asynchronously copied to the disaster recovery server.
The auxiliary server may receive the operation sequence transmitted by the main server and the main state value of the write operation corresponding to the operation sequence, and transmit the main state value to the disaster recovery server when the main server fails.
The disaster recovery server may receive the operation sequence of the plurality of write operations sent by the main server and the data written by the executed write operations, and may generate a disaster recovery state value of the write operation corresponding to the operation sequence according to the operation sequence and the executed write operations. The disaster recovery state value is used for representing whether the written data is finished asynchronous replication.
When the primary server fails, the disaster recovery server may obtain a primary state value of the write operation corresponding to the operation sequence from the secondary server, determine, according to the primary state value and the disaster recovery state value, a target operation corresponding to target data that has been asynchronously copied but not yet copied when the primary server fails, and perform data disaster recovery according to the target operation, currently suspended data, copied data, and the operation sequence.
Since the details have been described in the above embodiments, the present embodiment is not described in detail herein.
As can be seen from the above, in this embodiment, when the main server detects a write operation, it only needs to synchronously copy the operation sequence to the disaster recovery server, and because the data volume of the operation sequence is small, there is no need to have a high requirement on the network when synchronously copying the operation sequence, and therefore, the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Corresponding to the data disaster tolerance method, the embodiment of the invention also provides a data disaster tolerance device which is applied to a main server in a data disaster tolerance system, wherein the data disaster tolerance system also comprises a disaster recovery server; fig. 5 is one of schematic block compositions of a data disaster recovery device 500 according to an embodiment of the present invention, and as shown in fig. 5, the data disaster recovery device 500 includes:
a transmission module 501, configured to, when multiple write operations are detected, synchronously copy an operation sequence of the multiple write operations to the disaster recovery server, and asynchronously copy data written by the executed write operations to the disaster recovery server, so that the disaster recovery server generates a disaster recovery state value of the write operation corresponding to the operation sequence; the disaster recovery state value is used for representing whether the written data is copied to the disaster recovery server or not;
a generating module 502, configured to generate a main state value of a write operation corresponding to the operation sequence according to the operation sequence and the write operation that has been asynchronously copied; the main state value is used for representing whether the written data is asynchronously copied to the disaster recovery server or not;
a sharing module 503, configured to transmit the operation sequence and the main state value to the auxiliary server in a storage sharing manner, so that the disaster recovery server obtains the main state value from the auxiliary server when the main server fails, determine, according to the main state value and the disaster recovery state value, a target operation corresponding to target data that has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server when the main server fails, and perform data disaster recovery according to the target operation, currently suspended data, copied data, and the operation sequence.
Optionally, the transmission module 501 is configured to:
asynchronously copying data written by the executed write operation to the disaster recovery server in a queue mode; the queues are first-in first-out queues.
In this embodiment, only the operation sequence of the write operation detected by the primary server needs to be synchronously copied to the disaster recovery server, and because the data size of the operation sequence is small, there is no need to have a high requirement on the network when the operation sequence is synchronously copied, so that the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Corresponding to the data disaster recovery method, the embodiment of the invention also provides another data disaster recovery device, which is applied to an auxiliary server in a data disaster recovery system, wherein the data disaster recovery system further comprises a main server and a disaster recovery server; fig. 6 is a schematic diagram of module components of a data disaster recovery device 600 according to an embodiment of the present invention, and as shown in fig. 6, the data disaster recovery device 600 includes:
a receiving module 601, configured to receive an operation sequence of multiple write operations and a main status value of a write operation corresponding to the operation sequence, where the operation sequence is sent by the host server in a storage sharing manner when multiple write operations are detected; the main state value is generated by the main server according to the operation sequence and the write operation which is executed in the plurality of write operations and asynchronously copied to the disaster recovery server;
a sending module 602, configured to send the main state value to the disaster recovery server when the main server fails, so that the disaster recovery server determines, according to the main state value and the disaster recovery state value, that a target operation corresponding to target data that has been asynchronously copied to the disaster recovery server but has not yet been copied to the disaster recovery server when the main server fails, and performs data disaster tolerance according to the target operation, currently suspended data, specified data that is copied to the disaster recovery server by the main server in an asynchronous copying manner, and an operation sequence that is copied by the main server in a synchronous copying manner when multiple write operations are detected;
the disaster recovery state value is determined by the disaster recovery server according to the operation sequence synchronously copied by the main server and the write operation corresponding to the write data copied to the disaster recovery server by the main server in an asynchronous copying manner; the specified data is data written by the executed write operation on the main server.
In this embodiment, only the operation sequence of the write operation detected by the primary server needs to be synchronously copied to the disaster recovery server, and because the data size of the operation sequence is small, there is no need to have a high requirement on the network when the operation sequence is synchronously copied, so that the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Corresponding to the data disaster tolerance method, the embodiment of the invention also provides another data disaster tolerance device which is applied to a disaster recovery server in a data disaster tolerance system, wherein the data disaster tolerance system further comprises a main server and an auxiliary server; fig. 7 is a schematic diagram illustrating a module composition of a data disaster recovery device 700 according to an embodiment of the present invention, and as shown in fig. 7, the data disaster recovery device 700 includes:
a first module 701, configured to receive an operation sequence of multiple write operations transmitted by the primary server in a synchronous replication manner when multiple write operations are detected, and specified data transmitted by an asynchronous replication manner; the specified data is data written by the executed write operation on the main server;
a second module 702, configured to generate a disaster recovery status value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation corresponding to the specified data; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
a third module 703, configured to, when the primary server fails, obtain a primary state value of a write operation corresponding to the operation sequence from the secondary server; the main state value is used for representing whether the written data is subjected to asynchronous copying or not; the main state value is generated by the main server according to the operation sequence and the write operation which is subjected to asynchronous copying and is synchronized to the auxiliary server in a storage sharing mode;
a fourth module 704, configured to determine, according to the main status value and the disaster recovery status value, a target operation corresponding to target data that has been asynchronously copied but has not been copied when the main server fails, and perform data disaster recovery according to the target operation, currently suspended data, copied data, and the operation sequence.
Optionally, the fourth module 704 is configured to:
determining the write operation with inconsistent main state value and disaster recovery state value as a target operation corresponding to target data which is asynchronously copied but not copied when the main server fails;
according to the operation sequence and the target operation, performing write operation on the currently suspended data;
and performing data disaster tolerance according to the data written after the write operation is performed on the current suspended data and the copied data.
In this embodiment, only the operation sequence of the write operation detected by the primary server needs to be synchronously copied to the disaster recovery server, and because the data size of the operation sequence is small, there is no need to have a high requirement on the network when the operation sequence is synchronously copied, so that the problem of high network construction cost caused by disaster recovery of synchronous data copy in the related art can be effectively solved.
When the main server fails, the target operation corresponding to the target data which is asynchronously copied but not copied can be determined according to the main state value which is kept consistent with the main server on the auxiliary server and the disaster-tolerant state value on the disaster-tolerant backup server, and then the data can be destaged according to the target operation, the currently suspended data, the copied data and the operation sequence, so that the disaster-tolerant backup server is kept consistent with the main server before the failure, and the problem that the data of the disaster-tolerant backup node is inconsistent with the data of the main node before the failure due to asynchronous data copying and disaster tolerance in the related technology is effectively solved.
Corresponding to the data disaster recovery method, an embodiment of the present invention further provides a data disaster recovery device, and fig. 8 is a schematic diagram of a hardware structure of the data disaster recovery device according to an embodiment of the present invention.
The data disaster recovery device may be a terminal device or a server for data disaster recovery provided in the foregoing embodiment.
The data disaster recovery device may have a large difference due to different configurations or performances, and may include one or more processors 801 and a memory 802, where the memory 802 may store one or more stored applications or data. Wherein the memory 802 may be a transient storage or a persistent storage. The application stored in memory 802 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a data disaster recovery device. Still further, the processor 801 may be configured to communicate with the memory 802 to execute a series of computer-executable instructions in the memory 802 on the data disaster recovery device. The data disaster recovery apparatus may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input/output interfaces 805, one or more keyboards 806.
In particular, in the above embodiments, the data disaster recovery device includes a memory and one or more programs, where the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the data disaster recovery device, and is configured to be executed by one or more processors to execute the one or more programs for performing the above embodiments.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (10)
1. A data disaster tolerance method is applied to a main server in a data disaster tolerance system, and the data disaster tolerance system also comprises a disaster recovery server and an auxiliary server; characterized in that the method comprises:
when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, and asynchronously copying data written by the executed write-in operations to the disaster recovery server, so that the disaster recovery server generates a disaster recovery state value of the write-in operation corresponding to the operation sequence; the disaster recovery state value is used for representing whether the written data is copied to the disaster recovery server or not;
generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying; the main state value is used for representing whether the written data is asynchronously copied to the disaster recovery server or not;
and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing manner, so that the disaster recovery server obtains the main state value from the auxiliary server when the main server fails, determines a target operation corresponding to target data which has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server when the main server fails according to the main state value and the disaster recovery state value, and performs data disaster recovery according to the target operation, currently suspended data, copied data and the operation sequence.
2. The method of claim 1, wherein the asynchronously copying data written by the executed write operation to the disaster recovery server comprises:
asynchronously copying data written by the executed write operation to the disaster recovery server in a queue mode; the queues are first-in first-out queues.
3. A data disaster tolerance method is applied to an auxiliary server in a data disaster tolerance system, and the data disaster tolerance system also comprises a main server and a disaster recovery server; characterized in that the method comprises:
receiving an operation sequence of a plurality of write operations and a main state value of the write operation corresponding to the operation sequence, which are sent by the main server in a storage sharing mode when the main server detects the plurality of write operations; the main state value is generated by the main server according to the operation sequence and the write operation which is executed in the plurality of write operations and asynchronously copied to the disaster recovery server;
when the main server fails, sending the main state value to the disaster recovery server, so that the disaster recovery server determines, according to the main state value and the disaster recovery state value, that a target operation corresponding to target data which has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server has failed, and performs data disaster recovery according to the target operation, currently suspended data, specified data copied to the disaster recovery server by the main server in an asynchronous copying manner, and an operation sequence copied by the main server in a synchronous copying manner when detecting a plurality of write operations;
the disaster recovery state value is determined by the disaster recovery server according to the operation sequence synchronously copied by the main server and the write operation corresponding to the write data copied to the disaster recovery server by the main server in an asynchronous copying manner; and the specified data is data written by the executed write operation on the main server.
4. A data disaster tolerance method is applied to a disaster recovery backup server in a data disaster tolerance system, and the data disaster tolerance system also comprises a main server and an auxiliary server; characterized in that the method comprises:
receiving an operation sequence of a plurality of write operations transmitted by the main server in a synchronous copying mode when the main server detects the plurality of write operations, and designated data transmitted in an asynchronous copying mode; the specified data is data written by the executed write operation on the main server;
generating a disaster recovery state value of the write-in operation corresponding to the operation sequence according to the operation sequence and the write-in operation corresponding to the specified data; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
when the main server fails, acquiring a main state value of a write operation corresponding to the operation sequence from the auxiliary server; the main state value is used for representing whether the written data is subjected to asynchronous copying or not; the main state value is generated by the main server according to the operation sequence and the write operation which is subjected to asynchronous copying and is synchronized to the auxiliary server in a storage sharing mode;
and determining target operation corresponding to target data which is asynchronously copied but not copied when the main server fails according to the main state value and the disaster recovery state value, and performing data disaster recovery according to the target operation, the currently suspended data, the copied data and the operation sequence.
5. The method according to claim 4, wherein the determining, according to the primary status value and the disaster-backup status value, a target operation corresponding to target data that has been asynchronously replicated but has not yet been replicated when the primary server fails includes:
determining the write operation with inconsistent main state value and disaster recovery state value as a target operation corresponding to target data which is asynchronously copied but not copied when the main server fails;
the performing data disaster tolerance according to the target operation, the currently suspended data, the copied data and the operation sequence includes:
according to the operation sequence and the target operation, performing write operation on the currently suspended data;
and performing data disaster tolerance according to the data written after the write operation is performed on the current suspended data and the copied data.
6. A data disaster recovery system comprises a main server, a disaster recovery server and an auxiliary server, and is characterized in that:
the main server is used for: when a plurality of write-in operations are detected, synchronously copying the operation sequence of the write-in operations to the disaster recovery server, transmitting the operation sequence to the auxiliary server in a storage sharing mode, and asynchronously copying data written by the executed write-in operations to the disaster recovery server;
generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying, and transmitting the operation sequence and the main state value to the auxiliary server in a storage sharing mode; the main state value is used for representing whether the written data are asynchronously copied to the disaster recovery server or not;
the auxiliary server is configured to: receiving the operation sequence sent by the main server and a main state value of the write operation corresponding to the operation sequence, and sending the main state value to the disaster recovery server when the main server fails;
the disaster recovery server is used for: receiving the operation sequence of the plurality of write operations and the data written by the executed write operations sent by the main server, and generating a disaster recovery state value of the write operation corresponding to the operation sequence according to the operation sequence and the executed write operations; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
when the main server fails, acquiring a main state value of the write operation corresponding to the operation sequence from the auxiliary server, determining a target operation corresponding to target data which is asynchronously copied but not copied when the main server fails according to the main state value and the disaster recovery state value, and performing data disaster recovery according to the target operation, currently suspended data, copied data and the operation sequence.
7. A data synchronizer is applied to a main server in a data disaster recovery system, the data disaster recovery system also comprises a disaster recovery server and an auxiliary server, and the data synchronizer is characterized by comprising:
the transmission module is used for synchronously copying the operation sequence of the plurality of write-in operations to the disaster recovery server and asynchronously copying data written by the executed write-in operations to the disaster recovery server when a plurality of write-in operations are detected, so that the disaster recovery server generates a disaster recovery state value of the write-in operation corresponding to the operation sequence; the disaster recovery state value is used for representing whether the written data is copied to the disaster recovery server or not;
the generating module is used for generating a main state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation which is subjected to asynchronous copying; the main state value is used for representing whether the written data is asynchronously copied to the disaster recovery server or not;
and the sharing module is configured to transmit the operation sequence and the main state value to the auxiliary server in a storage sharing manner, so that the disaster recovery server obtains the main state value from the auxiliary server when the main server fails, determine, according to the main state value and the disaster recovery state value, a target operation corresponding to target data that has been asynchronously copied to the disaster recovery server but has not been copied to the disaster recovery server when the main server fails, and perform data disaster recovery according to the target operation, currently suspended data, copied data, and the operation sequence.
8. A data disaster recovery device is applied to an auxiliary server in a data disaster recovery system, and the data disaster recovery system also comprises a main server and a disaster recovery server; characterized in that the device comprises:
the receiving module is used for receiving an operation sequence of the plurality of write operations and a main state value of the write operation corresponding to the operation sequence, which are sent by the main server in a storage sharing mode when the main server detects the plurality of write operations; the main state value is generated by the main server according to the operation sequence and the write operation which is executed in the plurality of write operations and asynchronously copied to the disaster recovery server;
a sending module, configured to send the main state value to the disaster recovery server when the main server fails, so that the disaster recovery server determines, according to the main state value and the disaster recovery state value, a target operation corresponding to target data that has been asynchronously copied to the disaster recovery server but has not yet been copied to the disaster recovery server when the main server fails, and performs data disaster recovery according to the target operation, currently suspended data, specified data that is copied to the disaster recovery server by the main server in an asynchronous copying manner, and an operation sequence that is copied by the main server in a synchronous copying manner when multiple write operations are detected;
the disaster recovery state value is determined by the disaster recovery server according to the operation sequence synchronously copied by the main server and the write operation corresponding to the write data copied to the disaster recovery server by the main server in an asynchronous copying manner; the specified data is data written by the executed write operation on the main server.
9. A data disaster tolerance device is applied to a disaster recovery backup server in a data disaster tolerance system, and the data disaster tolerance system also comprises a main server and an auxiliary server; characterized in that the device comprises:
the first module is used for receiving the operation sequence of the plurality of write operations transmitted by the main server in a synchronous copying mode when the main server detects the plurality of write operations, and the designated data transmitted by an asynchronous copying mode; the specified data are data written by the executed write operation on the main server;
a second module, configured to generate a disaster recovery state value of the write operation corresponding to the operation sequence according to the operation sequence and the write operation corresponding to the specified data; the disaster recovery state value is used for representing whether the written data is finished asynchronous replication;
a third module, configured to, when the primary server fails, obtain a primary state value of a write operation corresponding to the operation order from the secondary server; the main state value is used for representing whether the written data is subjected to asynchronous copying or not; the main state value is generated by the main server according to the operation sequence and the write operation which is subjected to asynchronous copying, and is synchronized to the auxiliary server in a storage sharing mode;
a fourth module, configured to determine, according to the main status value and the disaster recovery status value, a target operation corresponding to target data that has been asynchronously replicated but has not yet been replicated when the main server fails, and perform data disaster recovery according to the target operation, currently suspended data, replicated data, and the operation sequence.
10. A server, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the method steps of data disaster recovery according to any of claims 1 to 2, or claim 3, or claims 4 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011423819.0A CN114610526B (en) | 2020-12-08 | 2020-12-08 | Data disaster tolerance method, system, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011423819.0A CN114610526B (en) | 2020-12-08 | 2020-12-08 | Data disaster tolerance method, system, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114610526A CN114610526A (en) | 2022-06-10 |
CN114610526B true CN114610526B (en) | 2023-02-24 |
Family
ID=81856852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011423819.0A Active CN114610526B (en) | 2020-12-08 | 2020-12-08 | Data disaster tolerance method, system, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114610526B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119329A (en) * | 2019-02-27 | 2019-08-13 | 咪咕音乐有限公司 | Data replication disaster tolerance method and disaster tolerance system |
CN111858147A (en) * | 2019-04-29 | 2020-10-30 | ***通信集团贵州有限公司 | Disaster tolerance processing method and device, mobile terminal and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4699091B2 (en) * | 2005-05-31 | 2011-06-08 | 株式会社日立製作所 | Disaster recovery method and system |
US10133510B2 (en) * | 2017-01-19 | 2018-11-20 | International Business Machines Corporation | Apparatus, method, and program product for data integrity during asynchronous remote copy |
-
2020
- 2020-12-08 CN CN202011423819.0A patent/CN114610526B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119329A (en) * | 2019-02-27 | 2019-08-13 | 咪咕音乐有限公司 | Data replication disaster tolerance method and disaster tolerance system |
CN111858147A (en) * | 2019-04-29 | 2020-10-30 | ***通信集团贵州有限公司 | Disaster tolerance processing method and device, mobile terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114610526A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6921206B2 (en) | Database state determination method and device and consistency verification method and device | |
CN107450979B (en) | Block chain consensus method and device | |
CN111327703B (en) | Consensus method and device based on block chain | |
CN109376197B (en) | Data synchronization method, server and computer storage medium | |
WO2019091324A1 (en) | Data synchronization method and device, and electronic device | |
CN108628688B (en) | Message processing method, device and equipment | |
CN109033127B (en) | Synchronous data verification method, device and equipment | |
CN111459724B (en) | Node switching method, device, equipment and computer readable storage medium | |
CN113743942B (en) | Transaction execution method, blockchain, master node and master storage device | |
WO2024001024A1 (en) | Method for executing transaction in blockchain system, and blockchain system and nodes | |
CN108304455B (en) | Method, device and equipment for processing service request | |
CN106873902B (en) | File storage system, data scheduling method and data node | |
CN111930530A (en) | Equipment message processing method, device and medium based on Internet of things | |
CN106708842B (en) | Method for loading data by application system, database and application system | |
CN115168322A (en) | Database system, main library election method and device | |
CN114610526B (en) | Data disaster tolerance method, system, device and equipment | |
CN116069792A (en) | Database disaster recovery system, method and device, storage medium and electronic equipment | |
CN113535738B (en) | Fault transfer method of MySQL database system, high-availability system and electronic equipment | |
CN115033350A (en) | Execution method and device of distributed transaction | |
CN114564458A (en) | Method, device, equipment and storage medium for data synchronization between clusters | |
CN110764690B (en) | Distributed storage system and leader node election method and device thereof | |
CN110633321B (en) | Data synchronization method, device and equipment | |
CN107645541B (en) | Data storage method and device and server | |
CN115344410B (en) | Method and device for judging event execution sequence, storage medium and electronic equipment | |
CN110955653A (en) | Data page processing method, device, equipment and computer system |
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 |