[go: up one dir, main page]

CN114116302A - Database backup method and device and computing equipment - Google Patents

Database backup method and device and computing equipment Download PDF

Info

Publication number
CN114116302A
CN114116302A CN202111205709.1A CN202111205709A CN114116302A CN 114116302 A CN114116302 A CN 114116302A CN 202111205709 A CN202111205709 A CN 202111205709A CN 114116302 A CN114116302 A CN 114116302A
Authority
CN
China
Prior art keywords
backup
database
data tables
original
retention time
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
CN202111205709.1A
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.)
Tianjin May 8th Home Freight Service Co ltd
Original Assignee
Tianjin May 8th Home Freight Service 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 Tianjin May 8th Home Freight Service Co ltd filed Critical Tianjin May 8th Home Freight Service Co ltd
Priority to CN202111205709.1A priority Critical patent/CN114116302A/en
Publication of CN114116302A publication Critical patent/CN114116302A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

The embodiment of the application provides a database backup method, a database backup device and computing equipment. Wherein the backup database is created in response to a database backup instruction for the primary database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables. The technical scheme provided by the embodiment of the application can quickly transfer the data in the original database to the backup database.

Description

Database backup method and device and computing equipment
Technical Field
The embodiment of the application relates to the technical field of databases, in particular to a database backup method, a database backup device and computing equipment.
Background
At present, a business of a company corresponds to one or more relational database management system (MYSQL) databases, when the business is offline, the one or more MYSQL databases corresponding to the business need to release resources to provide resources for the MYSQL database corresponding to the business updated by the business, and at this time, the MYSQL database corresponding to the released resources needs to be backed up, so that a developer can restore and restore damaged data based on the backed-up MYSQL database, or test whether the updated business function is available, and the like.
Currently, a dump mode is generally adopted to backup the MYSQL database, but when the data volume of the MYSQL database is too large, the efficiency of the mode is slow, and even the risk of backup failure exists.
Disclosure of Invention
The embodiment of the application provides a database backup method, a database backup device and computing equipment, which are used for solving the problem of low database backup efficiency when a large amount of data is stored.
In a first aspect, an embodiment of the present application provides a database backup method, including:
creating a backup database in response to a database backup instruction for the original database;
creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database;
and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables.
In a second aspect, an embodiment of the present application provides a database backup apparatus, including:
a creation module for creating a backup database in response to a database backup instruction for an original database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database;
a changing module, configured to change a plurality of original storage locations corresponding to the plurality of original data tables to a plurality of backup storage locations corresponding to the plurality of backup data tables, so that data in the plurality of original data tables is transferred to the plurality of backup data tables.
The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component;
the storage component stores one or more computer instructions; the one or more computer instructions to be invoked for execution by the processing component;
the processing component is to:
creating a backup database in response to a database backup instruction for the original database;
creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database;
and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables.
In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, where the computer program is executed by a computer to implement the database backup method according to the first aspect.
In the embodiment of the application, a backup database is created in response to a database backup instruction for an original database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables. The original data tables are stored in the backup database, and the backup data tables are stored in the original data tables, so that the original data tables are stored in the backup database.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart illustrating one embodiment of a database backup method provided herein;
FIG. 2 is a flow chart illustrating another embodiment of a database backup method provided herein;
FIG. 3 is a schematic diagram illustrating an embodiment of a database backup device provided in the present application;
fig. 4 shows a schematic structural diagram corresponding to the database backup device provided in the present application.
Detailed Description
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.
In some of the flows described in the specification and claims of this application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the number of operations, e.g., 101, 102, etc., merely being used to distinguish between various operations, and the number itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
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 a part of the embodiments of the present application, and not all of the 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.
In connection with the above background art, currently, in the process of backing up the original database, a method of dumping (mysqldump) data is generally adopted, and since each table and data in each table in the original database are queried in the dumping process, when the data volume of the original database is large, a lot of time is required to query the data in the original database, that is, the time consumed in the dumping process is relatively large, and the following is performed: and querying data in the original database, returning the data to the backup database in batches, and writing the data into the backup database. Generally, the speed of writing data into the backup database is much slower than the speed of sending data after querying the original database, which may result in that the data sent from the original database may not be written into the backup database in time, the data of the original database may be accumulated in the memory and waiting for sending, the waiting is not infinite, and when the data in the original database is not written into the backup database for a certain time, the dump may fail.
In view of the above, the embodiment of the application provides a database backup method, a database backup device and a computing device. Wherein the backup database is created in response to a database backup instruction for the primary database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables. The original data tables are stored in the backup database, and the backup data tables are stored in the original data tables, so that the original data tables are stored in the backup database.
Fig. 1 is a flowchart illustrating an embodiment of a database backup method provided in the present application, where the technical solution of the present embodiment may be executed by a third-party application program of a client, where the program may create a database and receive instructions. As shown in fig. 1, the method includes:
101. a backup database is created in response to a database backup instruction for the original database.
102. A plurality of backup data tables are created in the backup database based on the target number of the plurality of original data tables in the original database.
Generally, a server runs programs for performing various services, a database is stored in a client to support the running of the programs, and when the programs are updated or off-shelf, the corresponding databases are also deleted. Such that the third party application backs up the database based on the database backup instructions.
The database backup instructions may include target data amounts of a plurality of original databases of the original database and original database names, among others.
Generally, for convenience of representation, the backup database may be named according to the original database name, for example, the original database name is dbname, the backup database may be dbname1, and so on.
Optionally, in order to completely backup the data in the original database, a target number of the plurality of original data tables in the original database may be obtained in the backup database instruction, so as to create a target number of backup data tables corresponding to the plurality of original data tables.
For the same reason, the backup data tables may be named according to the original data table names.
103. And changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables.
In some embodiments, multiple original storage locations in multiple original data tables may be represented by multiple first reference paths, for example, if an original storage location of a table-named table original data table is a database named damame in a C disk on a PC, then the storage location of the original data table may be represented as a first reference path C disk/damame/table.
Therefore, alternatively, changing the plurality of original storage locations corresponding to the plurality of original data tables to the plurality of backup storage locations corresponding to the plurality of backup data tables may be implemented as:
determining a plurality of first reference paths corresponding to a plurality of original storage positions and a plurality of second reference paths corresponding to a plurality of backup storage positions;
the plurality of first reference paths are modified to a plurality of second reference paths based on the renaming function.
Optionally, modifying the first reference path to the second reference path based on the renaming function may be implemented as: determining a plurality of metadata indicating a plurality of first reference paths based on the renaming function; the reference path fields of the plurality of metadata are modified from the plurality of first reference paths to the plurality of second reference paths.
The reference paths of the multiple original data tables are used to indicate the storage locations corresponding to the multiple original data tables, for example, a certain original data table named table1 is a data table named dbname database, and the reference path may be daname/table 1.
The renaming function can change the metadata in the original database, and the metadata can be used for indicating the storage positions of the original data tables, so that the storage positions indicated by the metadata in the original data tables can be changed to the positions of the backup data tables by the renaming function.
In an optional embodiment, the primary database datame includes two primary data tables, which are primary data table1 and primary data table2, respectively, and creates a backup data table dbname1 based on the database backup instruction, and creates two backup data tables in backup data table dbname 1: original data table1 ', original data table 2', and change the reference paths of multiple original data tables by using renaming function rename, optionally, the corresponding renaming function statement may be: rename dbname/table1 to rename dbname1/table 1'; rename dbname/table1 to rename dbname1/table 1' so that the reference paths of multiple original databases can be changed to the reference paths of multiple backup databases, i.e., the storage locations of multiple original databases are changed.
Because the data in the original database in the embodiment of the application is the database corresponding to the offline service, the data in the database does not need to be queried, but only the data in the original database needs to be completely backed up, so that the data needing to be backed up does not need to be queried, that is, the data in the plurality of original data tables in the original database can be completely backed up into the plurality of backup data tables corresponding to the backup database only by changing the storage positions indicated by the metadata in the original database, that is, changing the reference paths of the plurality of original data tables in the original database.
Further, since the embodiment of the present application changes the reference paths of the plurality of original data tables in the original database, there is no problem of data acquisition in the original database and data writing in the backup database, and therefore, there is no problem of backup failure due to the fact that the speed of data acquisition is greater than the speed of data writing.
In the embodiment of the application, a backup database is created in response to a database backup instruction for an original database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; and changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables so that the data of the original data tables are transferred to the backup data tables. The original data tables are stored in the backup database, and the backup data tables are stored in the original data tables, so that the original data tables are stored in the backup database.
Optionally, since the backup database is for a developer to restore and restore damaged data based on the backed-up MYSQL database, or to test whether updated service functions are available, etc., after a new service runs stably, the backup database and a plurality of backup data tables in the backup database are deleted, so as to release resources for use by a next backup database.
FIG. 2 is a flow chart illustrating one embodiment of a database backup method provided herein. As shown in fig. 2, the backup database instructions include: the method comprises the following steps of:
201. the first retention time is filled in the retention time field in the backup database, creating the backup database.
Alternatively, the first retention time may be the retention time of the backup database, and the third-party application deletes the backup database once the first retention time is exceeded.
Optionally, in the process of creating the backup database, the first retention time may be set in a field in the backup database for indicating the retention time, so that the backup database may be deleted according to the first retention time.
The first retention time may be flexibly set according to different services, which is not described herein.
202. And filling corresponding second time fields in the retention time fields respectively corresponding to the plurality of backup data tables, and creating a target number of backup data tables.
Correspondingly, the second retention time may be a retention time corresponding to each of the plurality of backup data tables, and once the time exceeds the second retention time, the third-party application may delete the plurality of backup data tables.
Since the retention times of the plurality of backup data tables may not be consistent, the second retention time may be a plurality of retention times, which correspond to the plurality of backup data tables, respectively.
203. And changing a plurality of original storage positions corresponding to the original data tables into a plurality of backup storage positions corresponding to the backup data tables.
204. And deleting the plurality of backup data tables according to the second retention time.
205. And deleting the backup database according to the first retention time.
Wherein the first retention time is after the second retention time.
Optionally, when the storage location of the backup database and the storage location of the original database are located in the same storage location on the same disk or the same hard disk, the efficiency of data backup may be improved.
Optionally, in response to the database backup instruction for the original database, creating the backup database comprises: responding to a database backup instruction aiming at the original database, and acquiring a target storage position of the original database in the database backup instruction; based on the target storage location, a backup database is created.
According to the embodiment of the invention, the backup database is established based on the first retention time corresponding to the backup database and the target storage position of the original database, the plurality of backup data tables are established based on the second retention time corresponding to the plurality of backup data tables, and the backup database and the plurality of backup data tables are respectively deleted according to the first retention time and the second retention time.
Fig. 3 is a schematic structural diagram illustrating an embodiment of a database backup device provided in the present application, where the device includes: a creation module 31 and a modification module 32.
A creating module 31 for creating a backup database in response to a database backup instruction for the original database; creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database;
a changing module 32, configured to change a plurality of original storage locations corresponding to the plurality of original data tables to a plurality of backup storage locations corresponding to the plurality of backup data tables, so that data in the plurality of original data tables is transferred to the plurality of backup data tables.
Optionally, the database backup instruction includes a first retention time corresponding to the backup database, and the creating module 31 is specifically configured to:
and filling the first retention time in a retention time field in the backup database to create the backup database.
Optionally, the database backup instruction further includes second retention times corresponding to the multiple backup data tables, and the creating module 31 is further specifically configured to:
and filling corresponding second time fields in the retention time fields respectively corresponding to the plurality of backup data tables, and creating the backup data tables with the target number.
The device also comprises a deleting module used for changing the reference paths of the original data tables into the reference paths of the backup data tables so that the data of the original data tables are transferred to the backup data tables;
deleting the plurality of backup data tables according to the second retention time;
and deleting the backup database according to the first retention time, wherein the first retention time is after the second retention time.
Optionally, the device module further comprises: creation module 31, in particular for
Responding to a database backup instruction aiming at an original database, and acquiring a target storage position of the original database in the database backup instruction; and creating a backup database based on the target storage position.
Optionally, the changing module 32 is specifically configured to determine a plurality of first reference paths corresponding to the plurality of original storage locations and a plurality of second reference paths corresponding to the plurality of backup storage locations; modifying the plurality of first reference paths to a plurality of second reference paths based on a renaming function.
Optionally, the modification module 32 is further specifically configured to determine, based on the renaming function, a plurality of metadata indicating the plurality of first reference paths; modifying the reference path fields of the plurality of metadata from the plurality of first reference paths to a plurality of second reference paths.
The database backup apparatus shown in fig. 3 may execute the database backup method shown in the embodiments shown in fig. 1-2, and the implementation principle and the technical effect thereof are not repeated. The specific manner in which each module and unit of the database backup apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be described in detail herein.
In one possible design, the database backup apparatus of the embodiment shown in fig. 3 may be implemented as a computing device, which may include a storage component 401 and a processing component 402 as shown in fig. 4;
the storage component 401 stores one or more computer instructions for the processing component 402 to invoke for execution.
The processing component 402 is configured to:
creating a backup database in response to a database backup instruction for the original database;
creating a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database;
changing the reference paths of the original data tables into the reference paths of the backup data tables so that the data of the original data tables are transferred to the backup data tables.
Among other things, the processing component 402 may include one or more processors to execute computer instructions to perform all or some of the steps of the methods described above. Of course, the processing elements may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component 401 is configured to store various types of data to support operations at the terminal. The memory components may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Of course, a computing device may also necessarily include other components, such as input/output interfaces, communication components, and so forth.
The input/output interface provides an interface between the processing component 402 and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device may be a cloud server, and the processing component, the storage component, and the like may be a basic server resource rented or purchased from the cloud computing platform.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the data backup method in the embodiment shown in fig. 1-2 may be implemented.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1.一种数据库备份方法,其特征在于,包括:1. a database backup method, is characterized in that, comprises: 响应于针对原始数据库的数据库备份指令,创建备份数据库;creating a backup database in response to a database backup instruction for the original database; 根据所述原始数据库中的多个原始数据表的目标数量,在所述备份数据库创建多个备份数据表;Create a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; 将所述多个原始数据表各自对应的多个原始存储位置更改为所述多个备份数据表各自对应的多个备份存储位置,以便所述多个原始数据表的数据转移到所述多个备份数据表。changing the multiple original storage locations corresponding to the multiple original data tables to multiple backup storage locations corresponding to the multiple backup data tables, so that the data of the multiple original data tables is transferred to the multiple original data tables Back up the data sheet. 2.根据权利要求1所述的方法,其特征在于,所述数据库备份指令中包括所述备份数据库对应的第一保留时间,所述响应于针对原始数据库的数据库备份指令,创建备份数据库包括:2. The method according to claim 1, wherein the database backup instruction includes a first retention time corresponding to the backup database, and the creation of the backup database in response to the database backup instruction for the original database comprises: 在备份数据库中保留时间字段填充所述第一保留时间,创建备份数据库。The first retention time is filled in the retention time field in the backup database, and the backup database is created. 3.根据权利要求2所述的方法,其特征在于,所述数据库备份指令中还包括多个备份数据表对应的第二保留时间,所述根据所述原始数据库中的多个原始数据表的目标数量,在所述备份数据库创建多个备份数据表包括:3. The method according to claim 2, wherein the database backup instruction further includes second retention times corresponding to a plurality of backup data tables, and the data according to the data of the plurality of original data tables in the original database The target number, creating multiple backup data tables in the backup database includes: 在所述多个备份数据表分别对应的保留时间字段填充对应的第二时间字段,创建所述目标数量个备份数据表。The corresponding second time fields are filled in the respective retention time fields corresponding to the plurality of backup data tables to create the target number of backup data tables. 4.根据权利要求3所述的方法,其特征在于,在将所述多个原始数据表的引用路径更改为所述多个备份数据表的引用路径,以便所述多个原始数据表的数据转移到所述多个备份数据表之后,还包括:4 . The method according to claim 3 , wherein the reference paths of the plurality of original data tables are changed to the reference paths of the plurality of backup data tables, so that the data of the plurality of original data tables can be changed. 5 . After transferring to the plurality of backup data tables, also include: 按照所述第二保留时间对所述多个备份数据表进行删除;delete the plurality of backup data tables according to the second retention time; 按照所述第一保留时间对所述备份数据库进行删除,所述第一保留时间在所述第二保留时间之后。The backup database is deleted according to the first retention time, and the first retention time is after the second retention time. 5.根据权利要求1所述的方法,其特征在于,所述响应于针对原始数据库的数据库备份指令,创建备份数据库包括:5. The method according to claim 1, wherein, in response to a database backup instruction for the original database, creating a backup database comprises: 响应于针对原始数据库的数据库备份指令,获取所述数据库备份指令中所述原始数据库的目标存储位置;In response to the database backup instruction for the original database, obtain the target storage location of the original database in the database backup instruction; 基于所述目标存储位置,创建备份数据库。Based on the target storage location, a backup database is created. 6.根据权利要求1所述的方法,其特征在于,所述将所述多个原始数据表各自对应的多个原始存储位置更改为所述多个备份数据表各自对应的多个备份存储位置包括:6 . The method according to claim 1 , wherein the multiple original storage locations corresponding to the multiple original data tables are changed to multiple backup storage locations corresponding to the multiple backup data tables. 7 . include: 确定多个原始存储位置对应的多个第一引用路径以及多个备份存储位置对应的多个第二引用路径;determining multiple first reference paths corresponding to multiple original storage locations and multiple second reference paths corresponding to multiple backup storage locations; 基于重命名函数,将所述多个第一引用路径修改为多个第二引用路径。Based on the rename function, the plurality of first reference paths are modified into a plurality of second reference paths. 7.根据权利要求6所述的方法,其特征在于,所述基于重命名函数,将所述第一引用路径修改为第二引用路径包括:7. The method according to claim 6, wherein the modifying the first reference path to the second reference path based on the renaming function comprises: 基于重命名函数,确定用于指示多个第一引用路径的多个元数据;based on the rename function, determining a plurality of metadata for indicating the plurality of first reference paths; 将所述多个元数据的引用路径字段由所述多个第一引用路径修改为多个第二引用路径。The reference path fields of the plurality of metadata are modified from the plurality of first reference paths to the plurality of second reference paths. 8.一种数据库备份装置,其特征在于,包括:8. A database backup device, comprising: 创建模块,用于响应于针对原始数据库的数据库备份指令,创建备份数据库;根据所述原始数据库中的多个原始数据表的目标数量,在所述备份数据库创建多个备份数据表;The creation module is configured to create a backup database in response to a database backup instruction for the original database; create multiple backup data tables in the backup database according to the target number of multiple original data tables in the original database; 更改模块,用于将所述多个原始数据表各自对应的多个原始存储位置更改为所述多个备份数据表各自对应的多个备份存储位置,以便所述多个原始数据表的数据转移到所述多个备份数据表。A change module, configured to change a plurality of original storage locations corresponding to the plurality of original data tables to a plurality of backup storage locations corresponding to each of the plurality of backup data tables, so as to facilitate the data transfer of the plurality of original data tables to the plurality of backup data tables. 9.一种计算设备,其特征在于,包括处理组件以及存储组件;9. A computing device, comprising a processing component and a storage component; 所述存储组件存储一条或多条计算机指令;所述一条或多条计算机指令用以被所述处理组件调用执行;The storage component stores one or more computer instructions; the one or more computer instructions are used to be invoked and executed by the processing component; 所述处理组件用于:The processing components are used to: 响应于针对原始数据库的数据库备份指令,创建备份数据库;creating a backup database in response to a database backup instruction for the original database; 根据所述原始数据库中的多个原始数据表的目标数量,在所述备份数据库创建多个备份数据表;Create a plurality of backup data tables in the backup database according to the target number of the plurality of original data tables in the original database; 将所述多个原始数据表各自对应的多个原始存储位置更改为所述多个备份数据表各自对应的多个备份存储位置,以便所述多个原始数据表的数据转移到所述多个备份数据表。changing the multiple original storage locations corresponding to the multiple original data tables to multiple backup storage locations corresponding to the multiple backup data tables, so that the data of the multiple original data tables is transferred to the multiple backup storage locations Back up the data sheet. 10.一种计算机存储介质,其特征在于,存储有计算机程序,所述计算程序被计算机执行时,实现如权利要求1~7任一项所述的数据库备份方法。10 . A computer storage medium, characterized in that a computer program is stored, and when the computer program is executed by a computer, the database backup method according to any one of claims 1 to 7 is implemented.
CN202111205709.1A 2021-10-15 2021-10-15 Database backup method and device and computing equipment Pending CN114116302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111205709.1A CN114116302A (en) 2021-10-15 2021-10-15 Database backup method and device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111205709.1A CN114116302A (en) 2021-10-15 2021-10-15 Database backup method and device and computing equipment

Publications (1)

Publication Number Publication Date
CN114116302A true CN114116302A (en) 2022-03-01

Family

ID=80376322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111205709.1A Pending CN114116302A (en) 2021-10-15 2021-10-15 Database backup method and device and computing equipment

Country Status (1)

Country Link
CN (1) CN114116302A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117165B1 (en) * 2008-04-30 2012-02-14 Netapp, Inc. Disk-to-disk backup of database archive logs
CN109408278A (en) * 2017-08-15 2019-03-01 李剑春 Data processing method and device
CN110209735A (en) * 2019-05-05 2019-09-06 深圳市腾讯计算机系统有限公司 Database backup method, calculates equipment and storage medium at DB Backup device
US20200073978A1 (en) * 2018-08-31 2020-03-05 International Business Machines Corporation Processing event messages for changed data objects to determine changed data objects to backup

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117165B1 (en) * 2008-04-30 2012-02-14 Netapp, Inc. Disk-to-disk backup of database archive logs
CN109408278A (en) * 2017-08-15 2019-03-01 李剑春 Data processing method and device
US20200073978A1 (en) * 2018-08-31 2020-03-05 International Business Machines Corporation Processing event messages for changed data objects to determine changed data objects to backup
CN110209735A (en) * 2019-05-05 2019-09-06 深圳市腾讯计算机系统有限公司 Database backup method, calculates equipment and storage medium at DB Backup device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李真等: "《Oracle数据库管理与开发》", vol. 1, 31 August 2019, 重庆大学出版社, pages: 107 - 108 *
李芳等著: "《操作系统教程与实例分析》", vol. 1, 31 January 2006, 西安地图出版社, pages: 223 *
魏磊等著: "《云数据管理实战指南》", vol. 1, 31 March 2021, 机械工业出版社, pages: 147 - 148 *

Similar Documents

Publication Publication Date Title
US11194566B1 (en) Decentralized, cluster-managed deployment of software updates in a multi-cluster environment
US10025528B2 (en) Managing transformations of snapshots in a storage system
US9208188B2 (en) Tenant management of a hosted multi-tenant application
US11960442B2 (en) Storing a point in time coherently for a distributed storage system
US8868860B2 (en) Restore in cascaded copy environment
US9372880B2 (en) Reclamation of empty pages in database tables
US10108685B2 (en) Remote provisioning of virtual databases
US20170116088A1 (en) Virtual machine data protection
US20140379656A1 (en) System and Method for Maintaining a Cluster Setup
US10146634B1 (en) Image restore from incremental backup
US20240168917A1 (en) Pushing a point in time to a backend object storage for a distributed storage system
US11093387B1 (en) Garbage collection based on transmission object models
US12007945B2 (en) Snapshot migration between cloud storage platforms
US9547655B1 (en) Filesystem independent snapshot driver
US20230222165A1 (en) Object storage-based indexing systems and method
US20210303413A1 (en) Tagging application resources for snapshot capability-aware discovery
US20240272990A1 (en) System and method for redundant backup of datasets
US20220164121A1 (en) Data storage volume record management for application-level recovery
US10860306B2 (en) Reducing downtime when applying a patch to multiple databases
CN113609152A (en) Data processing method and device and computing equipment
US12026056B2 (en) Snapshot capability-aware discovery of tagged application resources
US20240273226A1 (en) Api model for as-a-service data resilience management
EP3264254A1 (en) System and method for a simulation of a block storage system on an object storage system
US20200293411A1 (en) Direct access to backup copy
CN114116302A (en) Database backup method and device and computing equipment

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