CN113656149A - Application processing method and device and related equipment - Google Patents

Application processing method and device and related equipment Download PDF

Info

Publication number
CN113656149A
CN113656149A CN202110962770.4A CN202110962770A CN113656149A CN 113656149 A CN113656149 A CN 113656149A CN 202110962770 A CN202110962770 A CN 202110962770A CN 113656149 A CN113656149 A CN 113656149A
Authority
CN
China
Prior art keywords
target application
backup
application
current
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110962770.4A
Other languages
Chinese (zh)
Inventor
赵振阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202110962770.4A priority Critical patent/CN113656149A/en
Publication of CN113656149A publication Critical patent/CN113656149A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses an application processing method, which comprises the following steps: determining a target application to be backed up under the K8S environment; backing up current configuration information of a target application in a service database; calling a snapshot interface in the container storage interface, and backing up the current service data of the target application by executing snapshot operation on the current service data of the target application in the service storage; and generating a current backup point, and updating a backup chain of the target application based on the current backup point. By applying the technical scheme provided by the application, the current configuration information and the current service data of the target application can be independently backed up, the backup efficiency is improved, excessive resources are avoided being consumed, and the target application can be effectively recovered based on the current configuration information and the current service data of the target application. The application also discloses an application processing device, equipment and a storage medium, and the application processing device, the equipment and the storage medium have corresponding technical effects.

Description

Application processing method and device and related equipment
Technical Field
The present application relates to the field of computer application technologies, and in particular, to an application processing method and apparatus, and a related device.
Background
K8S is short for Kubernetes and is an open source container orchestration engine for managing containerized applications on multiple hosts in a cloud platform. The goal of Kubernetes is to make deploying containerized applications simple and efficient (powerfull), which provides a mechanism for application deployment, planning, updating, maintenance.
In the K8S environment, there is always a need to backup applications in order to protect them. At present, the application disaster recovery requirement is mostly realized by backing up the ETCD database under the whole K8S environment. The ETCD is a distributed database used in a K8S environment, is a non-relational database, and saves resources and configuration information of the K8S environment in a key-value mode.
This method is equivalent to backing up the configuration information of all applications in the entire K8S environment, that is, as long as there is a backup requirement for one or more applications, the configuration information of all applications in the entire K8S environment needs to be backed up, the backup efficiency is low, and more resources are consumed, and the application restored based on the configuration information will be operated as a new operation instance, cannot continuously execute the previous service, and cannot effectively restore the stateful application.
Disclosure of Invention
The application processing method, the application processing device and the related equipment are provided to improve the backup efficiency of the stateful application in the K8S environment, avoid resource waste and realize effective recovery of the stateful application.
In order to solve the technical problem, the application provides the following technical scheme:
an application processing method, comprising:
determining a target application to be subjected to backup processing in a K8S environment, wherein the target application is a stateful application;
backing up the current configuration information of the target application in a service database;
calling a snapshot interface in a container storage interface, and backing up the current business data of the target application by executing snapshot operation on the current business data of the target application in business storage;
and generating a current backup point based on the current configuration information of the target application and the current service data of the target application, and updating a backup chain of the target application based on the current backup point.
In a specific embodiment of the present application, the backing up the current configuration information of the target application in the service database includes:
acquiring current configuration information of the target application by querying a service database;
and writing the current configuration information of the target application into a backup database.
In a specific embodiment of the present application, the current configuration information of the target application includes current container image version information, persistent volume declaration, configuration parameter information, and configuration script information of the target application.
In a specific embodiment of the present application, the invoking a snapshot interface in a container storage interface, and backing up current service data of a target application by performing a snapshot operation on the current service data of the target application in service storage includes:
calling a snapshot interface in a container storage interface, and executing snapshot operation on a service disk corresponding to a persistent volume of the target application in service storage to generate a storage snapshot of the target application;
and creating a backup disc in the backup storage mounted by the working node where the target application is located, copying the storage snapshot of the target application to the backup disc, and realizing the backup of the current service data of the target application.
In one embodiment of the present application, the method further includes:
and merging the plurality of storage snapshots of the target application in the service storage so as to only store one snapshot point of the target application in the service storage.
In a specific embodiment of the present application, the determining a target application to be backed up in a K8S environment includes:
receiving a backup request through an application program interface service;
and determining a target application to be subjected to backup processing under the K8S environment based on the backup request.
In one embodiment of the present application, the method further includes:
receiving a recovery request for the target application in the K8S environment;
determining a target backup point in a backup chain of the target application according to the recovery request;
exporting the target backup point and the service data corresponding to all backup points before the target backup point to a new disc stored by the service;
creating a new persistent volume and a new persistent volume declaration for the new disk;
and recovering the target application based on the configuration information corresponding to the target backup point, and associating the new persistent volume statement.
An application processing apparatus comprising:
the system comprises a target application determining module, a backup processing module and a backup processing module, wherein the target application determining module is used for determining a target application to be backed up under a K8S environment, and the target application is a stateful application;
the configuration information backup module is used for backing up the current configuration information of the target application in the service database;
the service data backup module is used for calling a snapshot interface in a container storage interface and backing up the current service data of the target application by executing snapshot operation on the current service data of the target application in service storage;
and the backup chain updating module is used for generating a current backup point based on the current configuration information of the target application and the current service data of the target application, and updating the backup chain of the target application based on the current backup point.
An application processing device comprising:
a memory for storing a computer program;
a processor for implementing the steps of the application processing method of any one of the above when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the application processing methods described above.
By applying the technical scheme provided by the embodiment of the application, after the target application to be backed up under the K8S environment is determined, the current configuration information of the target application in the service database is backed up, the snapshot interface in the container storage interface is called, the current service data of the target application in the service storage is backed up by performing snapshot operation on the current service data of the target application, a current backup point is generated based on the current configuration information of the backed up target application and the current service data of the target application, and the backup chain of the target application is updated based on the current backup point. When the backup of the target application in the K8S environment is required, the current configuration information and the current service data of the target application can be backed up independently, and the backup of the configuration information of all applications in the whole K8S environment is not required, so that the backup efficiency can be improved, the consumption of excessive resources can be avoided, and the effective recovery of the target application can be realized based on the current configuration information and the current service data of the target application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of an application processing method according to an embodiment of the present application;
FIG. 2 is a block diagram of an exemplary application processing system;
FIG. 3 is a schematic structural diagram of an application processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an application processing device in an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, there is shown a flowchart for implementing an application processing method provided in the embodiment of the present application, where the method may include the following steps:
s110: and determining a target application to be subjected to backup processing in the K8S environment.
The target application is a stateful application.
In the K8S environment, a master node and a plurality of working nodes can be deployed, and various applications can be run on the working nodes. Such as stateful applications, stateless applications, etc. Stateful (stateful) refers to the presence of a data storage function. Stateless refers to an operation that cannot save data. For stateless applications, when a problem occurs, an application can be directly restarted without backing up the application, and for stateful applications, when a problem occurs, the restoration needs to be performed depending on previous configuration information, service data and the like, so that the stateful applications need to be backed up.
When there is a backup requirement for the stateful application, a user may send a corresponding backup request, where the backup request may carry application information to be backed up. The backup request can be received through an application program interface service (API Server), and based on the backup request, the target application to be subjected to the backup processing in the K8S environment is determined.
After the target application to be subjected to the backup processing in the K8S environment is determined, the operations of the subsequent steps can be continuously executed.
S120: and backing up the current configuration information of the target application in the service database.
In this embodiment of the application, after determining the target application to be backed up in the K8S environment, the current configuration information of the target application in the service database may be backed up. The service database may be an ETCD, and the configuration information of the target application may be recorded in the service database.
The current configuration information of the target application may include current container image version information, persistent volumes, persistent volume declarations, configuration parameter information, and configuration script information of the target application. The configuration script information is information such as a yaml file for recording specification, execution environment, and the like. Persistent Volume (PV) is an abstraction of the underlying shared storage, and is related to the implementation of the specific underlying shared storage technology, such as Ceph (a distributed File System), GlusterFS (an open source distributed File System), NFS (Network File System), and the like. The Persistent Volume Claim (PVC) is a statement stored by a user, and the PVC consumes PV resources, and the user who really uses the storage does not need to care about the storage implementation details of the bottom layer, but only needs to directly use the PVC.
In a specific embodiment of the present application, the current configuration information of the target application may be obtained by querying the service database, and then the current configuration information of the target application is written into the backup database. The backup database is different from the service database.
After writing the current configuration information of the target application into the backup database, a link and reference relationship of the current configuration information of the target application may be generated. Corresponding configuration information can be searched in the backup database through the link of the current configuration information of the target application, and the incidence relation between the current configuration information and other configuration information of the target application can be determined through the reference relation of the current configuration information of the target application.
S130: and calling a snapshot interface in the container storage interface, and backing up the current service data of the target application by executing snapshot operation on the current service data of the target application in the service storage.
In the embodiment of the application, a snapshot interface can be added to the container storage interface. Container Storage Interface (CSI) is an industry standard Interface specification jointly formulated by members (members) from communities such as kubernets, messes, dockers, etc., aimed at exposing arbitrary Storage systems to containerized applications. The CSI specification defines a minimum set of operations and deployment recommendations for a Storage Provider (SP) to implement a CSI-compliant plug-in. The main focus of the CSI specification is to declare the interface that the plug-in must implement.
And calling a snapshot interface in the container storage interface to execute snapshot operation on the current business data of the target application in the business storage. A snapshot is a fully available copy of a given data set that includes an image of the corresponding data at some point in time (the point in time at which the copy began). The snapshot may be a copy of the data it represents or may be a replica of the data.
By executing snapshot operation on the current service data of the target application in the service storage, the current service data of the target application can be backed up.
Specifically, a snapshot interface in the container storage interface may be called, a snapshot operation is performed on a service disk corresponding to the persistent volume of the target application in the service storage, a storage snapshot of the target application is generated, then a backup disk is created in the backup storage mounted on the working node where the target application is located, and the storage snapshot of the target application is copied to the backup disk.
Before backing up the current service data of the target application, a backup state machine can be started first, and the state of the backup operation executed on the current service data of the target application is recorded in real time, so that the backup operation can be continuously executed at the place where the problem occurs when the problem occurs in the backup process.
By calling a snapshot interface in the container storage interface, a snapshot operation can be executed on a service disk corresponding to a persistent volume of the target application in service storage, so that a storage snapshot of the target application can be generated. Each disk corresponds to a LUN (Logical Unit Number).
The backup storage can be mounted on a working node where the target application is located, a backup disc is created in the backup storage, and a storage snapshot of the target application, which is generated by performing a snapshot operation on a service disc corresponding to a persistent volume of the target application in the service storage, is copied to the backup disc, so that the backup of the current service data of the target application is realized.
In an embodiment of the present application, a plurality of storage snapshots of a target application in a business storage may be merged, so that only one snapshot point of the target application is saved in the business storage. Specifically, the merging processing may be performed on the multiple storage snapshots of the target application in the service storage when a set time interval is reached, or the merging processing may be performed on the multiple storage snapshots of the target application in the service storage after a snapshot operation is performed on a service disk corresponding to a persistent volume of the target application in the service storage to generate a storage snapshot of the target application and the storage snapshot of the target application is copied to a backup disk. This may reduce the footprint of the storage snapshot in the business storage.
S140: and generating a current backup point based on the current configuration information of the backed-up target application and the current service data of the target application, and updating a backup chain of the target application based on the current backup point.
In the embodiment of the application, the current configuration information of the target application in the service database is backed up, a snapshot interface in the container storage interface is called, a snapshot operation is performed on the current service data of the target application in the service storage, and after the current service data of the target application is backed up, a current backup point can be generated based on the backed-up current configuration information of the target application and the current service data of the target application, and the current backup point can record the link, the reference relationship and the like of the current configuration information of the target application and can also record the snapshot information of the current service data of the target application. The backup processing of the target application at different times may generate corresponding backup points, and a plurality of backup points may form a backup chain. After the current backup point is generated, the backup chain of the target application may be updated based on the current backup point.
For ease of understanding, the backup process provided by the embodiment of the present application is described with reference to the system architecture shown in fig. 2.
The K8S environment may include a master node and a plurality of work nodes, such as a work node 1 and a work node 2, where the work node 1 runs a target application, the target application is a stateful application and is composed of a front-end pod (minimum resource organization unit in K8S) and a database pod, and the work node 2 runs a stateless application. The target application and the stateless application can both perform external service access through kubbeproxy (core component of Kubernetes) deployed on respective nodes. The user can manage the K8S environment through the container cloud management platform. A node proxy kubelet is also running in working node 1 and working node 2, maintaining the pots in operation and providing a kubernets runtime environment.
The main node may be deployed with application program interface services, a backup server, and a container storage interface. A backup client may be deployed in the working node 1. The K8S environment may correspond to business storage and backup storage.
The backup server can receive a backup request for the target application sent by a user through the container cloud management platform through the application program interface service, and determine that the target application in the K8S environment is the application to be backed up.
The backup server side can acquire the current configuration information of the target application by inquiring the service database, and write the current configuration information of the target application into the backup database.
The backup server side can also start a backup state machine, call a snapshot interface in the container storage interface, execute snapshot operation on a service disk corresponding to the persistent volume of the target application in service storage, and generate a storage snapshot of the target application;
the backup client may mount the backup storage to the working node 1, then copy the storage snapshot to a backup disk of the backup storage, and update the backup chain in the backup storage.
According to the embodiment of the application, the snapshot interface is added in the container storage interface, and the independent backup server is deployed in the K8S environment, so that the container storage interface can be controlled to snapshot the corresponding disk in the service storage under the condition that the application is unaware, and the snapshot is backed up to other storage, thereby realizing the backup of the service data of the stateful application. Meanwhile, the backup of the complete stateful application is realized by combining the backup of the stateful application configuration information.
By applying the method provided by the embodiment of the application, after the target application to be backed up in the K8S environment is determined, the current configuration information of the target application in the service database is backed up, the snapshot interface in the container storage interface is called, the current service data of the target application in the service storage is backed up by performing the snapshot operation on the current service data of the target application, a current backup point is generated based on the current configuration information of the backed up target application and the current service data of the target application, and the backup chain of the target application is updated based on the current backup point. When the backup of the target application in the K8S environment is required, the current configuration information and the current service data of the target application can be backed up independently, and the backup of the configuration information of all applications in the whole K8S environment is not required, so that the backup efficiency can be improved, the consumption of excessive resources can be avoided, and the effective recovery of the target application can be realized based on the current configuration information and the current service data of the target application.
In one embodiment of the present application, the method may further comprise the steps of:
the method comprises the following steps: receiving a recovery request for a target application in a K8S environment;
step two: determining a target backup point in a backup chain of the target application according to the recovery request;
step three: exporting the target backup point and the service data corresponding to all backup points before the target backup point to a new disc stored by the service;
step four: creating a new persistent volume and a new persistent volume declaration for the new disk;
step five: and recovering the target application based on the configuration information corresponding to the target backup point, and associating a new persistent volume statement.
For convenience of description, the above steps are combined for illustration.
The target application may not operate normally due to errors, exceptions, etc., and in this case, the target application needs to be recovered. A corresponding recovery request may be issued by the user. After receiving a restore request for a target application in the K8S environment, a target backup point in a backup chain of the target application may be determined based on the restore request. The recovery request can carry the information of the target backup point, and the target backup point can be determined by analyzing the recovery request.
After the target backup point is determined, the service data corresponding to the target backup point and all backup points before the target backup point in the backup chain can be exported to a new disk of the service storage, and the service data exported to the new disk of the service storage can be merged.
For a new disk, a new persistent volume and a new persistent volume declaration may be created.
Then, the configuration information corresponding to the target backup point is obtained, the configuration information corresponding to the target backup point can be obtained by reading the backup database, the target application can be recovered based on the configuration information corresponding to the target backup point, and then a new persistent volume statement can be associated, so that the target application can normally run.
According to the embodiment of the application, the target application can be quickly restored based on the backup chain of the target application, and the influence on the normal operation of the target application is avoided.
Corresponding to the above method embodiments, the present application embodiment further provides an application processing apparatus, and the application processing apparatus described below and the application processing method described above may be referred to correspondingly.
Referring to fig. 3, the apparatus may include the following modules:
the target application determining module 310 is configured to determine a target application to be backed up in the K8S environment, where the target application is a stateful application;
the configuration information backup module 320 is configured to backup current configuration information of a target application in a service database;
the service data backup module 330 is configured to invoke a snapshot interface in the container storage interface, and perform snapshot operation on current service data of a target application in service storage to backup the current service data of the target application;
and the backup chain updating module 340 is configured to generate a current backup point based on the current configuration information of the backed-up target application and the current service data of the target application, and update the backup chain of the target application based on the current backup point.
By applying the device provided by the embodiment of the application, after the target application to be backed up in the K8S environment is determined, the current configuration information of the target application in the service database is backed up, the snapshot interface in the container storage interface is called, the current service data of the target application in the service storage is backed up by performing snapshot operation on the current service data of the target application, a current backup point is generated based on the current configuration information of the backed up target application and the current service data of the target application, and the backup chain of the target application is updated based on the current backup point. When the backup of the target application in the K8S environment is required, the current configuration information and the current service data of the target application can be backed up independently, and the backup of the configuration information of all applications in the whole K8S environment is not required, so that the backup efficiency can be improved, the consumption of excessive resources can be avoided, and the effective recovery of the target application can be realized based on the current configuration information and the current service data of the target application.
In a specific embodiment of the present application, the configuration information backup module 320 is configured to:
acquiring current configuration information of a target application by inquiring a service database;
and writing the current configuration information of the target application into the backup database.
In one embodiment of the present application, the current configuration information of the target application includes current container image version information, persistent volume declaration, configuration parameter information, and configuration script information of the target application.
In a specific embodiment of the present application, the service data backup module 330 is configured to:
calling a snapshot interface in the container storage interface, and executing snapshot operation on a service disk corresponding to a persistent volume of the target application in service storage to generate a storage snapshot of the target application;
and creating a backup disc in the backup storage mounted by the working node where the target application is located, and copying the storage snapshot of the target application to the backup disc to realize the backup of the current service data of the target application.
In a specific embodiment of the present application, the system further includes a snapshot merge processing module, configured to:
and merging the plurality of storage snapshots of the target application in the business storage so as to only store one snapshot point of the target application in the business storage.
In one embodiment of the present application, the target application determining module 310 is configured to:
receiving a backup request through an application program interface service;
and determining a target application to be subjected to backup processing under the K8S environment based on the backup request.
In a specific embodiment of the present application, the system further includes a target application recovery module, configured to:
receiving a recovery request for a target application in a K8S environment;
determining a target backup point in a backup chain of the target application according to the recovery request;
exporting the target backup point and the service data corresponding to all backup points before the target backup point to a new disc stored by the service;
creating a new persistent volume and a new persistent volume declaration for the new disk;
and recovering the target application based on the configuration information corresponding to the target backup point, and associating a new persistent volume statement.
Corresponding to the above method embodiment, an embodiment of the present application further provides an application processing device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the application processing method when executing the computer program.
As shown in fig. 4, in order to illustrate a composition structure of the application processing apparatus, the application processing apparatus may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in embodiments of the application processing method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
determining a target application to be subjected to backup processing in a K8S environment, wherein the target application is a stateful application;
backing up current configuration information of a target application in a service database;
calling a snapshot interface in the container storage interface, and backing up the current service data of the target application by executing snapshot operation on the current service data of the target application in the service storage;
and generating a current backup point based on the current configuration information of the backed-up target application and the current service data of the target application, and updating a backup chain of the target application based on the current backup point.
In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as an interface call function, a data backup function), and the like; the storage data area may store data created during use, such as configuration data, service data, and the like.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 12 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 4 does not constitute a limitation of the application processing device in the embodiment of the present application, and in practical applications, the application processing device may include more or less components than those shown in fig. 4, or some components may be combined.
Corresponding to the above method embodiments, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above application processing method.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present application are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. An application processing method, comprising:
determining a target application to be subjected to backup processing in a K8S environment, wherein the target application is a stateful application;
backing up the current configuration information of the target application in a service database;
calling a snapshot interface in a container storage interface, and backing up the current business data of the target application by executing snapshot operation on the current business data of the target application in business storage;
and generating a current backup point based on the current configuration information of the target application and the current service data of the target application, and updating a backup chain of the target application based on the current backup point.
2. The application processing method according to claim 1, wherein the backing up the current configuration information of the target application in the service database comprises:
acquiring current configuration information of the target application by querying a service database;
and writing the current configuration information of the target application into a backup database.
3. The application processing method of claim 1, wherein the current configuration information of the target application comprises current container image version information, persistent volumes, persistent volume declarations, configuration parameter information, and configuration script information of the target application.
4. The application processing method according to claim 1, wherein the calling a snapshot interface in the container storage interface to backup the current business data of the target application by performing a snapshot operation on the current business data of the target application in the business storage includes:
calling a snapshot interface in a container storage interface, and executing snapshot operation on a service disk corresponding to a persistent volume of the target application in service storage to generate a storage snapshot of the target application;
and creating a backup disc in the backup storage mounted by the working node where the target application is located, copying the storage snapshot of the target application to the backup disc, and realizing the backup of the current service data of the target application.
5. The application processing method of claim 4, further comprising:
and merging the plurality of storage snapshots of the target application in the service storage so as to only store one snapshot point of the target application in the service storage.
6. The method according to claim 1, wherein the determining a target application to be backed up in a K8S environment comprises:
receiving a backup request through an application program interface service;
and determining a target application to be subjected to backup processing under the K8S environment based on the backup request.
7. The application processing method according to any one of claims 1 to 6, further comprising:
receiving a recovery request for the target application in the K8S environment;
determining a target backup point in a backup chain of the target application according to the recovery request;
exporting the target backup point and the service data corresponding to all backup points before the target backup point to a new disc stored by the service;
creating a new persistent volume and a new persistent volume declaration for the new disk;
and recovering the target application based on the configuration information corresponding to the target backup point, and associating the new persistent volume statement.
8. An application processing apparatus, comprising:
the system comprises a target application determining module, a backup processing module and a backup processing module, wherein the target application determining module is used for determining a target application to be backed up under a K8S environment, and the target application is a stateful application;
the configuration information backup module is used for backing up the current configuration information of the target application in the service database;
the service data backup module is used for calling a snapshot interface in a container storage interface and backing up the current service data of the target application by executing snapshot operation on the current service data of the target application in service storage;
and the backup chain updating module is used for generating a current backup point based on the current configuration information of the target application and the current service data of the target application, and updating the backup chain of the target application based on the current backup point.
9. An application processing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the application processing method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the application processing method according to any one of claims 1 to 7.
CN202110962770.4A 2021-08-20 2021-08-20 Application processing method and device and related equipment Pending CN113656149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110962770.4A CN113656149A (en) 2021-08-20 2021-08-20 Application processing method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110962770.4A CN113656149A (en) 2021-08-20 2021-08-20 Application processing method and device and related equipment

Publications (1)

Publication Number Publication Date
CN113656149A true CN113656149A (en) 2021-11-16

Family

ID=78480623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110962770.4A Pending CN113656149A (en) 2021-08-20 2021-08-20 Application processing method and device and related equipment

Country Status (1)

Country Link
CN (1) CN113656149A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281263A (en) * 2021-12-27 2022-04-05 深圳市名竹科技有限公司 Storage resource processing method, system and equipment of container cluster management system
CN114328007A (en) * 2021-11-19 2022-04-12 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof
CN115048240A (en) * 2022-05-17 2022-09-13 广州鼎甲计算机科技有限公司 Data processing method, system and medium based on Kubernetes
WO2023185300A1 (en) * 2022-04-01 2023-10-05 华为技术有限公司 Container storage management method and apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391318A (en) * 2017-09-18 2017-11-24 郑州云海信息技术有限公司 A kind of method, system and device of container data persistence
CN109284205A (en) * 2018-09-21 2019-01-29 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium
US20200133795A1 (en) * 2018-10-26 2020-04-30 EMC IP Holding Company LLC Smart dynamic restore for kubernetes based applications
CN111338854A (en) * 2020-05-25 2020-06-26 南京云信达科技有限公司 Kubernetes cluster-based method and system for quickly recovering data
WO2020207010A1 (en) * 2019-04-08 2020-10-15 平安科技(深圳)有限公司 Data backup method and device, and computer-readable storage medium
CN112181720A (en) * 2020-09-11 2021-01-05 济南浪潮数据技术有限公司 Virtual data center backup method and device based on cloud management platform
US20210011811A1 (en) * 2019-07-12 2021-01-14 Trilio Data, Inc. Scalable Cloud-Based Backup Method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391318A (en) * 2017-09-18 2017-11-24 郑州云海信息技术有限公司 A kind of method, system and device of container data persistence
CN109284205A (en) * 2018-09-21 2019-01-29 平安科技(深圳)有限公司 Snap backup method, device, computer equipment and storage medium
US20200133795A1 (en) * 2018-10-26 2020-04-30 EMC IP Holding Company LLC Smart dynamic restore for kubernetes based applications
WO2020207010A1 (en) * 2019-04-08 2020-10-15 平安科技(深圳)有限公司 Data backup method and device, and computer-readable storage medium
US20210011811A1 (en) * 2019-07-12 2021-01-14 Trilio Data, Inc. Scalable Cloud-Based Backup Method
CN111338854A (en) * 2020-05-25 2020-06-26 南京云信达科技有限公司 Kubernetes cluster-based method and system for quickly recovering data
CN112181720A (en) * 2020-09-11 2021-01-05 济南浪潮数据技术有限公司 Virtual data center backup method and device based on cloud management platform

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328007A (en) * 2021-11-19 2022-04-12 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof
CN114328007B (en) * 2021-11-19 2024-03-22 苏州浪潮智能科技有限公司 Container backup and restoration method, device and medium thereof
CN114281263A (en) * 2021-12-27 2022-04-05 深圳市名竹科技有限公司 Storage resource processing method, system and equipment of container cluster management system
CN114281263B (en) * 2021-12-27 2024-03-29 深圳市名竹科技有限公司 Storage resource processing method, system and equipment of container cluster management system
WO2023185300A1 (en) * 2022-04-01 2023-10-05 华为技术有限公司 Container storage management method and apparatus
CN115048240A (en) * 2022-05-17 2022-09-13 广州鼎甲计算机科技有限公司 Data processing method, system and medium based on Kubernetes
CN115048240B (en) * 2022-05-17 2023-08-29 广州鼎甲计算机科技有限公司 Data processing method, system and medium based on Kubernetes

Similar Documents

Publication Publication Date Title
US11132264B2 (en) Point-in-time copy restore
CN113656149A (en) Application processing method and device and related equipment
US10169173B2 (en) Preserving management services with distributed metadata through the disaster recovery life cycle
AU2015229684B2 (en) Page cache write logging at block-based storage
CN113672350B (en) Application processing method and device and related equipment
US9678680B1 (en) Forming a protection domain in a storage architecture
US10216583B1 (en) Systems and methods for data protection using cloud-based snapshots
CN109582443A (en) Virtual machine standby system based on distributed storage technology
US10817387B2 (en) Auto point in time data restore for instance copy
JP2006065845A (en) Generation of optimized restoration plan
US10585785B2 (en) Preservation of modifications after overlay removal from a container
CN112099989A (en) Disaster recovery, migration and recovery method for Kubernetes cloud native application
US9760449B2 (en) Restoring a point-in-time copy
CN112181723A (en) Financial disaster recovery method and device, storage medium and electronic equipment
US20210149771A1 (en) Application-level recovery from an enterprise-level image copy
US9760450B2 (en) Restoring a clone point-in-time copy
US10387262B1 (en) Federated restore of single instance databases and availability group database replicas
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
US10936425B2 (en) Method of tracking and analyzing data integrity issues by leveraging cloud services
CN112765129A (en) Method and equipment for realizing database data version management
CN117389713B (en) Storage system application service data migration method, device, equipment and medium
CN116578446B (en) Virtual machine backup method, device and system, electronic equipment and storage medium
US11080151B2 (en) Restoration of cloud management platform
CN116501552B (en) Data backup method, device, system and storage medium
US11620059B1 (en) Optimization of file system snapshot performance in hybrid storage deployments

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