CN112732492A - Extraction backup method and system based on cloud database - Google Patents
Extraction backup method and system based on cloud database Download PDFInfo
- Publication number
- CN112732492A CN112732492A CN202110090550.7A CN202110090550A CN112732492A CN 112732492 A CN112732492 A CN 112732492A CN 202110090550 A CN202110090550 A CN 202110090550A CN 112732492 A CN112732492 A CN 112732492A
- Authority
- CN
- China
- Prior art keywords
- server
- cloud database
- standby
- main server
- main
- 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
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
-
- 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/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/80—Database-specific techniques
Abstract
The invention discloses an extraction backup method and system based on a cloud database. The master server and the slave server are subjected to state diagnosis through socket communication, and once a fault of the master server is found, a master server and slave server switching mechanism is started, so that the availability and the reliability of the cloud database management are improved.
Description
Technical Field
The invention relates to the field of information technology application, in particular to an extraction backup method and system based on a cloud database.
Background
With the continuous development of electronization, the operation of enterprises depends on information technology more and more. More and more critical data is stored in the server, and higher requirements are made on the availability and reliability of the server due to special requirements on confidentiality and security of cloud data. Particularly, service execution matched with the server is needed, and once the server fails, the whole cloud platform can be stagnated, so that the adoption of a backup mechanism is a performance improvement mode indispensable for the operation of the server in cloud management.
However, most of the active/standby server dual-computer hot backup systems have the characteristics of high manufacturing cost and complex equipment specialties, and need expensive shared disk arrays.
Disclosure of Invention
Aiming at the defects that most of main and standby servers have high manufacturing cost and complex professional equipment and need expensive shared disk arrays, the invention establishes a cloud application software-based dual-computer hot backup model, provides a cloud database-based extraction backup method and system, aims at a server for operating and storing cloud data and a cloud database-based implementation scheme of dual-computer hot backup, and mainly solves the problems that the dual-computer hot backup of the server is completed by adopting a socket mode for communication and the availability and reliability of the system are improved by using the cost as low as possible and convenient maintenance.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a cloud database based extraction backup method, the method comprising:
acquiring a configuration file loading socket library of cloud data, and judging the attribute of a current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
establishing a mirror image link between the main server and the standby server;
when the main server software modifies the cloud database and writes the transaction into a cloud database log, performing dual-computer hot backup on the cloud database, and sending and writing the log record into a mirror image cloud database;
and if the current server operates as a standby server, newly building and binding a socket, detecting the communication of the main server and the standby server, and switching the main server and the standby server according to the detection result.
Preferably, the loading a socket library by the configuration file of the acquired cloud data, and the determining the current server attribute by the parameter value of the configuration file includes: reading a configuration file of the cloud data through file operation, and judging whether reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
after the socket library is loaded successfully, judging the type of the server according to the read parameter value, and if the server is the main server, executing a login interface; and if the server is the standby server, popping up a standby server prompt message.
Preferably, the establishing of the mirror image link between the active and standby servers includes:
connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of a cloud database based on a mirroring technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirroring link between the main Server and the standby Server based on a certificate mode;
and creating a mirror cloud database from the complete backup of the main server cloud database, wherein the name of the mirror cloud database is the same as the name of the main server cloud database.
Preferably, the detecting communication between the active server and the standby server includes: sending a message to a server, detecting a message sending and receiving state, if the continuous sending failure times exceed a first preset threshold value, indicating that the server fails, prompting to send a failure message, and exiting the program;
and if the continuous sending failure times exceed a second preset threshold value, determining that the main server fails.
Preferably, the switching between the main server and the standby server according to the detection result includes: when the main server fails, acquiring administrator authority and a remote shutdown command through remote connection;
switching the mirror cloud database into a cloud database;
setting an IP of the standby machine and modifying a server type file.
A cloud database based extraction backup system, the system comprising:
the acquisition module is used for acquiring a configuration file loading socket library of the cloud data and judging the attribute of the current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
the construction module is used for establishing mirror image links between the main server and the standby server;
the backup module is used for performing double-machine hot backup on the cloud database when the main server software modifies the cloud database and writes the transaction into a cloud database log, and sending and writing the log record into a mirror image cloud database;
and the switching module is used for creating and binding a socket if the current server operates as the standby server, detecting the communication of the main server and the standby server, and switching the main server and the standby server according to the detection result.
Further, the obtaining module comprises: the first judgment unit is used for reading the configuration file of the cloud data through file operation and judging whether the reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
the second judging unit is used for judging the type of the server according to the read parameter value after the socket library is successfully loaded, and executing a login interface if the server is the main server; and if the server is the standby server, popping up a standby server prompt message.
Further, the building module comprises:
the system comprises a mirror image link establishing unit, a cloud database management unit and a cloud database management unit, wherein the mirror image link establishing unit is used for connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of the cloud database based on a mirror image technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirror image link between the main Server and the standby Server based on a certificate mode;
and the database construction unit is used for creating a mirror image cloud database from the complete backup of the main server cloud database, and the name of the mirror image cloud database is the same as that of the main server cloud database.
A cloud database-based extraction backup device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method as described above.
A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement a method as described above.
The invention has the beneficial effects that:
the invention provides an extraction backup method and system based on a cloud database, which mainly adopt a double-computer hot backup mode, achieve the safety and high efficiency in data management application, effectively avoid the leakage of cloud data, ensure the safe and effective operation of the cloud data, effectively remove invalid redundant data information when extracting and processing the cloud data, further improve the processing precision and the processing efficiency of the cloud data, and simultaneously realize the private processing of the cloud data by processing differential data through an encryption system, further powerfully improve the convenience and the privacy of enterprise users when managing cloud data information of various items, thereby effectively meeting the flexibility and the accuracy when the enterprise users extract the cloud data and further effectively making up the defects in the prior art.
In the invention, the hardware only adopts two servers and one router, thus greatly reducing the equipment cost caused by adopting an expensive shared disk array.
The problem of complex system maintenance in a hardware mode is solved by a software-based active/standby server switching method.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
Fig. 1 is a flowchart of a cloud database-based extraction and backup method according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a dual-computer hot backup implementation method according to embodiment 2 of the present invention;
fig. 3 is a schematic flowchart of detecting communication between active and standby servers according to embodiment 2 of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
It is to be noted that, unless otherwise specified, technical or scientific terms used herein shall have the ordinary meaning as understood by those skilled in the art to which the invention pertains.
The specific implementation mode of the invention provides an extraction backup method and system based on a cloud database, and compared with a comparison file, the method has the following technical difference points: the comparison file CN10274223B is for migrating the user request link message for user service. The invention aims to ensure the stability of the cloud platform and the security of the cloud database.
The adopted technical means is as follows: the main Server and the standby Server are connected through a router and an application communication network, wherein the hot backup of the database is realized through a mirror image technology, the main Server and the standby Server are respectively provided with Microsoft SQL servers, and the mirror image between the main Server and the standby Server is realized through a certificate-based form. A mirror cloud database is created from a full backup (. bak file) of the primary server database, the name of the mirror cloud database should be the same as the primary server database name. After the mirror image link is established, when the main server software modifies the main database and writes the transaction into the log of the main database, the system sends and writes the log record into the mirror image cloud database, and the dual-computer hot backup of the server database is realized. The master server and the slave server are subjected to state diagnosis through socket communication, once a fault of the master server is found, a master server and slave server switching mechanism is started, the slave server is used as the master server, the system is guaranteed to operate all the time, and the availability and the reliability of the servers are improved.
A commonly used SQL Server data backup scheme mainly includes database mirroring, log transfer, and database clustering.
Database mirroring is the movement of database transactions from one SQL Server database to another SQL Server database in a different SQL Server environment. The image cannot be accessed directly, it can only be accessed in case of error recovery. The minimum requirements for database mirroring include two different SQL Server execution environments. The primary server is called the "host" and the second server is called the "standby". The host database is the cloud database you are actually using, and the mirror cloud database is the backup copy of your database. When a cloud transaction is written to your home server, they are also transferred to and written to your mirror cloud database.
In addition to the basic and mirror images, another optional component may be introduced, named "witness". The witness Server is the third SQL Server running instance, which is used for internal communication between the base and mirror when determining when to perform error recovery. This option is used only when it is desired to implement automatic error recovery, which enables a 2 to 1 voting capability when my one component is unreachable and thus requires error recovery. The witness server is only needed when you want to implement automatic error recovery.
The SQL Server transaction log transmission backup is a high-reliability backup scheme only second to mirroring, and can achieve a minute-level disaster recovery capability. The mirror image is a high-performance backup scheme, but the limitation is that the auxiliary server of the mirror image, namely the mirror image server, is only one, when a plurality of target servers are considered, the mirror image cannot meet the requirements of people, the problem can be solved by log transmission at this time, and the log transmission can also be used in combination with the mirror image.
The SQL Server cluster is a high-availability cluster of a database, and can realize so-called dual-computer hot backup, namely when one Server stops down the database service, the SQL Server cluster can be automatically transferred to another Server but needs a disk array cabinet. A comparison of SQL Server data backup schemes is shown in table 1.
TABLE 1
Function(s) | Database mirroring | Log transfer | Cluster |
Whether data is lost | Optional no data loss | Part of the data may be lost | Without data loss |
Whether or not to automatically transfer the fault | Is that | Whether or not | Is that |
Down time | Second class | Minute scale | Second class |
Hardware requirements | Without special requirements | Without special requirements | Disk array |
Target server | |||
1 is provided with | A plurality of | A plurality of |
Example 1:
the cloud database-based extraction and backup method provided by embodiment 1 of the present invention, as shown in fig. 1, includes the following specific steps:
s1, loading a socket library by a configuration file of the cloud data, and judging the attribute of the current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
s2, establishing a mirror image link between the main server and the standby server;
s3, when the main server software modifies the cloud database and writes the transaction into the cloud database log, performing hot-standby on the cloud database, and sending and writing the log record into the mirror image cloud database;
s4, if the current server is operated as the standby server, creating and binding a socket, detecting the communication of the standby server, and switching the standby server according to the detection result.
In step S1, the configuration file of the cloud data is acquired and the socket library is loaded, and the determining of the current server attribute by the parameter value of the configuration file includes: reading a configuration file of the cloud data through file operation, and judging whether reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
after the socket library is loaded successfully, judging the type of the server according to the read parameter value, and if the server is the main server, executing a login interface; and if the server is the standby server, popping up a standby server prompt message.
The step S2 of establishing the mirror link between the active and standby servers includes:
connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of a cloud database based on a mirroring technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirroring link between the main Server and the standby Server based on a certificate mode;
and creating a mirror cloud database from the complete backup of the main server cloud database, wherein the name of the mirror cloud database is the same as the name of the main server cloud database.
The dual-server hot-standby in step S2 is an active/standby mode, and the server data includes database data written to two servers at the same time, or a shared storage device is used. When the active server fails, the standby machine is activated through software diagnosis and test, and the application is guaranteed to be completely recovered to normal use in a short time. The above process involves two aspects: database backup and master-slave server switching.
The dual-machine hot backup system structure of the main and standby servers comprises the servers and the standby servers.
The hardware required by the invention comprises two servers and a router, wherein the main server and the standby server are connected with an application communication network through the router; wherein, the IP address of the main server is 192.168.2.3, and the IP address of the standby server is 192.168.2.4.
The dual-computer hot backup of the database is realized by a mirror image technology, Microsoft SQL Server is respectively installed on the main Server and the standby Server, and the mirror image between the main Server and the standby Server is realized by a certificate-based form. A full backup of the master and slave server databases (. bak file) creates a mirror cloud database, the name of which should be the same as the master server database name. After the mirror image link is established, when the main server software modifies the main database and writes the transaction into the log of the main database, the system sends and writes the log record into the mirror image cloud database, and the dual-computer hot backup of the server database is realized. The master server and the slave server are subjected to state diagnosis through socket communication, once a fault of the master server is found, a master server and slave server switching mechanism is started, the slave server is used as the master server, the system is guaranteed to operate all the time, and the availability and the reliability of the servers are improved.
In step S3, the detecting communication between the active server and the standby server includes: sending a message to a server, detecting a message sending and receiving state, if the continuous sending failure times exceed a first preset threshold value, indicating that the server fails, prompting to send a failure message, and exiting the program;
and if the continuous sending failure times exceed a second preset threshold value, determining that the main server fails.
The step S4 of switching between the active server and the standby server according to the detection result includes: when the main server fails, acquiring administrator authority and a remote shutdown command through remote connection;
switching the mirror cloud database into a cloud database;
setting an IP of the standby machine and modifying a server type file.
In summary, the above embodiment 1 has the following beneficial effects:
1. the hardware only adopts two servers and one router, so that the high equipment cost caused by the adoption of the shared disk array is reduced. The method comprises the steps of detecting signals of the main server and the standby server based on software, carrying out state diagnosis through socket communication, starting a switching mechanism of the main server and the standby server once a fault of the main server is found, using the standby server as the main server, ensuring that a system is always operated, and improving the availability and the reliability of the server.
2. The method comprises the steps of performing socket state diagnosis on a main server and a standby server, firstly judging the type of the server according to a configuration file, and if the server is a main server, executing a login interface; and when the server is judged to operate as a standby server, newly building and binding a socket, and detecting the communication of the main server and the standby server. Sending a prompt message for indicating that the failure of the standby server is three times, and quitting the program; and (4) successfully sending, receiving the failure for five times as the failure of the main server, and switching the main server and the standby server.
3. When the main server fails, the main server is remotely closed through the standby server, the original standby server database mirror image is switched to the main database, the machine IP is modified to be the main server IP, and the type of the configuration file server is modified.
Example 2:
the detailed description is provided below with reference to fig. 2 and the implementation steps.
The method comprises the following steps: firstly, reading a configuration file by using GetINAMAMEVALUE (), then loading a socket library, determining whether the server is used as a main server or a standby server by judging the parameter value of the ServType through case, if the server is used as the main server, executing a login interface, and then jumping out for judgment; and if the server is the standby server, popping up a standby server prompt message, and then executing the step two. The specific treatment process is as follows:
1. and reading the configuration file through file operation, judging whether reading is successful, loading the socket library if the reading is successful, repeatedly reading if the reading is unsuccessful, and prompting reading failure information after N times, wherein N is set to be 3.
2. And after the socket library is loaded successfully, judging the type of the server according to the read parameter value, if the server is the main server, executing a login interface, and finishing the step. If the server is the standby server, the message AfxMessageBox _T (the standby server is running)) is popped up, and then step two is executed.
Step two: and when the server is judged to operate as a standby server, newly building and binding a socket, and detecting the communication of the main server and the standby server. The specific treatment process is as follows:
sending a message, judging that the sending is successful, if the three times of failures are faults of the standby server, prompting to send the fault message, and quitting the program; and (3) successfully sending, receiving the failure of the main server for five times, and switching the main server and the standby server:
step three: with reference to fig. 3, the specific processing procedure for switching between the active server and the standby server is as follows:
1. remote shutdown of the main server WinExec ("C: \ \ a.bat", SW _ HIDE);
bat includes establishing remote connection to obtain administrator authority and remote shutdown command
net use\\192.168.2.3 330/user:Administrator
shutdown-s-t 0-m\\192.168.2.3
2. Database mirroring switching to a subject database
sql — T ("ALTER DATABASE MFTDMA SET PARTNER FORCE _ SERVICE _ ALLOW _ DATA _ LOSS"); // switching time of approximately second
vSQL=sql;
m_AdoConn.ExecuteSQL(vSQL);
3. Setting up a standby IP
system ("mesh interface ipv4 set address name ═ 192.168.2.3mask ═ 255.255.255.0gateway ═ 192.168.2.1 gmetric ═ 1");
Sleep(15000);
4. modifying server type files
file.Open(TEXT("C:\\scpcconfig.ini"),CFile::modeReadWrite;
file.ReadString(newType);
pType=file.GetPosition();
file.Seek(pType,0);
file.WriteString(TEXT("ServType=1"));
Step four: and (4) jumping out for judgment after the main server and the standby server are successfully switched, and entering a program main interface.
Example 3:
based on the same inventive concept, embodiment 3 of the present invention further provides an extraction backup system based on a cloud database, where the system includes:
the acquisition module is used for acquiring a configuration file loading socket library of the cloud data and judging the attribute of the current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
the construction module is used for establishing mirror image links between the main server and the standby server;
the backup module is used for performing double-machine hot backup on the cloud database when the main server software modifies the cloud database and writes the transaction into a cloud database log, and sending and writing the log record into a mirror image cloud database;
and the switching module is used for creating and binding a socket if the current server operates as the standby server, detecting the communication of the main server and the standby server, and switching the main server and the standby server according to the detection result.
Wherein the acquisition module comprises: the first judgment unit is used for reading the configuration file of the cloud data through file operation and judging whether the reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
the second judging unit is used for judging the type of the server according to the read parameter value after the socket library is successfully loaded, and executing a login interface if the server is the main server; and if the server is the standby server, popping up a standby server prompt message.
The construction module comprises:
the system comprises a mirror image link establishing unit, a cloud database management unit and a cloud database management unit, wherein the mirror image link establishing unit is used for connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of the cloud database based on a mirror image technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirror image link between the main Server and the standby Server based on a certificate mode;
and the database construction unit is used for creating a mirror image cloud database from the complete backup of the main server cloud database, and the name of the mirror image cloud database is the same as that of the main server cloud database.
Example 4: the embodiment 4 of the invention respectively provides equipment and a computer readable storage medium corresponding to the cloud database-based extraction and backup method and system; the extraction backup device based on the cloud database comprises: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of embodiment 1.
A computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of embodiment 1.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
Claims (10)
1. An extraction backup method based on a cloud database is characterized by comprising the following steps:
acquiring a configuration file loading socket library of cloud data, and judging the attribute of a current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
establishing a mirror image link between the main server and the standby server;
when the main server software modifies the cloud database and writes the transaction into a cloud database log, performing dual-computer hot backup on the cloud database, and sending and writing the log record into a mirror image cloud database;
and if the current server operates as a standby server, newly building and binding a socket, detecting the communication of the main server and the standby server, and switching the main server and the standby server according to the detection result.
2. The method of claim 1, wherein the obtaining the configuration file of the cloud data loads a socket library, and the determining the current server attribute according to the parameter value of the configuration file comprises: reading a configuration file of the cloud data through file operation, and judging whether reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
after the socket library is loaded successfully, judging the type of the server according to the read parameter value, and if the server is the main server, executing a login interface; and if the server is the standby server, popping up a standby server prompt message.
3. The method of claim 1, wherein establishing the mirror link between the active and standby servers comprises:
connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of a cloud database based on a mirroring technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirroring link between the main Server and the standby Server based on a certificate mode;
and creating a mirror cloud database from the complete backup of the main server cloud database, wherein the name of the mirror cloud database is the same as the name of the main server cloud database.
4. The method of claim 1, wherein detecting active-standby server communication comprises: sending a message to a server, detecting a message sending and receiving state, if the continuous sending failure times exceed a first preset threshold value, indicating that the server fails, prompting to send a failure message, and exiting the program;
and if the continuous sending failure times exceed a second preset threshold value, determining that the main server fails.
5. The method according to claim 1, wherein the switching between the main server and the standby server according to the detection result comprises: when the main server fails, acquiring administrator authority and a remote shutdown command through remote connection;
switching the mirror cloud database into a cloud database;
setting an IP of the standby machine and modifying a server type file.
6. A cloud database based extraction backup system, the system comprising:
the acquisition module is used for acquiring a configuration file loading socket library of the cloud data and judging the attribute of the current server according to the parameter value of the configuration file, wherein the server attribute comprises a main server and a standby server;
the construction module is used for establishing mirror image links between the main server and the standby server;
the backup module is used for performing double-machine hot backup on the cloud database when the main server software modifies the cloud database and writes the transaction into a cloud database log, and sending and writing the log record into a mirror image cloud database;
and the switching module is used for creating and binding a socket if the current server operates as the standby server, detecting the communication of the main server and the standby server, and switching the main server and the standby server according to the detection result.
7. The system of claim 6, wherein the acquisition module comprises: the first judgment unit is used for reading the configuration file of the cloud data through file operation and judging whether the reading is successful; if so, loading a socket library, otherwise, repeatedly reading until the reading times reach a preset threshold value, and prompting a reading failure message;
the second judging unit is used for judging the type of the server according to the read parameter value after the socket library is successfully loaded, and executing a login interface if the server is the main server; and if the server is the standby server, popping up a standby server prompt message.
8. The system of claim 6, wherein the building module comprises:
the system comprises a mirror image link establishing unit, a cloud database management unit and a cloud database management unit, wherein the mirror image link establishing unit is used for connecting a main Server and a standby Server through a router and an application communication network, establishing a dual-Server hot backup of the cloud database based on a mirror image technology, respectively installing SQL servers on the main Server and the standby Server, and establishing a mirror image link between the main Server and the standby Server based on a certificate mode;
and the database construction unit is used for creating a mirror image cloud database from the complete backup of the main server cloud database, and the name of the mirror image cloud database is the same as that of the main server cloud database.
9. An extraction backup device based on a cloud database, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of claims 1-5.
10. A computer-readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110090550.7A CN112732492A (en) | 2021-01-22 | 2021-01-22 | Extraction backup method and system based on cloud database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110090550.7A CN112732492A (en) | 2021-01-22 | 2021-01-22 | Extraction backup method and system based on cloud database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112732492A true CN112732492A (en) | 2021-04-30 |
Family
ID=75595244
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110090550.7A Pending CN112732492A (en) | 2021-01-22 | 2021-01-22 | Extraction backup method and system based on cloud database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112732492A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114326511A (en) * | 2021-12-29 | 2022-04-12 | 珠海万力达电气自动化有限公司 | Industrial and mining enterprise electric power centralized control system dual-computer switching method based on monitor configuration tool |
US11902083B1 (en) | 2021-08-05 | 2024-02-13 | Cisco Technology, Inc. | Techniques to provide a flexible witness in a distributed system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080189341A1 (en) * | 2007-02-01 | 2008-08-07 | David Randall Blea | Apparatus, system, and method for initializing a synchronized remote database |
US20090172044A1 (en) * | 2007-12-28 | 2009-07-02 | Level 3 Communications, Llc | Virtual database administrator |
CN101706795A (en) * | 2009-11-30 | 2010-05-12 | 上海世范软件技术有限公司 | Method for synchronizing data of database in active/standby server |
US20110010339A1 (en) * | 2009-07-09 | 2011-01-13 | Wipfel Robert A | Techniques for cloud control and management |
CN106357787A (en) * | 2016-09-30 | 2017-01-25 | 郑州云海信息技术有限公司 | Storage disaster tolerant control system |
CN106933703A (en) * | 2015-12-30 | 2017-07-07 | 阿里巴巴集团控股有限公司 | A kind of method of database data backup, device and electronic equipment |
CN107911238A (en) * | 2017-11-13 | 2018-04-13 | 郑州云海信息技术有限公司 | One kind is based on IPSAN servers two unit standby method and system |
CN108170768A (en) * | 2017-12-25 | 2018-06-15 | 腾讯科技(深圳)有限公司 | database synchronization method, device and readable medium |
WO2020009934A1 (en) * | 2018-07-03 | 2020-01-09 | Pivotal Software, Inc. | Light-weight mirror container |
-
2021
- 2021-01-22 CN CN202110090550.7A patent/CN112732492A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080189341A1 (en) * | 2007-02-01 | 2008-08-07 | David Randall Blea | Apparatus, system, and method for initializing a synchronized remote database |
US20090172044A1 (en) * | 2007-12-28 | 2009-07-02 | Level 3 Communications, Llc | Virtual database administrator |
US20110010339A1 (en) * | 2009-07-09 | 2011-01-13 | Wipfel Robert A | Techniques for cloud control and management |
CN101706795A (en) * | 2009-11-30 | 2010-05-12 | 上海世范软件技术有限公司 | Method for synchronizing data of database in active/standby server |
CN106933703A (en) * | 2015-12-30 | 2017-07-07 | 阿里巴巴集团控股有限公司 | A kind of method of database data backup, device and electronic equipment |
CN106357787A (en) * | 2016-09-30 | 2017-01-25 | 郑州云海信息技术有限公司 | Storage disaster tolerant control system |
CN107911238A (en) * | 2017-11-13 | 2018-04-13 | 郑州云海信息技术有限公司 | One kind is based on IPSAN servers two unit standby method and system |
CN108170768A (en) * | 2017-12-25 | 2018-06-15 | 腾讯科技(深圳)有限公司 | database synchronization method, device and readable medium |
WO2020009934A1 (en) * | 2018-07-03 | 2020-01-09 | Pivotal Software, Inc. | Light-weight mirror container |
Non-Patent Citations (4)
Title |
---|
张思民等: "《C++语言程序设计 第2版》" * |
李文帅等: "基于SQL2005镜像下的双机热备份", 《信息技术》 * |
杨晓芬等: "实时数据库系统双机热备机制设计与实现", 《计算机工程与应用》 * |
肖航: "数据库服务器实时备份与故障自动切换系统的构建", 《东南传播》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11902083B1 (en) | 2021-08-05 | 2024-02-13 | Cisco Technology, Inc. | Techniques to provide a flexible witness in a distributed system |
CN114326511A (en) * | 2021-12-29 | 2022-04-12 | 珠海万力达电气自动化有限公司 | Industrial and mining enterprise electric power centralized control system dual-computer switching method based on monitor configuration tool |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106843749B (en) | Write request processing method, device and equipment | |
CN105224637A (en) | A kind of based on PostgreSQL database active and standby/the comprehensive method of cluster application | |
US11144405B2 (en) | Optimizing database migration in high availability and disaster recovery computing environments | |
KR20110044858A (en) | Maintain data indetermination in data servers across data centers | |
JP2005196683A (en) | Information processing system, information processor and control method of information processing system | |
CN110807064B (en) | Data recovery device in RAC distributed database cluster system | |
CN108984349B (en) | Method and device for electing master node, medium and computing equipment | |
JP2013520746A (en) | System and method for failing over non-cluster aware applications in a cluster system | |
CN112732492A (en) | Extraction backup method and system based on cloud database | |
CN104036043A (en) | High availability method of MYSQL and managing node | |
US20100017648A1 (en) | Complete dual system and system control method | |
CN107357800A (en) | A kind of database High Availabitity zero loses solution method | |
CN113254275A (en) | MySQL high-availability architecture method based on distributed block device | |
WO2020233001A1 (en) | Distributed storage system comprising dual-control architecture, data reading method and device, and storage medium | |
US7120821B1 (en) | Method to revive and reconstitute majority node set clusters | |
CN113064766A (en) | Data backup method, device, equipment and storage medium | |
WO2018076696A1 (en) | Data synchronization method and out-of-band management device | |
US10728326B2 (en) | Method and system for high availability topology for master-slave data systems with low write traffic | |
WO2023151443A1 (en) | Synchronizing main database and standby database | |
CN116389233A (en) | Container cloud management platform active-standby switching system, method and device and computer equipment | |
CN114546427A (en) | MySQL high-availability implementation method based on DNS and MGR | |
CN112702206A (en) | Main and standby cluster deployment method and system | |
CN115297129B (en) | Method and device for establishing data communication network | |
CN113467717B (en) | Dual-machine volume mirror image management method, device and equipment and readable storage medium | |
CN114915545B (en) | Application scheduling deployment management method based on DHCP network cluster |
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 |