CN112463450B - Incremental backup management method, system, electronic equipment and storage medium - Google Patents

Incremental backup management method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112463450B
CN112463450B CN202011363433.5A CN202011363433A CN112463450B CN 112463450 B CN112463450 B CN 112463450B CN 202011363433 A CN202011363433 A CN 202011363433A CN 112463450 B CN112463450 B CN 112463450B
Authority
CN
China
Prior art keywords
backup
incremental
incremental backup
deleted
deleting
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
CN202011363433.5A
Other languages
Chinese (zh)
Other versions
CN112463450A (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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202011363433.5A priority Critical patent/CN112463450B/en
Publication of CN112463450A publication Critical patent/CN112463450A/en
Application granted granted Critical
Publication of CN112463450B publication Critical patent/CN112463450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F11/1453Management of the data involved in backup or backup restore using de-duplication of the data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses an incremental backup management method, which comprises the following steps: receiving a backup deleting instruction, and determining incremental backup to be deleted according to the backup deleting instruction; judging whether the incremental backup to be deleted has a child backup or not; if yes, updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup, and deleting the incremental backup to be deleted; and if not, deleting the incremental backup to be deleted. The method and the device can reduce occupation of the incremental backup to the storage resources. The application also discloses an incremental backup management system, electronic equipment and a storage medium, which have the beneficial effects.

Description

Incremental backup management method, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to an incremental backup management method, an incremental backup management system, an electronic device, and a storage medium.
Background
Backup is a mechanism of data protection that is commonly used to protect core data or personally important data produced by business systems. A typical backup system is typically combined with a hardware storage device to form a backup solution.
Incremental backups are one implementation of backup functions, and the current deletion logic for incremental backups is: the cloud platform issues an instruction for deleting a certain appointed incremental backup, firstly, database record inquiry is conducted, if no child backup based on the incremental backup to be deleted exists, the incremental backup can be deleted successfully, and otherwise, deletion of the incremental backup to be deleted is forbidden. In the above incremental backup deletion scheme, the incremental backup of the existing child backup cannot be deleted, so that the incremental backup occupies excessive storage resources.
Therefore, how to reduce the occupation of storage resources by incremental backups is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide an incremental backup management method, an incremental backup management system, electronic equipment and a storage medium, which can reduce occupation of storage resources by incremental backup.
In order to solve the above technical problems, the present application provides an incremental backup management method, which includes:
receiving a backup deleting instruction, and determining incremental backup to be deleted according to the backup deleting instruction;
judging whether the incremental backup to be deleted has a child backup or not;
If yes, updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup, and deleting the incremental backup to be deleted;
and if not, deleting the incremental backup to be deleted.
Optionally, if the backup deletion instruction is a non-concurrent incremental backup deletion instruction, updating the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup, including:
querying a first incremental backup and a second incremental backup; the first incremental backup is a parent backup of the incremental backup to be deleted, and the second incremental backup is a child backup of the incremental backup to be deleted;
setting a father backup ID variable of the second incremental backup as a backup ID of the first incremental backup, and updating the dependency relationship between the first incremental backup and the second incremental backup;
and determining difference data between the incremental backup to be deleted and the first incremental backup, and importing the difference data into the second incremental backup.
Optionally, if the backup deletion instruction is a concurrent incremental backup deletion instruction, updating the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup, including:
Acquiring a backup dependency dictionary; wherein the backup dependency dictionary includes dependencies between all incremental backups;
setting the incremental backup to be deleted as the current-level incremental backup;
inquiring a parent backup of the incremental backup of the current level according to the backup dependency dictionary;
judging whether the father backup of the incremental backup of the current level is deleted or not;
if yes, setting the father backup of the current level incremental backup as a new current level incremental backup, and executing the operation of inquiring the father backup of the current level incremental backup according to the backup dependency dictionary;
if not, setting the father backup of the current level incremental backup as a third incremental backup, and updating a fourth incremental backup by using the third incremental backup; and the fourth incremental backup is a sub-backup to be deleted.
Optionally, updating the fourth incremental backup with the third incremental backup includes:
setting a father backup ID variable of the fourth incremental backup as a backup ID of the third incremental backup, and updating the dependency relationship between the third incremental backup and the fourth incremental backup;
and determining difference data of the incremental backup to be deleted and the third incremental backup, and importing the difference data into the fourth incremental backup.
Optionally, after deleting the incremental backup to be deleted, the method further includes:
and updating the dependency relationship among all incremental backups in the backup dependency dictionary.
Optionally, after querying the parent backup of the incremental backup of the current hierarchy according to the backup dependency dictionary, the method further includes:
and if the third incremental backup is not queried after traversing the backup dependency dictionary, deleting the incremental backup to be deleted.
Optionally, after determining that the incremental backup to be deleted has a child backup, the method further includes:
judging whether the incremental backup to be deleted is the incremental backup which is created for the first time by the system; if yes, deleting the incremental backup to be deleted; and if not, executing the operation of updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup.
The application also provides an incremental backup management system, which comprises:
the incremental backup to be deleted determining module is used for receiving a backup deleting instruction and determining incremental backup to be deleted according to the backup deleting instruction;
the sub-backup judging module is used for judging whether the incremental backup to be deleted has sub-backup or not;
the first deleting module is used for deleting the incremental backup to be deleted if the incremental backup to be deleted has the child backup, and updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the father backup;
And the second deleting module is used for deleting the incremental backup to be deleted if the incremental backup to be deleted does not have the child backup.
The application also provides a storage medium, on which a computer program is stored, which when executed implements the steps performed by the incremental backup management method described above.
The application also provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps executed by the incremental backup management method when calling the computer program in the memory.
The application provides an incremental backup management method, which comprises the following steps: receiving a backup deleting instruction, and determining incremental backup to be deleted according to the backup deleting instruction; judging whether the incremental backup to be deleted has a child backup or not; if yes, updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup, and deleting the incremental backup to be deleted; and if not, deleting the incremental backup to be deleted.
After receiving the backup deleting instruction, the method determines the incremental backup to be deleted according to the backup deleting instruction. If the incremental backup to be deleted does not comprise the child backup, the incremental backup to be deleted can be deleted directly, and if the incremental backup to be deleted comprises the child backup, the dependency relationship of the child backup is updated according to the dependency relationship of the incremental backup to be deleted and the parent backup. When the dependency relationship of the child backup is updated, the parent backup ID of the child backup can be updated from the incremental backup to be deleted to the parent backup. After the dependency relationship of the child backup is updated, the incremental backup to be deleted is deleted without causing storage abnormality, so that the application can delete the incremental backup of the existing child backup and reduce the occupation of the incremental backup to storage resources. The application also provides an incremental backup management system, an electronic device and a storage medium, which have the beneficial effects and are not described herein.
Drawings
For a clearer description of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an incremental backup management method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a backup management method based on a multi-architecture distributed cloud platform according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an incremental backup management system according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of an incremental backup management method according to an embodiment of the present application.
The specific steps may include:
s101: receiving a backup deleting instruction, and determining incremental backup to be deleted according to the backup deleting instruction;
the embodiment can be applied to a multi-architecture distributed cloud platform based on Openstack, the Openstack is an open source cloud platform software technology, an operation platform and a tool set for deploying cloud are provided, the cloud platform is a cloud platform for comprehensively providing virtualized computing service, storage service and network service for users, and the cloud platform has a reliable cloud deployment scheme and good expansibility and is an operating system in cloud computing era. The multi-architecture distributed cloud platform can be provided with a backup system for carrying out data backup, one of the most main functions considered by the backup system is time line version freezing and backtracking, and one important design idea is surrounding a restoration design. The backup copies the data from one node to another node and from one system to avoid the possibility of the occurrence of problems of hardware and software in the same period; backup systems typically add a high level of redundancy configuration, or redundancy replication, or low cost arithmetic redundancy data distribution to the data store. The backup system further avoids the problems of data loss, addition and modification and the like caused by various intentional or unintentional data read-write actions (such as manual operation, system fault, software defect, hacking invasion, viruses, natural disasters and the like) through time versioning and space redundancy distribution. When the backup system software has problems, the data can be restored back through a certain flow. After the problem occurs in the service system, the multiple backups can be independently restored in the selected database table or a certain 1 file; if the data adopts the hybrid cloud mode, the data can be restored to the service system under extremely short conditions.
The distributed storage is used as a supporting scheme of a backup back-end system, and after the OpenStack cloud platform is docked, the built incremental backup native logic is realized as follows: (1) When the incremental backup bak_1 is created for the 1 st time, the incremental backup bak_1 is automatically converted into full backup, a temporary snapshot A of the cloud hard disk at the current moment, a base data volume and the snapshot A thereof (only the name is the same as the cloud hard disk snapshot A but the meaning is different) are generated, and the cloud platform generates a unique ID number in the current cloud platform for the incremental backup bak_1 in the creation process: bak_1.id; (2) When the incremental backup bak_2 is created for the 2 nd time, the backup is created based on the incremental backup created for the 1 st time, firstly, a temporary snapshot B of the current moment of the cloud hard disk is generated, the data difference between the snapshot B and the snapshot A of the cloud hard disk is exported to a temporary file diff_A_B by using a distributed storage bottom layer command, the difference data in the diff_A_B is imported to a base volume immediately, the snapshot B (the meaning of which is the same as 1)) of the base volume is synchronously generated, and the cloud platform generates a unique ID number in the current cloud platform for the incremental backup bak_2 in the creation process: the bak_2.id, at the same time, generates a parent ID record, the parent ID number is bak_1.id, which indicates that the incremental backup bak_2 to be deleted is generated based on bak_1; (3) When the incremental backup bak_3 is created for the 3 rd time, the creation backup is performed based on the incremental backup created for the 2 nd time, firstly, a temporary snapshot C of the current moment of the cloud hard disk is generated, the data difference between the snapshot C and the snapshot B of the cloud hard disk is exported to a temporary file diff_B_C by using a distributed storage bottom layer command, the difference data in the diff_B_C is imported to a base volume immediately, the snapshot C (the meaning of which is the same as that of the two steps) of the base volume is synchronously generated, and the cloud platform generates a unique ID number in the current cloud platform for the incremental backup bak_3 in the creation process: bak_3.id, a parent ID record is generated, the parent ID number is bak_2.id, which indicates that the incremental backup bak_3 to be deleted is generated based on bak_2; the subsequent incremental backup creation process is the same as (2) (3).
After receiving the backup deletion instruction, the embodiment can analyze the backup deletion instruction, and determine the incremental backup to be deleted corresponding to the backup deletion instruction according to the analysis result. In this embodiment, the number of incremental backups to be deleted is not limited, and one backup deletion instruction may delete any number of incremental backups to be deleted.
S102: judging whether the incremental backup to be deleted has a child backup or not; if yes, go to S103; if not, entering S104;
in this step, whether the incremental backup to be deleted has a child backup may be determined by querying a database, where the parent backup mentioned in this embodiment is the parent backup of the incremental backup to be deleted, the child backup is the child backup of the incremental backup to be deleted, and difference data is stored in the child backup, where the difference data is difference data between a snapshot corresponding to the child backup and a snapshot corresponding to the incremental backup to be deleted. If the incremental backup to be deleted does not have the sub-backup, the incremental sub-backup to be deleted can be directly deleted; if the incremental backup to be deleted has the sub-backup, the backup system inquires the sub-backup to be deleted when the incremental backup to be deleted is directly deleted, and outputs abnormal refusal to delete when the backup system inquires the sub-backup to be deleted depends on the incremental backup to be deleted. In this embodiment, the dependency relationship of the child backup is updated according to the dependency relationship of the incremental backup to be deleted and the parent backup through the operation of S103, so that the parent backup of the child backup is updated to be the parent backup of the incremental backup to be deleted, so that the child backup and the incremental backup to be deleted have no dependency relationship, and the incremental backup can be deleted.
As a possible implementation manner, after determining that the incremental backup to be deleted has a child backup, it may also be determined whether the incremental backup to be deleted is an incremental backup created for the first time by the system; if yes, deleting the incremental backup to be deleted; if not, the operation of updating the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup in S103 is executed.
S103: updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup, and deleting the incremental backup to be deleted;
the step is based on the existence of the child backup in the incremental backup to be deleted, and the parent backup of the child backup is updated from the incremental backup to be deleted to the parent backup of the incremental backup to be deleted according to the dependency relationship between the incremental backup to be deleted and the parent backup. After updating the dependency of the child backup, the embodiment may delete the incremental backup to be deleted.
The above procedure is illustrated: incremental backups B1-B2-B3-B4 are sequentially created for the cloud hard disk v1, B1 is the parent backup of B2, B2 is the parent backup of B3, and B3 is the parent backup of B4. If B4 is deleted, firstly inquiring whether a child backup with the parent backup ID of B4 exists through a database, and if not, directly deleting the incremental backup B4; if B3 is deleted, the database query can obtain that the parent backup ID of the incremental backup B4 is B3, and the exception is thrown directly at the moment, because B3 has the child backup B4, deletion is forbidden. By the processing manner of this embodiment, before B3 is deleted, the parent backup of B4 may be updated to B2, and at this time, B3 deletion will not be abnormal, so that B3 deletion may be implemented. In a large-scale cloud platform, a backup system is generally designed with a scheme for carrying out backup regularly, in order to save and reasonably utilize storage resources, the backup system is generally designed with a timing for creating incremental backups, the incremental backups are accumulated for a long time and are more in quantity, and a plurality of intermediate incremental backups are not necessarily obtained, so that inquiry is troublesome. From the convenience of use, users generally want to keep the latest backup data, and the data of the historical backup is ensured to be available during the recovery, and the incremental backup created in other periods can be combined and deleted according to the actual requirements. The backup management function design scheme based on the multi-architecture distributed cloud platform provided by the embodiment can enrich the management mechanism of the cloud platform backup data protection, and improves the convenience and reliability of the cloud platform.
S104: and deleting the incremental backup to be deleted.
After receiving the backup deletion instruction, the embodiment determines the incremental backup to be deleted according to the backup deletion instruction. If the incremental backup to be deleted does not comprise the child backup, the incremental backup to be deleted can be deleted directly, and if the incremental backup to be deleted comprises the child backup, the dependency relationship of the child backup is updated according to the dependency relationship of the incremental backup to be deleted and the parent backup. When the dependency relationship of the child backup is updated, the parent backup ID of the child backup can be updated from the incremental backup to be deleted to the parent backup. After the dependency relationship of the child backup is updated, the deletion of the incremental backup to be deleted does not cause storage abnormality, so that the embodiment can delete the incremental backup of the existing child backup and reduce the occupation of the incremental backup to storage resources.
As a further introduction to the corresponding embodiment of fig. 1, if the backup deletion instruction received in S101 is a non-concurrent incremental backup deletion instruction, incremental backups are deleted one by one in the backup system, that is, the deletion operation of the next incremental backup is performed after the incremental backup to be deleted is deleted. Therefore, when receiving a non-concurrent incremental backup deletion instruction, the present embodiment may update the dependency relationship of the child backup by including:
Step A1: querying a first incremental backup and a second incremental backup;
the first incremental backup is a parent backup of the incremental backup to be deleted, and the second incremental backup is a child backup of the incremental backup to be deleted;
step A2: setting a father backup ID variable of the second incremental backup as a backup ID of the first incremental backup, and updating the dependency relationship between the first incremental backup and the second incremental backup;
each incremental backup can have a corresponding parent backup ID variable, and before this step, the parent backup ID variable of the second incremental backup is the backup ID of the incremental backup to be deleted, and this step sets the parent backup ID variable of the second incremental backup to the backup ID of the first incremental backup, so that the parent backup of the second incremental backup is adjusted from the incremental backup to be deleted to the first incremental backup, that is, the dependency relationship between the first incremental backup and the second incremental backup is updated.
Step A3: and determining difference data between the incremental backup to be deleted and the first incremental backup, and importing the difference data into the second incremental backup.
In order to avoid the loss of the difference data due to deletion of the incremental backup to be deleted, the step determines the difference data between the incremental backup to be deleted and the first incremental backup and imports the difference data into the second incremental backup so that the difference data between the incremental backup to be deleted and the first incremental backup is stored in the second incremental backup.
The embodiment provides an implementation manner of deleting incremental backup in a non-concurrent incremental backup deleting scene, wherein a father backup ID and a son backup ID of the incremental backup to be deleted are recorded first; if the sub-backup ID does not exist, directly deleting the incremental backup to be deleted; if so, assigning the parent backup ID to the parent backup ID variable of the child backup, and updating the database. And exporting the difference data diff_data export between the incremental backup to be deleted and the father backup to a transition temporary file, importing diff_data import to the child backup to generate a new child backup, so that the intermediate data is not lost when the new child backup is used for recovering, and then directly deleting the incremental backup to be deleted.
In the above embodiment, the father backup ID variable of the second incremental backup is set as the backup ID of the first incremental backup, and the dependency relationship of the first incremental backup is updated to the second incremental backup, so that the deletion operation of the incremental backup to be deleted can be implemented. The above embodiment also imports the difference data between the incremental backup to be deleted and the first incremental backup into the second incremental backup, so that the intermediate data is not lost. After the related operations of steps A1 to A3 are performed, the incremental backup to be deleted may be deleted directly.
As a further introduction to the corresponding embodiment of fig. 1, if the backup deletion instruction received in S101 is a concurrent incremental backup deletion instruction, the incremental backup is concurrently deleted in the backup system, that is, there may be an operation in which multiple incremental backups to be deleted are deleted simultaneously. Therefore, when receiving the concurrent incremental backup deletion instruction, the embodiment may update the dependency relationship of the child backup by the following method, including:
step B1: acquiring a backup dependency dictionary;
the backup dependency dictionary comprises the dependency relationship among all incremental backups, namely the relationship among parent and child backups.
Step B2: setting the incremental backup to be deleted as the current-level incremental backup;
step B3: inquiring a parent backup of the incremental backup of the current level according to the backup dependency dictionary;
step B4: judging whether the father backup of the incremental backup of the current level is deleted or not; if yes, enter step B5; if not, entering a step B6;
the step is used for inquiring whether the parent backup of the incremental backup of the current hierarchy is deleted, if so, the step B5 is used for continuously inquiring the parent backup of the parent backup upwards.
Step B5: setting the father backup of the current-level incremental backup as a new current-level incremental backup, and entering a step B3;
Step B6: setting a father backup of the current level incremental backup as a third incremental backup, and updating a fourth incremental backup by using the third incremental backup;
and the fourth incremental backup is a sub-backup to be deleted. Specifically, the process of updating the fourth incremental backup by using the third incremental backup includes: setting a father backup ID variable of the fourth incremental backup as a backup ID of the third incremental backup, and updating the dependency relationship between the third incremental backup and the fourth incremental backup; and determining the difference data of the incremental backup to be deleted and the third incremental backup, and importing the difference data into the fourth incremental backup so as to ensure that the data in the middle is not lost, and then directly deleting the incremental backup to be deleted.
After executing step B6, the present embodiment may delete the incremental backups to be deleted, and update the dependency relationships between all the incremental backups in the backup dependency dictionary.
Further, after the parent backup of the current-level incremental backup is queried according to the backup dependency dictionary, if the third incremental backup (i.e., the parent backup of the current-level incremental backup that is not deleted) is not queried after traversing the backup dependency dictionary, the incremental backup to be deleted may be deleted.
The above embodiments provide a scheme for deleting incremental backups in a concurrent incremental backup deletion scenario. Under the concurrent deleting scene, the risk problems are as follows: when the intermediate incremental backups are deleted in batches, it is possible that the parent backup of the backup to be deleted currently is already deleted, and if the incremental backup to be deleted currently exists in the child backup and is not deleted, the parent backup ID of the child backup newly assigned becomes meaningless. In order to solve the above problem, the present embodiment provides the following mechanism to ensure that incremental backups that may not be deleted can find the corresponding parent backup ID that depends on, so as to show the dependency relationship, where the implementation logic of the mechanism is as follows: constructing an incremental backup ID maintenance FUNCTION Bak_ID_FUNCTION, inquiring the association relation between each backup ID and the parent backup ID thereof through a database, and storing the association relation in a backup dependency dictionary form, wherein the key-value storage form is as follows: { backup ID: parent backup ID }. The corresponding parent backup ID value can be found according to the recorded ID value of each incremental backup. Before deleting the incremental backup to be deleted, the current FUNCTION Bak_ID_FUNCTION is called, and updated and stored into the backup dependency dictionary ID_Dict. When deleting a plurality of incremental backups, if the parent backup to be deleted is deleted, the parent backup ID of the child backup is updated to the parent backup ID value of the parent backup to be deleted or the parent backup ID value of the higher level until found. After finding the father backup, the father backup ID value can be updated and stored in the database, then the difference data diff_data export between the current backup and the father backup which is queried up newly is exported to a transition temporary file, and diff_data import is imported to the child backup to obtain a new child backup, thus ensuring that the intermediate data is not lost when the new child backup is used for recovery, and then the deletion action of the incremental backup to be deleted is started. If the father backup and the son backup of the incremental backup to be deleted exist, the backup ID of the father backup is directly taken to be assigned to the father ID variable of the son backup, and then the new dependency relationship is updated to the database. And then exporting the difference data diff_data export between the incremental backup to be deleted and the father backup to a transition temporary file, importing diff_data import to the child backup to generate a new child backup, so that the intermediate data is not lost when the new child backup is used for recovering.
The flow described in the above embodiment is explained below by way of an embodiment in practical application. Referring to fig. 2, fig. 2 is a flowchart of a backup management method based on a multi-architecture distributed cloud platform provided in an embodiment of the present application, where the embodiment is applicable to multiple cloud platform infrastructures such as X86, ARM, MIPS, and the like, and the process is as follows: the user pre-issues a delete incremental backup request; and judging whether the current scene belongs to a concurrent deleting scene or not. If the current incremental backup to be deleted (namely the incremental backup to be deleted) has no sub-backup, judging whether the current incremental backup to be deleted (namely the incremental backup to be deleted) has the sub-backup or not; if the sub-backup does not exist, deleting the current incremental backup; if the child backup exists, updating the parent ID value of the child backup to the parent backup ID value of the incremental backup to be deleted currently, exporting the difference data diff_data export between the current backup and the parent backup to a temporary file, importing diff_data import into the child backup to obtain a new child backup, and deleting the current incremental backup.
And if the scene is the concurrent deletion scene, calling an incremental backup ID maintenance function to obtain a maintenance record ID_Dict between the parent backup ID and the child backup ID, and judging whether the child backup exists in the current incremental backup. If the child backup does not exist, deleting the current incremental backup. If the child backup exists, judging whether the parent backup of the current incremental backup exists or not; if the father backup exists, the father ID value of the child backup is updated to the father backup ID value of the current incremental backup to be deleted, the difference data diff_data export between the current backup and the latest father backup inquired by the father backup is exported to a temporary file, the diff_data export is imported to the child backup to obtain a new child backup, and finally the current incremental backup is deleted. If the parent backup of the current incremental backup does not exist, the following loop operation is performed:
Step C1, obtaining a parent backup ID value of a parent backup of the incremental backup to be deleted currently in an ID_Dict dictionary;
step C2, whether the latest father backup currently inquired exists or not; if yes, entering a step C4, otherwise entering a step C3;
step C3, obtaining the father backup ID value of the current latest father backup, searching the father backup ID according to the current latest father backup ID value, and entering step C2;
and step C4, updating the father ID value of the child backup to the father backup ID value of the incremental backup to be deleted currently, exporting the difference data diff_data export between the current backup and the latest father backup queried by the father backup to a temporary file, importing diff_data export to the child backup to obtain a new child backup, and deleting the current incremental backup.
The preconditions for the corresponding embodiment of fig. 2 are: the current backup storage back end supports incremental backup, and a plurality of incremental backups based on the same source cloud hard disk exist on the cloud platform. The embodiment corresponding to fig. 2 provides a new design of a cloud Ping Taiyun hard disk backup management function scheme, which is designed optimally for the backup deletion management function of the back end of the storage backup, supports deletion of any single or batch incremental backup and does not affect the data integrity after recovery based on the current backup time.
And after the user logs in the cloud platform, initiating an incremental backup deletion request, and executing incremental backup deletion operations of the non-concurrent deletion scene and the concurrent deletion scene according to the incremental backup deletion scene.
In a non-concurrent delete scenario, i.e., delete any one of the intermediate incremental backups, the operation implementation logic: the father backup ID value and the son backup ID of the current incremental backup are recorded in advance, the father ID value of the son backup is updated to the father backup ID value of the incremental backup to be deleted currently and is updated to the database, then the difference data diff_data export between the current backup and the father backup is exported to a transitional temporary file, diff_data import is imported to the son backup of the current incremental backup to generate a new son backup, so that when the new son backup is used for recovery, intermediate data is not lost, and then the deletion of the current backup is finished.
In a concurrent delete scenario, i.e., when multiple incremental backups are deleted simultaneously, the operation implementation logic: calling an incremental backup ID maintenance FUNCTION Bak_ID_FUNCTION, saving ID value dependency relations among all incremental backups into a dictionary ID_Dict, and then starting deleting the current incremental backup: if the current incremental backup does not contain the sub backup, deleting directly, and ending; if the current incremental backup has a child backup, further judging whether a parent backup of which the incremental backup is to be deleted currently exists or not: if the data exists, directly taking the ID value of the data to be assigned to a father ID variable based on the child backup to be deleted, then updating the father ID variable into a database, then exporting the difference data diff_data export between the current backup and the father backup to a transition temporary file, importing diff_data import into the child backup to generate a new child backup, thus ensuring that the intermediate data is not lost when the new child backup is used for recovery, and finally ending; if the incremental backup to be deleted does not exist, the father backup ID value of the father backup of the incremental backup to be deleted is obtained from the ID_Dict dictionary, whether the father backup of the incremental backup to be deleted exists or not is further judged, if the father backup of the father backup to be deleted exists, the ID_Dict dictionary value is continued until a exist father backup is found, the ID value of the father backup is assigned to the father ID variable of the son backup of the incremental backup to be deleted, the father backup is updated to a database, the difference data diff_data export between the current backup and the queried latest father backup is continuously executed and exported to a transition temporary file, and diff_data import is imported to the son backup of the father backup to generate a new son backup, so that the intermediate data is not lost when the new son backup is used for recovery, and the current incremental backup is deleted.
The above embodiment provides the core implementation logic for managing the flow and the data operation during deletion, and the optimization based on the native logic can support deletion of any single or batch incremental backup without affecting the data integrity after restoration based on the current backup time. The embodiment provides a design of a multi-architecture cloud platform backup management mechanism and a framework design idea that the multi-architecture cloud platform supports backup cloud disk management of the existing backup. The interface of the embodiment has openness and is optimized based on the native interface.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an incremental backup management system according to an embodiment of the present application;
the system may include:
the incremental backup to be deleted determining module 100 is configured to receive a backup deletion instruction, and determine an incremental backup to be deleted according to the backup deletion instruction;
a sub-backup judging module 200, configured to judge whether the incremental backup to be deleted has a sub-backup;
the first deletion module 300 is configured to, if there is a child backup in the incremental backup to be deleted, update a dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and a parent backup, and delete the incremental backup to be deleted;
And the second deleting module 400 is configured to delete the incremental backup to be deleted if the incremental backup to be deleted does not have a child backup.
After receiving the backup deletion instruction, the embodiment determines the incremental backup to be deleted according to the backup deletion instruction. If the incremental backup to be deleted does not comprise the child backup, the incremental backup to be deleted can be deleted directly, and if the incremental backup to be deleted comprises the child backup, the dependency relationship of the child backup is updated according to the dependency relationship of the incremental backup to be deleted and the parent backup. When the dependency relationship of the child backup is updated, the parent backup ID of the child backup can be updated from the incremental backup to be deleted to the parent backup. After the dependency relationship of the child backup is updated, the deletion of the incremental backup to be deleted does not cause storage abnormality, so that the embodiment can delete the incremental backup of the existing child backup and reduce the occupation of the incremental backup to storage resources.
Further, the first deletion module 300 includes:
the non-concurrent deleting processing unit is used for inquiring the first incremental backup and the second incremental backup if the backup deleting instruction is a non-concurrent incremental backup deleting instruction; the first incremental backup is a parent backup of the incremental backup to be deleted, and the second incremental backup is a child backup of the incremental backup to be deleted; the parent backup ID variable of the second incremental backup is set as the backup ID of the first incremental backup, and the dependency relationship between the first incremental backup and the second incremental backup is updated; and the method is also used for determining the difference data between the incremental backup to be deleted and the first incremental backup and importing the difference data into the second incremental backup.
Further, the first deletion module 300 includes:
the concurrent deleting processing unit is configured to update the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup if the backup deleting instruction is a concurrent incremental backup deleting instruction, and includes: the backup dependency dictionary is also used for acquiring a backup dependency dictionary; wherein the backup dependency dictionary includes dependencies between all incremental backups; the method is also used for setting the incremental backup to be deleted as the current-level incremental backup; the backup management system is also used for inquiring the father backup of the incremental backup of the current level according to the backup dependency dictionary; the method is also used for judging whether the father backup of the current level incremental backup is deleted or not; if yes, setting the father backup of the current level incremental backup as a new current level incremental backup, and executing the operation of inquiring the father backup of the current level incremental backup according to the backup dependency dictionary; if not, setting the father backup of the current level incremental backup as a third incremental backup, and updating a fourth incremental backup by using the third incremental backup; and the fourth incremental backup is a sub-backup to be deleted.
Further, the process of updating the fourth incremental backup by the concurrent deletion processing unit by using the third incremental backup includes:
Setting a father backup ID variable of the fourth incremental backup as a backup ID of the third incremental backup, and updating the dependency relationship between the third incremental backup and the fourth incremental backup;
and determining difference data of the incremental backup to be deleted and the third incremental backup, and importing the difference data into the fourth incremental backup.
Further, the method further comprises the following steps:
and the dictionary updating module is used for updating the dependency relationship among all the incremental backups in the backup dependency dictionary after deleting the incremental backups to be deleted.
Further, the method further comprises the following steps:
and the backup deleting module is used for deleting the incremental backup to be deleted if the third incremental backup is not queried after traversing the backup dependency dictionary after querying the parent backup of the incremental backup of the current level according to the backup dependency dictionary.
Further, the method further comprises the following steps:
the primary creation incremental backup processing module is used for judging whether the incremental backup to be deleted is the incremental backup created for the first time by the system after judging that the sub-backup exists in the incremental backup to be deleted; if yes, deleting the incremental backup to be deleted; and if not, executing the operation of updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup.
Since the embodiments of the system portion and the embodiments of the method portion correspond to each other, the embodiments of the system portion refer to the description of the embodiments of the method portion, which is not repeated herein.
The present application also provides a storage medium having stored thereon a computer program which, when executed, performs the steps provided by the above embodiments. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The application also provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided in the foregoing embodiments when calling the computer program in the memory. Of course the electronic device may also include various network interfaces, power supplies, etc.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. An incremental backup management method, comprising:
receiving a backup deleting instruction, and determining incremental backup to be deleted according to the backup deleting instruction;
judging whether the incremental backup to be deleted has a child backup or not;
if yes, updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup, and deleting the incremental backup to be deleted;
If not, deleting the incremental backup to be deleted;
if the backup deletion instruction is a non-concurrent incremental backup deletion instruction, updating the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup, including:
querying a first incremental backup and a second incremental backup; the first incremental backup is a parent backup of the incremental backup to be deleted, and the second incremental backup is a child backup of the incremental backup to be deleted;
setting a father backup ID variable of the second incremental backup as a backup ID of the first incremental backup, and updating the dependency relationship between the first incremental backup and the second incremental backup;
determining difference data between the incremental backup to be deleted and the first incremental backup, and importing the difference data into the second incremental backup;
if the backup deleting instruction is a concurrent incremental backup deleting instruction, updating the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup, including:
acquiring a backup dependency dictionary; wherein the backup dependency dictionary includes dependencies between all incremental backups;
setting the incremental backup to be deleted as the current-level incremental backup;
Inquiring a parent backup of the incremental backup of the current level according to the backup dependency dictionary;
judging whether the father backup of the incremental backup of the current level is deleted or not;
if yes, setting the father backup of the current level incremental backup as a new current level incremental backup, and executing the operation of inquiring the father backup of the current level incremental backup according to the backup dependency dictionary;
if not, setting the father backup of the current level incremental backup as a third incremental backup, and updating a fourth incremental backup by using the third incremental backup; and the fourth incremental backup is a sub-backup to be deleted.
2. The incremental backup management method of claim 1 wherein updating the fourth incremental backup with the third incremental backup comprises:
setting a father backup ID variable of the fourth incremental backup as a backup ID of the third incremental backup, and updating the dependency relationship between the third incremental backup and the fourth incremental backup;
and determining difference data of the incremental backup to be deleted and the third incremental backup, and importing the difference data into the fourth incremental backup.
3. The incremental backup management method of claim 1, further comprising, after deleting the incremental backup to be deleted:
And updating the dependency relationship among all incremental backups in the backup dependency dictionary.
4. The incremental backup management method of claim 1, further comprising, after querying a parent backup of a current-level incremental backup according to the backup dependency dictionary:
and if the third incremental backup is not queried after traversing the backup dependency dictionary, deleting the incremental backup to be deleted.
5. The incremental backup management method of any one of claims 1 to 4, further comprising, after determining that the incremental backup to be deleted has a child backup:
judging whether the incremental backup to be deleted is the incremental backup which is created for the first time by the system; if yes, deleting the incremental backup to be deleted; and if not, executing the operation of updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the parent backup.
6. An incremental backup management system, comprising:
the incremental backup to be deleted determining module is used for receiving a backup deleting instruction and determining incremental backup to be deleted according to the backup deleting instruction;
the sub-backup judging module is used for judging whether the incremental backup to be deleted has sub-backup or not;
The first deleting module is used for deleting the incremental backup to be deleted if the incremental backup to be deleted has the child backup, and updating the dependency relationship of the child backup according to the dependency relationship of the incremental backup to be deleted and the father backup;
the first deleting module includes:
the non-concurrent deleting processing unit is used for inquiring the first incremental backup and the second incremental backup if the backup deleting instruction is a non-concurrent incremental backup deleting instruction; the first incremental backup is a parent backup of the incremental backup to be deleted, and the second incremental backup is a child backup of the incremental backup to be deleted; the parent backup ID variable of the second incremental backup is set as the backup ID of the first incremental backup, and the dependency relationship between the first incremental backup and the second incremental backup is updated; the method is also used for determining difference data between the incremental backup to be deleted and the first incremental backup and importing the difference data into the second incremental backup;
the concurrent deleting processing unit is configured to update the dependency relationship of the child backup according to the dependency relationship between the incremental backup to be deleted and the parent backup if the backup deleting instruction is a concurrent incremental backup deleting instruction, and includes: the backup dependency dictionary is also used for acquiring a backup dependency dictionary; wherein the backup dependency dictionary includes dependencies between all incremental backups; the method is also used for setting the incremental backup to be deleted as the current-level incremental backup; the backup management system is also used for inquiring the father backup of the incremental backup of the current level according to the backup dependency dictionary; the method is also used for judging whether the father backup of the current level incremental backup is deleted or not; if yes, setting the father backup of the current level incremental backup as a new current level incremental backup, and executing the operation of inquiring the father backup of the current level incremental backup according to the backup dependency dictionary; if not, setting the father backup of the current level incremental backup as a third incremental backup, and updating a fourth incremental backup by using the third incremental backup; the fourth incremental backup is a sub-backup to be deleted;
And the second deleting module is used for deleting the incremental backup to be deleted if the incremental backup to be deleted does not have the child backup.
7. An electronic device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the incremental backup management method of any one of claims 1 to 5 when the computer program in the memory is invoked by the processor.
8. A storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the steps of the incremental backup management method of any one of claims 1 to 5.
CN202011363433.5A 2020-11-27 2020-11-27 Incremental backup management method, system, electronic equipment and storage medium Active CN112463450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011363433.5A CN112463450B (en) 2020-11-27 2020-11-27 Incremental backup management method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011363433.5A CN112463450B (en) 2020-11-27 2020-11-27 Incremental backup management method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112463450A CN112463450A (en) 2021-03-09
CN112463450B true CN112463450B (en) 2023-12-22

Family

ID=74809036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011363433.5A Active CN112463450B (en) 2020-11-27 2020-11-27 Incremental backup management method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112463450B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238891A (en) * 2021-03-19 2021-08-10 浪潮云信息技术股份公司 Backup deletion method and system based on backup chain
CN113535482B (en) * 2021-07-22 2024-03-19 华云数据控股集团有限公司 Cloud backup chain data backup method and device, equipment and readable medium
CN114676000A (en) * 2022-04-15 2022-06-28 中兴通讯股份有限公司 Data processing method and device, storage medium and computer program product
CN114721881B (en) * 2022-06-09 2022-11-04 苏州浪潮智能科技有限公司 Database management method, system, electronic device and storage medium
CN114817410B (en) * 2022-06-23 2022-09-13 心鉴智控(深圳)科技有限公司 Service data processing method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017453A (en) * 2006-02-07 2007-08-15 国际商业机器公司 Method and system for managing deletions in backup sets
CN101477487A (en) * 2009-01-22 2009-07-08 上海交通大学 Multiple incremental files backup and recovery method
CN102819536A (en) * 2011-09-27 2012-12-12 金蝶软件(中国)有限公司 Processing method and device of tree type data
US9235582B1 (en) * 2013-03-14 2016-01-12 Emc Corporation Tracking files excluded from backup
CN106933699A (en) * 2015-12-30 2017-07-07 中移(苏州)软件技术有限公司 A kind of data recovery, snapshot establishment, snapshot delet method and device
CN109614051A (en) * 2018-12-13 2019-04-12 北京金山云网络技术有限公司 A kind of method for cleaning of Backup Data, device, electronic equipment and storage medium
CN110879762A (en) * 2019-10-25 2020-03-13 苏州浪潮智能科技有限公司 Cloud backup deleting method and locally-stored cloud backup deleting method
CN111858159A (en) * 2020-06-19 2020-10-30 苏州浪潮智能科技有限公司 Backup method and system based on chain clone characteristic

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177149A1 (en) * 2002-03-18 2003-09-18 Coombs David Lawrence System and method for data backup
US9195727B2 (en) * 2013-01-30 2015-11-24 Hewlett-Packard Development Company, L.P. Delta partitions for backup and restore
US20170153951A1 (en) * 2015-11-30 2017-06-01 Microsoft Technology Licensing, Llc Incremental synchronous hierarchical system restoration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017453A (en) * 2006-02-07 2007-08-15 国际商业机器公司 Method and system for managing deletions in backup sets
CN101477487A (en) * 2009-01-22 2009-07-08 上海交通大学 Multiple incremental files backup and recovery method
CN102819536A (en) * 2011-09-27 2012-12-12 金蝶软件(中国)有限公司 Processing method and device of tree type data
US9235582B1 (en) * 2013-03-14 2016-01-12 Emc Corporation Tracking files excluded from backup
CN106933699A (en) * 2015-12-30 2017-07-07 中移(苏州)软件技术有限公司 A kind of data recovery, snapshot establishment, snapshot delet method and device
CN109614051A (en) * 2018-12-13 2019-04-12 北京金山云网络技术有限公司 A kind of method for cleaning of Backup Data, device, electronic equipment and storage medium
CN110879762A (en) * 2019-10-25 2020-03-13 苏州浪潮智能科技有限公司 Cloud backup deleting method and locally-stored cloud backup deleting method
CN111858159A (en) * 2020-06-19 2020-10-30 苏州浪潮智能科技有限公司 Backup method and system based on chain clone characteristic

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于过程结构树的流程间差别检测算法;曹斌等;电子学报;862-870 *
文件系统增量备份策略的形式化描述及实现;肖克辉;倪德明;;计算机工程与设计(10);217-219 *
树形高效数据库备份管理模型;周文瑾;胡晓勤;李自尊;邓亮;;计算机工程与设计(12);149-153 *
浅议中小企业数据备份;程利先;;企业技术开发(19);77-78+114 *

Also Published As

Publication number Publication date
CN112463450A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN112463450B (en) Incremental backup management method, system, electronic equipment and storage medium
US7676492B2 (en) Migration of database using serialized objects
US10496399B2 (en) Using a data dictionary to determine an upgrade edition of a relational database table
US8010962B2 (en) Infrastructure for the automation of the assembly of schema maintenance scripts
RU2429529C2 (en) Dynamic configuration, allocation and deployment of computer systems
RU2417426C2 (en) Database fragment cloning and management
US10956374B2 (en) Data recovery method, apparatus, and system
JP2022501692A (en) Upgrade from the first version of the database to the second version
CN113420026B (en) Database table structure changing method, device, equipment and storage medium
CN112365244A (en) Data life cycle management method and device
CN111314333A (en) Account management method, account management device, account management equipment and computer readable storage medium
CN105550342B (en) A kind of data processing method of the distributed data base of all-transparent
US20200097581A1 (en) Systems and methods of managing manifest refresh in a database
JP2001159993A (en) Method and device for storing data for referring to optional time state
CN113792026B (en) Method and device for deploying database script and computer-readable storage medium
WO2023111910A1 (en) Rolling back database transaction
US8630976B2 (en) Fast search replication synchronization processes
CN115114284A (en) Table change processing method and system
CN114138560A (en) Backup restoration method and system for operating system
CN111367892B (en) Data migration method and device
CN114610351A (en) Database upgrading method
CN114385415A (en) Method and device for virtual machine to backup across backup storage pools
CN108376104B (en) Node scheduling method and device and computer readable storage medium
CN112269677A (en) Rollback operation device, method, equipment and medium under heterogeneous cloud platform
CN111061568A (en) Method and device for deleting load balancer

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