CN114328016A - Data synthesis method, device, equipment and storage medium - Google Patents

Data synthesis method, device, equipment and storage medium Download PDF

Info

Publication number
CN114328016A
CN114328016A CN202111612386.8A CN202111612386A CN114328016A CN 114328016 A CN114328016 A CN 114328016A CN 202111612386 A CN202111612386 A CN 202111612386A CN 114328016 A CN114328016 A CN 114328016A
Authority
CN
China
Prior art keywords
linked list
backup
node
full
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111612386.8A
Other languages
Chinese (zh)
Inventor
覃展恒
倪国军
陈勇铨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Information2 Software Inc
Original Assignee
Shanghai Information2 Software Inc
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 Shanghai Information2 Software Inc filed Critical Shanghai Information2 Software Inc
Priority to CN202111612386.8A priority Critical patent/CN114328016A/en
Publication of CN114328016A publication Critical patent/CN114328016A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data synthesis method, a data synthesis device, data synthesis equipment and a storage medium. The method comprises the following steps: acquiring CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup; synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information; and synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information. The embodiment of the invention performs one-time complete backup and then performs a plurality of times of incremental backups to obtain a plurality of backup data and CBT information corresponding to the data, thereby reducing a large amount of unnecessary repeated read-write operations, reducing the recovery time, improving the efficiency of data recovery and reducing the resource occupation of the production environment.

Description

Data synthesis method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer disaster recovery backup, in particular to a data synthesis method, a device, equipment and a storage medium.
Background
The cloud virtualization platform is a new concept derived and developed from a virtualization technology (virtualization technology) concept, and refers to a method of cutting resources of one or more servers into a computing pool, a storage pool and a network pool by means of server resource cutting, and allocating the computing pool, the storage pool and the network pool together through resource management software to cooperatively work. When the operation and maintenance personnel need to create the cloud server, the required resources can be flexibly distributed according to actual requirements, so that the hardware resources of the server can be more reasonably used, and the waste of the redundant computing capacity of the hardware is reduced.
People in daily life increasingly depend on data, so that high requirements are put on the reliability and safety of the data. In the process of server operation, the problems of data loss and data damage are often caused by hardware damage or misoperation of operation and maintenance personnel. And before the data is lost or damaged, the data is backed up at regular time, so that the loss caused by the data loss or damage can be reduced to a certain extent. Nowadays, more and more enterprises can back up service data (server databases, virtual machine systems, etc.), and guarantee service continuity is provided.
For example, for a backup of a VMware Virtual Machine (Virtual Machine ware, a "Virtual PC" software), a change Block CBT (Changed Block Tracking) information needs to be acquired according to an interface provided by a platform, and a corresponding portion of a disk of a source Virtual Machine or a target Virtual Machine needs to be read and written according to the CBT information. The CBT information is some form of key-value pair, the variable block information of the VMware virtual machine is a key-value pair in the form of (offset, length), the first element represents the corresponding offset position of the data block corresponding to the block CBT information in the disk, and the second element represents the length of the data block. According to the CBT key value pairs, virtual machine data can be obtained by reading and writing the virtual machine disk, and backup and recovery of the virtual machine data are achieved.
Considering that one virtual machine is backed up for n times, n backup data and n CBT information are obtained. If the actually changed data volume is small or a plurality of repeatedly changed data blocks exist, a large amount of unnecessary read-write operation is carried out when the backup data is restored according to the information in sequence, and system resources are occupied.
Disclosure of Invention
In view of this, the present invention provides a data synthesis method, apparatus, device and storage medium, which solve the problem in the prior art that a large number of unnecessary read-write operations performed when recovering backup data occupy system resources, reduce recovery time, and improve data recovery efficiency.
In a first aspect, an embodiment of the present invention provides a data synthesis method, where the method includes:
acquiring CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup;
synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information.
In a second aspect, an embodiment of the present invention further provides a data synthesis apparatus, including:
the acquisition module is used for acquiring the CBT information of the full backup, the data of at least one incremental backup and the CBT information of at least one incremental backup;
the first synthesis module is used for synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and the second synthesis module is used for synthesizing the full-volume backup data and the at least one incremental backup data according to the target CBT information.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: one or more processors; a memory for storing one or more programs; when executed by the one or more processors, cause the one or more processors to implement a data synthesis method as in any one of the embodiments described above.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the data synthesis method according to any one of the above embodiments.
According to the embodiment of the invention, a plurality of backup data and CBT information corresponding to the data are obtained by executing one-time full backup and then performing a plurality of times of incremental backups, and when a time point is selected for data recovery, the synthesized full-backup CBT data is directly used for recovery, so that unnecessary repeated reading and writing are reduced, the recovery time is shortened, the recovery efficiency is improved, and resources occupying the production environment are reduced.
Drawings
FIG. 1 is a flow chart of a data synthesis method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data synthesis apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
The term "include" and variations thereof as used herein are intended to be open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment".
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example one
Fig. 1 is a flowchart of a data synthesis method provided in an embodiment of the present invention, and this embodiment is applicable to a case of data synthesis, for example, a case of VMware virtual machine change block data synthesis based on a finite state machine, where the finite state machine is a tool for modeling object behaviors, and its role is mainly to describe a sequence of states that an object experiences in its lifecycle and how to respond to various events from the outside, and is widely applied in computer science and technology. The method may be performed by a data synthesis apparatus in an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware, as shown in fig. 1, and specifically includes the following steps:
s101, obtaining CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup.
It should be explained that full backup is also called full backup, which means that a full backup is performed on all data and corresponding structures at a certain specified point in time. The full backup has the characteristics that the backed-up data is complete and the security is high, but relatively more storage space is occupied, and the backup needs more time.
It should be explained that an incremental backup is a type of backup, which means that after a full backup or a last incremental backup, each backup only needs to backup data that is increased or modified compared to the previous backup, and may be understood as backing up all changed files after the last backup. In the actual operation process, the object of the first incremental backup is added and modified data generated after full backup; the objects of the second incremental backup are the added and modified data that was generated after the first incremental backup, and so on. The incremental backup has the characteristics that no repeated backup data exists, so that the amount of data to be backed up is small, the time required by backup is short, and the data recovery of the incremental backup is troublesome.
It should be noted that the CBT information of the full backup refers to the change block information of the full backup, the data of the full backup refers to the data actually backed up by the full backup, and the data of the full backup corresponds to the CBT information of the full backup. Correspondingly, the CBT information of the incremental backup refers to the change block information of the incremental backup, the data of the incremental backup refers to the data actually backed up by the incremental backup, and the data of the incremental backup corresponds to the CBT information of the incremental backup. And the incremental backup data and the incremental backup CBT information are at least once.
Specifically, in this embodiment, a full backup is performed first, and then incremental backups are performed for several times, so that CBT information of the full backup and data of the full backup after the full backup, as well as data that needs to be incrementally backed up at least once and CBT information that needs to be incrementally backed up at least once are obtained.
S102, synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information.
The target CBT information is CBT information obtained by synthesizing CBT information of the full backup and CBT information of the at least one incremental backup.
Specifically, the CBT information of the full backup and the CBT information of the at least one incremental backup are synthesized to obtain target CBT information. In the actual operation process, synthesizing the CBT information of the full backup and the CBT information of the primary incremental backup to obtain new CBT information; and synthesizing the new CBT information and the CBT information of the next incremental backup, and circularly processing the new CBT information and the CBT information of the next incremental backup until the CBT information of all incremental backups is synthesized to obtain the target CBT information.
And S103, synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information.
Specifically, after synthesizing the full-backup CBT information and the at least one incremental backup CBT information to obtain the target CBT information, synthesizing the full-backup data and the at least one incremental backup data according to the target CBT information. In the actual operation process, synthesizing the full-amount backup data and the primary incremental backup data to obtain new data; and synthesizing the new data and the data of the next incremental backup, and performing cyclic processing until all the data of the incremental backups are synthesized finally, thereby completing the data synthesis process.
According to the embodiment of the invention, a plurality of backup data and CBT information corresponding to the data are obtained by executing one-time full backup and then performing a plurality of times of incremental backups, and when a time point is selected for data recovery, the synthesized full-backup CBT data is directly used for recovery, so that unnecessary repeated reading and writing are reduced, the recovery time is shortened, the recovery efficiency is improved, and resources occupying the production environment are reduced.
Optionally, synthesizing the CBT information of the full backup and the CBT information of the incremental backup at least once to obtain the target CBT information, includes:
and determining a full-volume linked list according to the CBT information of the full-volume backup.
It should be explained that the full quantity linked list refers to a data linked list corresponding to the full quantity backup CBT information.
Specifically, a full-volume linked list corresponding to the full-volume backup CBT information is determined according to the full-volume backup CBT information.
In the embodiment of the invention, after the CBT information of each backup is obtained from an interface provided by a VMware platform, the CBT information represented by a key value pair (start, end) is organized into a linked list, the start position start is smaller and is placed at the head, and the start values of all nodes in the linked list are strictly in an ascending order. The interface provided by the VMware platform can ensure that each CBT information in a single backup is not overlapped, but does not ensure that the CBT information of different backups is not overlapped.
And determining at least one increment linked list according to the CBT information of the at least one increment backup.
It should be noted that the incremental linked list refers to a data linked list corresponding to the CBT information of the incremental backup.
Specifically, an increment chain table corresponding to the CBT information of each increment backup is determined according to the CBT information of at least one increment backup.
And synthesizing the CBT information of the full backup and the CBT information of the at least one incremental backup according to the full linked list and the at least one incremental linked list to obtain target CBT information.
Specifically, the CBT information of the full backup and the CBT information of the at least one incremental backup are synthesized according to the full linked list and the at least one incremental linked list to obtain target CBT information. In the actual operation process, synthesizing the CBT information of the full quantity backup and the CBT information of the primary incremental backup according to the full quantity linked list and an incremental linked list to obtain new CBT information; and determining a new linked list according to the new CBT information, synthesizing the new CBT information and the CBT information of the primary incremental backup according to the new linked list and the next incremental linked list, and performing cyclic processing until all the CBT information of the incremental backup is synthesized to obtain target CBT information.
Optionally, synthesizing the CBT information of the full backup and the CBT information of the at least one incremental backup according to the full linked list and the at least one incremental linked list to obtain target CBT information, including:
and determining a merging rule according to the initial offset of the nodes in the full-scale linked list, the end offset of the nodes in the full-scale linked list, the initial offset of the nodes in at least one incremental linked list and the end offset of the nodes in at least one incremental linked list.
It should be explained that a node represents CBT information corresponding to a block of data, a start may represent a start offset of the block of data in a file, and an end may represent an end offset of the block of data in the file, and a plurality of such nodes form a linked list.
It should be noted that the merge rule refers to a rule for merging the full-size linked list and the at least one incremental linked list.
Specifically, the merging rules are determined according to the initial offset of the nodes in the full-scale linked list, the end offset of the nodes in the full-scale linked list, the initial offset of the nodes in at least one incremental linked list and the end offset of the nodes in at least one incremental linked list. The concrete basis for determining the merging rule may be to determine the starting offset of the node in the full-scale linked list, the ending offset of the node in the full-scale linked list, the starting offset of the node in the at least one incremental linked list, and the ending offset of the node in the at least one incremental linked list.
And inserting the nodes in at least one increment linked list into the full linked list according to the merging rule to obtain target CBT information.
Specifically, after the merging rule is determined, the nodes in at least one increment linked list are inserted into the full-scale linked list according to the merging rule, and the target CBT information is obtained. In the actual operation process, firstly, inserting nodes in an increment linked list into a full linked list according to a merging rule to obtain a new linked list corresponding to new CBT information; and inserting the nodes in the next increment linked list into the new linked list according to the merging rule, and circularly processing the nodes until the nodes in all the increment linked lists are inserted to obtain target CBT information.
Optionally, determining a merge rule according to the starting offset of the node in the full-scale linked list, the ending offset of the node in the full-scale linked list, the starting offset of the node in the at least one incremental linked list, and the ending offset of the node in the at least one incremental linked list, includes:
if the ending offset of the current node in the target linked list is less than or equal to the starting offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list behind the current node in the target linked list, wherein the target linked list comprises: at least one of the full quantity linked list, the full quantity linked list after the node is inserted and the full quantity linked list after the node is deleted.
The target linked list refers to a linked list currently merged with the increment linked list, and may be a full linked list or a new linked list merged with at least one increment linked list, and the new linked list merged with at least one increment linked list may be, for example, a new linked list after a node in at least one increment linked list is inserted or a new linked list after a node in an original full linked list is deleted.
It should be noted that the current node refers to a node in the current full-volume linked list, which performs a comparison between the ending offset and the starting offset with the incremental node.
It should be explained that the node at the same position in the increment linked list refers to the node at the same position in the increment linked list as the current node in the target linked list. For example, if the current node is located at the 3 rd bit in the target linked list, the node at the same location in the increment linked list is also the node located at the 3 rd bit in the increment linked list.
Specifically, if the ending offset of the current node in the target linked list is less than or equal to the starting offset of the node at the same position in the increment linked list, which indicates that the target linked list is in front of the increment linked list and the two pieces of data do not overlap, the node at the same position in the increment linked list is inserted behind the current node in the target linked list.
Illustratively, if the initial offset of the first node in the target linked list is 0, the end offset is 5, the initial offset of the first node in the incremental linked list is 9, and the end offset is 10, and the end offset of the first node in the target linked list is smaller than the initial offset of the first node in the incremental linked list, the first node in the incremental linked list is inserted into the first node in the target linked list, then the target linked list points to the newly inserted node, and the incremental linked list points to the second node, and the determination is continued.
In the actual operation process, if a new increment linked list still exists, the new linked list after the current synthesis is taken as a target linked list, the new increment linked list is taken as an increment linked list, and the synthesis is continued according to the method.
And if the initial offset of the current node in the target linked list is greater than the ending offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list before the current node in the target linked list.
Specifically, if the initial offset of the current node in the target linked list is greater than the end offset of the node at the same position in the increment linked list, it indicates that the target linked list is behind the increment linked list and the two pieces of data do not overlap, and the node at the same position in the increment linked list is inserted in front of the current node in the target linked list.
Illustratively, the start offset of the first node in the target linked list is 9, the end offset is 10, the start offset of the first node in the incremental linked list is 0, and the end offset is 5, the start offset of the first node in the target linked list is greater than the end offset of the first node in the incremental linked list, and then the first node in the incremental linked list is inserted before the first node in the target linked list, and then the node pointed by the target linked list is unchanged, and the incremental linked list points to the second node, and the judgment is continued.
In the actual operation process, if a new increment linked list still exists, the new linked list after the current synthesis is taken as a target linked list, the new increment linked list is taken as an increment linked list, and the synthesis is continued according to the method.
If the ending offset of the current node in the target linked list is greater than or equal to the starting offset of the node at the same position in the increment linked list, and the ending offset of the current node in the target linked list is less than or equal to the ending offset of the node at the same position in the increment linked list, deleting the node with the ending offset less than the ending offset of the node at the same position in the increment linked list from the target linked list from the current node in the target linked list, and inserting the node at the same position in the increment linked list behind the last deleted node in the target linked list.
Specifically, if the ending offset of the current node in the target linked list is greater than or equal to the starting offset of the node at the same position in the increment linked list, and the ending offset of the current node in the target linked list is less than or equal to the ending offset of the node at the same position in the increment linked list, it is described that the data block represented by the node at the same position in the increment linked list completely contains the data block represented by the current node in the target linked list, the node whose ending offset is less than the ending offset of the node at the same position in the increment linked list is deleted from the target linked list from the current node in the target linked list, and the node at the same position in the increment linked list is inserted into the last deleted node in the target linked list.
Illustratively, the initial offset of the first node in the target linked list is 5, the end offset is 8, the initial offset of the first node in the incremental linked list is 3, the end offset is 10, the end offset of the first node in the target linked list is greater than the initial offset of the first node in the incremental linked list, and the end offset of the first node in the target linked list is less than the end offset of the first node in the incremental linked list, then starting from the first node in the target linked list, deleting the node whose end offset is less than the end offset of the first node in the incremental linked list from the target linked list, inserting the first node in the incremental linked list after the last deleted node in the target linked list, then the target linked list points to the newly inserted node, and the incremental linked list points to the second node, and continuing the determination.
In the actual operation process, if a new increment linked list still exists, the new linked list after the current synthesis is taken as a target linked list, the new increment linked list is taken as an increment linked list, and the synthesis is continued according to the method.
Optionally, determining a merge rule according to the starting offset of the node in the full-scale linked list, the ending offset of the node in the full-scale linked list, the starting offset of the node in the at least one incremental linked list, and the ending offset of the node in the at least one incremental linked list includes:
and if the current node in the target linked list is the last node of the target linked list and the node at the same position in the increment linked list is not the last node, inserting the nodes at the same position in the increment linked list and other nodes which are not inserted into the full linked list.
It should be noted that the remaining nodes that are not inserted into the full-size linked list refer to the remaining nodes that are not inserted into the full-size linked list in the incremental linked list.
Specifically, if the current node in the target linked list is the last node of the target linked list, that is, the target linked list has been traversed, and the node at the same position in the increment linked list is not the last node, the node at the same position in the increment linked list and the other nodes that are not inserted into the full linked list are all inserted into the full linked list. If the increment linked list is traversed, the CBT information is completely merged, the target CBT information is obtained, and the task can be directly ended.
In the actual operation process, if a new increment linked list still exists, the new linked list after the current synthesis is taken as a target linked list, the new increment linked list is taken as an increment linked list, and the synthesis is continued according to the method.
Optionally, synthesizing the full-volume backup data and the at least one incremental backup data according to the target CBT information includes:
and determining a target data block according to the initial offset and the end offset of the target CBT information, the full backup data and the data of at least one incremental backup.
It should be noted that the target data block refers to a data block obtained after synthesis, which starts with a start offset and ends with an end offset, and which is between the start offset and the end offset.
Specifically, after the data of the full backup is synthesized with the data of at least one incremental backup, the start offset and the end offset of the target CBT information may also change accordingly. And determining a target data block according to the initial offset and the end offset of the target CBT information, the full backup data and the data of at least one incremental backup.
And generating a target file according to the target data block.
The target file refers to a data file obtained by synthesizing the full-volume backup data and the at least one incremental backup data. The target file is initially an empty file and can be created according to the requirements of the target file.
Specifically, after the target data block is determined, a corresponding target file is generated according to the target data block.
Optionally, the obtaining of the data of the full backup and the data of the at least one incremental backup includes:
and acquiring the file handle.
It should be noted that when the target file is opened, the linux system allocates an integer, which is the file handle. The corresponding file can be read and written according to the file handle, and the file handle can be understood to correspond to a backup data file.
Specifically, a file handle is obtained. In the actual operation process, each node on the linked list when synthesizing the CBT information can store the file handle corresponding to the data block corresponding to the CBT information in addition to the start offset and the end offset of the CBT information, and the synthesized CBT chain can correspondingly read the source file according to the file handle.
And reading the data of the full backup and the data of at least one incremental backup according to the file handle.
Specifically, the data of the full backup and the data of at least one incremental backup are read according to the file handle. In the actual operation process, a file handle is obtained, a corresponding file is opened, the corresponding position of the data file is read according to the starting offset and the ending offset of the CBT information, the data block can be obtained, and then the data block is written into a target file.
Example two
Fig. 2 is a schematic structural diagram of a data synthesis apparatus according to a second embodiment of the present invention, where the apparatus is suitable for a case of data synthesis, for example, a finite state machine-based VMware virtual machine change block data synthesis, and the apparatus may be implemented by hardware/software and may be configured in a server to implement a data synthesis method according to the second embodiment of the present invention. As shown in fig. 2, the apparatus specifically includes: an acquisition module 201, a first synthesis module 202 and a second synthesis module 203.
The acquiring module 201 is configured to acquire full-backup CBT information, full-backup data, at least one incremental backup data, and at least one incremental backup CBT information;
a first synthesis module 202, configured to synthesize the CBT information of the full backup and the CBT information of the at least one incremental backup to obtain target CBT information;
and a second synthesizing module 203, configured to synthesize the data of the full backup and the data of at least one incremental backup according to the target CBT information.
According to the embodiment of the invention, a plurality of backup data and CBT information corresponding to the data are obtained by executing one-time full backup and then performing a plurality of times of incremental backups, and when a time point is selected for data recovery, the synthesized full-backup CBT data is directly used for recovery, so that unnecessary repeated reading and writing are reduced, the recovery time is shortened, the recovery efficiency is improved, and resources occupying the production environment are reduced.
Further, the first synthesizing module 202 includes:
the first determining unit is used for determining a full-volume linked list according to the CBT information of the full-volume backup;
the second determining unit is used for determining at least one increment linked list according to the CBT information of the at least one increment backup;
and the synthesis unit is used for synthesizing the CBT information of the full quantity backup and the CBT information of the at least one incremental backup according to the full quantity linked list and the at least one incremental linked list to obtain target CBT information.
Further, the synthesis unit includes:
a determining subunit, configured to determine a merge rule according to a starting offset of a node in the full-scale linked list, an ending offset of a node in the full-scale linked list, a starting offset of a node in the at least one incremental linked list, and an ending offset of a node in the at least one incremental linked list;
and the inserting subunit is used for inserting the nodes in the at least one increment linked list into the full-scale linked list according to the merging rule to obtain target CBT information.
Further, the determining subunit is specifically configured to:
if the ending offset of the current node in the target linked list is less than or equal to the starting offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list behind the current node in the target linked list, wherein the target linked list comprises: at least one of the full linked list, the full linked list after the nodes are inserted and the full linked list after the nodes are deleted;
if the initial offset of the current node in the target linked list is greater than the ending offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list before the current node in the target linked list;
if the ending offset of the current node in the target linked list is greater than or equal to the starting offset of the node at the same position in the increment linked list, and the ending offset of the current node in the target linked list is less than or equal to the ending offset of the node at the same position in the increment linked list, deleting the node with the ending offset less than the ending offset of the node at the same position in the increment linked list from the target linked list from the current node in the target linked list, and inserting the node at the same position in the increment linked list behind the last deleted node in the target linked list.
Further, the determining subunit is specifically configured to:
and if the current node in the target linked list is the last node of the target linked list and the node at the same position in the increment linked list is not the last node, inserting the node at the same position in the increment linked list and other nodes which are not inserted into the full linked list.
Further, the second synthesis module 203 comprises:
a third determining unit, configured to determine a target data block according to a starting offset and an ending offset of the target CBT information, the full-volume backup data, and at least one incremental backup data;
and the generating unit is used for generating a target file according to the target data block.
Further, the obtaining module 201 includes:
an acquisition unit configured to acquire a file handle;
and the reading unit is used for reading the data of the full backup and the data of at least one incremental backup according to the file handle.
The data synthesis device can execute the data synthesis method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the data synthesis method.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention, as shown in fig. 3, the electronic device includes a processor 301, a memory 302, an input device 303, and an output device 304; the number of the processors 301 in the electronic device may be one or more, and one processor 301 is taken as an example in fig. 3; the processor 301, the memory 302, the input device 303 and the output device 304 in the electronic apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 3.
The memory 302 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data synthesis method in the embodiment of the present invention (for example, the acquisition module 201, the first synthesis module 202, and the second synthesis module 203 in the data synthesis apparatus). The processor 301 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 302, that is, implements the data synthesis method provided by the above-described embodiment of the present invention:
acquiring CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup;
synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information.
The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 302 may further include memory located remotely from the processor 301, which may be connected to the device/terminal/server through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 303 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output means 304 may comprise a display device such as a display screen.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data synthesis method provided in the fourth embodiment of the present invention, where the method includes:
acquiring CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup;
synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or flash Memory), an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of synthesizing data, comprising:
acquiring CBT information of full backup, data of at least one incremental backup and CBT information of at least one incremental backup;
synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and synthesizing the data of the full backup and the data of at least one incremental backup according to the target CBT information.
2. The method of claim 1, wherein synthesizing the full-backup CBT information and the at least one incremental-backup CBT information to obtain target CBT information comprises:
determining a full linked list according to the CBT information of the full backup;
determining at least one increment linked list according to the CBT information of the at least one increment backup;
and synthesizing the CBT information of the full backup and the CBT information of the at least one incremental backup according to the full linked list and the at least one incremental linked list to obtain target CBT information.
3. The method of claim 2, wherein synthesizing the CBT information of the full backup and the CBT information of the at least one incremental backup according to the full linked list and the at least one incremental linked list to obtain target CBT information comprises:
determining a merging rule according to the initial offset of the nodes in the full-scale linked list, the end offset of the nodes in the full-scale linked list, the initial offset of the nodes in the at least one incremental linked list and the end offset of the nodes in the at least one incremental linked list;
and inserting the nodes in the at least one increment linked list into the full-scale linked list according to the merging rule to obtain target CBT information.
4. The method of claim 2, wherein determining a merge rule based on a starting offset of a node in the full-scale linked list, an ending offset of a node in the full-scale linked list, a starting offset of a node in the at least one incremental linked list, and an ending offset of a node in the at least one incremental linked list comprises:
if the ending offset of the current node in the target linked list is less than or equal to the starting offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list behind the current node in the target linked list, wherein the target linked list comprises: at least one of the full linked list, the full linked list after the nodes are inserted and the full linked list after the nodes are deleted;
if the initial offset of the current node in the target linked list is greater than the ending offset of the node at the same position in the increment linked list, inserting the node at the same position in the increment linked list before the current node in the target linked list;
if the ending offset of the current node in the target linked list is greater than or equal to the starting offset of the node at the same position in the increment linked list, and the ending offset of the current node in the target linked list is less than or equal to the ending offset of the node at the same position in the increment linked list, deleting the node with the ending offset less than the ending offset of the node at the same position in the increment linked list from the target linked list from the current node in the target linked list, and inserting the node at the same position in the increment linked list behind the last deleted node in the target linked list.
5. The method of claim 2, wherein determining a merge rule based on a starting offset of a node in the full-scale linked list, an ending offset of a node in the full-scale linked list, a starting offset of a node in the at least one incremental linked list, and an ending offset of a node in the at least one incremental linked list comprises:
and if the current node in the target linked list is the last node of the target linked list and the node at the same position in the increment linked list is not the last node, inserting the node at the same position in the increment linked list and other nodes which are not inserted into the full linked list.
6. The method of claim 1, wherein synthesizing the full-size backed-up data and the at least one incremental backed-up data according to the target CBT information comprises:
determining a target data block according to the initial offset and the end offset of the target CBT information, the full backup data and the at least one incremental backup data;
and generating a target file according to the target data block.
7. The method of claim 1, wherein obtaining the full backup data and the at least one incremental backup data comprises:
acquiring a file handle;
and reading the data of the full backup and the data of at least one incremental backup according to the file handle.
8. A data synthesis apparatus, comprising:
the acquisition module is used for acquiring the CBT information of the full backup, the data of at least one incremental backup and the CBT information of at least one incremental backup;
the first synthesis module is used for synthesizing the CBT information of the full backup and the CBT information of at least one incremental backup to obtain target CBT information;
and the second synthesis module is used for synthesizing the full-volume backup data and the at least one incremental backup data according to the target CBT information.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the processors to implement the data synthesis method of any of claims 1-7.
10. A computer-readable storage medium containing a computer program, on which the computer program is stored, which, when executed by one or more processors, implements a data synthesis method as claimed in any one of claims 1 to 7.
CN202111612386.8A 2021-12-27 2021-12-27 Data synthesis method, device, equipment and storage medium Pending CN114328016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111612386.8A CN114328016A (en) 2021-12-27 2021-12-27 Data synthesis method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111612386.8A CN114328016A (en) 2021-12-27 2021-12-27 Data synthesis method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114328016A true CN114328016A (en) 2022-04-12

Family

ID=81012702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111612386.8A Pending CN114328016A (en) 2021-12-27 2021-12-27 Data synthesis method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114328016A (en)

Similar Documents

Publication Publication Date Title
US8856080B2 (en) Backup using metadata virtual hard drive and differential virtual hard drive
CN111198868B (en) Intelligent database-dividing real-time data migration method and device
US20120110287A1 (en) Snapshots in a hybrid storage device comprising a magnetic disk and a solid state disk
US10216429B2 (en) Performing post-processing operations for log file writes
CN104714858A (en) Data backup method, data recovery method and device
CN111201763B (en) Security based on file system content
US20110093437A1 (en) Method and system for generating a space-efficient snapshot or snapclone of logical disks
US20190317872A1 (en) Database cluster architecture based on dual port solid state disk
EP3474143B1 (en) Method and apparatus for incremental recovery of data
JP2021522577A (en) Host-aware update write method, system, and computer program
CN111858146A (en) Method, apparatus and computer program product for recovering data
CN109739691A (en) DB Backup and restoration methods, device, terminal device and storage medium
CN105608150A (en) Business data processing method and system
CN108572888B (en) Disk snapshot creating method and disk snapshot creating device
CN111656325B (en) Fast recovery from failures in a time-ordered log-structured key-value storage system
CN112882859A (en) Virtual machine synthetic backup method and system
US9158712B2 (en) Instantaneous save/restore of virtual machines with persistent memory
CN112231288A (en) Log storage method and device and medium
CN111488117B (en) Method, electronic device, and computer-readable medium for managing metadata
CN114026545A (en) Snapshot for arbitrary point in time replication
CN114328016A (en) Data synthesis method, device, equipment and storage medium
CN110989999A (en) Code generation method and device, electronic equipment and medium
US10409651B2 (en) Incremental workflow execution
CN115328696A (en) Data backup method in database
CN117435404B (en) Processing method, system and data recovery method for permanent incremental backup data storage

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