CN114328029B - Backup method and device of application resources, electronic equipment and storage medium - Google Patents

Backup method and device of application resources, electronic equipment and storage medium Download PDF

Info

Publication number
CN114328029B
CN114328029B CN202210195612.5A CN202210195612A CN114328029B CN 114328029 B CN114328029 B CN 114328029B CN 202210195612 A CN202210195612 A CN 202210195612A CN 114328029 B CN114328029 B CN 114328029B
Authority
CN
China
Prior art keywords
resource
target
application
backup
application resource
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.)
Active
Application number
CN202210195612.5A
Other languages
Chinese (zh)
Other versions
CN114328029A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210195612.5A priority Critical patent/CN114328029B/en
Publication of CN114328029A publication Critical patent/CN114328029A/en
Application granted granted Critical
Publication of CN114328029B publication Critical patent/CN114328029B/en
Priority to PCT/CN2022/140467 priority patent/WO2023165226A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The application discloses a backup method and device of application resources, electronic equipment and a storage medium. The method comprises the following steps: receiving a resource backup request, wherein the resource backup request comprises a first resource identifier corresponding to a first application resource to be subjected to backup operation; responding to the resource backup request, and creating corresponding target storage information of the first application resource in the object storage pool; utilizing the first resource identifier to inquire first resource data corresponding to the first application resource from a database; and backing up the first resource data to the object storage pool according to the target storage information so as to complete the backup of the first application resource. According to the method and the device, the storage information of the application resources to be backed up in the object storage pool is automatically created according to the resource backup request, and the resource data of the application resources to be backed up are backed up to the object storage pool according to the storage information, so that the backup of the resource data is realized. The situation that backup is not carried out when the resource data of the application resources are lost is avoided, and the guarantee of the application resources is improved.

Description

Backup method and device of application resources, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for backing up an application resource, an electronic device, and a storage medium.
Background
In the container technology era, a large number of business application scenes are organized through kubernets containers, wherein K8s metadata corresponding to the business scenes of the cloud and PV user data are important data assets of users. In the prior art, it often happens that when a user performs unpredictable operations, such as deleting application resources by mistake in a database or losing the application resources in the database updating process, the resource data of the application resources are not backed up when lost, so that the application resources cannot be quickly restored subsequently.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present application provides a backup method and apparatus for an application resource, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a backup method for an application resource, including:
receiving a resource backup request, wherein the resource backup request comprises a first resource identifier corresponding to a first application resource to be subjected to backup operation;
in response to the resource backup request, creating corresponding target storage information of the first application resource in an object storage pool, wherein the object storage pool is used for storing backup data of the application resource;
utilizing the first resource identifier to inquire first resource data corresponding to the first application resource from a database;
and backing up the first resource data to an object storage pool according to the target storage information so as to complete the backup of the first application resource.
Further, the method further comprises:
determining a resource identifier corresponding to a currently deployed application resource in a target cluster, and acquiring authentication information corresponding to the application resource;
and establishing a corresponding relation between the resource identifier and the authentication information, and storing the corresponding relation to the database.
Further, the creating target storage information corresponding to the first application resource in the object storage pool includes:
acquiring a corresponding relation between a resource identifier and authentication information from the database, and acquiring target authentication information corresponding to the first application resource based on the corresponding relation;
calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource;
and creating a storage position and a storage path corresponding to the first application resource based on the encryption configuration information, and taking the storage position and the storage path as the target storage information.
Further, before invoking a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource, the method further includes:
verifying the target authentication information;
under the condition that the target authentication information is matched with preset authentication information, determining that the target authentication information is verified;
and under the condition that the target authentication information passes verification, calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource.
Further, the backing up the first resource data to the object storage platform according to the target storage information includes:
generating an interface annotation of the target interface based on the first resource data, and adding the interface annotation and the target storage information to the target interface to obtain an updated target interface;
and calling the updated target interface to create first backup data corresponding to the first application resource in the object storage pool so as to complete the backup of the first application resource.
Further, after backing up the first resource data to the object storage platform according to the target storage information, the method further includes:
receiving a resource restoration request, wherein the resource restoration request comprises a second resource identifier corresponding to a second application resource to be subjected to restoration operation;
obtaining second backup data matched with the second resource identification from the object storage pool;
generating the second application resource in a target cluster based on the second backup data.
Further, the generating the second application resource in the target cluster based on the second backup data includes:
querying a target node corresponding to the second backup data from the target cluster;
acquiring a mirror image file meeting the corresponding frame of the target node from a mirror image warehouse;
and creating the second application resource at the target node according to the mirror image file and the second backup data.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for backing up application resources, including:
the device comprises a receiving module, a judging module and a processing module, wherein the receiving module is used for receiving a resource backup request, and the resource backup request comprises a first resource identifier corresponding to a first application resource to be subjected to backup operation;
a response module, configured to create, in response to the resource backup request, target storage information corresponding to the first application resource in an object storage pool, where the object storage pool is used to store backup data of the application resource;
the query module is used for querying first resource data corresponding to the first application resource from a database by using the first resource identifier;
and the backup module is used for backing up the first resource data to an object storage pool according to the target storage information so as to complete the backup of the first application resource.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: the method provided by the embodiment of the application automatically creates the storage information of the application resource to be backed up in the object storage pool according to the resource backup request, and backs up the resource data of the application resource to be backed up to the object storage pool according to the storage information, so that the backup of the resource data in the object storage pool is realized. The situation that backup is not carried out when the resource data of the application resources are lost is avoided, and the guarantee of the application resources is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
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 for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a backup method for an application resource according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a backup method for application resources according to another embodiment of the present application;
fig. 3 is a schematic diagram of a service system according to an embodiment of the present application;
fig. 4 is a block diagram of a backup apparatus for application resources according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a backup method and device of application resources, electronic equipment and a storage medium. The method provided by the embodiment of the present invention may be applied to any required electronic device, for example, the electronic device may be an electronic device such as a server and a terminal, and the method is not specifically limited herein, and for convenience of description, the method is hereinafter simply referred to as an electronic device.
According to an aspect of an embodiment of the present application, a method embodiment of a backup method for an application resource is provided. Fig. 1 is a flowchart of a backup method for application resources according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, receiving a resource backup request, where the resource backup request includes a first resource identifier corresponding to a first application resource to be backed up.
The method provided by the embodiment of the application is applied to a target cluster, the resource backup request can be initiated to the target cluster by a user through a client, specifically, the method can detect a selection operation acting on the client, determine a selected first application resource based on the selection operation, determine a first resource identifier corresponding to the first application resource, generate the resource backup request according to the first resource identifier, and send the resource backup request to the target cluster.
In this embodiment of the present application, the resource backup request may also be periodically and automatically initiated, and specifically, the application resource in the target cluster may be periodically detected, then a first resource identifier set corresponding to the deployed application resource in the target cluster is determined, and a second resource identifier set of the executed backup application resource is obtained from the object storage pool. By comparing the first resource identifier set with the second resource identifier set, the first application resource which is not currently backed up in the target cluster can be determined from the first resource identifier set, and at this time, the first resource identifier corresponding to the first application resource is obtained, and the resource backup request is generated based on the first resource identifier.
Step S12, in response to the resource backup request, creates target storage information corresponding to the first application resource in an object storage pool, where the object storage pool is used for storing backup data of the application resource.
In an embodiment of the application, the method further comprises the following steps a1-a 2:
step A1, determining the resource identifier corresponding to the application resource currently deployed in the target cluster, and obtaining the authentication information corresponding to the application resource.
Step A2, establishing the corresponding relation between the resource identification and the authentication information, and storing the corresponding relation to the database.
In order to ensure the security of the subsequent backup execution operation, the embodiment of the application resource backup method and the application resource backup system can collect the resource identifier corresponding to the currently deployed application resource in the target cluster in advance, and then the resource identifier queries the corresponding authentication information, wherein the authentication information can be uploaded to a database by a developer in advance, and the authentication information includes an access key corresponding to the application resource. And then establishing a corresponding relation between the resource identification and the authentication information, and storing the corresponding relation into a database.
In this embodiment of the present application, step S12, creating target storage information corresponding to the first application resource in the object storage pool, includes the following steps B1-B3:
and step B1, acquiring the corresponding relation between the resource identification and the authentication information from the database, and acquiring the target authentication information corresponding to the first application resource based on the corresponding relation.
In this embodiment of the present application, before invoking the target interface according to the target authentication information to generate the encryption configuration information corresponding to the first application resource, the method further includes: and verifying the target authentication information, determining that the target authentication information is verified under the condition that the target authentication information is matched with the preset authentication information, and calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource under the condition that the target authentication information is verified.
And step B2, calling the target interface according to the target authentication information to generate the encryption configuration information corresponding to the first application resource.
And step B3, creating a storage position corresponding to the first application resource and a storage path based on the encryption configuration information, and taking the storage position and the storage path as target storage information.
In the embodiment of the application, a target interface (namely, kubernets API) is called to create encryption configuration information according to object storage authentication information, and the encryption configuration information carries object storage information and is used for identifying the uniqueness of a finally obtained storage position and a storage path. For example: the uniqueness is identified using the information ID in the object storage information. Specifically, the encryption configuration information is used for creating a storage path and a storage position with application resource uniqueness.
Step S13, using the first resource identifier to query the database for first resource data corresponding to the first application resource.
In this embodiment of the present application, the database further stores resource data corresponding to each application resource, so that first resource data corresponding to a first application resource can be queried from the database by using a first resource identifier, where the first resource data includes: stateful load, stateless load, normal configuration, encrypted configuration, and service data, among others.
Step S14, the first resource data is backed up to the object storage pool according to the target storage information, so as to complete the backup of the first application resource.
In this embodiment of the application, the step S14 of backing up the first resource data to the object storage platform according to the target storage information includes the following steps C1-C2:
and step C1, generating an interface annotation of the target interface based on the first resource data, and adding the interface annotation and the target storage information to the target interface to obtain an updated target interface.
In the embodiment of the application, after the first resource data is determined, an object structure is generated according to a preset format by the first resource data, then the object structure is added to the target interface according to an interface annotation mode, and meanwhile, target storage information is added to the target interface, so that an updated target interface is obtained. It should be noted that the object structure is added to the target interface in the way of interface annotation, so that the target interface directly creates the backup resource when being called.
As an example, the object structure generated by the first resource data according to the preset format is as follows:
{
”namespace”:”test-backup”,
”resourcesType”:”deployments.apps”,
”resourcesName”:[”workload-deploy1”, ”workload-deploy2”……],
},{
”namespace”:”test-backup”,
”resourcesType”:”statefulsets.apps”,
”resourcesName”:[”workload-sts1”, ”workload-sts2”……],
}
……
step C2, the updated target interface is called to create first backup data corresponding to the first application resource in the object storage pool, so as to complete the backup of the first application resource.
In the embodiment of the application, the updated target interface is called to create first backup data corresponding to the first application resource in the object storage pool according to the storage path and the storage position, so as to complete the backup of the first application resource.
The method provided by the embodiment of the application automatically creates the storage information of the application resource to be backed up in the object storage pool according to the resource backup request, and backs up the resource data of the application resource to be backed up to the object storage pool according to the storage information, so that the backup of the resource data in the object storage pool is realized. The situation that backup is not carried out when the resource data of the application resources are lost is avoided, and the guarantee of the application resources is improved.
In this embodiment of the present application, as shown in fig. 2, after backing up the first resource data to the object storage platform according to the target storage information, the method further includes the following steps:
step S21, receiving a resource restoring request, where the resource restoring request includes a second resource identifier corresponding to a second application resource to be restored.
In this embodiment of the present application, the resource restoration request may be initiated by a user to the target cluster through a client, and specifically, the user may detect whether a resource loss occurs in the target cluster through the client, for example: the client stores the resource identification of each application resource in the target cluster, and the client can periodically query the survival state of the application resource in the target cluster according to the resource identification. And if the client side inquires the survival state of the application resource corresponding to a certain resource identifier in the current detection period, determining that the application resource corresponding to the resource identifier is lost in the target cluster.
In the embodiment of the application, when the target cluster has a resource loss condition, the client determines a second application resource lost in the target cluster, determines a second resource identifier corresponding to the second application resource lost, and subsequently acquires backup data of the second application resource from the object storage pool according to the second resource identifier.
At step 22, second backup data matching the second resource identification is obtained from the object storage pool.
In this embodiment of the application, since the backup data corresponding to each application resource in the target cluster is stored in the object storage pool, the second backup data matching the second resource identifier may be obtained from the object storage pool according to the second resource identifier.
As an example, the target storage pool stores a plurality of resource identifiers, and backup data corresponding to the resource identifiers, resource identifier a — backup data a, resource identifier B — backup data B, and resource identifier C — backup data C. Therefore, after the resource identifier of the lost application resource is determined, the backup data corresponding to the resource identifier can be obtained from the object storage pool according to the resource identifier, and the lost application resource can be restored in the target cluster according to the backup data.
Step S23, generating a second application resource in the target cluster based on the second backup data.
In this embodiment of the application, in step S23, generating a second application resource in the target cluster based on the second backup data includes the following steps D1-D3:
and D1, querying the target node corresponding to the second backup data from the target cluster.
In the embodiment of the present application, a plurality of nodes are deployed in the target cluster, for example: an X86 node, an ARM node, and so on. Before restoring the lost application resource, it is necessary to determine to which node (i.e., target node) the backup data corresponding to the lost application resource is restored, and at this time, the target node deployed by the lost application resource (i.e., the second application resource) may be queried by using a correspondence relationship between the application resource and the node.
And D2, acquiring the image file meeting the corresponding frame of the target node from the image warehouse.
In the embodiment of the application, after a target node for executing the restore operation is determined, a frame corresponding to the target node needs to be queried, and then an image file matched with the frame is obtained from an image warehouse, wherein the image warehouse stores frames of all nodes in a target cluster and image files corresponding to the frames.
And D3, creating a second application resource at the target node according to the image file and the second backup data.
In the embodiment of the application, a second application resource is created at a target node in a target cluster according to the mirror image file pulled from the mirror image warehouse and the second backup data, so that the restoring operation of losing the application resource is completed. It should be noted that the image file is similar to the rar ZIP compact package, and a specific series of files are made into a single file according to a certain format, so as to facilitate the downloading and use by the user.
In the embodiment of the application, in the case of resource loss caused by unpredictable human operation, the backed-up resource is pulled from the object storage pool and restored in the target cluster. Therefore, the characteristic of high guarantee of application resources in a Kubernetes computing cluster based on multi-architecture domestic servers is improved.
As an example, as shown in fig. 3, the service system includes: storage device, backup device. Wherein, the storage device includes: a database and an object storage pool. And after the backup device receives the resource backup request, the backup device is used for acquiring the resource data of the application resource to be backed up from the database in the storage device and creating storage information in the object storage pool in the storage device. And then, executing backup operation according to the storage information, namely backing up the resource data of the application resources to be backed up to the object storage pool.
As shown in fig. 3, the service system further includes: the restoration device and the mirror image warehouse are used for receiving the resource restoration request, acquiring backup data corresponding to the application resource to be restored from the object storage pool according to the resource restoration request, acquiring a mirror image file meeting the requirement of a target node corresponding to the application resource to be restored from the mirror image warehouse, and then restoring the application resource according to the mirror image file and the backup data.
Fig. 4 is a block diagram of an apparatus for backing up application resources according to an embodiment of the present disclosure, where the apparatus may be implemented as part or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 4, the apparatus includes:
the receiving module 41 is configured to receive a resource backup request, where the resource backup request includes a first resource identifier corresponding to a first application resource to be backed up.
And a response module 42, configured to create, in response to the resource backup request, target storage information corresponding to the first application resource in an object storage pool, where the object storage pool is used for storing backup data of the application resource.
And the query module 43 is configured to query the database for the first resource data corresponding to the first application resource by using the first resource identifier.
And the backup module 44 is configured to backup the first resource data to the object storage pool according to the target storage information, so as to complete the backup of the first application resource.
In this embodiment of the present application, the apparatus for backing up application resources further includes: the storage module is used for determining a resource identifier corresponding to the currently deployed application resource in the target cluster and acquiring authentication information corresponding to the application resource; and establishing a corresponding relation between the resource identifier and the authentication information, and storing the corresponding relation to a database.
In this embodiment of the present application, the response module 42 is configured to obtain a corresponding relationship between the resource identifier and the authentication information from the database, and obtain target authentication information corresponding to the first application resource based on the corresponding relationship; calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource; and creating a storage position and a storage path corresponding to the first application resource based on the encryption configuration information, and taking the storage position and the storage path as target storage information.
In this embodiment of the present application, the apparatus for backing up application resources further includes: the storage module is used for verifying the target authentication information; under the condition that the target authentication information is matched with the preset authentication information, determining that the target authentication information passes verification; and under the condition that the target authentication information passes the verification, calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource.
In this embodiment of the present application, the backup module 44 is configured to generate an interface annotation of the target interface based on the first resource data, and add the interface annotation and the target storage information to the target interface to obtain an updated target interface; and calling the updated target interface to create first backup data corresponding to the first application resource in the object storage pool so as to complete the backup of the first application resource.
In this embodiment of the present application, the apparatus for backing up application resources further includes: the resource restoration module is used for receiving a resource restoration request, wherein the resource restoration request comprises a second resource identifier corresponding to a second application resource to be subjected to restoration operation; acquiring second backup data matched with the second resource identification from the object storage pool; a second application resource is generated in the target cluster based on the second backup data.
In an embodiment of the present application, the restoring module is configured to query, from the target cluster, a target node corresponding to the second backup data; acquiring a mirror image file of a corresponding frame meeting a target node from a mirror image warehouse; and creating a second application resource at the target node according to the mirror image file and the second backup data.
An embodiment of the present application further provides an electronic device, as shown in fig. 5, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, there is further provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the backup method of the application resource described in any of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for backing up application resources as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A backup method for application resources is characterized by comprising the following steps:
receiving a resource backup request, wherein the resource backup request comprises a first resource identifier corresponding to a first application resource to be subjected to backup operation;
in response to the resource backup request, creating corresponding target storage information of the first application resource in an object storage pool, wherein the object storage pool is used for storing backup data of the application resource;
utilizing the first resource identifier to inquire first resource data corresponding to the first application resource from a database;
backing up the first resource data to an object storage pool according to the target storage information so as to complete the backup of the first application resource;
wherein the creating of the target storage information corresponding to the first application resource in the object storage pool includes:
acquiring a corresponding relation between a resource identifier and authentication information from the database, and acquiring target authentication information corresponding to the first application resource based on the corresponding relation;
calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource;
and creating a storage position and a storage path corresponding to the first application resource based on the encryption configuration information, and taking the storage position and the storage path as the target storage information, wherein the encryption configuration information carries object storage information, and the object storage information is used for identifying the uniqueness of the storage position and the storage path.
2. The method of claim 1, further comprising:
determining a resource identifier corresponding to a currently deployed application resource in a target cluster, and acquiring authentication information corresponding to the application resource;
and establishing a corresponding relation between the resource identifier and the authentication information, and storing the corresponding relation to the database.
3. The method according to claim 1, wherein before invoking a target interface to generate the encryption configuration information corresponding to the first application resource according to the target authentication information, the method further comprises:
verifying the target authentication information;
under the condition that the target authentication information is matched with preset authentication information, determining that the target authentication information passes verification;
and under the condition that the target authentication information passes verification, calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource.
4. The method of claim 1, wherein backing up the first resource data to an object storage platform according to the target storage information comprises:
generating an interface annotation of the target interface based on the first resource data, and adding the interface annotation and the target storage information to the target interface to obtain an updated target interface;
and calling the updated target interface to create first backup data corresponding to the first application resource in the object storage pool so as to complete the backup of the first application resource.
5. The method of claim 1, wherein after backing up the first resource data to an object storage platform according to the target storage information, the method further comprises:
receiving a resource restoration request, wherein the resource restoration request comprises a second resource identifier corresponding to a second application resource to be subjected to restoration operation;
obtaining second backup data matched with the second resource identification from the object storage pool;
generating the second application resource in a target cluster based on the second backup data.
6. The method of claim 5, wherein generating the second application resource in a target cluster based on the second backup data comprises:
querying a target node corresponding to the second backup data from the target cluster;
acquiring a mirror image file meeting the corresponding frame of the target node from a mirror image warehouse;
and creating the second application resource at the target node according to the mirror image file and the second backup data.
7. An apparatus for backing up application resources, comprising:
the device comprises a receiving module, a judging module and a processing module, wherein the receiving module is used for receiving a resource backup request, and the resource backup request comprises a first resource identifier corresponding to a first application resource to be subjected to backup operation;
a response module, configured to create, in response to the resource backup request, target storage information corresponding to the first application resource in an object storage pool, where the object storage pool is used to store backup data of the application resource;
the query module is used for querying first resource data corresponding to the first application resource from a database by using the first resource identifier;
the backup module is used for backing up the first resource data to an object storage pool according to the target storage information so as to complete the backup of the first application resource;
the response module is specifically used for acquiring the corresponding relation between the resource identifier and the authentication information from the database and acquiring target authentication information corresponding to the first application resource based on the corresponding relation; calling a target interface according to the target authentication information to generate encryption configuration information corresponding to the first application resource; the method comprises the steps of creating a storage position and a storage path corresponding to a first application resource based on encryption configuration information, and taking the storage position and the storage path as target storage information, wherein the encryption configuration information carries object storage information, and the object storage information is used for identifying the uniqueness of the storage position and the storage path.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 6.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-6 by executing a program stored on a memory.
CN202210195612.5A 2022-03-02 2022-03-02 Backup method and device of application resources, electronic equipment and storage medium Active CN114328029B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210195612.5A CN114328029B (en) 2022-03-02 2022-03-02 Backup method and device of application resources, electronic equipment and storage medium
PCT/CN2022/140467 WO2023165226A1 (en) 2022-03-02 2022-12-20 Application resource backup method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210195612.5A CN114328029B (en) 2022-03-02 2022-03-02 Backup method and device of application resources, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114328029A CN114328029A (en) 2022-04-12
CN114328029B true CN114328029B (en) 2022-06-03

Family

ID=81030265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210195612.5A Active CN114328029B (en) 2022-03-02 2022-03-02 Backup method and device of application resources, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114328029B (en)
WO (1) WO2023165226A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328029B (en) * 2022-03-02 2022-06-03 苏州浪潮智能科技有限公司 Backup method and device of application resources, electronic equipment and storage medium
CN117312044A (en) * 2022-06-28 2023-12-29 华为技术有限公司 Backup method and device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8819471B2 (en) * 2011-06-03 2014-08-26 Apple Inc. Methods and apparatus for power state based backup
CN102541694B (en) * 2012-01-18 2015-05-13 浪潮(北京)电子信息产业有限公司 Method and device for database backup
CN108279996A (en) * 2018-01-17 2018-07-13 链家网(北京)科技有限公司 A kind of high in the clouds data backup processing method and device
CN109284205B (en) * 2018-09-21 2023-04-07 平安科技(深圳)有限公司 Snapshot backup method and device, computer equipment and storage medium
CN111597078A (en) * 2020-05-15 2020-08-28 山东汇贸电子口岸有限公司 Timed backup method and system for copying ceph block storage data to object storage
CN112181720A (en) * 2020-09-11 2021-01-05 济南浪潮数据技术有限公司 Virtual data center backup method and device based on cloud management platform
CN112380067B (en) * 2020-11-30 2023-08-22 四川大学华西医院 Metadata-based big data backup system and method in Hadoop environment
CN113687911A (en) * 2021-07-30 2021-11-23 广东浪潮智慧计算技术有限公司 Metadata management method, system, electronic equipment and storage medium
CN113722155A (en) * 2021-11-01 2021-11-30 苏州浪潮智能科技有限公司 Data backup and repair method in distributed file system and related components
CN113722157B (en) * 2021-11-03 2022-03-08 苏州浪潮智能科技有限公司 Virtual machine data management method, device, equipment and medium
CN114090344B (en) * 2022-01-19 2022-04-29 苏州浪潮智能科技有限公司 Method, device, equipment and medium for deleting backup resources of container cluster
CN114328029B (en) * 2022-03-02 2022-06-03 苏州浪潮智能科技有限公司 Backup method and device of application resources, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023165226A1 (en) 2023-09-07
CN114328029A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN111104392B (en) Database migration method and device, electronic equipment and storage medium
CN114328029B (en) Backup method and device of application resources, electronic equipment and storage medium
US11586506B2 (en) System and method for indexing image backups
CN107147748B (en) File uploading method and device
WO2018233630A1 (en) Fault discovery
US9940115B2 (en) Mobile application deployment for distributed computing environments
CN107580032B (en) Data processing method, device and equipment
CN112202633B (en) Block chain network testing method and device, electronic equipment and readable storage medium
CN111240892A (en) Data backup method and device
CN110990335A (en) Log archiving method, device, equipment and computer readable storage medium
CN111245897A (en) Data processing method, device, system, storage medium and processor
CN108459927B (en) Data backup method and device and server
US9665732B2 (en) Secure Download from internet marketplace
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
EP3051457A1 (en) Method for performing file synchronization control, and associated apparatus
CN113869989B (en) Information processing method and device
CN109472540B (en) Service processing method and device
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN110083509B (en) Method and device for arranging log data
CN113342579A (en) Data restoration method and device
CN114491653A (en) Data content tamper-proof system, method and device
CN110888847A (en) Recycle bin system and file recycling method
CN114327542B (en) Service equipment updating method and device, electronic equipment and storage medium
JP2014235583A (en) Data migration system and data migration method
CN116684282B (en) Method and device for initializing newly-added cloud server and computer 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
GR01 Patent grant
GR01 Patent grant