CN113626528A - Database double-activity implementation verification method and system - Google Patents

Database double-activity implementation verification method and system Download PDF

Info

Publication number
CN113626528A
CN113626528A CN202110948102.6A CN202110948102A CN113626528A CN 113626528 A CN113626528 A CN 113626528A CN 202110948102 A CN202110948102 A CN 202110948102A CN 113626528 A CN113626528 A CN 113626528A
Authority
CN
China
Prior art keywords
database cluster
data
database
cluster
file server
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.)
Pending
Application number
CN202110948102.6A
Other languages
Chinese (zh)
Inventor
卢知白
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110948102.6A priority Critical patent/CN113626528A/en
Publication of CN113626528A publication Critical patent/CN113626528A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments

Abstract

The application relates to a database double-activity implementation verification method and a system, wherein the method comprises the following steps: the method comprises the steps of respectively deploying a first database cluster and a second database cluster, and creating a synchronous attribute table in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication to achieve double-activity. In the application, data in the first database cluster or the second database cluster is backed up to the data file server, and the data backed up by the data file server is restored to the backup data verification environment for verification at a preset time every day, so that whether data replication between the first database cluster and the second database cluster is completely synchronous or not, feasibility of double activity constructed between the first database cluster and the second database cluster is confirmed, and whether the data in the first database cluster or the second database cluster is completely backed up to the data file server or not is confirmed.

Description

Database double-activity implementation verification method and system
Technical Field
The application relates to the technical field of data processing, in particular to a database double-activity implementation verification method and system.
Background
In the prior art, in order to prevent disasters, a scheme of 'two places and three centers', 'double activity' and data backup is implemented. The scheme is that a backup disaster preparation center is established in a city at a different place and is used for data backup of the double centers, and when the double centers break down due to natural disasters and the like, the disaster preparation center at the different place can use the backup data to restore the service. However, in the prior art, there is no good way to verify the feasibility of the scheme.
Disclosure of Invention
In order to overcome the problem that no better verification mode exists for the implementation of the schemes of 'two places and three centers', 'double active' and data backup in the related art at least to a certain extent, the application provides a database double active implementation verification method and system.
The scheme of the application is as follows:
according to a first aspect of the embodiments of the present application, there is provided a database live-live implementation verification method, including:
respectively deploying a first database cluster and a second database cluster;
creating a table of synchronization attributes in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication;
backing up data in the first database cluster or the second database cluster to a data file server;
and at the preset time every day, restoring the data backed up by the data file server to a backup data verification environment for verification.
Preferably, in an implementation manner of the present application, the method further includes:
configuring a multi-data center model at the first database cluster and the second database cluster.
Preferably, in an implementable manner of the present application, the backing up the data in the first database cluster or the second database cluster to a data file server includes:
backing up data in the first database cluster or the second database cluster to a data file server based on a full library full data backup, and/or a full library incremental data backup.
Preferably, in an implementable manner of the present application, the restoring the data backed up by the data file server to the backup data verification environment for verification includes:
and restoring the data backed up by the data file server to a backup data verification environment for verification based on full-library full-volume data restoration and/or full-library incremental data restoration.
Preferably, in an implementable manner of the present application, said making the first database cluster and the second database cluster possible to perform synchronized transactional replication includes:
when synchronous transaction replication is carried out, transaction updates are applied to all configured systems in parallel at the initial stage of transaction replication;
all configured systems remain persistent and visible in the second phase.
Preferably, in an implementation manner of the present application, the method further includes:
and if the state of the first database cluster or the second database cluster is changed to be unavailable, refusing the write-execution operation transaction submitted in the first database cluster or the second database cluster.
Preferably, in an implementation manner of the present application, the method further includes:
when the status of the first database cluster or the second database cluster is changed from unavailable to available, the executed write operation transaction submitted by the first database cluster or the second database cluster is recovered.
Preferably, in an implementation manner of the present application, the method further includes:
the database cluster that is made available is made to perform work independently of the database cluster that is made unavailable.
According to a second aspect of the embodiments of the present application, there is provided a database live-live implementation verification system, including:
a first database cluster, a second database cluster, a data file server, and a backup data verification environment;
the first database cluster and the second database cluster are provided with a table with synchronous attributes, so that the first database cluster and the second database cluster can perform synchronous transaction replication;
the data file server is used for backing up data in the first database cluster or the second database cluster; and the database system is further configured to restore data in the first database cluster or the second database cluster to a backup data verification environment for verification.
The technical scheme provided by the application can comprise the following beneficial effects: the database double-activity implementation verification method in the application comprises the following steps: the method comprises the steps of respectively deploying a first database cluster and a second database cluster, and creating a synchronous attribute table in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication to achieve double-activity. In the application, data in the first database cluster or the second database cluster is backed up to the data file server, and the data backed up by the data file server is restored to the backup data verification environment for verification at a preset time every day, so that whether data replication between the first database cluster and the second database cluster is completely synchronous or not, feasibility of double activity constructed between the first database cluster and the second database cluster is confirmed, and whether the data in the first database cluster or the second database cluster is completely backed up to the data file server or not is confirmed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a database double-live implementation verification method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a database double-live implementation verification system according to an embodiment of the present application.
Reference numerals: a first database cluster-21; a second database cluster-22; a data file server-23; backup data validation environment-24.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
A database double-live implementation verification method, referring to fig. 1, includes:
s11: respectively deploying a first database cluster and a second database cluster;
the distance between the first database cluster and the second database cluster is controlled between 50-100 KM.
The network between the first database cluster and the second database cluster must have double links and double channels, and the network delay is less than or equal to 1ms
S12: creating a table of synchronization attributes in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication;
in this embodiment, the first database cluster and the second database cluster achieve dual activities. The first database cluster and the second database cluster are two data centers in the same city, can bear the service of a user at the same time, can be used for continuous service without seamless switching under the condition that any one data center fails and is unavailable, and realize minute-level RTO and zero RPO.
Preferably, multiple data center modes are configured at the first database cluster and the second database cluster. The multiple data center mode functionality supports the synchronous replication of data across two data centers, ensuring data availability in the event of database instance outages or data center failures. And configuring a multi-data center mode, and creating a table of synchronous attributes in the two clusters.
Preferably, each database cluster is provided with 9 servers (3 management nodes and 6 data nodes), two database clusters are arranged in the same plan, and a trillion network is communicated among the clusters.
S13: backing up data in the first database cluster or the second database cluster to a data file server;
the data file server is a server arranged in a data backup center, the data backup center is a disaster backup center for establishing backup in a remote city, and is used for data backup of double centers (a first database cluster and a second database cluster).
In the data backup recovery strategy, data backup can be performed in the first database cluster or the second database cluster, and preferably, is performed in the second database cluster generally.
S14: and at the preset time every day, restoring the data backed up by the data file server to the backup data verification environment for verification.
Preferably, the preset time of day may be 18.30.
The database double-live implementation verification method in the embodiment includes: the method comprises the steps of respectively deploying a first database cluster and a second database cluster, and creating a synchronous attribute table in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication to achieve double-activity. In this embodiment, data in the first database cluster or the second database cluster is backed up to the data file server, and the data backed up by the data file server is restored to the backup data verification environment for verification at a preset time every day, so as to confirm whether data replication between the first database cluster and the second database cluster is completely synchronized, feasibility of double live constructed between the first database cluster and the second database cluster, and whether the data in the first database cluster or the second database cluster is completely backed up to the data file server.
In the subsequent implementation process, after the database double-live verification passes, the double-live verification environment can be deployed into the sandbox system. In order to ensure the aim of comparing the data check of the sandbox system with the current core report and continuously operating, other interference items are reduced as much as possible, and the sandbox and the database double-live verification environment are respectively and independently deployed.
The database double-live implementation verification method in some embodiments, which backs up data in a first database cluster or a second database cluster to a data file server, includes:
data in the first database cluster or the second database cluster is backed up to the data file server based on a full library full data backup, and/or a full library incremental data backup.
To ensure that the database can be restored in the event of a catastrophic failure, multiple data backup approaches are supported in this embodiment.
Full-library full-volume data backup refers to full-library backup of all data.
Full library incremental data backup refers to full library backup incremental changes.
In some embodiments, the database double-live implementation verification method for restoring the data backed up by the data file server to the backup data verification environment for verification includes:
and restoring the data backed up by the data file server to a backup data verification environment for verification based on full-library full data restoration and/or full-library incremental data restoration.
To ensure that the database can be restored in the event of a catastrophic failure, multiple data recovery approaches are supported in this embodiment.
Full-library full-volume data recovery refers to full-library recovery of all data.
Full bank incremental data recovery refers to full bank recovery incremental changes.
In some embodiments, the method for performing validation on database double-activity to enable a first database cluster and a second database cluster to perform synchronous transaction replication includes:
when synchronous transaction replication is carried out, transaction updates are applied to all configured systems in parallel at the initial stage of transaction replication;
all configured systems remain persistent and visible in the second phase.
In this embodiment, when performing the synchronized transaction replication, the transaction update is applied to all configured systems in parallel in the initial stage of the transaction replication, and remains persistent and visible to all configured systems in the second stage. The update of table a in the first database cluster is performed concurrently with the update of the corresponding remote table a' in the second database cluster at the instance the transaction is initiated, thereby minimizing the latency of the remote system. Completion of the input output is synchronized before the results are returned to the database client and before the second phase of the transaction is completed. This may ensure that all operations maintain the ACID attribute in all clusters. This approach allows the distributed database to maintain two or more clusters in a lockstep synchronized manner, thereby ensuring 100% data consistency and enhanced availability.
The database double-live implementation verification method in some embodiments further includes:
and if the state of the first database cluster or the second database cluster is changed to be unavailable, rejecting the write operation execution transaction submitted in the first database cluster or the second database cluster.
Further, the method also comprises the following steps:
and when the state of the first database cluster or the second database cluster is changed from unavailable to available, restoring the transaction submitted by the first database cluster or the second database cluster for executing the write operation.
Further, the method also comprises the following steps:
the database cluster that is made available is made to perform work independently of the database cluster that is made unavailable.
If a data center interruption occurs and the data center becomes unavailable due to the interruption or network failure, the corresponding database cluster state is also changed to unavailable, and the transaction performing the write operation is not allowed to be submitted on any cluster.
If the problem of interruption is solved and the state of the corresponding database cluster is changed from unavailable to available, the transaction can flow normally again, and the transaction for executing the write operation submitted by the database cluster is recovered.
At the same time, the administrator may also declare STRs through the management interface, allowing an individual participant to modify its database independently of another participant, thereby making database clusters that are available in status perform work independently of database clusters that are unavailable in status. In this case, the two clusters are separate and do not run in duplicate until the administrator re-enables the two clusters and resolves the temporary update. Preferably, in the case of finding a fault, the present embodiment may also automatically perform an operation of causing the database cluster whose status is available to perform work independently of the database cluster whose status is unavailable, so as to implement automatic switching.
A database live-action validation system, comprising:
a first database cluster 21, a second database cluster 22, a data file server 23, and a backup data verification environment 24;
wherein, a table with synchronization attribute is created in the first database cluster 21 and the second database cluster 22, so that the first database cluster 21 and the second database cluster 22 can perform synchronization transaction replication;
the data file server 23 is used for backing up data in the first database cluster 21 or the second database cluster 22; and also for restoring data in the first database cluster 21 or the second database cluster 22 to the backup data verification environment 24 for verification.
Referring to fig. 2, in this embodiment, data is backed up from the second database cluster 22 to the data file server 23.
The database double-live implementation verification system in this embodiment includes: a first database cluster 21, a second database cluster 22, a data file server 23, and a backup data verification environment 24. Wherein, a table with synchronization attribute is created in the first database cluster 21 and the second database cluster 22, so that the first database cluster 21 and the second database cluster 22 can perform synchronization transaction replication; the data file server 23 is used for backing up data in the first database cluster 21 or the second database cluster 22; and also for restoring data in the first database cluster 21 or the second database cluster 22 to the backup data verification environment 24 for verification. In this embodiment, a first database cluster 21 and a second database cluster 22 are deployed respectively, and a table of synchronization attributes is created in the first database cluster 21 and the second database cluster 22, so that the first database cluster 21 and the second database cluster 22 can perform synchronization transaction replication, thereby achieving double-live. In this embodiment, the data in the first database cluster 21 or the second database cluster 22 is backed up to the data file server 23, and the data backed up by the data file server 23 is restored to the backup data verification environment 24 for verification at a preset time every day, so as to confirm whether the data replication between the first database cluster 21 and the second database cluster 22 is completely synchronized, the feasibility of double live constructed between the first database cluster 21 and the second database cluster 22, and whether the data in the first database cluster 21 or the second database cluster 22 is completely backed up to the data file server 23.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (9)

1. A database double-live implementation verification method is characterized by comprising the following steps:
respectively deploying a first database cluster and a second database cluster;
creating a table of synchronization attributes in the first database cluster and the second database cluster, so that the first database cluster and the second database cluster can perform synchronous transaction replication;
backing up data in the first database cluster or the second database cluster to a data file server;
and at the preset time every day, restoring the data backed up by the data file server to a backup data verification environment for verification.
2. The method of claim 1, further comprising:
configuring a multi-data center model at the first database cluster and the second database cluster.
3. The method of claim 1, wherein backing up data in the first database cluster or the second database cluster to a data file server comprises:
backing up data in the first database cluster or the second database cluster to a data file server based on a full library full data backup, and/or a full library incremental data backup.
4. The method of claim 1, wherein the restoring the data backed up by the data file server to a backup data verification environment for verification comprises:
and restoring the data backed up by the data file server to a backup data verification environment for verification based on full-library full-volume data restoration and/or full-library incremental data restoration.
5. The method of claim 1, wherein said making the first database cluster and the second database cluster accessible for synchronized transactional replication comprises:
when synchronous transaction replication is carried out, transaction updates are applied to all configured systems in parallel at the initial stage of transaction replication;
all configured systems remain persistent and visible in the second phase.
6. The method of claim 1, further comprising:
and if the state of the first database cluster or the second database cluster is changed to be unavailable, refusing the write-execution operation transaction submitted in the first database cluster or the second database cluster.
7. The method of claim 6, further comprising:
when the status of the first database cluster or the second database cluster is changed from unavailable to available, the executed write operation transaction submitted by the first database cluster or the second database cluster is recovered.
8. The method of claim 6, further comprising:
the database cluster that is made available is made to perform work independently of the database cluster that is made unavailable.
9. A database live-action validation system, comprising:
a first database cluster, a second database cluster, a data file server, and a backup data verification environment;
the first database cluster and the second database cluster are provided with a table with synchronous attributes, so that the first database cluster and the second database cluster can perform synchronous transaction replication;
the data file server is used for backing up data in the first database cluster or the second database cluster; and the database system is further configured to restore data in the first database cluster or the second database cluster to a backup data verification environment for verification.
CN202110948102.6A 2021-08-18 2021-08-18 Database double-activity implementation verification method and system Pending CN113626528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110948102.6A CN113626528A (en) 2021-08-18 2021-08-18 Database double-activity implementation verification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110948102.6A CN113626528A (en) 2021-08-18 2021-08-18 Database double-activity implementation verification method and system

Publications (1)

Publication Number Publication Date
CN113626528A true CN113626528A (en) 2021-11-09

Family

ID=78386353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110948102.6A Pending CN113626528A (en) 2021-08-18 2021-08-18 Database double-activity implementation verification method and system

Country Status (1)

Country Link
CN (1) CN113626528A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466960A (en) * 2023-04-14 2023-07-21 北京星汉未来网络科技有限公司 Method, device, equipment and medium for multi-activity deployment of database

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466960A (en) * 2023-04-14 2023-07-21 北京星汉未来网络科技有限公司 Method, device, equipment and medium for multi-activity deployment of database

Similar Documents

Publication Publication Date Title
US20200257593A1 (en) Storage cluster configuration change method, storage cluster, and computer system
US6003075A (en) Enqueuing a configuration change in a network cluster and restore a prior configuration in a back up storage in reverse sequence ordered
RU2208834C2 (en) Method and system for recovery of database integrity in system of bitslice databases without resource sharing using shared virtual discs and automated data medium for them
US9785691B2 (en) Method and apparatus for sequencing transactions globally in a distributed database cluster
KR102441997B1 (en) Apparatus for controlling synchronization of metadata on network and method for the same
US9280428B2 (en) Method for designing a hyper-visor cluster that does not require a shared storage device
Stonebraker Errors in database systems, eventual consistency, and the cap theorem
US7085956B2 (en) System and method for concurrent logical device swapping
CN111427728B (en) State management method, main/standby switching method and electronic equipment
WO2017071563A1 (en) Data storage method and cluster management node
CN105930498A (en) Distributed database management method and system
CN105406980A (en) Multi-node backup method and multi-node backup device
CN105915391B (en) The distributed key assignments storage method of self-recovering function is submitted and had based on single phase
CN113688035B (en) Database dual-activity center verification method and system based on sandbox environment
CA3162740A1 (en) Traffic switching methods and devices based on multiple active data centers
CN114020835A (en) Synchronization method, system, equipment and medium for real-time database system configuration data
CN113626528A (en) Database double-activity implementation verification method and system
US20230004465A1 (en) Distributed database system and data disaster backup drilling method
CN113986450A (en) Virtual machine backup method and device
WO2018076696A1 (en) Data synchronization method and out-of-band management device
CN104794026A (en) Cluster instance and multi-data-source binding failover method
WO2023151443A1 (en) Synchronizing main database and standby database
KR101513943B1 (en) Method and system for operating management of real-time replicated database
CN113438111A (en) Method for restoring RabbitMQ network partition based on Raft distribution and application
JP2022503583A (en) Non-destructive upgrade methods, equipment and systems for distributed tuning engines in a distributed computing environment

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