CN115080309A - Data backup system, method, storage medium, and electronic device - Google Patents

Data backup system, method, storage medium, and electronic device Download PDF

Info

Publication number
CN115080309A
CN115080309A CN202210744986.8A CN202210744986A CN115080309A CN 115080309 A CN115080309 A CN 115080309A CN 202210744986 A CN202210744986 A CN 202210744986A CN 115080309 A CN115080309 A CN 115080309A
Authority
CN
China
Prior art keywords
backup
database
data
task
group
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
CN202210744986.8A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210744986.8A priority Critical patent/CN115080309A/en
Publication of CN115080309A publication Critical patent/CN115080309A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/1461Backup scheduling policy
    • 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/1456Hardware arrangements for backup
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Abstract

The application discloses a data backup system, a data backup method, a storage medium and electronic equipment, and relates to the field of financial science and technology. The system comprises: the standing book database is used for acquiring the information of the database group and generating a backup strategy corresponding to the database group; the backup management platform is used for acquiring a backup strategy, executing a backup task of the database group through the backup database under the condition that the backup mode is remote backup, and backing up data generated by the backup task to the distributed object storage system; and the distributed object storage system is used for receiving the data generated by the backup task. By the method and the device, the problems that backup data occupy large space of a built-in SSD and the backup data are difficult to manage in the related art are solved.

Description

Data backup system, method, storage medium, and electronic device
Technical Field
The application relates to the field of financial science and technology, in particular to a data backup system, a data backup method, a storage medium and electronic equipment.
Background
Currently, with the development of open source databases, MySQL databases are widely used in many enterprises. With the increase of the traffic volume, the data volume stored in the MySQL database and the number of the databases also need to be greatly increased, so that data in the databases generally need to be backed up, and the phenomenon of data loss caused by database abnormality is prevented.
In the currently used data backup method, data in a backup database is usually copied to a backup directory in a server where the backup database is located, and then the data is periodically backed up from the backup directory to a hard disk for storage. However, the management of data backup is distributed, and unified management and monitoring of backup operations cannot be performed. Meanwhile, the storage device used when the backup data is stored in the backup directory is a built-in SSD storage disk, but the disk space occupied by the backup directory is about 1.5 times of the space required by actual data storage, and the backup disk cannot be completely used in general data backup, so that the built-in SSD storage disk has more residual space and is not fully utilized. In addition, in order to ensure that sufficient space still needs to be reserved in the server corresponding to the newly-prepared database for backup after the database is switched to be highly available, storage space needs to be reserved in all the servers in the MySQL database group, waste of disk performance and storage resources is caused, and storage cost is increased. Meanwhile, distributed Mysql backup management cannot accurately control backup tasks and timely find out backup task failure conditions, and unified management and updating of backup scripts are difficult to complete. When the backup is recovered, the backup recovery is only carried out through manual operation, and the recovery operation is very complicated.
Aiming at the problems that backup data occupies a large space of a built-in SSD storage disk and the backup data is difficult to manage in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The application provides a data backup system, a data backup method, a storage medium and electronic equipment, which are used for solving the problems that backup data occupies a large space of a built-in SSD (solid State disk) and the backup data is difficult to manage in the related art.
According to one aspect of the present application, a data backup system is provided. The system comprises: the system comprises a standing book database, a database group and a backup strategy, wherein the standing book database is used for acquiring information of the database group and generating a backup strategy corresponding to the database group, the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; the backup management platform is used for acquiring a backup strategy, executing a backup task of the database group through the backup database under the condition that the backup mode is remote backup, and backing up data generated by the backup task to the distributed object storage system; and the distributed object storage system is used for receiving the data generated by the backup task.
Optionally, the data backup system further comprises: and the database management platform is used for monitoring the operation condition of the database group, determining the slave database as the master database under the condition that the master database in the database group has a fault, and sending a prompt message to the standing book database so as to prompt the standing book database to change the backup strategy corresponding to the database group.
Optionally, the data backup system further comprises: and the tape library is used for receiving the target data generated by the backup task, wherein the target data is data with the backup retention time length longer than the preset time length, and the backup retention time length is determined by a backup strategy.
Optionally, the data backup system further comprises: and the database building platform is used for creating a database group, sending the information of the database group to the standing book database, modifying the created database group, and sending modification information corresponding to the database group to the standing book database so as to prompt the standing book database to change a backup strategy corresponding to the database group.
According to one aspect of the present application, a data backup method is provided. The method comprises the following steps: the method comprises the steps that a backup strategy sent by a standing book database is obtained, wherein the backup strategy is used for indicating a backup database and a backup mode in a database group, and the backup database is a database for executing a backup task; judging whether the backup mode is remote backup or not; and under the condition that the backup mode is remote backup, executing the backup task of the database group through the backup database, and backing up the data generated by the backup task to the distributed object storage system.
Optionally, in a case that the backup mode is remote backup, after executing a backup task of the database group by using the backup database and backing up data generated by the backup task to the distributed object storage system, the method further includes: under the condition of receiving a backup recovery instruction, analyzing a recovery address in the backup recovery instruction; and acquiring the backed-up data indicated by the backup recovery instruction, and sending the backed-up data to the database indicated by the recovery address.
Optionally, the backup policy includes a backup retention time, the backup task of the database group is executed through the backup database, and the backup of the data generated by the backup task to the distributed object storage system includes: under the condition that the backup mode is remote backup, obtaining backup retention time and judging whether the backup retention time is greater than preset time; under the condition that the backup retention time is less than the preset time, backing up data generated by the backup task to the distributed object storage system; and under the condition that the backup retention time is longer than the preset time, backing up the data generated by the backup task to the distributed object storage system, and backing up the data generated by the backup task to the tape library.
Optionally, in the process of executing the backup task of the database group through the backup database, in the case of a failure in execution of the backup task, reminder information is generated, where the reminder information is used to indicate the failure in execution of the backup task.
According to another aspect of the present application, a data backup method is provided. The method comprises the following steps: the method comprises the steps of obtaining information of a database group and generating a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; and sending the backup strategy to a backup management platform so as to execute a backup task based on the backup strategy through the backup management platform and backup data generated by the backup task to the distributed object storage system, wherein the backup task is executed through a backup database.
Optionally, the obtaining information of the database group and generating the backup policy corresponding to the database group includes: acquiring creating information of the database group, and analyzing a database to be backed up and a backup database corresponding to the database to be backed up from the creating information; determining backup information, and generating a backup strategy according to the information of the backup database and the backup information, wherein the backup information at least comprises one of the following information: backup address, backup time.
Optionally, after obtaining information of the database group and generating a backup policy corresponding to the database group, the method further includes: when receiving a modification message aiming at a server in a database group, changing a backup strategy corresponding to the database group; and/or when a switching message aiming at a master database in the database group is received, changing the backup strategy corresponding to the database group, wherein the switching message is used for indicating that the slave database in the database group is switched to the master database.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium for storing a program, where the program controls a device in which the computer storage medium is located to execute a data backup method when the program runs.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions when executed perform a data backup method.
By this application, the following system is employed: the standing book database is used for acquiring information of the database group and generating a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; the backup management platform is used for acquiring a backup strategy, executing a backup task of the database group through the backup database under the condition that the backup mode is remote backup, and backing up data generated by the backup task to the distributed object storage system; and the distributed object storage system is used for receiving the data generated by the backup task. The problems that backup data occupies a large space of a built-in SSD and the backup data is difficult to manage in the related art are solved. The generation, the issuing and the management of the backup strategy are carried out through the standing book database and the backup management platform, and the backup data are remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a data backup system provided in accordance with an embodiment of the present application;
FIG. 2 is a flowchart illustrating operation of an alternative data backup system according to an embodiment of the present application;
FIG. 3 is a flowchart of a data backup method provided according to an embodiment of the present application;
FIG. 4 is a flow chart of another data backup method provided according to an embodiment of the present application;
fig. 5 is a schematic diagram of a data backup device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another data backup device provided in accordance with an embodiment of the present application;
fig. 7 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
It should be noted that the data backup system, the data backup method, the storage medium and the electronic device determined by the present disclosure may be used in the field of financial technology, and may also be used in any field other than the field of financial technology.
According to an embodiment of the present application, a data backup system is provided.
Fig. 1 is a schematic diagram of a data backup system provided according to an embodiment of the present application. As shown in fig. 1, the system includes:
the standing book database 101 is configured to obtain information of the database group, and generate a backup policy corresponding to the database group, where the backup policy is used to indicate a backup database and a backup manner in the database group, and the backup database is a database that executes a backup task.
Specifically, the information of the database group may be attribute information of the newly added database group, for example, a group name of the newly added database group, the number of databases in the group, settings of a master database and a slave database in the group, and the like, after receiving the information of the database group, the ledger database 101 stores the information of the database group into the ledger database 101, and sets a certain slave database in the database group as a backup database, and sets a backup manner of the backup database, for example, remote backup or local backup, and after selecting the backup manner, a backup policy corresponding to the database group may be generated according to the backup manner, the information of the backup database, and the like, and the backup policy may be sent to the backup management platform 102.
The backup management platform 102 is configured to acquire a backup policy, execute a backup task of the database group through the backup database when the backup mode is remote backup, and backup data generated by the backup task to the distributed object storage system 103.
Specifically, the backup management platform 102 may receive a backup policy sent by the ledger database 101, perform backup operation on a corresponding database according to a backup manner in the backup policy, push the backup policy and a corresponding backup script stored in the backup management platform 102 to a corresponding MYSQL database when the backup manner is remote backup, and send corresponding backup data in the backup database to the distributed object storage system 103 for backup storage after receiving the corresponding backup script by the MYSQL database.
For example, the backup policy corresponding to the database group a may be remote backup, and the backup database is set as the slave database C, at this time, after receiving the backup policy, the backup management platform 102 sends the backup script and the backup policy together to the MYSQL database, which may contain data information of a plurality of database groups, and after receiving the backup script and the backup policy, the MYSQL database sets the slave database C as the backup database through the backup script, and remotely backs up the data in the slave database C and sends the data to the distributed object storage system 103 for storage. It should be noted that the backup script feeds back the backup condition to the backup management platform 102 after the backup operation is completed in the backup database in the MYSQL database, and the backup management platform 102 may send an alarm message when receiving the feedback message that the backup is abnormal, so that the operation and maintenance personnel may perform maintenance in time.
It should be noted that, after the backup management platform 102 receives the multiple backup policies at the same time, the backup script corresponding to each backup management platform 102 may be selected from the multiple backup scripts, and the multiple backup policies are sorted according to the contents of the backup policies and executed in sequence, so as to ensure that each backup operation can be completed in a specified time.
And the distributed object storage system 103 is used for receiving data generated by the backup task.
Specifically, the distributed object storage system 103 may receive data sent by the backup database in each database group in the MYSQL database, and store the data in the corresponding database, thereby completing remote backup of the data.
The data backup system provided by the embodiment of the application is used for acquiring information of a database group and generating a backup strategy corresponding to the database group through the standing book database 101, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; the backup management platform 102 is configured to acquire a backup policy, execute a backup task of the database group through the backup database when the backup mode is a remote backup, and backup data generated by the backup task to the distributed object storage system 103; and the distributed object storage system 103 is used for receiving data generated by the backup task. The problems that backup data occupies a large space of a built-in SSD and the backup data is difficult to manage in the related art are solved. The generation, the issuing and the management of the backup strategy are carried out through the standing book database 101 and the backup management platform 102, and the backup data is remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Optionally, in the data backup system provided in the embodiment of the present application, the data backup system further includes: and the database management platform is used for monitoring the operation condition of the database group, determining the slave database as the master database under the condition that the master database in the database group has a fault, and sending a prompt message to the standing book database 101 so as to prompt the standing book database 101 to change the backup strategy corresponding to the database group.
Specifically, the database management platform can monitor the running state of the database groups in the MYSQL database in real time, change a certain slave database in the same group into a master database under the condition that a master database is abnormal in a certain database group, change the original master database into a slave database and perform exception handling, and accordingly guarantee normal running of the database. The embodiment achieves the effect of improving the usability of the database group.
It should be noted that, when a master database of a certain database group is abnormal, a backup database may be changed to the master database, and since the databases may not be set as the master database and the backup database at the same time, other slave databases in the database group need to be changed to the backup database, and change information is sent to the ledger database 101, the ledger database 101 changes the backup policy according to the change condition of the backup database, and sends the changed backup policy to the backup management platform 102, and the backup management platform 102 issues the backup script according to the changed backup policy, so that the backup databases are set in the other slave databases in the database group, and the backup databases are changed and managed in time.
Optionally, in the data backup system provided in the embodiment of the present application, the data backup system further includes: and the tape library is used for receiving the target data generated by the backup task, wherein the target data is data with the backup retention time length longer than the preset time length, and the backup retention time length is determined by a backup strategy.
Specifically, after the distributed object storage system 103 receives data sent by backup databases in each database group in the MYSQL database and stores the data in the corresponding databases, backup retention time information in a backup policy corresponding to each database needs to be acquired, the backup retention time information is compared with a preset time, and when the backup retention time is longer than the preset time, it indicates that the backup data needs to be stored for a long time, so that the backup data with the backup retention time longer than the preset time needs to be sent to a tape library for storage. According to the embodiment, the tape library is used for storing important data for a long time, so that the effect of improving the stability of remote data backup is achieved.
Optionally, in the data backup system provided in the embodiment of the present application, the data backup system further includes: and the database building platform is used for creating a database group, sending the information of the database group to the standing book database 101, modifying the created database group, and sending modification information corresponding to the database group to the standing book database 101 so as to prompt the standing book database 101 to change a backup strategy corresponding to the database group.
Specifically, the database group information may include attribute information of the database group, for example, a group name of the newly added database group, the number of databases in the group, settings of the master database and the slave database in the databases in the group, and the like. The database building platform can be used for building a newly-added database group in the MYSQL database, sending group information of the newly-added database group to the account book database 101 for recording, meanwhile, when one or more databases in the database group need to be changed, changing can also be conducted through the database building platform, changing contents are sent to the account book database 101, so that changing information is recorded in time, corresponding backup strategies are modified in time according to the newly-added or changing information, and the backup strategies are sent to the backup management platform 102, so that synchronous newly-added and changing operations of the backup databases are completed. The embodiment manages the newly added and updated database groups, and improves the management effect of the database groups.
Figure 2 is a flow chart illustrating operation of an alternative data backup system provided in accordance with an embodiment of the present application, as shown in fig. 2, the database building platform creates a target database group, and sends the data content of the target database group to MYSQL for storage, meanwhile, the information of the target database group is sent to a standing book database, the standing book database stores the information of the target database group, and generating a backup strategy according to the information of the target database group, sending the backup strategy to a backup management platform, selecting a corresponding backup script by the backup management platform according to the backup strategy, pushing the backup strategy and the backup script to a MYSQL database, sending the backup data to a distributed object storage system for storage through a backup database arranged in the backup strategy, and sending the data needing to be stored for a long time to a tape library for storage according to the storage time length.
The backup script sent by the backup management platform can also feed back the backup condition to the backup management platform after the backup database in the MYSQL database completes the backup operation, and the backup management platform can generate alarm information when receiving the feedback information that the backup is abnormal and can send an alarm, so that operation and maintenance personnel can maintain in time.
It should be noted that, when the master database of the target database group is abnormal, the backup database may be changed to the master database, and since the databases may not be set as the master database and the backup database at the same time, other slave databases in the database group need to be changed to the backup database, and the change information is sent to the ledger database, the ledger database changes the backup policy according to the change condition of the backup database, and sends the changed backup policy to the backup management platform, and the backup management platform issues the backup script according to the changed backup policy, so as to set the backup database in the other slave databases in the database group, thereby timely changing and managing the backup database.
According to an embodiment of the present application, a data backup method is provided. Fig. 3 is a flowchart of a data backup method according to an embodiment of the present application. As shown in fig. 3, the method comprises the steps of:
step S301, a backup strategy sent by the standing book database is obtained, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task.
Step S302, judging whether the backup mode is remote backup.
Step S303, if the backup mode is remote backup, executing a backup task of the database group through the backup database, and backing up data generated by the backup task to the distributed object storage system.
Specifically, the backup management platform may receive a backup policy sent by the ledger database, perform backup operation on the corresponding database according to a backup manner in the backup policy, push the backup policy and the corresponding backup script stored in the backup management platform to the corresponding MYSQL database when the backup manner is remote backup, and send the corresponding backup data in the backup database to the distributed object storage system for backup storage after the MYSQL database receives the corresponding backup script.
For example, the backup strategy corresponding to the database group a may be remote backup, the backup database is set as a slave database C, at this time, after receiving the backup strategy, the backup management platform sends a backup script and the backup strategy together to the MYSQL database, the MYSQL database may contain data information of a plurality of database groups, after receiving the backup script and the backup strategy, the MYSQL database sets the slave database C as the backup database through the backup script, and remotely backs up the data in the slave database C and sends the data to the distributed object storage system for storage. It should be noted that the backup script feeds back the backup condition to the backup management platform after the remote backup operation is completed in the MYSQL database, and the backup management platform can send out the warning information when receiving the feedback information that the backup is abnormal, so that the operation and maintenance personnel can maintain the operation and maintenance platform in time.
According to the data backup method provided by the embodiment of the application, a backup strategy sent by a standing book database is obtained, wherein the backup strategy is used for indicating a backup database and a backup mode in a database group, and the backup database is a database for executing a backup task; judging whether the backup mode is remote backup or not; under the condition that the backup mode is remote backup, the backup database executes the backup task of the database group, and backs up the data generated by the backup task to the distributed object storage system, thereby solving the problems that the backup data occupies large space of a built-in SSD storage disk and the backup data is difficult to manage in the prior art. The generation, the issuing and the management of the backup strategy are carried out through the standing book database and the backup management platform, and the backup data are remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Optionally, in the data backup method provided in this embodiment of the present application, when the backup mode is remote backup, the backup task of the database group is executed through the backup database, and data generated by the backup task is backed up to the distributed object storage system, and the method further includes: analyzing a recovery address in the backup recovery instruction under the condition of receiving the backup recovery instruction; and acquiring the backed-up data indicated by the backup recovery instruction, and sending the backed-up data to the database indicated by the recovery address.
Specifically, when the backup script and the backup strategy are sent to the MYSQL database, an identifier corresponding to a database group needs to be added to the backup script and the backup strategy, and when the MYSQL database sends the backup data to the distributed object storage system, the same identifier is added to the corresponding backup database in the distributed object storage system, where the identifier may be a timestamp or an identifier, and at this time, under an instruction for obtaining the backup data received by the distributed object storage system, the distributed object storage system may perform analysis of the identifier, and after obtaining the identifier information, send the backup data to the database group with the same identifier in the MYSQL database according to the identifier information, thereby completing the operation of restoring the backup data. The embodiment achieves the effect of conveniently and accurately recovering the backup data.
Optionally, in the data backup method provided in this embodiment of the present application, the backup policy includes a backup retention time, the executing the backup task of the database group by the backup database, and the backing up the data generated by the backup task to the distributed object storage system includes: under the condition that the backup mode is remote backup, obtaining backup retention time and judging whether the backup retention time is greater than preset time; under the condition that the backup retention time is less than the preset time, backing up data generated by the backup task to the distributed object storage system; and under the condition that the backup retention time is longer than the preset time, backing up the data generated by the backup task to the distributed object storage system, and backing up the data generated by the backup task to the tape library.
Specifically, after the distributed object storage system receives data sent by backup databases in each database group in the MYSQL database and stores the data in the corresponding databases, information of backup retention time in a backup strategy corresponding to each database needs to be acquired, the backup retention time information is compared with preset time, and when the backup retention time is longer than the preset time, it indicates that the backup data needs to be stored for a long time, so that the backup data with the backup retention time longer than the preset time needs to be sent to a tape library for storage. According to the embodiment, the tape library is used for storing important data for a long time, so that the effect of improving the stability of remote data backup is achieved.
Optionally, in the data backup method provided in the embodiment of the present application, in the process of executing the backup task of the database group through the backup database, in the case that the execution of the backup task fails, the reminder information is generated, where the reminder information is used to indicate that the execution of the backup task fails.
Specifically, the backup script sent by the backup management platform feeds back the backup condition to the backup management platform after the backup operation is completed in the backup database in the MYSQL database, and the backup management platform can generate alarm information when receiving the feedback information that the backup is abnormal, and can send an alarm, so that operation and maintenance personnel can maintain the backup in time. The embodiment feeds back the backup condition and gives an alarm on the abnormal backup condition, thereby improving the management efficiency of the backup data.
According to an embodiment of the present application, another data backup method is provided. Fig. 4 is a schematic diagram of another data backup device provided according to an embodiment of the present application. As shown in fig. 4, the method comprises the steps of:
step S401, acquiring information of the database group, and generating a backup policy corresponding to the database group, where the backup policy is used to indicate a backup database and a backup manner in the database group, and the backup database is a database for executing a backup task.
Specifically, the information of the database group may be attribute information of the newly added database group, for example, a group name of the newly added database group, the number of databases in the group, settings of a master database and slave databases in the group, and the like.
Step S402, sending the backup strategy to a backup management platform, executing a backup task based on the backup strategy through the backup management platform, and backing up data generated by the backup task to the distributed object storage system, wherein the backup task is executed through a backed-up database.
Specifically, after the ledger database generates the backup policy, the backup policy needs to be sent to the backup management platform. And the backup strategy and the corresponding backup script are issued to the MYSQL database through the backup management platform, the backup database is set in the MYSQL database according to the backup strategy, and the backup data is sent to the distributed object storage system through the backup database, so that remote backup of the data is completed.
According to the data backup method provided by the embodiment of the application, the information of the database group is obtained, and the backup strategy corresponding to the database group is generated, wherein the backup strategy is used for indicating the backup database and the backup mode in the database group, and the backup database is a database for executing a backup task; and sending the backup strategy to a backup management platform so as to execute a backup task based on the backup strategy through the backup management platform and backup data generated by the backup task to the distributed object storage system, wherein the backup task is executed through a backup database. The problems that backup data occupies a large space of a built-in SSD and the backup data is difficult to manage in the related art are solved. The generation, the issuing and the management of the backup strategy are carried out through the standing book database and the backup management platform, and the backup data are remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Optionally, in the data backup method provided in the embodiment of the present application, the obtaining information of the database group, and generating the backup policy corresponding to the database group includes: acquiring creating information of the database group, and analyzing a database to be backed up and a backup database corresponding to the database to be backed up from the creating information; determining backup information, and generating a backup strategy according to the information of the backup database and the backup information, wherein the backup information at least comprises one of the following information: backup address, backup time.
Specifically, the creation information of the database group may be attribute information of the newly added database group, for example, information such as a group name of the newly added database group, the number of databases in the group, settings of a master database and a slave database in the databases in the group, and the like. The standing book database can acquire database group information, set a backup database according to the database group information, determine preset backup time, backup addresses and other information after the backup database is set, generate a backup strategy according to the backup information and the backup database information, and send the backup strategy to a backup management platform for backup operation. The embodiment generates the backup strategy, and lays a foundation for quickly and accurately finishing the data backup in the follow-up process.
Optionally, in the data backup method provided in the embodiment of the present application, after obtaining information of the database group and generating a backup policy corresponding to the database group, the method further includes: when receiving a modification message aiming at a server in a database group, changing a backup strategy corresponding to the database group; and/or when a switching message aiming at a master database in the database group is received, changing the backup strategy corresponding to the database group, wherein the switching message is used for indicating that the slave database in the database group is switched to the master database.
Specifically, after the data backup is completed, a server change may occur, for example, a server change due to damage to a database corresponding to the database group, or a change from the database to the master database due to an abnormality in the master database. At this time, the ledger database can acquire the change information of the database, update the backup strategy according to the change information, send the backup strategy to the backup management platform, and issue the backup script according to the changed backup strategy, so that the backup database is set in the rest slave databases in the database group, and the change and management of the backup database are performed in time. The embodiment achieves the effect of improving the usability of the database group.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a data backup device, and it should be noted that the data backup device in the embodiment of the present application may be used to execute the method for data backup provided in the embodiment of the present application. The following describes a data backup device according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a data backup device according to an embodiment of the present application. As shown in fig. 5, the apparatus includes: a first acquisition unit 51, a judgment unit 52 and an execution unit 53.
Specifically, the first obtaining unit 51 is configured to obtain a backup policy sent by the ledger database, where the backup policy is used to indicate a backup database and a backup manner in the database group, and the backup database is a database for executing a backup task;
a judging unit 52, configured to judge whether the backup manner is remote backup;
and the execution unit 53 is configured to, in a case that the backup mode is remote backup, execute a backup task of the database group through the backup database, and backup data generated by the backup task to the distributed object storage system.
In the data backup device provided in the embodiment of the present application, a first obtaining unit 51 obtains a backup policy sent by a ledger database, where the backup policy is used to indicate a backup database and a backup manner in a database group, and the backup database is a database for executing a backup task; the judging unit 52 judges whether the backup mode is remote backup; when the backup mode is remote backup, the execution unit 53 executes the backup task of the database group through the backup database, and backs up the data generated by the backup task to the distributed object storage system. The problems that backup data occupies a large space of a built-in SSD and the backup data is difficult to manage in the related art are solved. The generation, the issuing and the management of the backup strategy are carried out through the standing book database and the backup management platform, and the backup data are remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Optionally, in the data backup apparatus provided in the embodiment of the present application, the apparatus further includes: the analysis unit is used for analyzing the recovery address in the backup recovery instruction under the condition of receiving the backup recovery instruction; and the second acquisition unit is used for acquiring the backed-up data indicated by the backup recovery instruction and sending the backed-up data to the database indicated by the recovery address.
Optionally, in the data backup apparatus provided in this embodiment of the present application, the backup policy includes a backup reserved time, and the executing unit 53 includes: the first acquisition module is used for acquiring backup reserved time and judging whether the backup reserved time is greater than preset time or not under the condition that the backup mode is remote backup; the first backup module is used for backing up data generated by the backup task to the distributed object storage system under the condition that the backup retention time is less than the preset time; and the second backup module is used for backing up the data generated by the backup task to the distributed object storage system and backing up the data generated by the backup task to the tape library under the condition that the backup retention time is longer than the preset time.
Optionally, in the data backup apparatus provided in this embodiment of the present application, in the process of executing a backup task of a database group through a backup database, in the case that the execution of the backup task fails, a reminder is generated, where the reminder is used to indicate that the execution of the backup task fails.
The data backup device comprises a processor and a memory, the first acquiring unit 51, the judging unit 52, the executing unit 53 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
Fig. 6 is a schematic diagram of another data backup device provided in an embodiment of the present application. As shown in fig. 6, the apparatus includes: a third acquisition unit 61 and a transmission unit 62.
A third obtaining unit 61, configured to obtain information of a database group, and generate a backup policy corresponding to the database group, where the backup policy is used to indicate a backup database and a backup manner in the database group, and the backup database is a database for executing a backup task;
and a sending unit 62, configured to send the backup policy to the backup management platform, so as to execute a backup task based on the backup policy through the backup management platform, and backup data generated by the backup task to the distributed object storage system, where the backup task is a backup task executed through a backed-up database.
The data backup device provided by the embodiment of the application acquires information of the database group through the third acquiring unit 61, and generates a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; the sending unit 62 sends the backup policy to the backup management platform, so as to execute a backup task based on the backup policy through the backup management platform, and backup data generated by the backup task to the distributed object storage system, where the backup task is a backup task executed through a backed-up database. The problems that backup data occupies a large space of a built-in SSD and the backup data is difficult to manage in the related art are solved. The generation, the issuing and the management of the backup strategy are carried out through the standing book database and the backup management platform, and the backup data are remotely backed up, so that the effects of conveniently and efficiently managing the backup data and saving the local storage space are achieved.
Optionally, in the data backup apparatus provided in the embodiment of the present application, the third obtaining unit 61 includes: the second acquisition module is used for acquiring the creation information of the database group and analyzing the database to be backed up and the backup database corresponding to the database to be backed up from the creation information; the generating module is used for determining backup information and generating a backup strategy according to the information of the backup database and the backup information, wherein the backup information at least comprises one of the following information: backup address, backup time.
Optionally, in the data backup apparatus provided in the embodiment of the present application, the apparatus further includes: the change module is used for changing the backup strategy corresponding to the database group when receiving the modification message aiming at the server in the database group; and/or when a switching message aiming at a master database in the database group is received, changing the backup strategy corresponding to the database group, wherein the switching message is used for indicating that the slave database in the database group is switched to the master database.
The data backup device comprises a processor and a memory, the third acquiring unit 61, the transmitting unit 62 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more kernels can be set, and the problems that backup data occupies a large space of a built-in SSD storage disk and the backup data is difficult to manage in the related art are solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium on which a program is stored, the program implementing the data backup method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the data backup method is executed when the program runs.
As shown in fig. 7, an embodiment of the present invention provides an electronic device, where the electronic device 70 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the following steps: the method comprises the steps that a backup strategy sent by a standing book database is obtained, wherein the backup strategy is used for indicating a backup database and a backup mode in a database group, and the backup database is a database for executing a backup task; judging whether the backup mode is remote backup or not; and under the condition that the backup mode is remote backup, executing the backup task of the database group through the backup database, and backing up the data generated by the backup task to the distributed object storage system. And/or acquiring information of the database group, and generating a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; and sending the backup strategy to a backup management platform so as to execute a backup task based on the backup strategy through the backup management platform and backup data generated by the backup task to the distributed object storage system, wherein the backup task is executed through a backup database. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: the method comprises the steps that a backup strategy sent by a standing book database is obtained, wherein the backup strategy is used for indicating a backup database and a backup mode in a database group, and the backup database is a database for executing a backup task; judging whether the backup mode is remote backup or not; and under the condition that the backup mode is remote backup, executing the backup task of the database group through the backup database, and backing up the data generated by the backup task to the distributed object storage system. And/or acquiring information of the database group and generating a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task; and sending the backup strategy to a backup management platform so as to execute a backup task based on the backup strategy through the backup management platform and backup data generated by the backup task to the distributed object storage system, wherein the backup task is executed through a backup database.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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). The memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the 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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A data backup system, comprising:
the system comprises a standing book database, a database group and a backup strategy, wherein the standing book database is used for acquiring information of the database group and generating the backup strategy corresponding to the database group, the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task;
the backup management platform is used for acquiring the backup strategy, executing the backup task of the database group through the backup database under the condition that the backup mode is remote backup, and backing up data generated by the backup task to the distributed object storage system;
and the distributed object storage system is used for receiving the data generated by the backup task.
2. The data backup system of claim 1, wherein the data backup system further comprises:
and the database management platform is used for monitoring the operation condition of the database group, determining a slave database as a master database under the condition that the master database in the database group has a fault, and sending a prompt message to the standing book database so as to prompt the standing book database to change the backup strategy corresponding to the database group.
3. The data backup system of claim 1, wherein the data backup system further comprises:
and the tape library is used for receiving target data generated by the backup task, wherein the target data is data with backup retention time longer than preset time, and the backup retention time is determined by the backup strategy.
4. The data backup system of claim 1, wherein the data backup system further comprises:
and the database building platform is used for creating the database group, sending the information of the database group to the standing book database, modifying the created database group, and sending modification information corresponding to the database group to the standing book database so as to prompt the standing book database to change the backup strategy corresponding to the database group.
5. A method for backing up data, comprising:
the method comprises the steps of obtaining a backup strategy sent by a standing book database, wherein the backup strategy is used for indicating a backup database and a backup mode in a database group, and the backup database is a database for executing a backup task;
judging whether the backup mode is remote backup or not;
and under the condition that the backup mode is remote backup, executing a backup task of the database group through the backup database, and backing up data generated by the backup task to a distributed object storage system.
6. The method according to claim 5, wherein when the backup mode is remote backup, after the backup task of the database cluster is executed by the backup database and data generated by the backup task is backed up to the distributed object storage system, the method further comprises:
under the condition of receiving a backup recovery instruction, analyzing a recovery address in the backup recovery instruction;
and obtaining the backed-up data indicated by the backup recovery instruction, and sending the backed-up data to the database indicated by the recovery address.
7. The method of claim 5, wherein the backup policy includes a backup retention time, the performing the backup task for the database cluster by the backup database, and the backing up the data generated by the backup task to the distributed object storage system comprises:
under the condition that the backup mode is remote backup, acquiring the backup retention time length, and judging whether the backup retention time length is greater than a preset time length;
under the condition that the backup retention time is smaller than the preset time, backing up the data generated by the backup task to the distributed object storage system;
and under the condition that the backup retention time is longer than the preset time, backing up the data generated by the backup task to the distributed object storage system, and backing up the data generated by the backup task to a tape library.
8. The method of claim 5, wherein during the execution of the backup task of the database cluster by the backup database, in case of a failure of the execution of the backup task, generating a reminder, wherein the reminder is used to indicate the failure of the execution of the backup task.
9. A method for data backup, comprising:
the method comprises the steps of obtaining information of a database group and generating a backup strategy corresponding to the database group, wherein the backup strategy is used for indicating a backup database and a backup mode in the database group, and the backup database is a database for executing a backup task;
and sending the backup strategy to a backup management platform, executing a backup task based on the backup strategy through the backup management platform, and backing up data generated by the backup task to a distributed object storage system, wherein the backup task is executed through a backed-up database.
10. The method of claim 9, wherein obtaining information for a database cluster and generating a backup policy corresponding to the database cluster comprises:
acquiring creating information of the database group, and analyzing a database to be backed up and the backup database corresponding to the database to be backed up from the creating information;
determining backup information, and generating the backup strategy according to the information of the backup database and the backup information, wherein the backup information at least comprises one of the following information: backup address, backup time.
11. The method of claim 9, wherein after obtaining information for a database cluster and generating a backup policy corresponding to the database cluster, the method further comprises:
when a modification message for a server in the database group is received, changing a backup strategy corresponding to the database group; and/or
When a switching message aiming at a master database in the database group is received, changing a backup strategy corresponding to the database group, wherein the switching message is used for indicating that a slave database in the database group is switched to the master database.
12. A computer storage medium for storing a program, wherein the program is operable to control an apparatus in which the computer storage medium is located to execute the data backup method according to any one of claims 5 to 8 or the data backup method according to any one of claims 9 to 11.
13. An electronic device comprising one or more processors and memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data backup method of any of claims 5 to 8, or the data backup method of any of claims 9 to 11.
CN202210744986.8A 2022-06-28 2022-06-28 Data backup system, method, storage medium, and electronic device Pending CN115080309A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210744986.8A CN115080309A (en) 2022-06-28 2022-06-28 Data backup system, method, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210744986.8A CN115080309A (en) 2022-06-28 2022-06-28 Data backup system, method, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
CN115080309A true CN115080309A (en) 2022-09-20

Family

ID=83255715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210744986.8A Pending CN115080309A (en) 2022-06-28 2022-06-28 Data backup system, method, storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN115080309A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226093A (en) * 2023-04-25 2023-06-06 北京庚顿数据科技有限公司 Real-time database system based on dual-activity high-availability architecture

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226093A (en) * 2023-04-25 2023-06-06 北京庚顿数据科技有限公司 Real-time database system based on dual-activity high-availability architecture
CN116226093B (en) * 2023-04-25 2023-08-08 北京庚顿数据科技有限公司 Real-time database system based on dual-activity high-availability architecture

Similar Documents

Publication Publication Date Title
CN102981931B (en) Backup method and device for virtual machine
US9436556B2 (en) Customizable storage system for virtual databases
US20160062851A1 (en) Preventing migration of a virtual machine from affecting disaster recovery of replica
CN105723679A (en) Client-configurable security options for data streams
CN105765575A (en) Data stream ingestion and persistence techniques
CN105706086A (en) Managed service for acquisition, storage and consumption of large-scale data streams
CN109582443A (en) Virtual machine standby system based on distributed storage technology
CN103164254A (en) Maintaining consistency of storage in a mirrored virtual environment
CN110825420A (en) Configuration parameter updating method, device, equipment and storage medium for distributed cluster
US10067836B1 (en) Configuration based intelligent protection modeling
CN107870802B (en) Virtual machine migration method and device
CN113312153A (en) Cluster deployment method and device, electronic equipment and storage medium
CN105354102B (en) A kind of method and apparatus of file system maintenance and reparation
CN110727547A (en) System and method for protecting Docker application container
CN114003439B (en) Data backup method, device, equipment and storage medium
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN114625535A (en) Service deployment method and device for multiple Kubernetes clusters
CN112579550B (en) Metadata information synchronization method and system of distributed file system
CN111090440A (en) Information processing method, system, device and storage medium
CN105550230A (en) Method and device for detecting failure of node of distributed storage system
CN110298031B (en) Dictionary service system and model version consistency distribution method
CN109104314B (en) Method and device for modifying log configuration file
CN116594734A (en) Container migration method and device, storage medium and electronic equipment
CN114996955A (en) Target range environment construction method and device for cloud-originated chaotic engineering experiment
CN115617459A (en) Method, device and equipment for resource scheduling

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