CN109376033B - Snapshot backup method and device, computer equipment and storage medium - Google Patents

Snapshot backup method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN109376033B
CN109376033B CN201811105917.2A CN201811105917A CN109376033B CN 109376033 B CN109376033 B CN 109376033B CN 201811105917 A CN201811105917 A CN 201811105917A CN 109376033 B CN109376033 B CN 109376033B
Authority
CN
China
Prior art keywords
backup
snapshot
storage
data
backed
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
CN201811105917.2A
Other languages
Chinese (zh)
Other versions
CN109376033A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811105917.2A priority Critical patent/CN109376033B/en
Publication of CN109376033A publication Critical patent/CN109376033A/en
Application granted granted Critical
Publication of CN109376033B publication Critical patent/CN109376033B/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
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; 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

Landscapes

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

Abstract

The application relates to the field of data processing, in particular to application of data backup, and discloses a snapshot backup method, a snapshot backup device, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up; refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, wherein the storage end is storage equipment used for storing the storage snapshot; mounting the storage snapshot to the backup host, and executing the backup task to complete the backup of the data to be backed up; and if the backup of the data to be backed up is detected to be completed, controlling the backup host to unload the storage snapshot. The snapshot backup method can improve backup efficiency.

Description

Snapshot backup method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a snapshot backup method and apparatus, a computer device, and a storage medium.
Background
At present, with the development of big data, the data plays a crucial role in the development of enterprises, and more enterprises are concerned about the backup of stored product data. In order to improve the security and efficiency of data storage backup of products and protect data of enterprises, a data Snapshot technology (Snapshot) is one of the mature rapid backup technologies. Data snapshot technology is a technology of preserving a data image at a certain time, and the preserved image is called a snapshot. The true meaning of the data snapshot is: the backup of the file system is achieved in the shortest amount of time and with the lowest consumption, creating a "shadow" image of the data, which can be read or written as the original data is manipulated. Therefore, the data snapshot technology is adopted to photograph the data, so that the application program can be ensured to continue to run without being influenced while backing up, downloading or transferring the data. However, when the commercial backup products on the market perform snapshot backup on the backup source library at present, the step of initiating the snapshot backup each time is tedious, and the operation steps related to the storage and backup host are too many, thereby resulting in lower backup efficiency. Therefore, it is necessary to provide a snapshot backup method to solve the above problems.
Disclosure of Invention
The application provides a snapshot backup method, a snapshot backup device, computer equipment and a storage medium, and aims to improve the backup efficiency of data.
The application provides a snapshot backup method, which comprises the following steps:
receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up;
refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, wherein the storage end is storage equipment used for storing the storage snapshot;
mounting the storage snapshot to the backup host, and executing the backup task to complete the backup of the data to be backed up;
and if the data to be backed up is detected to be completely backed up, controlling the backup host to unload the storage snapshot.
The application provides a snapshot backup device, it includes:
the system comprises a request receiving unit, a backup task generating unit and a backup task processing unit, wherein the request receiving unit is used for receiving a snapshot backup request and generating a backup task according to the snapshot backup request, and the snapshot backup request comprises data to be backed up;
the refreshing and obtaining unit is used for refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, and the storage end is storage equipment used for storing the storage snapshot;
the mount execution unit is used for mounting the storage snapshot into the backup host and executing the backup task to complete the backup of the data to be backed up;
and the control unloading unit is used for controlling the backup host to unload the storage snapshot if the backup of the data to be backed up is detected to be completed.
The application also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of any one of the snapshot backup methods provided by the application.
The present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the snapshot backup method according to any embodiment provided in the present application.
The embodiment of the application provides a snapshot backup method, a snapshot backup device, computer equipment and a storage medium, wherein a backup task is generated according to a snapshot backup request by receiving the snapshot backup request; refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up in the snapshot backup request; mounting the storage snapshot to the backup host, and executing the backup task to complete the backup of the data to be backed up; and if the data to be backed up is detected to be completely backed up, controlling the backup host to unload the storage snapshot. The backup method reduces the disk recovery operation on the backup host, avoids the abnormality that the backup host generates invalid equipment files due to the recovery of the storage disk and the CPU is busy due to an invalid link, reduces the disk scanning times of the host, avoids the task failure caused by the disk identification of the host by blocking an application program, reduces the direct mutual influence of the backup operation, and particularly improves the backup efficiency and the success rate of the backup operation when multiple tasks are concurrent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a view of a scene corresponding to a snapshot backup method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a snapshot backup method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of a snapshot backup method according to another embodiment of the present application;
FIG. 4 is a schematic flow chart diagram illustrating steps for setting up a default configuration database according to an embodiment of the present application;
fig. 5 is a schematic block diagram of a snapshot backup apparatus according to an embodiment of the present application;
fig. 6 is a schematic block diagram of a snapshot backup apparatus according to another embodiment of the present application;
fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of 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 will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
The embodiment of the application provides a snapshot backup method and device, computer equipment and a storage medium.
For convenience of understanding, an application scene composition to which the snapshot backup method of the embodiment of the present application is applied is introduced first. As shown in fig. 1, the application scenario includes a Server, a backup host, a preset configuration library, a storage end, a production host, and a terminal.
The terminal can be an electronic device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant and a wearable device; the Server can be an independent Server or a Server cluster consisting of a plurality of servers; the backup host can also be a server; the storage end is a storage device. The production host corresponds to the production environment and generates the data to be backed up, and the Server and the backup host form a backup environment for executing the snapshot backup method provided by the embodiment to complete the backup of the data to be backed up. In one embodiment, it is understood that the Server Server and the backup host may be the same Server.
Referring to fig. 2, fig. 2 is a schematic flowchart of a snapshot backup method according to an embodiment of the present application. The snapshot backup method is applied to a Server Server. As shown in fig. 2, the snapshot backup method includes steps S101 to S104.
S101, receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up.
Specifically, the Server receives a snapshot backup request sent by the terminal, and generates a backup task according to the snapshot backup request. If a user needs a snapshot backup service, the user can send a snapshot backup request through a terminal, the snapshot backup request comprises backup parameters and a data identifier of data to be backed up, and the backup parameters comprise: the backup data retention time, the backup period, the backup starting time and the like, wherein the data to be backed up comprises production data, log data and the like; the data identification may be represented by a database type and an instance name, which may be the name of the user application.
Specifically, a backup client may be set in the terminal, the user opens the client in the terminal to set a corresponding backup policy, the backup policy includes a backup parameter and data to be backed up, and a snapshot backup request is generated according to the backup parameter in the backup policy. Wherein, setting a corresponding backup strategy, for example, setting the retention time of backup data to be 1 month, setting Monday, tuesday, thursday and Friday in the backup period, and setting the backup start time to be 23.
And S102, refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, wherein the storage end is storage equipment used for storing the storage snapshot.
Specifically, the storage end is a storage device, specifically, may be a database, and a storage snapshot previously established for the backup data is stored in the storage end, so that the storage end is convenient to refresh to obtain the storage snapshot corresponding to the data to be backed up.
S103, mounting the storage snapshot to the backup host, and executing the backup task to complete the backup of the data to be backed up.
Specifically, the mounting the storage snapshot to the backup host specifically includes: mapping the storage snapshot to a backup host to enable the backup host to scan and load the storage snapshot when the storage snapshot is identified, and mounting the storage snapshot to the backup host specifically includes the processes of mapping, scanning and loading. And the backup host executes the backup task to complete the backup of the data to be backed up and monitors the backup state of the data to be backed up, wherein the backup state comprises the success of the backup and the failure of the backup.
And S104, controlling the backup host to unload the storage snapshot if the backup of the data to be backed up is detected to be completed.
Specifically, if it is monitored that the data to be backed up is successfully backed up, indicating that the data to be backed up is backed up, the storage snapshot mounted on the backup host before the backup host is unloaded is controlled so as to continuously realize snapshot backup of the data to be backed up. For example, the above method steps are executed circularly according to the backup period to realize the backup of the data to be backed up. The snapshot backup method omits the mapping relation between the recovery storage snapshot and the backup host and the corresponding process of the snapshot mapping between the recovery storage snapshot and the production source library of the production host, thereby improving the backup efficiency, namely the success rate of backup operation.
In the embodiment, the snapshot backup method reduces disk recovery operation on the backup host, avoids abnormalities of the backup host such as invalid device file generation caused by recovery of a storage disk and CPU busy caused by an invalid link, reduces the disk scanning times of the production host, avoids task failure caused by disk identification of a blocked application program on the production host, reduces mutual influence of backup operation, and particularly improves backup efficiency and success rate of backup operation when multiple tasks are concurrent.
Referring to fig. 3, fig. 3 is a schematic flowchart of a snapshot backup method according to another embodiment of the present application. The snapshot backup method is applied to a Server Server. As shown in fig. 3, the snapshot backup method includes steps S201 to S209.
S201, receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up.
Specifically, the Server receives a snapshot backup request sent by the terminal, and generates a backup task according to the snapshot backup request. If a user needs a snapshot backup service, the user can send a snapshot backup request through a terminal, the snapshot backup request comprises backup parameters and a data identifier of data to be backed up, and the backup parameters comprise: backup data retention time, backup period, backup starting time and the like, wherein the backup data comprises production data, log data and the like; the data identification may be represented by a database type and an instance name, which may be the name of the user application.
Specifically, a backup client may be set in the terminal, the user opens the client in the terminal to set a corresponding backup policy, the backup policy includes a backup parameter, and a snapshot backup request is generated according to the backup policy. Wherein, setting a corresponding backup strategy, for example, setting the retention time of backup data to be 1 month, setting Monday, tuesday, thursday and Friday in the backup period, and setting the backup start time to be 23.
S202, judging whether a storage snapshot corresponding to the data to be backed up exists in a storage end.
Specifically, whether a storage snapshot corresponding to the data to be backed up exists in a storage end is judged, and a judgment result is generated. If the storage end has the storage snapshot corresponding to the data to be backed up, executing step S203; and if the storage end does not have the storage snapshot corresponding to the data to be backed up, executing step S204.
And S203, refreshing the storage terminal to obtain a storage snapshot corresponding to the data to be backed up.
Specifically, a storage snapshot corresponding to the data to be backed up exists in the storage terminal, and the storage terminal is refreshed to obtain the storage snapshot corresponding to the data to be backed up. The storage end is a storage device used for storing the storage snapshot, and the storage snapshot established for the backup data before is stored in the storage end, so that the storage end is convenient to refresh to obtain the storage snapshot corresponding to the data to be backed up.
And S204, acquiring a data identifier corresponding to the data to be backed up.
Specifically, if a storage snapshot corresponding to the data to be backed up does not exist in the storage end, a data identifier corresponding to the data to be backed up is obtained.
The data identifier is used to mark the data to be backed up, and may be specifically represented by a database type and an instance name, where the instance name may be a name of a user application.
S205, inquiring a preset configuration library according to the data identification to obtain a source library disk list corresponding to the data identification.
Specifically, the preset configuration library stores a corresponding relationship between the data identifier and a source library disk list, so that the source library disk list corresponding to the data identifier can be queried in the preset configuration database through the data identifier, and the source library disk list is the same as a disk list of a production host in a production environment of the user application and is used for storing data generated by the user application. Therefore, the preset configuration library can avoid acquiring the disk list of the source library from the production host.
And S206, generating a storage snapshot according to the source library disk list.
Specifically, a storage disk required for storing a snapshot is created in a storage end according to the source library disk list; and establishing a mapping relation between a production source library corresponding to the production host and the storage disk to complete the creation of the storage snapshot. And creating a storage snapshot at a storage end according to the source library disk list by using a data snapshot technology, wherein the storage snapshot is convenient for realizing snapshot backup.
And S207, mounting the storage snapshot into the backup host, and executing the backup task to complete the backup of the data to be backed up.
Specifically, the storage snapshot is mapped onto a backup host so that the backup host scans and loads the storage snapshot when the storage snapshot is identified. And executing the backup task after the backup host is loaded to the storage snapshot so as to complete the backup of the data to be backed up. And monitoring the backup state of the data to be backed up, wherein the backup state comprises backup success and backup failure.
And S208, if the backup of the data to be backed up is detected to be completed, controlling the backup host to unload the storage snapshot.
Specifically, if it is monitored that the data to be backed up is successfully backed up, indicating that the data to be backed up is backed up, the storage snapshot mounted on the backup host before the backup host is unloaded is controlled so as to continuously realize snapshot backup of the data to be backed up. For example, the above method steps are executed circularly according to the backup period to realize the backup of the data to be backed up. The snapshot backup method omits the mapping relation between the recovery storage snapshot and the backup host and the corresponding process of the snapshot mapping between the recovery storage snapshot and the production source library of the production host, thereby improving the backup efficiency, namely the success rate of backup operation.
S209, controlling the storage end to store the storage snapshot and the corresponding relation between the storage snapshot and the data identifier.
Specifically, the storage snapshot generated on the storage end by the backup is stored in the storage terminal, and meanwhile, the corresponding relation between the storage snapshot and the data identifier is also stored, so that the storage end is refreshed during the next backup to obtain the storage snapshot corresponding to the data to be backed up.
In an embodiment, before step S205, a step of setting a preset configuration database is further included, as shown in fig. 4, the step specifically includes the following steps:
s301, a resource application request is obtained, wherein the resource application request comprises disk requirement information of a user application database.
Specifically, if a user needs a cloud service, such as a secure cloud or an ari cloud, the user may apply for a corresponding database on a cloud database through a terminal to store application data, thereby requesting the user to fill in a corresponding application requirement, that is, corresponding disk requirement information. And generating a resource application request according to the application requirement, and sending the resource application request to a Server Server, wherein the resource application request comprises disk requirement information of a user application database. Therefore, the Server Server can obtain the resource application request sent by the terminal.
S302, distributing disk resources for the user according to the disk demand information and generating disk resource information.
The disk resource information comprises a data identifier, a source library disk list and a corresponding relation between the data identifier and the source library disk list.
Specifically, the Server allocates corresponding disk resources to the user according to the disk demand information, and the allocated disk resources generate disk resource information. The disk resource information may include a data identifier and a source library disk list, and a corresponding relationship between the data identifier and the source library disk list.
The data identification can be represented by a database type and an instance name, and the instance name can be the name of the user application; the source library disk list is a disk directory corresponding to data generated by user application.
Because a plurality of users initiate resource application requests through corresponding terminals, a data disk table can be preset, and data identifications of the users and a source library disk list are correspondingly stored in the data disk table. And simultaneously, the receiving terminal sends a resource change request, the resource change request comprises disk change information, and the data disk table is updated according to the disk change information. In addition, a source library disk list corresponding to the data identification can be obtained from the generation host; and verifying the data disk table according to the acquired source library disk list, and storing the data disk table to the preset configuration library after the data disk table is verified.
S303, storing the disk resource information into the preset configuration library.
Specifically, the disk resource information is stored in the preset configuration library so as to obtain a source library disk list corresponding to the disk resource information according to data identification query. For example, the data identifier, the source library disk list and the corresponding relationship between the data identifier and the source library disk list are stored in the data disk table, and the data disk table is stored in a preset configuration library.
In this embodiment, a resource application request is obtained; distributing disk resources for the user according to the disk demand information in the resource application request and generating disk resource information; and storing the disk resource information into the preset configuration library to complete the setting of the preset configuration library. According to the method, the preset configuration library can be set when the user applies for the cloud service, so that the setting efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic block diagram of a snapshot backup apparatus according to an embodiment of the present application. As shown in fig. 5, the present application also provides a snapshot backup apparatus corresponding to the above snapshot backup method. The snapshot backup apparatus includes a unit for executing the above-described snapshot backup method, and the apparatus may be configured in a server.
Specifically, as shown in fig. 5, the snapshot backup apparatus 400 includes: a request receiving unit 401, a snapshot judging unit 402, a refresh acquiring unit 403, an identification acquiring unit 404, a query acquiring unit 405, a snapshot generating unit 406, a mount executing unit 407, a control uninstalling unit 408, and a control saving unit 409.
The request receiving unit 401 is configured to receive a snapshot backup request, and generate a backup task according to the snapshot backup request, where the snapshot backup request includes data to be backed up.
A snapshot determining unit 402, configured to determine whether a storage snapshot corresponding to the data to be backed up exists in the storage end.
A refresh obtaining unit 403, configured to refresh a storage end to obtain a storage snapshot corresponding to the data to be backed up, where the storage end is a storage device used to store the storage snapshot.
An identifier obtaining unit 404, configured to obtain a data identifier corresponding to the data to be backed up.
And an inquiry obtaining unit 405, configured to query a preset configuration library according to the data identifier to obtain a source library disk list corresponding to the data identifier.
And a snapshot generating unit 406, configured to generate a storage snapshot according to the source library disk list.
A mount executing unit 407, configured to mount the storage snapshot to the backup host, and execute the backup task to complete backup of the data to be backed up.
The control unloading unit 408 is configured to control the backup host to unload the storage snapshot if it is detected that the backup of the data to be backed up is completed.
And a control saving unit 409, configured to control the storage end to save the storage snapshot and the corresponding relationship between the storage snapshot and the data identifier.
In an embodiment, corresponding to the step of setting the preset configuration database, as shown in fig. 6, the snapshot backup apparatus 400 further includes: request acquisition unit 4051, allocation generation unit 4052, and information storage unit 4053.
The request obtaining unit 4051 is configured to obtain a resource application request, where the resource application request includes disk requirement information of a database applied by a user.
The allocation generating unit 4052 is configured to allocate a disk resource to the user according to the disk demand information, and generate disk resource information, where the disk resource information includes a data identifier, a source library disk list, and a correspondence between the data identifier and the source library disk list.
An information storage unit 4053, configured to store the disk resource information in the preset configuration library.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the snapshot backup apparatus and the units described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described apparatus may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 7.
Referring to fig. 7, fig. 7 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 700 may be a server.
Referring to fig. 7, the computer device 700 includes a processor 720, a memory, which may include a non-volatile storage medium 730 and an internal memory 740, and a network interface 750, which are connected by a system bus 710.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer programs 732, when executed, cause the processor 720 to perform any of a variety of snapshot backup methods.
The processor 720 is used to provide computing and control capabilities, supporting the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of the computer program 732 in the non-volatile storage medium 730, and when the computer program 732 is executed by the processor 720, the processor 720 can be caused to perform any one of the snapshot backup methods.
The network interface 750 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing device 700 to which the disclosed aspects apply, as a particular computing device 700 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to perform the following steps:
receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up; refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, wherein the storage end is storage equipment used for storing the storage snapshot; mounting the storage snapshot to the backup host, and executing the backup task to complete the backup of the data to be backed up; and if the data to be backed up is detected to be completely backed up, controlling the backup host to unload the storage snapshot.
In an embodiment, before the processor 720 is configured to run the program code stored in the memory to implement the refreshing and obtain the storage snapshot corresponding to the data to be backed up, the following steps are further implemented:
judging whether a storage snapshot corresponding to the data to be backed up exists in a storage end; and if the storage snapshot corresponding to the data to be backed up exists in the storage end, executing the step of refreshing the storage end to obtain the storage snapshot corresponding to the data to be backed up.
In an embodiment, the processor 720 is configured to execute the program code stored in the memory to implement the following steps after determining whether the storage snapshot corresponding to the data to be backed up exists in the storage end:
if the storage snapshot corresponding to the data to be backed up does not exist in the storage terminal, acquiring a data identifier corresponding to the data to be backed up; inquiring a preset configuration library according to the data identification to obtain a source library disk list corresponding to the data identification; and generating a storage snapshot according to the source library disk list, and executing the step of mounting the storage snapshot to the backup host.
In an embodiment, before the processor 720 is configured to run the program code stored in the memory to implement the querying of the preset configuration library according to the data identifier to obtain the source library disk list corresponding to the data identifier, the following steps are further implemented:
acquiring a resource application request, wherein the resource application request comprises disk demand information of a user application database; distributing disk resources for the user according to the disk demand information and generating disk resource information, wherein the disk resource information comprises a data identifier, a source library disk list and a corresponding relation between the data identifier and the source library disk list; and storing the disk resource information into the preset configuration library.
In one embodiment, the processor 720 is configured to execute the program code stored in the memory to implement the following steps after controlling the backup host to unload the storage snapshot:
and controlling the storage end to store the storage snapshot and the corresponding relation between the storage snapshot and the data identifier.
In an embodiment, the processor 720 is configured to run the program code stored in the memory to implement the mounting of the storage snapshot to the backup host, which specifically implements the following steps:
mapping the storage snapshot onto a backup host to cause the backup host to scan load the storage snapshot upon identifying the storage snapshot.
In an embodiment, the processor 720 is configured to run a program code stored in a memory to implement the receiving of the snapshot backup request, and when a backup task is generated according to the snapshot backup request, the following steps are specifically implemented:
receiving a backup strategy sent by a terminal, wherein the backup strategy comprises backup parameters and a data identifier of data to be backed up; and generating a backup task according to the backup parameters and the data identification.
It should be understood that, in the embodiment of the present Application, the Processor 720 may be a Central Processing Unit (CPU), and the Processor 720 may also be other general-purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field-Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the configuration of computer device 700 depicted in FIG. 7 is not intended to be limiting of computer device 700 and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. In the embodiment of the present invention, the computer program may be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement the flow steps of the embodiments including the methods as described above.
The computer readable storage medium may be a magnetic disk, an optical disk, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk or an optical disk, etc. which can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the 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.
In the several embodiments provided in the present application, it should be understood that the disclosed snapshot backup apparatus and method may be implemented in other manners. For example, the snapshot backup apparatus embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated in another system or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A snapshot backup method, comprising:
receiving a snapshot backup request, and generating a backup task according to the snapshot backup request, wherein the snapshot backup request comprises data to be backed up;
refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, wherein the storage end is storage equipment used for storing the storage snapshot;
mounting the storage snapshot into a backup host, and executing the backup task to complete the backup of the data to be backed up;
if the backup of the data to be backed up is detected to be completed, controlling the backup host to unload the storage snapshot;
if the storage end does not have the storage snapshot corresponding to the data to be backed up, acquiring a data identifier corresponding to the data to be backed up;
inquiring a preset configuration library according to the data identification to obtain a source library disk list corresponding to the data identification;
generating a storage snapshot according to the source library disk list, and executing the step of mounting the storage snapshot to the backup host;
creating a storage disk required for storing a snapshot in a storage end according to the source library disk list; and establishing a mapping relation between a production source library corresponding to the production host and the storage disk to complete the creation of the storage snapshot.
2. The snapshot backup method according to claim 1, wherein before the refreshing the storage end to obtain the storage snapshot corresponding to the data to be backed up, the method further comprises:
judging whether a storage snapshot corresponding to the data to be backed up exists in a storage end;
and if the storage snapshot corresponding to the data to be backed up exists in the storage end, executing the step of refreshing the storage end to obtain the storage snapshot corresponding to the data to be backed up.
3. The snapshot backup method according to claim 1, wherein before querying a preset configuration library according to the data identifier to obtain a source library disk list corresponding to the data identifier, the snapshot backup method further comprises:
acquiring a resource application request, wherein the resource application request comprises disk demand information of a user application database;
distributing disk resources for the user according to the disk demand information and generating disk resource information, wherein the disk resource information comprises a data identifier, a source library disk list and a corresponding relation between the data identifier and the source library disk list;
and storing the disk resource information into the preset configuration library.
4. The snapshot backup method of claim 1, wherein after controlling the backup host to offload the storage snapshot, further comprising:
and controlling the storage end to store the storage snapshot and the corresponding relation between the storage snapshot and the data identifier.
5. The snapshot backup method of claim 1, wherein said mounting the storage snapshot to a backup host comprises:
mapping the storage snapshot onto a backup host to cause the backup host to scan for loading the storage snapshot upon identifying the storage snapshot.
6. The snapshot backup method of claim 1, wherein the receiving a snapshot backup request and generating a backup task according to the snapshot backup request comprises:
receiving a backup strategy sent by a terminal, wherein the backup strategy comprises backup parameters and a data identifier of data to be backed up; and
and generating a backup task according to the backup parameters and the data identification.
7. A snapshot backup apparatus, comprising:
the system comprises a request receiving unit, a backup task generating unit and a backup task processing unit, wherein the request receiving unit is used for receiving a snapshot backup request and generating a backup task according to the snapshot backup request, and the snapshot backup request comprises data to be backed up;
the refreshing and obtaining unit is used for refreshing a storage end to obtain a storage snapshot corresponding to the data to be backed up, and the storage end is storage equipment used for storing the storage snapshot;
the mount execution unit is used for mounting the storage snapshot into a backup host and executing the backup task to complete the backup of the data to be backed up;
the control unloading unit is used for controlling the backup host to unload the storage snapshot if the backup of the data to be backed up is detected to be completed;
a data identifier obtaining unit, configured to obtain a data identifier corresponding to the data to be backed up if a storage snapshot corresponding to the data to be backed up does not exist in the storage end;
the query acquisition unit is used for querying a preset configuration library according to the data identification to acquire a source library disk list corresponding to the data identification;
the generation execution unit is used for generating a storage snapshot according to the source library disk list and executing the step of mounting the storage snapshot to the backup host;
the storage snapshot creating unit is used for creating a storage disk required by the storage snapshot in a storage end according to the source library disk list; and establishing a mapping relation between a production source library corresponding to the production host and the storage disk to complete the creation of the storage snapshot.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
CN201811105917.2A 2018-09-21 2018-09-21 Snapshot backup method and device, computer equipment and storage medium Active CN109376033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811105917.2A CN109376033B (en) 2018-09-21 2018-09-21 Snapshot backup method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811105917.2A CN109376033B (en) 2018-09-21 2018-09-21 Snapshot backup method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109376033A CN109376033A (en) 2019-02-22
CN109376033B true CN109376033B (en) 2023-04-07

Family

ID=65402233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811105917.2A Active CN109376033B (en) 2018-09-21 2018-09-21 Snapshot backup method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109376033B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976945A (en) * 2019-02-26 2019-07-05 深圳市买买提信息科技有限公司 A kind of method and device of Log backup
CN110297813B (en) * 2019-05-22 2022-09-02 平安银行股份有限公司 Data migration method and device, computer equipment and storage medium
CN111722880B (en) * 2020-05-11 2024-02-09 深圳市共进电子股份有限公司 Equipment production method and device, terminal equipment and medium
CN113377577B (en) * 2021-06-10 2022-06-07 上海西信信息科技股份有限公司 Cloud platform architecture based on big data and data processing method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402471A (en) * 2011-12-23 2012-04-04 创新科软件技术(深圳)有限公司 Method and system for backing up data in real time based on snapshot function of memory array
EP2731013A1 (en) * 2012-11-12 2014-05-14 Huawei Technologies Co., Ltd. Backing up method, device, and system for virtual machine
CN105653718A (en) * 2016-01-04 2016-06-08 浪潮电子信息产业股份有限公司 Method for ensuring data consistence of database after snapshot in disk snapshot storing environment
WO2017211099A1 (en) * 2016-06-06 2017-12-14 华为技术有限公司 Data backup method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402471A (en) * 2011-12-23 2012-04-04 创新科软件技术(深圳)有限公司 Method and system for backing up data in real time based on snapshot function of memory array
EP2731013A1 (en) * 2012-11-12 2014-05-14 Huawei Technologies Co., Ltd. Backing up method, device, and system for virtual machine
CN103810058A (en) * 2012-11-12 2014-05-21 华为技术有限公司 Backup method, equipment and system for virtual machine
CN105653718A (en) * 2016-01-04 2016-06-08 浪潮电子信息产业股份有限公司 Method for ensuring data consistence of database after snapshot in disk snapshot storing environment
WO2017211099A1 (en) * 2016-06-06 2017-12-14 华为技术有限公司 Data backup method and apparatus

Also Published As

Publication number Publication date
CN109376033A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN109284205B (en) Snapshot backup method and device, computer equipment and storage medium
CN109376033B (en) Snapshot backup method and device, computer equipment and storage medium
CN107832126B (en) Thread adjusting method and terminal thereof
US10740136B2 (en) Automatic virtual machine termination in a cloud
US10303508B2 (en) Adaptive self-maintenance scheduler
JP6669682B2 (en) Cloud server scheduling method and apparatus
CN107832100B (en) APK plug-in loading method and terminal thereof
WO2019205371A1 (en) Server, message allocation method, and storage medium
CN111273871B (en) Method and device for dynamically allocating storage resources on container platform
CN110267060B (en) Video file storage injection method and device, computer equipment and storage medium
CN107682391B (en) Electronic device, server allocation control method, and computer-readable storage medium
CN106572137B (en) Distributed service resource management method and device
CN110109628B (en) Data reconstruction method, device, equipment and storage medium of distributed storage system
CN109726007B (en) Container arrangement quota management method and device and container arrangement system
US20050160313A1 (en) Real-time remote backup system and related method
CN112416542A (en) Distributed task system, management method and device and computer equipment
US9792130B2 (en) Rebooting to a UEFI application from a UEFI supported system
WO2020228036A1 (en) Task processing method and apparatus, system, electronic device, and storage medium
CN110968406B (en) Method, device, storage medium and processor for processing task
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN114756527A (en) Method and device for expanding Redis cluster, electronic equipment and storage medium
CN108566293B (en) Electronic device, zk node information notification method, and storage medium
CN112506574A (en) Method for modifying BIOS configuration options in ARM server based on CentOS in-band
US11150947B2 (en) Determining a deletion deadline for a staging environment
CN113311995B (en) Cloud hard disk preparation method and device, computer equipment and storage medium

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