CN117170941A - Data backup method, device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN117170941A
CN117170941A CN202311447584.2A CN202311447584A CN117170941A CN 117170941 A CN117170941 A CN 117170941A CN 202311447584 A CN202311447584 A CN 202311447584A CN 117170941 A CN117170941 A CN 117170941A
Authority
CN
China
Prior art keywords
backup
data
task
resource type
storage pool
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.)
Granted
Application number
CN202311447584.2A
Other languages
Chinese (zh)
Other versions
CN117170941B (en
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311447584.2A priority Critical patent/CN117170941B/en
Publication of CN117170941A publication Critical patent/CN117170941A/en
Application granted granted Critical
Publication of CN117170941B publication Critical patent/CN117170941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a data backup method, a data backup device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a backup instruction, and acquiring a resource type and a backup parameter in the backup instruction to generate a corresponding backup task; responding to the triggering of the backup task, acquiring backup parameters and resource types, and inquiring a task template corresponding to the backup task to generate a backup instance according to the task template and the backup parameters; executing the backup instance, determining backup data based on the backup parameters, querying the adapter associated with the resource type to call the adapter, transmitting the backup data to the storage pool corresponding to the resource type, and executing the data backup program. The implementation mode can solve the problems that the current data center mainly adopts a plurality of database mixed deployment modes, and backup tools supported by different databases are large in difference, so that unified management is lacked, compatibility is poor, and the success rate of data backup is reduced.

Description

Data backup method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for data backup, an electronic device, and a storage medium.
Background
With the continuous development of business, the data volume of enterprises is continuously increased, the data becomes the core value of the enterprises, the data importance and the security requirements are higher and higher, and the data backup also becomes an important problem. The traditional data backup is generally composed of a backup server, a backup agent end and a storage server, wherein the backup agent is responsible for acquiring data from a target server, transmitting the data to a corresponding database for storage, and transmitting the data to the backup database for backup archiving. However, the current data center mainly adopts a mixed deployment mode of multiple databases, and backup tools supported by different databases have large differences, so that unified management is lacked, compatibility is poor, and the success rate of data backup is reduced.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for data backup, which can solve the problem that the current data center mainly adopts a hybrid deployment mode of multiple databases, and backup tools supported by different databases have large differences, resulting in lack of unified management and poor compatibility, thereby resulting in a reduction in success rate of data backup.
To achieve the above object, according to one aspect of the embodiments of the present application, there is provided a method for data backup.
The data backup method of the embodiment of the application comprises the following steps: receiving a backup instruction, and acquiring a resource type and a backup parameter in the backup instruction to generate a corresponding backup task;
responding to the triggering of a backup task, acquiring the backup parameter and the resource type, and inquiring a task template corresponding to the backup task to generate a backup instance according to the task template and the backup parameter;
and executing the backup instance, determining backup data based on the backup parameters, querying the adapter associated with the resource type to call the adapter, transmitting the backup data to a storage pool corresponding to the resource type, and executing a data backup program.
In one embodiment, invoking the adapter to transfer the backup data to a storage pool corresponding to the resource type includes:
obtaining backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type;
inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information associated with the resource type, wherein the backup operation information comprises a second interface;
and running the backup operation information to transmit the backup data to a storage pool corresponding to the resource type through the second interface.
In yet another embodiment, transmitting the backup data to the storage pool corresponding to the resource type through the second interface includes:
inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data;
and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through the second interface based on the transmission threshold value.
In yet another embodiment, generating a backup instance from the task template and the backup parameters includes:
and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
In yet another embodiment, after transmitting the backup data to the storage pool corresponding to the resource type, the method further includes:
and receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information, and sending the backup feedback information.
In yet another embodiment, after transmitting the backup data to the storage pool corresponding to the resource type, the method includes:
and generating a backup data set corresponding to the storage pool based on the backup data, and establishing an association relation between the backup data set and the resource type.
In yet another embodiment, the generating the corresponding backup task includes:
and acquiring a backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
To achieve the above object, according to another aspect of an embodiment of the present application, there is provided an apparatus for data backup.
The device for data backup in the embodiment of the application comprises: the generating unit is used for receiving a backup instruction, and acquiring the resource type and the backup parameter in the backup instruction so as to generate a corresponding backup task;
the generating unit is further configured to, in response to the backup task being triggered, obtain the backup parameter and the resource type, query a task template corresponding to the backup task, and generate a backup instance according to the task template and the backup parameter;
and the backup unit is used for executing the backup instance, determining data to be backed up based on the backup parameter, inquiring the adapter associated with the resource type to call the adapter, transmitting the backup data to a storage pool corresponding to the resource type, and executing a data backup program.
In one embodiment, the backup unit is specifically configured to:
calling the adapter, and acquiring backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type;
inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information associated with the resource type, wherein the backup operation information comprises a second interface;
and running the backup operation information to transmit the backup data to a storage pool corresponding to the resource type through the second interface.
In a further embodiment, the backup unit is specifically configured to:
inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data;
and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through the second interface based on the transmission threshold value.
In a further embodiment, the generating unit is specifically configured to:
and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
In yet another embodiment, the apparatus further comprises:
and the return unit is used for receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information and sending the backup feedback information.
In a further embodiment, the generating unit is further configured to:
and generating a backup data set corresponding to the storage pool based on the backup data, and establishing an association relation between the backup data set and the resource type.
In a further embodiment, the generating unit is specifically configured to:
and acquiring a backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present application includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the data backup method provided by the embodiment of the application.
To achieve the above object, according to still another aspect of an embodiment of the present application, a computer-readable medium is provided.
A computer readable medium of an embodiment of the present application stores a computer program thereon, which when executed by a processor implements a method for data backup provided by the embodiment of the present application.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided a computer program product.
The computer program product of the embodiment of the application comprises a computer program, and the program is executed by a processor to realize the method for backing up data provided by the embodiment of the application.
One embodiment of the above application has the following advantages or benefits: in the embodiment of the application, after receiving the data backup instruction, the resource type and the backup parameter can be acquired to generate the corresponding backup task, and the backup parameter represents the parameter required by executing the data backup, so that the corresponding backup task can be generated for different types of databases; after the backup task is triggered, a task template corresponding to the backup task can be queried, then a backup instance is generated by combining the backup parameter, the backup instance is executed at the same time, backup data can be determined based on the backup parameter, an adapter associated with a resource type is queried, so that the adapter is called, the backup data is transmitted to a storage pool corresponding to the resource type, and a data backup program is executed. In the embodiment of the application, the resource type can be determined when the backup instruction is received, the resource type represents the resource type for storing the backup data, so that the backup task corresponding to each database of different types can be generated, and then the adapter associated with the resource type can be queried when the backup example is executed, so that the backup data can be transmitted to the storage pool corresponding to the resource type through the adapter.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the application and are not to be construed as unduly limiting the application. Wherein:
FIG. 1 is a schematic diagram of a system architecture of a data backup system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of one main flow of a method of data backup according to an embodiment of the present application;
FIG. 3 is a schematic diagram of yet another main flow of a method of data backup according to an embodiment of the present application;
FIG. 4 is a schematic diagram of yet another main flow of a method of data backup according to an embodiment of the present application;
FIG. 5 is a schematic diagram of the main units of an apparatus for data backup according to an embodiment of the present application;
FIG. 6 is a diagram of yet another exemplary system architecture in which embodiments of the present application may be applied;
FIG. 7 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the application and features of the embodiments may be combined with each other without conflict. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The embodiment of the application provides a data backup system which can be used for a scene of data backup processing, in particular for a scene of data backup processing of heterogeneous databases.
Specifically, fig. 1 is a schematic diagram of a system architecture of a data backup system according to an embodiment of the present application. As shown in fig. 1, the data backup system may include a business layer, an adaptation layer, and a storage layer, wherein the adaptation layer may include database adaptation, storage adaptation, and agent management.
The business layer can be used for providing backup, recovery and archiving business management functions, for example, can be used for task template configuration, and can support user-defined execution operation according to the arrangement and execution operation of the resource type on the backup task; the method can also be used for creating a backup task according to business requirements, starting the backup task after auditing, and performing scheduling of the backup task, performing the backup task concurrently, and controlling backup instances and bandwidth of the backup task execution; it can also be used for backup task inquiry, inquiry and statistics for backup task execution, etc. Database adaptation and storage adaptation may be used to define database adaptation models and adaptation specifications, provide adapter configuration, and so forth. The agent management can be used for providing a unified management function of the backup agent, and aiming at the heterogeneous environment of the data center, the deployment, operation and monitoring capabilities of the backup agent are improved. The storage layer may be used to provide storage resource centralized management functions, lifecycle management of backup data sets, and so forth.
It should be noted that, in the embodiment of the present application, the data center may be a heterogeneous storage environment, including databases corresponding to multiple types, and may form a storage pool to perform data backup.
The embodiment of the application provides a data backup method, which can be executed by the data backup system shown in fig. 1, as shown in fig. 2, and comprises the following steps:
s201: and receiving a backup instruction, and acquiring the resource type and the backup parameter in the backup instruction to generate a corresponding backup task.
The backup instruction can be input by a user, and can be input through a display page or sent through other devices. The backup instruction may include a resource type and a backup parameter, where the resource type represents a resource type for storing backup data, and the backup parameter represents a parameter required for executing data backup, so that a backup task corresponding to the resource type may be generated after the resource type and the backup parameter are acquired.
It should be noted that the specific content included in the backup parameter may be set based on the requirement, for example, the backup parameter may include information of backup data, information of a backup database, a backup operation type, and the like.
The backup instruction can also comprise a backup execution type, which indicates whether the backup task is executed once or periodically, so that the triggering time of the backup task can be determined. If the operation is only performed once, the triggering time can be the time designated in the backup instruction or the preset time; if periodic execution is required, a period or a preset period in the backup instruction may be acquired to determine the execution time. This step can therefore be performed as: and acquiring a backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
S202: and responding to the triggering of the backup task, acquiring the backup parameter and the resource type, and inquiring a task template corresponding to the backup task to generate a backup instance according to the task template and the backup parameter.
After the backup task is generated, the backup task can be automatically triggered when a preset trigger time is reached, or a backup task trigger instruction sent by an external system can be received to trigger the backup task. After the backup task is triggered, the backup parameters and the resource types can be acquired so as to facilitate the subsequent backup processing. The backup task execution can be realized based on the backup instance, so that the task template corresponding to the backup task can be queried after the backup task is triggered, and the backup instance is generated according to the task template and the backup parameters. The task template is preconfigured.
In one embodiment, generating the backup instance may act in particular: and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
The task scheduling engine is preset and can be used for configuring and scheduling the task template, wherein atomic operation of backup operation for generating the backup instance can be preconfigured, the operation information represents information such as identification of the needed backup operation in the backup template, and execution logic which can comprise the identification of the needed backup operation, namely arrangement logic, so that after the operation information in the task template is obtained, the corresponding backup operation set can be inquired, and the arrangement can be carried out to obtain the backup instance.
It should be noted that, in the embodiment of the present application, the task template may include multiple types, for example, may include a script type and an API type. For the script type, input parameters can be customized in advance, the parameters can support regular verification, information required by executing timeout time, executing backup of a user and the like can be configured, and the script type can support scripts such as shell, python and the like. For the API type, the API parameters can be configured in a self-defined way, the API request and the return are packaged in a unified way, the backup API is provided for different database configuration corresponding interface information calling processing databases, and the API processing returns results. For the task template, the configured input parameters can specifically comprise configuration input parameter mapping rules, so that the program can be automatically converted according to the rules, and the differences of the API interface parameters of different databases are shielded; the configuration return parameter can analyze the returned result through the BeanShell hot loading and automatically convert the returned result into a service field for returning. In addition, in the embodiment of the application, task templates corresponding to different requirements can be set, for example, mySQL backup templates, mySQL database full logical backup, mySQL incremental logical backup, mySQL full physical backup, mySQL incremental physical backup and the like can be included for the MySQL database.
S203: executing the backup instance, determining backup data based on the backup parameters, querying the adapter associated with the resource type to call the adapter, transmitting the backup data to the storage pool corresponding to the resource type, and executing the data backup program.
The backup instance can be executed to realize data backup after the backup instance is generated. The backup instance includes backup parameters, so the corresponding backup parameters can be determined based on the backup information. In order to adapt to databases of different types, different adapters can be set, and an association between the database and the resource type to which the database belongs is established, so that the corresponding adapter can be queried through the resource type, the backup data is transmitted to a storage pool corresponding to the resource type by calling the adapter, and a data backup program is executed. The data is stored in the database corresponding to the backup, so that the backup data can be transmitted to the storage pool and then can be sent to the corresponding database to execute the data backup program.
It should be noted that, in the embodiment of the present application, the adapter may be implemented through a script class or an API, and for the script class, parameters after a task instance is generated according to a task template are automatically converted into script input parameters, and then a script is issued to a database node; for API operation, the business parameters can be converted into interface input parameters according to the input parameter rules, the API is automatically called, and the return message is automatically analyzed according to the return parameter rules.
Specifically, in the embodiment of the present application, backup data transmission may be performed as follows: obtaining backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type; inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information related to the resource type, wherein the backup operation information comprises a second interface; and running the backup operation information to transmit the backup data to the storage pool corresponding to the resource type through the second interface. The first interface is a general interface so as to be conveniently in butt joint with the service layer, and the second interface can be an interface corresponding to each database so as to adapt to databases of different resource types, thereby realizing the construction of a storage pool and the management of backup data.
In the backup data transmission, parameters such as compression parameters, encryption parameters, retry parameters, transmission thresholds, etc. may also be set for each transmission, so as to facilitate the data transmission. Specifically, it may be performed as: inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data; and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through a second interface based on the transmission threshold value.
The compression parameter indicates whether or not the transmission data is compressed and how to compress; the encryption parameter indicates whether or not the transmission data is encrypted and how it is encrypted; the transmission threshold represents a transmission bandwidth threshold of data transmission; the retry parameter indicates the number of transmission failure retries.
It should be noted that, in the embodiment of the present application, the adapter is dynamically loaded and configured in a plug-in manner, and the adapter management needs to configure the parameter conversion and return parameter conversion rules corresponding to the adapter request by the atomic operation. And different adaptation plug-ins can realize different types of operations, for example, for a storage pool class adaptation plug-in, operations such as adding a storage bucket, deleting a storage bucket, synchronizing a storage bucket, inquiring a storage bucket object and the like can be realized; for the transmission class adapter plug-in, the atomic operation mainly comprises data uploading, data downloading, data copying, data deleting, data inquiring, data checking, data encrypting, data compressing and the like, and the custom operation expansion is supported.
In yet another embodiment, after the backup data is transmitted to the storage pool, a backup data set corresponding to the storage pool may be generated based on the backup data, and an association relationship between the backup data set and the resource type may be established, so that management and query of the backup data set may be facilitated.
Specifically, in the embodiment of the application, the backup data set can be managed and queried through proxy management. Proxy management may be used for installation, start-up, shut-down, probe-activation, restart, upgrade services, etc. of nodes in a data backup system.
In yet another embodiment, after the data backup is completed, the return information sent by the storage pool may also be received, so the return information is parsed to invoke a second preset conversion rule, and the parsed return information is converted into backup feedback information and sent to be fed back to the service layer or other systems.
In the embodiment of the application, the resource type can be determined when the backup instruction is received, the resource type represents the resource type for storing the backup data, so that the backup task corresponding to each database of different types can be generated, and then the adapter associated with the resource type can be queried when the backup instance is executed, so that the backup data can be transmitted to the storage pool corresponding to the resource type through the adapter.
The following describes a method for backing up data in the embodiment of the present application with reference to the system architecture shown in fig. 1, and as shown in fig. 3, the method includes:
s301: and receiving a backup instruction, and acquiring the resource type and the backup parameter in the backup instruction to generate a corresponding backup task.
S302: and acquiring the backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
S303: and responding to the triggering of the backup task, acquiring the backup parameter and the resource type, and inquiring a task template corresponding to the backup task to generate a backup instance according to the task template and the backup parameter.
S304: and executing the backup instance, and determining backup data based on the backup parameters.
S305: and inquiring the adapter related to the resource type, and acquiring backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise the backup type.
S306: and inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information related to the resource type, wherein the backup operation information comprises a second interface.
S307: and running the backup operation information to transmit the backup data to the storage pool corresponding to the resource type through the second interface.
It should be noted that, in the embodiment of the present application, the data office processing principle is the same as that shown in fig. 2, and will not be described herein.
The following describes a method for backing up data in the embodiment of the present application with reference to the system architecture shown in fig. 1, and as shown in fig. 4, the method includes:
s401: and receiving a backup instruction, and acquiring the resource type and the backup parameter in the backup instruction to generate a corresponding backup task.
S402: and responding to the triggering of the backup task, acquiring the backup parameter and the resource type, and inquiring a task template corresponding to the backup task.
S403: and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
S404: executing the backup instance, determining backup data based on the backup parameters, and querying the adapter associated with the resource type.
S405: and calling the adapter, transmitting the backup data to a storage pool corresponding to the resource type, and executing a data backup program.
S406: and receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information, and sending the backup feedback information.
It should be noted that, in the embodiment of the present application, the data office processing principle is the same as that shown in fig. 2, and will not be described herein.
In order to solve the problems in the prior art, an embodiment of the present application provides a data backup apparatus 500, as shown in fig. 5, the apparatus 500 includes:
a generating unit 501, configured to receive a backup instruction, and obtain a resource type and a backup parameter in the backup instruction, so as to generate a corresponding backup task;
the generating unit 501 is further configured to, in response to a backup task being triggered, obtain the backup parameter and the resource type, query a task template corresponding to the backup task, and generate a backup instance according to the task template and the backup parameter;
and the backup unit 502 is configured to execute the backup instance, determine data to be backed up based on the backup parameter, query the adapter associated with the resource type to call the adapter, transmit the backup data to a storage pool corresponding to the resource type, and execute a data backup program.
It should be understood that the manner of implementing the embodiment of the present application is the same as that of implementing the embodiment shown in fig. 2, and will not be described herein.
In one embodiment, the backup unit 502 is specifically configured to:
calling the adapter, and acquiring backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type;
inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information associated with the resource type, wherein the backup operation information comprises a second interface;
and running the backup operation information to transmit the backup data to a storage pool corresponding to the resource type through the second interface.
In yet another embodiment, the backup unit 502 is specifically configured to:
inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data;
and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through the second interface based on the transmission threshold value.
In yet another embodiment, the generating unit 501 is specifically configured to:
and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
In yet another embodiment, the apparatus 500 further comprises:
and the return unit is used for receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information and sending the backup feedback information.
In yet another embodiment, the generating unit 501 is further configured to:
and generating a backup data set corresponding to the storage pool based on the backup data, and establishing an association relation between the backup data set and the resource type.
In yet another embodiment, the generating unit 501 is specifically configured to:
and acquiring a backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
It should be understood that the manner of implementing the embodiments of the present application is the same as that of implementing the embodiments shown in fig. 2, 3 and 4, and will not be described herein.
According to the embodiment of the application, the backup tasks corresponding to the resource types can be generated, the backup tasks of the databases of different types can be triggered, the corresponding adapters are configured for the databases of different types, the data backup of the databases of the corresponding types can be executed through the adapters, the data backup of the databases of different types is realized, and the compatibility of the databases of different types and the success rate of the data backup of the databases of different types are improved.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
The electronic equipment of the embodiment of the application comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor, so that the at least one processor performs the data backup method provided by the embodiment of the present application.
Fig. 6 illustrates an exemplary system architecture 600 of a data backup method or apparatus to which embodiments of the present application may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various client applications may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be, but are not limited to, smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, and may perform processing such as analysis on received data such as a product information query request, and feed back processing results (e.g., product information—just an example) to the terminal device.
It should be noted that, the method for data backup provided in the embodiment of the present application is generally performed by the server 605, and accordingly, the device for data backup is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing embodiments of the present application. The computer system shown in fig. 7 is only an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the application.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes a generation unit, a determination unit, and a backup unit. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, a generating unit may also be described as a "generating functional unit".
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method of data backup provided by the present application.
As another aspect, the present application also provides a computer program product, including a computer program, where the program when executed by a processor implements a method for backing up data provided by an embodiment of the present application.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (12)

1. A method of data backup, comprising:
receiving a backup instruction, and acquiring a resource type and a backup parameter in the backup instruction to generate a corresponding backup task;
responding to the triggering of a backup task, acquiring the backup parameter and the resource type, and inquiring a task template corresponding to the backup task to generate a backup instance according to the task template and the backup parameter;
executing the backup instance, determining backup data based on the backup parameters, querying the adapter associated with the resource type to call the adapter, transmitting the backup data to a storage pool corresponding to the resource type, and executing a data backup program;
invoking the adapter to transmit the backup data to a storage pool corresponding to the resource type, including:
obtaining backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type;
inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information associated with the resource type, wherein the backup operation information comprises a second interface;
and running the backup operation information to transmit the backup data to a storage pool corresponding to the resource type through the second interface.
2. The method of claim 1, wherein transferring the backup data to the storage pool corresponding to the resource type via the second interface comprises:
inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data;
and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through the second interface based on the transmission threshold value.
3. The method of claim 1, wherein generating a backup instance from the task template and the backup parameters comprises:
and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
4. The method of claim 1, further comprising, after transferring the backup data to the storage pool corresponding to the resource type:
and receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information, and sending the backup feedback information.
5. The method of claim 1, wherein after transferring the backup data to the storage pool corresponding to the resource type, comprising:
and generating a backup data set corresponding to the storage pool based on the backup data, and establishing an association relation between the backup data set and the resource type.
6. The method of claim 1, wherein the generating the corresponding backup task comprises:
and acquiring a backup execution type from the backup instruction to determine the triggering time corresponding to the backup task, and generating the corresponding backup task based on the triggering time.
7. An apparatus for data backup, comprising:
the generating unit is used for receiving a backup instruction, and acquiring the resource type and the backup parameter in the backup instruction so as to generate a corresponding backup task;
the generating unit is further configured to, in response to the backup task being triggered, obtain the backup parameter and the resource type, query a task template corresponding to the backup task, and generate a backup instance according to the task template and the backup parameter;
the backup unit is used for executing the backup instance, determining data to be backed up based on the backup parameter, inquiring the adapter associated with the resource type to call the adapter, transmitting the backup data to a storage pool corresponding to the resource type, and executing a data backup program;
the backup unit is specifically configured to:
calling the adapter, and acquiring backup parameters in the backup instance through a first interface of the adapter, wherein the backup parameters comprise a backup type;
inquiring a corresponding first preset conversion rule in the adapter based on the backup type so as to convert the backup parameter into backup operation information associated with the resource type, wherein the backup operation information comprises a second interface;
and running the backup operation information to transmit the backup data to a storage pool corresponding to the resource type through the second interface.
8. The apparatus according to claim 7, wherein the backup unit is specifically configured to:
inquiring compression parameters and/or encryption parameters in the backup operation information to execute corresponding compression operation and/or encryption operation on the backup data;
and inquiring a transmission threshold value in the backup operation information, and transmitting the backup data after operation to a storage pool corresponding to the resource type through the second interface based on the transmission threshold value.
9. The apparatus according to claim 7, wherein the generating unit is specifically configured to:
and calling a preset task scheduling engine to inquire a corresponding backup operation set according to the operation information in the task template, and arranging each backup operation in the backup operation set based on the task template to generate a backup instance.
10. The apparatus of claim 7, wherein the apparatus further comprises:
and the return unit is used for receiving the return information sent by the storage pool, analyzing the return information, calling a second preset conversion rule, converting the analyzed return information into backup feedback information and sending the backup feedback information.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
12. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202311447584.2A 2023-11-02 2023-11-02 Data backup method, device, electronic equipment and storage medium Active CN117170941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311447584.2A CN117170941B (en) 2023-11-02 2023-11-02 Data backup method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311447584.2A CN117170941B (en) 2023-11-02 2023-11-02 Data backup method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117170941A true CN117170941A (en) 2023-12-05
CN117170941B CN117170941B (en) 2024-02-13

Family

ID=88941644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311447584.2A Active CN117170941B (en) 2023-11-02 2023-11-02 Data backup method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117170941B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130191342A1 (en) * 2007-03-05 2013-07-25 Sachhin Sreedharan Using versioning to back up multiple versions of a stored object
US20140074787A1 (en) * 2012-09-12 2014-03-13 International Business Machines Corporation Using a metadata image of a file system and archive instance to backup data objects in the file system
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
US20160217042A1 (en) * 2015-01-23 2016-07-28 Servicenow, Inc. Distributed computing system with resource managed database cloning
US20170147443A1 (en) * 2014-07-28 2017-05-25 Hewlett Packard Enterprise Development Lp Providing data backup
CN107402941A (en) * 2016-07-22 2017-11-28 延边众生云计算科技有限公司 Conventional data Fabric Interface and its implementation
US10210054B1 (en) * 2017-08-31 2019-02-19 International Business Machines Corporation Backup optimization in hybrid storage environment
US10606709B1 (en) * 2018-10-26 2020-03-31 EMC IP Holding Company LLC Method and system for intelligently load balancing database backup operations in information technology environments
CN112035297A (en) * 2020-08-28 2020-12-04 浪潮云信息技术股份公司 Automatic cloud backup execution method based on backup task
CN115357433A (en) * 2022-10-19 2022-11-18 江苏博云科技股份有限公司 Database backup method, device, equipment and storage medium under container environment
CN115629909A (en) * 2022-09-29 2023-01-20 中国建设银行股份有限公司 Service data processing method and device, electronic equipment and storage medium
US20230147133A1 (en) * 2021-11-08 2023-05-11 Sap Se Multiple operation modes in backup operator
CN116302708A (en) * 2023-03-20 2023-06-23 金蝶软件(中国)有限公司 Data backup method, device, equipment and storage medium based on load balancing

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130191342A1 (en) * 2007-03-05 2013-07-25 Sachhin Sreedharan Using versioning to back up multiple versions of a stored object
US20140074787A1 (en) * 2012-09-12 2014-03-13 International Business Machines Corporation Using a metadata image of a file system and archive instance to backup data objects in the file system
US20170147443A1 (en) * 2014-07-28 2017-05-25 Hewlett Packard Enterprise Development Lp Providing data backup
US20160217042A1 (en) * 2015-01-23 2016-07-28 Servicenow, Inc. Distributed computing system with resource managed database cloning
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
CN107402941A (en) * 2016-07-22 2017-11-28 延边众生云计算科技有限公司 Conventional data Fabric Interface and its implementation
US10210054B1 (en) * 2017-08-31 2019-02-19 International Business Machines Corporation Backup optimization in hybrid storage environment
US20190065324A1 (en) * 2017-08-31 2019-02-28 International Business Machines Corporation Backup optimization in hybrid storage environment
US10606709B1 (en) * 2018-10-26 2020-03-31 EMC IP Holding Company LLC Method and system for intelligently load balancing database backup operations in information technology environments
CN112035297A (en) * 2020-08-28 2020-12-04 浪潮云信息技术股份公司 Automatic cloud backup execution method based on backup task
US20230147133A1 (en) * 2021-11-08 2023-05-11 Sap Se Multiple operation modes in backup operator
CN115629909A (en) * 2022-09-29 2023-01-20 中国建设银行股份有限公司 Service data processing method and device, electronic equipment and storage medium
CN115357433A (en) * 2022-10-19 2022-11-18 江苏博云科技股份有限公司 Database backup method, device, equipment and storage medium under container environment
CN116302708A (en) * 2023-03-20 2023-06-23 金蝶软件(中国)有限公司 Data backup method, device, equipment and storage medium based on load balancing

Also Published As

Publication number Publication date
CN117170941B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN112860451A (en) Multi-tenant data processing method and device based on SaaS
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN111045833A (en) Interface calling method and device
CN112104679B (en) Method, apparatus, device and medium for processing hypertext transfer protocol request
EP4180985A1 (en) File sharing method, apparatus, and system
CN114296953A (en) Multi-cloud heterogeneous system and task processing method
CN111522617B (en) Method and device for maintaining system and electronic equipment
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN117170941B (en) Data backup method, device, electronic equipment and storage medium
CN113127335A (en) System testing method and device
CN115629909A (en) Service data processing method and device, electronic equipment and storage medium
CN113779122B (en) Method and device for exporting data
CN115277707A (en) Service processing method, device, electronic equipment and storage medium
WO2021243665A1 (en) Compilation method, compilation apparatus, compilation system, storage medium, and electronic device
CN113419745A (en) Application instance number management method and device, electronic equipment and computer readable medium
CN112416980A (en) Data service processing method, device and equipment
CN113821352A (en) Remote service calling method and device
CN114745367B (en) Data transmission method, device, electronic equipment and storage medium
CN110764932A (en) Data processing method, system, medium and computing device
CN112559001A (en) Method and device for updating application
CN112883103A (en) Method and device for data transfer between clusters
CN112671877B (en) Data processing method and device
CN113132480B (en) Data transmission method, device and system
CN110262756B (en) Method and device for caching data

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
GR01 Patent grant
GR01 Patent grant