CN111984465A - Database remote backup method, device, medium and electronic equipment - Google Patents

Database remote backup method, device, medium and electronic equipment Download PDF

Info

Publication number
CN111984465A
CN111984465A CN202010737322.XA CN202010737322A CN111984465A CN 111984465 A CN111984465 A CN 111984465A CN 202010737322 A CN202010737322 A CN 202010737322A CN 111984465 A CN111984465 A CN 111984465A
Authority
CN
China
Prior art keywords
backup
file
target
remote
local server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010737322.XA
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.)
Beijing Kingbase Information Technologies Co Ltd
Original Assignee
Beijing Kingbase Information Technologies Co Ltd
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 Beijing Kingbase Information Technologies Co Ltd filed Critical Beijing Kingbase Information Technologies Co Ltd
Priority to CN202010737322.XA priority Critical patent/CN111984465A/en
Publication of CN111984465A publication Critical patent/CN111984465A/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/1464Management of the backup or restore process for networked environments
    • 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/1448Management of the data involved in backup or backup restore
    • G06F11/1453Management of the data involved in backup or backup restore using de-duplication of the data
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to the field of database technologies, and in particular, to a method and an apparatus for remote backup of a database, a computer-readable storage medium, and an electronic device, wherein the method includes: responding to the starting backup instruction to establish a communication channel between the local server carrying the database; generating a backup command request based on a preset custom communication protocol, and sending the backup command request to the local server through the communication channel; and receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel to store backup. The embodiment of the disclosure can avoid special configuration of the local server and the remote backup server, realize relatively simple operation of file backup, occupy less computer resources, save resources and improve database backup efficiency.

Description

Database remote backup method, device, medium and electronic equipment
Technical Field
The disclosed embodiments relate to the technical field of databases, and in particular, to a database remote backup method, a database remote backup device, and a computer-readable storage medium and an electronic device for implementing the database remote backup method.
Background
With the rapid development of information technologies such as the internet, the database plays an important role as the core of the information system. Especially in some industries where data reliability is a high requirement, the loss can be very disastrous if unexpected shutdown or data loss occurs. It is therefore critical for the database to set up reasonable backup and disaster recovery policies.
The database system supports local backup, and generated backup file sets such as data files, control files or configuration files are persistently stored in a host where the database instances are located. However, if a database instance fails at the host level, both the running database and the native set of backup files are damaged and it is difficult to restore the database. In this case, an administrator is usually required to manually copy the backup file set periodically, the administrator time and effort are occupied, and human errors or accidents are easy to occur. In order to solve the above problems, some database remote backup technologies are proposed in the related art, which transmit backup files to a remote backup host for storage.
However, currently, when performing remote File backup, some special configurations, such as File Transfer Protocol (FTP), simple File Transfer Protocol (TFTP), Secure File Transfer Protocol (SFTP), are required to be performed on the local host and the remote backup host, and these special configurations are complicated to operate, and when performing backup operation after special configuration, many computer resources of the local host and/or the remote backup host are occupied, which affects remote backup efficiency of database files.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides a database remote backup method, a database remote backup apparatus, and a computer-readable storage medium and an electronic device implementing the database remote backup method.
In a first aspect, an embodiment of the present disclosure provides a remote backup method for a database, which is applied to a remote backup server, where the backup method includes:
responding to the starting backup instruction to establish a communication channel between the local server carrying the database;
generating a backup command request based on a preset custom communication protocol, and sending the backup command request to the local server through the communication channel;
and receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel to store backup.
In some embodiments of the present disclosure, the preset custom communication protocol is configured on the remote backup server and/or the local server; the preset custom communication protocol defines a plurality of preset protocol commands related to file backup, and the total number of the preset protocol commands is smaller than a preset threshold value.
In some embodiments of the present disclosure, the establishing a communication channel with a local server carrying a database in response to the start backup instruction includes:
and establishing a communication channel with the local server based on the connection-oriented socket.
In some embodiments of the present disclosure, further comprising:
compressing the transmitted target backup file, and storing the compressed target backup file; and/or the presence of a gas in the gas,
when a plurality of target backup files are determined to be backed up, determining whether the target backup files have repeated files;
and when determining that the target backup files have repeated files, removing the repeated target backup files.
In some embodiments of the present disclosure, before sending the backup command request to the local server through the communication channel, the method further includes:
configuring a network bandwidth threshold used when the remote backup server backs up; the network bandwidth threshold is associated with an operating state of the local server.
In some embodiments of the present disclosure, further comprising:
and generating a backup record file, and recording backup related information and writing the backup record file when the target backup file is backed up.
In some embodiments of the present disclosure, further comprising:
determining whether a target backup file which is not completely backed up is interrupted or not based on the backup recording file;
and determining that the target backup files which are not completely backed up exist, and restoring and backing up the target backup files which are not completely backed up based on the interruption point.
In some embodiments of the present disclosure, further comprising:
acquiring a first check code of a source file corresponding to the target backup file from the local server;
acquiring a second check code of the target backup file, and determining whether the target backup file is correct or not based on the first check code and the second check code;
and when the target backup file is determined to be incorrect, resending the backup command request to the local server for backup so as to re-backup the target backup file.
In some embodiments of the present disclosure, further comprising:
when a plurality of target backup files are determined, backing up the plurality of target backup files in parallel; or, the target backup file is encrypted and then stored.
In some embodiments of the present disclosure, the remote backup server supports file storage in a plurality of different formats; and/or the local server bears a plurality of databases, and the backup method further comprises the following steps:
respectively backing up target backup files in a plurality of databases on the local server; and the target backup files corresponding to the databases are stored in different positions.
In a second aspect, an embodiment of the present disclosure provides a remote backup apparatus for a database, which is applied to a remote backup server, and includes:
the communication establishing module is used for responding to the starting backup instruction to establish a communication channel between the communication establishing module and a local server bearing a database;
the request processing module is used for generating a backup command request based on a preset custom communication protocol and sending the backup command request to the local server through the communication channel;
and the file backup module is used for receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel so as to store backup.
In a third aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the remote database backup method according to any one of the above embodiments.
In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to execute the steps of the database remote backup method according to any of the above embodiments by executing the executable instructions.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
in the embodiment of the disclosure, a remote backup server responds to a backup starting instruction to establish a communication channel with a local server carrying a database, then generates a backup command request based on a preset custom communication protocol, sends the backup command request to the local server through the communication channel, and finally receives at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel to store backup. Therefore, in the scheme of the embodiment, the user-defined communication protocol is adopted to complete the interaction of the backup command and the transmission of the backup file between the local server and the host of the network remote backup server, special configurations such as FTP, TFTP, SFTP and the like are not needed, the operation of file backup is relatively simple, and meanwhile, the backup file and control information such as a backup command request are transmitted simultaneously through one communication channel, so that the total occupied computer resources are less, namely, the resources are saved, and the remote backup efficiency of the database is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flow chart of a remote database backup method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a database remote backup system architecture according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method for remote backup of a database according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a database remote backup system architecture according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a remote database backup device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device shown in an example embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Currently, when a file is remotely backed up, some special configurations, such as FTP, TFTP or SFTP, need to be performed on a local host and a remote backup host, and these special configurations are complex, for example, require configuration by a professional, and are complex for a common database administrator.
Fig. 1 is a flowchart of a remote database backup method according to an exemplary embodiment of the present disclosure, and fig. 2 is a schematic diagram of a remote database backup system according to an exemplary embodiment of the present disclosure. The database remote backup method may be applied to a remote backup server 100 as shown in fig. 2. Referring to fig. 1-2, the backup method may include the steps of:
step S102: and establishing a communication channel with a local server carrying the database in response to the starting backup instruction.
Illustratively, the remote backup server 100 may establish a communication channel with the local server 200 hosting the database in response to the start backup instruction. The start backup instruction may be generated according to a backup policy setting, for example, according to a backup time, such as starting backup at a certain time point of each day, when the remote backup server 100 automatically generates the start backup instruction. It is to be understood that the start backup instruction may also be generated when the administrator operates the remote backup server 100 to start backup, which is not limited in this embodiment.
Step S104: and generating a backup command request based on a preset custom communication protocol, and sending the backup command request to the local server through the communication channel.
Illustratively, in this embodiment, the remote backup server 100 accesses the local server 200, i.e., accesses the database, using a predefined custom communication protocol. In particular, the remote backup server 100 may generate a backup command request based on a preset custom communication protocol, and the backup command request may instruct the database on the local server 200 to return a corresponding target backup file, such as one or more of a data file, a control file, and a configuration file, but is not limited thereto.
Step S106: and receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel to store backup.
For example, when the local server 200 receives the backup command request, it obtains at least one corresponding target backup file in the database in response to the backup command request, and transmits the at least one target backup file to the remote backup server 100 for backup.
In the method of the embodiment, the user-defined communication protocol is adopted to complete the interaction of the backup command and the transmission of the backup file between the local server and the host of the network remote backup server, so as to realize the remote backup of the database, avoid the special configuration of FTP, TFTP, SFTP and the like on the database nodes, namely the local server and the remote backup server, realize the operation of file backup relatively simply, simultaneously transmit the backup file and the control information such as the request of the backup command through one communication channel, generally occupy less computer resources, namely save the resources, and further improve the remote backup efficiency of the database.
In some embodiments of the present disclosure, the preset customized communication protocol may be configured on the remote backup server 100 and/or the local server 200, that is, the preset customized communication protocol may be configured on the remote backup server 100 or the local server 200 separately, or may be configured on both the remote backup server 100 and the local server 200.
By way of example, the specific configuration process may include, but is not limited to, the following: after the remote backup server 100 configures the preset custom communication protocol, the preset custom communication protocol and the configuration instruction are sent to the local server 200, and the local server 200 configures the preset custom communication protocol on the local server 200 according to the instruction of the configuration instruction.
In this embodiment, the preset custom communication protocol may define a plurality of preset protocol commands related to the file backup, and the total number of the preset protocol commands is smaller than a preset threshold. For example, the preset threshold may be, but is not limited to, 10, where the total number of the preset protocol commands is less than 10. In this embodiment, according to the requirement of the backup crossing host, the preset custom communication protocol may define a proper amount of preset protocol commands related to file backup, such as a backup protocol command, a file read command, a file write command, a file synchronization command, and the like, and access the local server 200 carrying the database based on the preset custom communication protocol to complete backup command interaction and backup file transmission with the host of the network remote backup server 100, so as to implement remote backup of the database, and further reduce computer resource occupation of the local server 200 and/or the remote backup server 100 during file backup. Compared with file backup modes such as FTP, TFTP and SFTP, the method saves resources to a great extent, and further improves the remote backup efficiency of the database.
For example, the protocol command requests may all be in a string command line format, and may specifically be composed of protocol commands and protocol parameters. For example, the backup command request may consist of a backup protocol command and protocol parameters. The return format may be different according to different protocol command requests, for example, the file returned by the backup command request may be content in a binary data stream format, and other protocol commands may return content in a string format.
Optionally, in some embodiments of the present disclosure, in order to improve reliability of the backup operation, in step S102, establishing a communication channel between the local server carrying the database and the backup instruction in response to the backup start instruction may specifically include: and establishing a communication channel with the local server based on the connection-oriented socket. For example, the remote backup server 100 may establish a communication channel with the local server 200 based on a connection-oriented SOCKET (SOCKET _ STREAM). Specifically, as an example, the remote backup server 100 may redirect the standard input (stdio), the standard output (stdout), and the standard error output (stderr) of the communication process of the master node, i.e., the local server 200, to the remote backup server 100, for example, the remote backup server 100 may implement the redirection via the standard C interface dup2 function, thereby implementing the establishment of the communication channel. In this embodiment, the communication channel is established based on the connection-oriented socket, so that the established communication channel generally does not lose data during data transmission, and more reliable transmission of the backup file can be realized, thereby improving the reliability of the backup operation to a certain extent.
Optionally, in some embodiments of the present disclosure, the backup method may further include: and compressing the transmitted target backup file, and storing the compressed target backup file. That is, the compression in the network transmission process is supported in this embodiment, so that the transmission efficiency of the target backup file can be greatly improved.
Optionally, in some embodiments of the present disclosure, the backup method may further include: when a plurality of target backup files are determined to be backed up, determining whether the target backup files have repeated files; and when determining that the target backup files have repeated files, removing the repeated target backup files. For example, the target backup file a and the target backup file B backed up on the remote backup server 100 are duplicated, i.e., the contents of the two are the same, the target backup file a or the target backup file B may be removed to reserve one of the target backup files. This may reduce unnecessary usage of storage space of the remote backup server 100.
Optionally, in some embodiments of the present disclosure, before sending the backup command request to the local server through the communication channel in step S104, the backup method may further include the following steps: configuring a network bandwidth threshold used when the remote backup server 100 performs backup; the network bandwidth threshold is related to the operating state of the local server 200.
Specifically, in this embodiment, the configuration of the network bandwidth threshold during backup may be implemented, for example, when the working state of the local server 200 is busy, for example, if the database thereon is working normally and there are a large number of query requests, a first network bandwidth threshold that is relatively smaller may be set, and the network bandwidth that may be occupied at most during backup is the first network bandwidth threshold. When the local server 200 is in an idle state, for example, if the database on the local server is operating normally and there are a few query requests, a second network bandwidth threshold value that is relatively larger may be set, and the network bandwidth occupied during backup may be the second network bandwidth threshold value. The setting can reduce the influence on the normal work of the database on the local server 200 during backup as much as possible, and improve the reliability and stability of database backup.
Optionally, in some embodiments of the present disclosure, the backup method may further include the steps of: and generating a backup record file, and recording backup related information and writing the backup record file when the target backup file is backed up. Illustratively, for example, backup log information is recorded, information that the backup has been stopped is marked, and the like.
Further, optionally, in some embodiments of the present disclosure, the backup method may further include the following steps: determining whether a target backup file which is not completely backed up is interrupted or not based on the backup recording file; and determining that the target backup files which are not completely backed up exist, and restoring and backing up the target backup files which are not completely backed up based on the interruption point. For example, the recording information that the backup of the backup recording file recording target backup file C is not completed can be based on the recording information to restore the backup target backup file C from the breakpoint, so that the remote backup function of the database can be improved, the breakpoint restoration is supported, and the backup function of the database is enriched.
Optionally, in some embodiments of the present disclosure, in combination with the step shown in fig. 3, the backup method may further include the following steps:
step S201: and acquiring a first check code of a source file corresponding to the target backup file from the local server 200.
For example, when the remote backup server 100 receives the target backup file or after the backup is completed, the remote backup server 100 may send a source file check code obtaining request to the local server 200, where the source file check code obtaining request may instruct the local server 200 to return the first check code D1 of the source file D' corresponding to the target backup file D.
Step S202: and acquiring a second check code of the target backup file, and determining whether the target backup file is correct or not based on the first check code and the second check code.
For example, the remote backup server 100 may locally obtain the second Check code D2 of the corresponding target backup file D, and the first Check code D1 and the second Check code D2 may be Cyclic Redundancy Check (CRC) Check codes, but are not limited thereto. The remote backup server 100 may then determine whether the target backup file D is correct based on the first check code D1 and the second check code D2, that is, whether the target backup file D is consistent with the source file D', and the specific checking process may refer to the prior art, which is not described herein again.
Step S203: and when the target backup file is determined to be incorrect, resending the backup command request to the local server to backup the target backup file again.
For example, when it is determined that the target backup file D is not correct, the remote backup server 100 retransmits the backup command request to the local server 200 to newly backup the target backup file D. When the target backup file D is determined to be correct, no processing may be performed or check information may be recorded in the backup record file, but the method is not limited thereto. In the embodiment, the accuracy of each file can be checked, and the accuracy of the backup files is ensured.
Optionally, in order to improve the efficiency of remote backup of the database, in some embodiments of the present disclosure, the backup method may further include: and when a plurality of target backup files are determined, backing up the plurality of target backup files in parallel.
In this embodiment, concurrent execution is supported, and with files as execution granularity, the file may be allocated to different processes to perform network transmission and persistent storage write-in operations at the same time, for example, the remote backup server 100 is receiving the transmitted target backup file E and is writing the target backup file F and the target backup file G at the same time.
Optionally, in some embodiments of the present disclosure, the backup method may further include: and encrypting and storing the target backup file. For example, the remote backup server 100 receives the transmitted target backup file H, encrypts the target backup file H, and stores the encrypted target backup file H. In the embodiment, the encryption protection of the backup file set is supported, and the data security of the backup file set is enhanced.
Optionally, in some embodiments of the present disclosure, the remote backup server 100 may support file storage in a plurality of different formats. For example, the present embodiment may support, but is not limited to, a Common Internet File System (CIFS), a Portable Operating System Interface (POSIX), and an S3 Simple Storage Service (S3 Simple Storage Service) protocol when persistently storing the backup File set. In this way, the remote backup server 100 can support storage of target backup files in different formats, and the applicability of remote backup storage is extended.
Optionally, in some embodiments of the present disclosure, the local server 200 may carry a plurality of databases, such as, but not limited to, the two databases 1 and 2 schematically illustrated in fig. 4. Correspondingly, the backup method may further include: respectively backing up target backup files in a plurality of databases on the local server 200; and the target backup files corresponding to the databases are stored in different positions.
Specifically, as an example, in this embodiment, the target backup file I and the target backup file J in the database 1 and the database 2 on the local server 200 may be backed up respectively, and the backed-up target backup file I and the backed-up target backup file J may be stored in different storage locations, such as different disks, on the remote backup server 100, but the present invention is not limited thereto. In this way, the remote backup server 100 in this embodiment may perform centralized management on the target backup files of the multiple database instances.
It should be noted that although the various steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc. Additionally, it will also be readily appreciated that the steps may be performed synchronously or asynchronously, e.g., among multiple modules/processes/threads.
Based on the same concept, the embodiment of the disclosure provides a remote database backup device, which can be applied to a remote backup server. As shown in fig. 5, the database remote backup apparatus 500 may include a communication establishing module 501, a request processing module 502, and a file backup module 503; wherein:
the communication establishing module 501 is configured to respond to a backup starting instruction to establish a communication channel with a local server carrying a database;
the request processing module 502 is configured to generate a backup command request based on a preset custom communication protocol, and send the backup command request to the local server through the communication channel;
the file backup module 503 is configured to receive, through the communication channel, at least one target backup file transmitted back by the local server in response to the backup command request, so as to store a backup.
In the device of this embodiment, a user-defined communication protocol is used to complete backup command interaction and backup file transmission between the local server and the network remote backup server host, so as to implement remote backup of the database, thereby avoiding special configurations such as FTP, TFTP, SFTP and the like for the database nodes, i.e., the local server and the remote backup server, and achieving relatively simple operation of file backup.
In some embodiments of the present disclosure, the preset custom communication protocol may be configured on the remote backup server and/or the local server; the preset custom communication protocol defines a plurality of preset protocol commands related to file backup, and the total number of the preset protocol commands is smaller than a preset threshold value.
Optionally, in some embodiments of the present disclosure, the establishing communication module 501, in response to the starting backup instruction, establishes a communication channel with a local server carrying a database, and specifically includes: and establishing a communication channel with the local server based on the connection-oriented socket.
Optionally, in some embodiments of the present disclosure, a file compression module may be further included, configured to compress the transmitted target backup file, and store the compressed target backup file.
Optionally, in some embodiments of the present disclosure, a file deduplication module may further be included, configured to determine whether there is a duplicate file in a plurality of target backup files when it is determined that there are a plurality of target backup files to be backed up; and when determining that the target backup files have repeated files, removing the repeated target backup files.
Optionally, in some embodiments of the present disclosure, a bandwidth configuration module may be further included, configured to configure a network bandwidth threshold used when the remote backup server backs up before the request processing module 502 sends the backup command request to the local server through the communication channel; the network bandwidth threshold is associated with an operating state of the local server.
Optionally, in some embodiments of the present disclosure, a backup recording module may further be included, configured to generate a backup recording file, and record backup related information and write the backup recording file in the backup recording file when the target backup file is backed up.
Further, in some embodiments of the present disclosure, an interruption backup transmission module may be further included, configured to determine whether there is a target backup file that is not completely backed up due to interruption based on the backup recording file; and determining that the target backup files which are not completely backed up exist, and restoring and backing up the target backup files which are not completely backed up based on the interruption point.
Optionally, in some embodiments of the present disclosure, a file verification module may further be included, to: acquiring a first check code of a source file corresponding to the target backup file from the local server; acquiring a second check code of the target backup file, and determining whether the target backup file is correct or not based on the first check code and the second check code; and when the target backup file is determined to be incorrect, resending the backup command request to the local server for backup so as to re-backup the target backup file.
Optionally, in some embodiments of the present disclosure, the file backup module 503 is further configured to determine that there are multiple target backup files, and backup the multiple target backup files in parallel.
Optionally, in some embodiments of the present disclosure, a file encryption module may be further included, configured to encrypt the target backup file and store the encrypted target backup file.
Optionally, in some embodiments of the present disclosure, the remote backup server may support file storage in a plurality of different formats.
Optionally, in some embodiments of the present disclosure, the local server may carry a plurality of databases, and the file backup module 503 may also be configured to respectively backup target backup files in the plurality of databases on the local server; and the target backup files corresponding to the databases are stored in different positions.
The specific manner in which the above-mentioned embodiments of the apparatus, and the corresponding technical effects brought about by the operations performed by the respective modules, have been described in detail in the embodiments related to the method, and will not be described in detail herein.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units. The components shown as modules or units may or may not be physical units, i.e. may be located in one place or may also be distributed over a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the wood-disclosed scheme. One of ordinary skill in the art can understand and implement it without inventive effort.
The disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the database remote backup method according to any one of the above embodiments.
By way of example, and not limitation, such readable storage media can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Embodiments of the present disclosure also provide an electronic device, such as a remote backup server, including a processor and a memory for storing executable instructions of the processor. Wherein the processor is configured to perform the steps of the database remote backup method in any of the above embodiments via execution of the executable instructions.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the database remote backup method section above in this specification. For example, the processing unit 610 may perform the steps of the method as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above-mentioned database remote backup method according to the embodiments of the present disclosure.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A remote backup method of a database is applied to a remote backup server, and is characterized in that the backup method comprises the following steps:
responding to the starting backup instruction to establish a communication channel between the local server carrying the database;
generating a backup command request based on a preset custom communication protocol, and sending the backup command request to the local server through the communication channel;
and receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel to store backup.
2. The remote backup method for database according to claim 1, wherein the preset custom communication protocol is configured on the remote backup server and/or the local server; the preset custom communication protocol defines a plurality of preset protocol commands related to file backup, and the total number of the preset protocol commands is smaller than a preset threshold value.
3. The remote backup method of database according to claim 2, wherein said establishing a communication channel with a local server carrying the database in response to the start backup command comprises:
and establishing a communication channel with the local server based on the connection-oriented socket.
4. The remote backup method for the database according to any one of claims 1 to 3, further comprising:
compressing the transmitted target backup file, and storing the compressed target backup file; and/or the presence of a gas in the gas,
when a plurality of target backup files are determined to be backed up, determining whether the target backup files have repeated files;
and when determining that the target backup files have repeated files, removing the repeated target backup files.
5. The remote backup method for database according to any claim 1 to 3, wherein before sending the backup command request to the local server through the communication channel, further comprising:
configuring a network bandwidth threshold used when the remote backup server backs up; the network bandwidth threshold is associated with an operating state of the local server.
6. The remote backup method for the database according to any one of claims 1 to 3, further comprising:
and generating a backup record file, and recording backup related information and writing the backup record file when the target backup file is backed up.
7. The remote backup method for database as claimed in claim 6, further comprising:
determining whether a target backup file which is not completely backed up is interrupted or not based on the backup recording file;
and determining that the target backup files which are not completely backed up exist, and restoring and backing up the target backup files which are not completely backed up based on the interruption point.
8. The remote backup method for the database according to any one of claims 1 to 3, further comprising:
acquiring a first check code of a source file corresponding to the target backup file from the local server;
acquiring a second check code of the target backup file, and determining whether the target backup file is correct or not based on the first check code and the second check code;
and when the target backup file is determined to be incorrect, resending the backup command request to the local server for backup so as to re-backup the target backup file.
9. The remote backup method for the database according to any one of claims 1 to 3, further comprising:
when a plurality of target backup files are determined, backing up the plurality of target backup files in parallel; or, the target backup file is encrypted and then stored.
10. The remote backup method for the database according to any one of claims 1 to 3, wherein the remote backup server supports file storage of a plurality of different formats; and/or the local server bears a plurality of databases, and the backup method further comprises the following steps:
respectively backing up target backup files in a plurality of databases on the local server; and the target backup files corresponding to the databases are stored in different positions.
11. A remote backup device of database is applied to a remote backup server and is characterized in that,
the communication establishing module is used for responding to the starting backup instruction to establish a communication channel between the communication establishing module and a local server bearing a database;
the request processing module is used for generating a backup command request based on a preset custom communication protocol and sending the backup command request to the local server through the communication channel;
and the file backup module is used for receiving at least one target backup file transmitted back by the local server in response to the backup command request through the communication channel so as to store backup.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for remote backup of a database according to any one of claims 1 to 10.
13. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the database remote backup method of any of claims 1-10 via execution of the executable instructions.
CN202010737322.XA 2020-07-28 2020-07-28 Database remote backup method, device, medium and electronic equipment Pending CN111984465A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010737322.XA CN111984465A (en) 2020-07-28 2020-07-28 Database remote backup method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010737322.XA CN111984465A (en) 2020-07-28 2020-07-28 Database remote backup method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111984465A true CN111984465A (en) 2020-11-24

Family

ID=73444744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010737322.XA Pending CN111984465A (en) 2020-07-28 2020-07-28 Database remote backup method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111984465A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113485873A (en) * 2021-07-30 2021-10-08 北京鼎普科技股份有限公司 Backup method and system
CN113840003A (en) * 2021-09-24 2021-12-24 维沃移动通信有限公司 Synchronization method and device
CN115277679A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and system
WO2022253125A1 (en) * 2021-06-04 2022-12-08 中兴通讯股份有限公司 Data recovery method and device, and storage medium
CN115470043A (en) * 2022-09-14 2022-12-13 广州鼎甲计算机科技有限公司 Database backup method and device, computer equipment and storage medium
CN115640170A (en) * 2022-12-26 2023-01-24 交通运输部公路科学研究所 Big data synchronous backup and verification method
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102200936A (en) * 2011-05-11 2011-09-28 杨钧 Intelligent configuration storage backup method suitable for cloud storage
CN103229165A (en) * 2010-08-12 2013-07-31 安全第一公司 Systems and methods for secure remote storage
US20140195491A1 (en) * 2013-01-09 2014-07-10 Giga-Byte Technology Co., Ltd. Remote backup system and remote backup method thereof
CN108628706A (en) * 2018-05-02 2018-10-09 北京新桥信通科技股份有限公司 Method, apparatus, system and the storage medium of data backup
JP2020087147A (en) * 2018-11-29 2020-06-04 株式会社リコー Information processing apparatus, remote apparatus management system, communication method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103229165A (en) * 2010-08-12 2013-07-31 安全第一公司 Systems and methods for secure remote storage
CN102200936A (en) * 2011-05-11 2011-09-28 杨钧 Intelligent configuration storage backup method suitable for cloud storage
US20140195491A1 (en) * 2013-01-09 2014-07-10 Giga-Byte Technology Co., Ltd. Remote backup system and remote backup method thereof
CN108628706A (en) * 2018-05-02 2018-10-09 北京新桥信通科技股份有限公司 Method, apparatus, system and the storage medium of data backup
JP2020087147A (en) * 2018-11-29 2020-06-04 株式会社リコー Information processing apparatus, remote apparatus management system, communication method, and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
丁胜, 陈建勋: "数据备份***中自定义协议实现网络通信", 计算机时代, no. 03, pages 37 - 39 *
刘荣辉: "大数据架构技术与实例分析", 31 January 2018, 东北师范大学出版社, pages: 69 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022253125A1 (en) * 2021-06-04 2022-12-08 中兴通讯股份有限公司 Data recovery method and device, and storage medium
CN113485873A (en) * 2021-07-30 2021-10-08 北京鼎普科技股份有限公司 Backup method and system
CN113840003A (en) * 2021-09-24 2021-12-24 维沃移动通信有限公司 Synchronization method and device
CN115277679A (en) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 File synchronization method and system
CN115277679B (en) * 2022-07-29 2024-04-12 山石网科通信技术股份有限公司 File synchronization method and system
CN115470043A (en) * 2022-09-14 2022-12-13 广州鼎甲计算机科技有限公司 Database backup method and device, computer equipment and storage medium
CN115470043B (en) * 2022-09-14 2023-04-25 广州鼎甲计算机科技有限公司 Database backup method, device, computer equipment and storage medium
CN115640170A (en) * 2022-12-26 2023-01-24 交通运输部公路科学研究所 Big data synchronous backup and verification method
CN117033083A (en) * 2023-09-28 2023-11-10 武汉吧哒科技股份有限公司 Data backup method, system and storage medium
CN117033083B (en) * 2023-09-28 2024-01-19 武汉吧哒科技股份有限公司 Data backup method, system and storage medium

Similar Documents

Publication Publication Date Title
CN111984465A (en) Database remote backup method, device, medium and electronic equipment
US10481978B2 (en) Optimal slice encoding strategies within a dispersed storage unit
US8255653B2 (en) System and method for adding a storage device to a cluster as a shared resource
US10719407B1 (en) Backing up availability group databases configured on multi-node virtual servers
US11093387B1 (en) Garbage collection based on transmission object models
US8793456B2 (en) Automated migration to a new target volume via merged bitmaps to maintain consistency
JP2017509990A (en) Reduced data volume durability status for block-based storage
JP2017518565A (en) Reading multi-generation stored data in a distributed storage network
US20190317872A1 (en) Database cluster architecture based on dual port solid state disk
WO2019001521A1 (en) Data storage method, storage device, client and system
WO2015043155A1 (en) Method and device for network element backup and recovery based on command set
US9037821B1 (en) Systems and methods for replicating snapshots across backup domains
CN102479118A (en) Incremental backup method for data blocks
US10146471B1 (en) Offloaded data protection based on virtual machine snapshots
US10387262B1 (en) Federated restore of single instance databases and availability group database replicas
US8892830B2 (en) Changing ownership of cartridges
US11281532B1 (en) Synchronously storing data in a dispersed storage network
US20090185762A1 (en) Data structure for image file
US10091298B2 (en) Enhancing performance of data storage in a dispersed storage network
CN114661420A (en) Application protection method, device and system based on Kubernetes container platform
US10880388B1 (en) Automatic redirection in scale-out cluster environments that perform distributed deduplication
US11336750B1 (en) Remote procedure calls that offload search pattern matching from clients to servers
US11262934B2 (en) Deletion of stored data
CN116113931A (en) Freeing a data storage track while maintaining logical corruption protection
US20200333979A1 (en) Identifying and processing predefined dispersed storage network workflows

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