Data synthesis method, apparatus, device, and storage medium based on index redirection
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2026-08-14
AI Technical Summary
但在第二次数据全量备份的过程中,由于数据的变化,第二次全量备份时需要对部分数据进行重新复制或计算,导致大量的数据块需要进行磁盘移动,造成大量临时存储空间的占用
[0048]上述基于索引重定向的数据合成方法、装置、计算机设备和存储介质,在每次更新数据后通过将无变化数据和获取的增量备份数据进行整合生成一个新的全量备份数据,充分利用了先前无变化数据,减少了这部分数据的重复备份,以避免复制过程导致数据错误,保证了数据的安全性且节省了存储空间。
Smart Images

Figure CN116204356B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a data synthesis method, apparatus, computer device, and storage medium based on index redirection. Background Technology
[0002] With the rise of cloud computing, more and more data from government agencies and enterprises are being migrated to the cloud. However, with the inevitability of ransomware and human error, more and more customers are paying attention to data security issues, and data backup has become the last line of defense for data security.
[0003] To ensure data rollback capability, current data backup methods typically employ a full -> incremental -> full backup approach to save data copies. However, during the second full backup, due to data changes, some data needs to be re-copied or recalculated, resulting in a large number of data blocks needing to be moved to disk, causing significant temporary storage space consumption. Summary of the Invention
[0004] Therefore, it is necessary to provide a data synthesis method, apparatus, computer equipment, and storage medium based on index redirection that can address the aforementioned technical problems, thereby reducing disk movement of data blocks and the occupation of temporary space during data synthesis and backup through index redirection technology.
[0005] On the one hand, a data synthesis method based on index redirection is provided, the method comprising:
[0006] Perform a full backup based on the current stored data to obtain the initial full backup data;
[0007] Based on the updated storage data, perform an incremental backup to obtain the incremental backup data;
[0008] Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data;
[0009] When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data.
[0010] In one embodiment, the method further includes:
[0011] When acquiring the initial full backup data, the initial directory index is acquired simultaneously.
[0012] After the new full backup data is generated, the initial directory index is updated based on the new full backup data to form a new directory index;
[0013] After a new full backup of the data is created, the previously generated directory index is updated to form a new directory index.
[0014] In one embodiment, forming an initial directory index or a new directory index includes:
[0015] Configure multiple consecutive data blocks into a single interval block device;
[0016] Disk space management is performed on the interval block device using an interval tree;
[0017] A superblock is set up corresponding to the interval tree, and data retrieval is performed based on the directory index stored in the superblock.
[0018] In one embodiment, the step of updating the initial directory index to form a new directory index based on the new full backup data includes:
[0019] The incremental backup data in the new full backup data is divided into interval block devices;
[0020] The partitioned incremental backup data is inserted into the underlying block device data nodes in the directory index, and the associated upper-level nodes are added.
[0021] Retain the remaining data in the new full backup data, excluding the incremental backup data, in the underlying block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index.
[0022] Add or modify related nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly;
[0023] The superblock is pointed to the new root node, forming a new directory index corresponding to the new full backup data, and a snapshot of the newly added node information is taken.
[0024] In one embodiment, the step of identifying unchanged data from the initial full backup data based on the bitmap information of the changed data includes:
[0025] The deleted data is identified in the initial full backup data based on the bitmap information of the changed data;
[0026] After removing the deleted data from the initial complete data, unchanged data is formed.
[0027] In one embodiment, the step of integrating unchanged data and acquired incremental backup data to form new full backup data includes:
[0028] Based on the bitmap information of the changed data, identify the unchanged data in the initial full backup data that is relative to the incremental backup data;
[0029] The unchanged data in the initial full backup data that is opposite to the incremental backup data is integrated with the incremental backup data to form the changed data;
[0030] The remaining unchanged data in the initial full backup data are combined with the changed data to perform a full backup, forming a new full backup data.
[0031] In one embodiment, after each new full backup of data is generated, the method further includes:
[0032] Delete the incremental backup data.
[0033] On the other hand, a data synthesis apparatus based on index redirection is provided, the apparatus comprising:
[0034] The initial full backup data management module is used to perform a full backup based on the current stored data and obtain the initial full backup data;
[0035] The incremental backup data acquisition module is used to acquire incremental backup data based on the updated stored data and to perform incremental backups.
[0036] The new full backup data management module is used to obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form new full backup data.
[0037] The iterative data integration module is used to obtain the corresponding incremental backup data and bitmap information of the changed data when the stored data is updated again. Based on the bitmap information of the changed data, it identifies the unchanged data from the previously generated full backup data and integrates the unchanged data with the obtained incremental backup data to form a new full backup data.
[0038] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0039] Perform a full backup based on the current stored data to obtain the initial full backup data;
[0040] Based on the updated storage data, perform an incremental backup to obtain the incremental backup data;
[0041] Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data;
[0042] When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data.
[0043] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0044] Perform a full backup based on the current stored data to obtain the initial full backup data;
[0045] Based on the updated storage data, perform an incremental backup to obtain the incremental backup data;
[0046] Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data;
[0047] When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data.
[0048] The aforementioned data synthesis method, apparatus, computer equipment, and storage medium based on index redirection generate a new full backup data by integrating unchanged data and acquired incremental backup data after each data update. This makes full use of the previously unchanged data, reduces the duplication of this data, avoids data errors caused by the copying process, ensures data security, and saves storage space. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A schematic diagram of the architecture of a traditional data backup synthesis method;
[0051] Figure 2 This is a schematic diagram of the data synthesis method architecture based on index redirection in one embodiment of this application;
[0052] Figure 3 This is a logic diagram of a data synthesis method based on index redirection in one embodiment of this application;
[0053] Figure 4 This is a flowchart illustrating a data synthesis method based on index redirection in one embodiment of this application;
[0054] Figure 5 This is a schematic diagram illustrating the use of a tree-shaped directory index for data block retrieval in one embodiment of this application;
[0055] Figure 6 This is a schematic diagram illustrating the formation of the latest synthesized full backup data directory index in one embodiment of this application;
[0056] Figure 7 This is an application environment diagram of a data synthesis method based on index redirection in one embodiment of this application;
[0057] Figure 8 This is a flowchart illustrating a data synthesis method based on index redirection in another embodiment of this application;
[0058] Figure 9 This is a flowchart illustrating the steps in one embodiment of the present application to identify unchanged data from the initial full backup data based on the bitmap information of the changed data, and to integrate the unchanged data and the acquired incremental backup data to form a new full backup data.
[0059] Figure 10 This is a flowchart illustrating the step of forming an initial directory index or a new directory index in one embodiment of this application;
[0060] Figure 11 This is a flowchart illustrating the step of updating the initial directory index to form a new directory index based on new full backup data in one embodiment of this application.
[0061] Figure 12 This is a structural block diagram of a data synthesis apparatus based on index redirection in one embodiment of this application;
[0062] Figure 13 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0064] As described in the background section, during data backup, a full or complete data backup is typically performed once, followed by incremental backups each day based on the previous day's data. Incremental backups refer to backing up data that has changed compared to the previous backup. When performing a full backup according to the backup strategy settings, a composite backup method is generally used to combine the data into a new complete backup. Traditionally, this is done as follows: Figure 1 As shown.
[0065] In traditional data synthesis methods, when synthesizing the second full backup data, it is necessary to copy the unchanged data part of the first full backup data and the incremental backup data. This results in two full backup data and one incremental backup data, which occupy a lot of storage space. At the same time, it also requires the load of temporary servers and temporary storage space to move and copy related data blocks.
[0066] Example 1
[0067] To address the aforementioned problems, Embodiment 1 of this invention creatively proposes a data synthesis method based on index redirection. This method effectively avoids the problems inherent in traditional methods. The architecture of the data synthesis method based on index redirection is as follows: Figure 2 As shown.
[0068] The index-redirected composite backup method does not actually copy or move data during the second full backup. Instead, it modifies the file's index pointer to point to a virtual second full backup. Thus, each incremental data change is synthesized into the previously generated full backup, becoming a new full backup. As the backup strategy progresses, the newly generated full backup replaces the original full backup, ensuring that only one completely new full backup is retained in the backup space. This significantly reduces storage space usage.
[0069] like Figure 3 , Figure 4 As shown, the steps of the data synthesis method based on index redirection provided in this application are as follows:
[0070] S1. The first full backup is performed to create a basic full backup of the data.
[0071] S2. Perform the second incremental backup, acquire the incremental backup data, and simultaneously read the bitmap information of the changed data. Based on the information in the changed bitmap, read the unchanged data from the initial full backup data and integrate it with the acquired incremental backup data to form a new full backup data.
[0072] S3. Subsequently, each incremental backup will acquire the incremental backup data and the bitmap information of the changed data. Combined with the previously generated full backup data, the background will automatically integrate them into a new full backup data.
[0073] S4. Each incremental data acquisition will be deleted after the new full backup data is synthesized, reducing the storage space occupied.
[0074] To better enable restoration of backup data to any previous point in time, file-level snapshots are performed on the full backup data after each index redirection and synthesis. In the event of data loss, recovery can be performed using the backup data. The recovery process primarily involves reading data, and to accelerate data retrieval, the index is used for fast queries.
[0075] First, such as Figure 5 As shown, in the management of backup set data blocks, extent block devices are used instead of individual data blocks to manage backup data. Each extent block device is a continuous data block of a certain length, and disk space management is provided by the extent tree. It relies on the tree-structured directory index (BTree) stored in the super block. This can improve the retrieval speed of data blocks and reduce metadata overhead.
[0076] Secondly, such as Figure 6 As shown, during incremental data merging, snapshots are generated based on Copy-on-Write (COW) transaction technology. The incremental data is divided into interval block devices and then inserted into the bottom-level block device data nodes in the Tree-Based Directory Index (BTree). Related upper-level nodes are added or modified, and so on, triggering a chain reaction where each level adds or modifies related nodes until the top-level root node is generated. Once the entire incremental data merging transaction is complete, the Super Block points to this newly added root node, forming the latest merged full backup data directory index, and simultaneously, a snapshot of the newly created node information is taken.
[0077] After each incremental data synthesis transaction is completed, the node information before synthesis, including block device information, is not deleted. The backup data files before the synthesis transaction started are completely preserved, and the directory index after each synthesis is snapshotted. In this way, the directory index of full backup data at multiple time points can be saved. When performing data recovery, users can select full backup data to restore based on the backup time point.
[0078] Meanwhile, in terms of backup data storage, since the storage space only retains one initial full backup data and multiple incremental data, as well as snapshot information generated after each synthesis process, the storage space usage has been greatly reduced compared to the traditional backup method which requires storing multiple full data.
[0079] This invention proposes a data synthesis and backup method based on index redirection technology, which can bring practical benefits in the following aspects:
[0080] 1. By modifying the file index pointer, a large number of data blocks are avoided from being moved to disk during the merging process, reducing the load on the backup server.
[0081] 2. By using virtual full backup data, data backup time is reduced and backup efficiency is improved.
[0082] 3. It eliminates the need to reserve a large amount of temporary storage space in advance for file data synthesis processing, thus improving the utilization rate of backup space.
[0083] Example 2
[0084] The data synthesis method based on index redirection provided in Embodiment 2 of this application can be applied to, for example... Figure 7 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be a standalone server or a server cluster consisting of multiple servers. Terminal 102 stores data in server 104.
[0085] The data merging principle during data storage is as follows: On the first day, a full backup is performed to create the initial full backup data. On the second day, production data changes relative to the first day's data, so an incremental backup is performed. Based on the change bitmap information, unchanged data from the first day's production data is identified in the initial full backup, and deleted data from the first day's production data is excluded. New data from the second day's production data relative to the first day's production data is identified in the incremental backup. The unchanged data from the initial full backup and the new data from the second day's incremental backup are integrated to form a new full backup. Subsequent incremental backups acquire the incremental backup data and the bitmap information of the changed data, combining it with the previously generated full backup data, and the background automatically integrates them into a new full backup. Each acquired incremental data is deleted after the new full backup data is synthesized, reducing storage space usage.
[0086] In the management of backup set data blocks, extent block devices are used instead of individual data blocks to manage backup data. Each extent block device is a continuous data block of a certain length, and disk space is managed by the extent tree. It relies on the tree-structured directory index (BTree) stored in the super block. This can improve the retrieval speed of data blocks and reduce metadata overhead.
[0087] During incremental data merging, snapshots are generated using Copy-on-Write (COW) transaction technology. Incremental data is divided into interval block devices and then inserted into the bottom-level block device data nodes in the Tree-Based Directory Index (BTree). Related upper-level nodes are added or modified, and so on, triggering a chain reaction where each level adds or modifies related nodes until the top-level root node is generated. Once the entire incremental data merging transaction is complete, the Super Block points to this newly added root node, forming the latest merged full backup data directory index, and simultaneously, a snapshot of the newly created node information is taken.
[0088] To better enable restoration of backup data to any previous point in time, file-level snapshots are performed on the full backup data after each index redirection and synthesis. In the event of data loss, recovery can be performed using the backup data. The recovery process primarily involves reading data, and to accelerate data retrieval, the index is used for fast queries.
[0089] In one embodiment, such as Figure 8 As shown, a data synthesis method based on index redirection is provided, which can be applied to... Figure 7Taking server 104 as an example, the following steps are included:
[0090] Step S10: Perform a full backup based on the current stored data to obtain the initial full backup data;
[0091] Step S20: Obtain incremental backup data by performing incremental backup based on the updated storage data;
[0092] Step S30: Obtain bitmap information of the changed data, identify unchanged data from the initial full backup data based on the bitmap information of the changed data, and integrate the unchanged data and the obtained incremental backup data to form new full backup data.
[0093] Step S40: When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are integrated to form a new full backup data.
[0094] like Figure 9 As shown, in this embodiment, the step of identifying unchanged data from the initial full backup data based on the bitmap information of the changed data includes:
[0095] Step S31: Identify the deleted data in the initial full backup data based on the bitmap information of the changed data;
[0096] Step S32: After removing the deleted data from the initial complete data, unchanged data is formed.
[0097] like Figure 9 As shown, in this embodiment, the step of integrating unchanged data and acquired incremental backup data to form new full backup data includes:
[0098] Step S33: Identify the unchanged data in the initial full backup data that is relative to the incremental backup data based on the bitmap information of the changed data;
[0099] Step S34: Integrate the unchanged data in the initial full backup data that is opposite to the incremental backup data and the incremental backup data to form the changed data;
[0100] Step S35: Perform a full backup of the remaining unchanged data in the initial full backup data together with the changed data to form new full backup data.
[0101] Therefore, as Figure 9 As shown, step S30 of this application includes steps S31 to S35 as described above.
[0102] like Figure 8 As shown, in this embodiment, after each new full backup of data is generated, the following steps are also included:
[0103] Step S50: Delete the incremental backup data.
[0104] Each incremental backup data acquired will be deleted after the new full backup data is synthesized, reducing the storage space occupied.
[0105] In this embodiment, the method further includes:
[0106] When acquiring the initial full backup data, the initial directory index is acquired simultaneously.
[0107] After the new full backup data is generated, the initial directory index is updated based on the new full backup data to form a new directory index;
[0108] After a new full backup of the data is created, the previously generated directory index is updated to form a new directory index.
[0109] In other words, such as Figure 8 As shown, a data synthesis method based on index redirection is provided, including the following steps:
[0110] Step S10: Perform a full backup based on the current stored data, obtain the initial full backup data, and synchronously obtain the initial directory index;
[0111] Step S20: Obtain incremental backup data by performing incremental backup based on the updated storage data;
[0112] Step S30: Obtain bitmap information of the changed data; identify unchanged data from the initial full backup data based on the bitmap information of the changed data; integrate the unchanged data and the obtained incremental backup data to form new full backup data; update the initial directory index based on the new full backup data to form a new directory index.
[0113] Step S40: When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are integrated to form a new full backup data. The previously generated directory index is updated to form a new directory index.
[0114] Step S50: Delete the incremental backup data.
[0115] This method constructs a completely new virtual full backup by modifying the index pointer and associating it with the original data file. It then uses full backup snapshots to generate a data recovery index. By integrating unchanged data with the acquired incremental backup data after each update to generate a new full backup, it fully utilizes the previously unchanged data, reduces redundant backups of this data, avoids data errors during the copying process, ensures data security, and saves storage space. This application uses snapshots of previous full backups to generate a recovery index (i.e., a directory index) for subsequent data. Each synthesized directory index is snapshotted, thus saving directory indexes of full backups at multiple points in time. During data recovery, users can select the full backup to restore based on the backup time point.
[0116] like Figure 10 As shown, in this embodiment, the process of forming an initial directory index or a new directory index includes:
[0117] Step S11: Configure multiple consecutive data blocks into a single interval block device;
[0118] Step S12: Manage disk space for the interval block device using the interval tree;
[0119] Step S13: Set up a superblock corresponding to the interval tree, and perform data retrieval based on the directory index stored in the superblock.
[0120] like Figure 11 As shown, in this embodiment, the step of updating the initial directory index to form a new directory index based on the new full backup data includes:
[0121] Step S21: Divide the incremental backup data in the new full backup data into interval block devices;
[0122] Step S22: Insert the partitioned incremental backup data into the underlying block device data nodes in the directory index, and add the associated upper-level nodes.
[0123] Step S23: Retain the remaining data in the new full backup data, excluding the incremental backup data, in the bottom-level block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index.
[0124] Step S24: Add or modify associated nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly;
[0125] Step S25: Point the superblock to the new root node to form a new directory index corresponding to the new full backup data, and take a snapshot of the newly added node information.
[0126] It is understandable that in steps S30 and S40, whenever there is a directory index being updated to form a new directory index, steps S21 to S25 are included.
[0127] In the above-mentioned data synthesis method based on index redirection, a new full backup is generated by integrating the unchanged data and the acquired incremental backup data after each data update. This makes full use of the previously unchanged data, reduces the duplication of this data, avoids data errors caused by the copying process, ensures data security, and saves storage space.
[0128] It should be understood that, although Figures 8-11 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 8-11 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0129] Example 3
[0130] In Example 3, as Figure 12 As shown, a data synthesis device 10 based on index redirection is provided, including: an initial full backup data management module 1, an incremental backup data acquisition module 2, a new full backup data management module 3, an iterative integration data module 4, and an incremental backup data deletion module 5.
[0131] The initial full backup data management module 1 is used to perform a full backup based on the current stored data and obtain the initial full backup data.
[0132] The incremental backup data acquisition module 2 is used to acquire incremental backup data based on the updated storage data and by performing incremental backup.
[0133] The new full backup data management module 3 is used to obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form new full backup data.
[0134] The iterative integration data module 4 is used to obtain the corresponding incremental backup data and bitmap information of the changed data when the stored data is updated again. Based on the bitmap information of the changed data, it identifies the unchanged data from the previously generated full backup data and integrates the unchanged data with the obtained incremental backup data to form a new full backup data.
[0135] The incremental backup data deletion module 5 is used to delete the incremental backup data after each new full backup is generated.
[0136] In this embodiment, the new full backup data management module 3 is specifically used for:
[0137] The deleted data is identified in the initial full backup data based on the bitmap information of the changed data;
[0138] After removing the deleted data from the initial complete data, the unchanged data is formed;
[0139] Based on the bitmap information of the changed data, identify the unchanged data in the initial full backup data that is relative to the incremental backup data;
[0140] The unchanged data in the initial full backup data that is opposite to the incremental backup data is integrated with the incremental backup data to form the changed data;
[0141] The remaining unchanged data in the initial full backup data are combined with the changed data to perform a full backup, forming a new full backup data.
[0142] like Figure 12 As shown, in this embodiment, the data synthesis device 10 based on index redirection further includes a directory index management module 6. The directory index management module 6 is used to synchronously acquire an initial directory index when acquiring initial full backup data; after forming new full backup data, it is also used to update the initial directory index according to the new full backup data to form a new directory index; after forming new full backup data again, it is also used to update the previously generated directory index to form a new directory index.
[0143] In this embodiment, the process of forming an initial directory index or a new directory index includes:
[0144] Configure multiple consecutive data blocks into a single interval block device;
[0145] Disk space management is performed on the interval block device using an interval tree;
[0146] A superblock is set up corresponding to the interval tree, and data retrieval is performed based on the directory index stored in the superblock.
[0147] In this embodiment, the step of updating the initial directory index to form a new directory index based on the new full backup data includes:
[0148] The incremental backup data in the new full backup data is divided into interval block devices;
[0149] The partitioned incremental backup data is inserted into the underlying block device data nodes in the directory index, and the associated upper-level nodes are added.
[0150] Retain the remaining data in the new full backup data, excluding the incremental backup data, in the underlying block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index.
[0151] Add or modify related nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly;
[0152] The superblock is pointed to the new root node, forming a new directory index corresponding to the new full backup data, and a snapshot of the newly added node information is taken.
[0153] In the aforementioned data synthesis device based on index redirection, after each data update, a new full backup data is generated by integrating the unchanged data and the acquired incremental backup data. This makes full use of the previously unchanged data, reduces the duplication of this data, avoids data errors caused by the copying process, ensures data security, and saves storage space.
[0154] Specific limitations regarding the index-redirected data synthesis apparatus can be found in the limitations of the index-redirected data synthesis method described above, and will not be repeated here. Each module in the aforementioned index-redirected data synthesis apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0155] Example 4
[0156] In embodiment 4, a computer device is provided, which may be a server, and its internal structure diagram may be as follows. Figure 13As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores index-redirected data synthesis. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements an index-redirected data synthesis method.
[0157] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0158] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0159] Perform a full backup based on the current stored data to obtain the initial full backup data;
[0160] Based on the updated storage data, perform an incremental backup to obtain the incremental backup data;
[0161] Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data;
[0162] When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data.
[0163] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0164] The step of identifying unchanged data from the initial full backup data based on the bitmap information of the changed data includes:
[0165] The deleted data is identified in the initial full backup data based on the bitmap information of the changed data;
[0166] After removing the deleted data from the initial complete data, unchanged data is formed.
[0167] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0168] The step of integrating unchanged data and acquired incremental backup data to form new full backup data includes:
[0169] Based on the bitmap information of the changed data, identify the unchanged data in the initial full backup data that is relative to the incremental backup data;
[0170] The unchanged data in the initial full backup data that is opposite to the incremental backup data is integrated with the incremental backup data to form the changed data;
[0171] The remaining unchanged data in the initial full backup data are combined with the changed data to perform a full backup, forming a new full backup data.
[0172] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0173] After each new full backup is created, it also includes:
[0174] Delete the incremental backup data.
[0175] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0176] When acquiring the initial full backup data, the initial directory index is acquired simultaneously.
[0177] After the new full backup data is generated, the initial directory index is updated based on the new full backup data to form a new directory index;
[0178] After a new full backup of the data is created, the previously generated directory index is updated to form a new directory index.
[0179] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0180] When creating an initial or new directory index, the following is included:
[0181] Configure multiple consecutive data blocks into a single interval block device;
[0182] Disk space management is performed on the interval block device using an interval tree;
[0183] A superblock is set up corresponding to the interval tree, and data retrieval is performed based on the directory index stored in the superblock.
[0184] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0185] The step of updating the initial directory index to form a new directory index based on the new full backup data includes:
[0186] The incremental backup data in the new full backup data is divided into interval block devices;
[0187] The partitioned incremental backup data is inserted into the underlying block device data nodes in the directory index, and the associated upper-level nodes are added.
[0188] Retain the remaining data in the new full backup data, excluding the incremental backup data, in the underlying block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index.
[0189] Add or modify related nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly;
[0190] The superblock is pointed to the new root node, forming a new directory index corresponding to the new full backup data, and a snapshot of the newly added node information is taken.
[0191] For specific limitations on the steps implemented by the processor when executing a computer program, please refer to the limitations on the data composition method based on index redirection mentioned above, which will not be repeated here.
[0192] Example 6
[0193] In embodiment 6, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:
[0194] Perform a full backup based on the current stored data to obtain the initial full backup data;
[0195] Based on the updated storage data, perform an incremental backup to obtain the incremental backup data;
[0196] Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data;
[0197] When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data.
[0198] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0199] The step of identifying unchanged data from the initial full backup data based on the bitmap information of the changed data includes:
[0200] The deleted data is identified in the initial full backup data based on the bitmap information of the changed data;
[0201] After removing the deleted data from the initial complete data, unchanged data is formed.
[0202] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0203] The step of integrating unchanged data and acquired incremental backup data to form new full backup data includes:
[0204] Based on the bitmap information of the changed data, identify the unchanged data in the initial full backup data that is relative to the incremental backup data;
[0205] The unchanged data in the initial full backup data that is opposite to the incremental backup data is integrated with the incremental backup data to form the changed data;
[0206] The remaining unchanged data in the initial full backup data are combined with the changed data to perform a full backup, forming a new full backup data.
[0207] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0208] After each new full backup is created, it also includes:
[0209] Delete the incremental backup data.
[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0211] When acquiring the initial full backup data, the initial directory index is acquired simultaneously.
[0212] After the new full backup data is generated, the initial directory index is updated based on the new full backup data to form a new directory index;
[0213] After a new full backup of the data is created, the previously generated directory index is updated to form a new directory index.
[0214] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0215] When creating an initial or new directory index, the following is included:
[0216] Configure multiple consecutive data blocks into a single interval block device;
[0217] Disk space management is performed on the interval block device using an interval tree;
[0218] A superblock is set up corresponding to the interval tree, and data retrieval is performed based on the directory index stored in the superblock.
[0219] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0220] The step of updating the initial directory index to form a new directory index based on the new full backup data includes:
[0221] The incremental backup data in the new full backup data is divided into interval block devices;
[0222] The partitioned incremental backup data is inserted into the underlying block device data nodes in the directory index, and the associated upper-level nodes are added.
[0223] Retain the remaining data in the new full backup data, excluding the incremental backup data, in the underlying block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index.
[0224] Add or modify related nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly;
[0225] The superblock is pointed to the new root node, forming a new directory index corresponding to the new full backup data, and a snapshot of the newly added node information is taken.
[0226] For specific limitations on the implementation steps when a computer program is executed by a processor, please refer to the limitations on the data composition method based on index redirection mentioned above, which will not be repeated here.
[0227] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0228] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0229] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A data synthesis method based on index redirection, characterized in that, include: Perform a full backup based on the current stored data to obtain the initial full backup data; Based on the updated storage data, perform an incremental backup to obtain the incremental backup data; Obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form a new full backup data; When the stored data is updated again, the corresponding incremental backup data and bitmap information of the changed data are obtained. Based on the bitmap information of the changed data, the unchanged data is identified from the previously generated full backup data. The unchanged data and the obtained incremental backup data are then integrated to form a new full backup data. When acquiring the initial full backup data, the initial directory index is acquired simultaneously. After the new full backup data is generated, the initial directory index is updated based on the new full backup data to form a new directory index; The step of updating the initial directory index based on the new full backup data to form a new directory index includes: The incremental backup data in the new full backup data is divided into interval block devices; The partitioned incremental backup data is inserted into the underlying block device data nodes in the directory index, and the associated upper-level nodes are added. Retain the remaining data in the new full backup data, excluding the incremental backup data, in the underlying block device data nodes and associated upper-level nodes in the directory index, and delete the upper-level nodes that are unrelated to the new full backup data in the directory index. Add or modify related nodes layer by layer upwards until the root source at the top level, and generate a new root node accordingly; The superblock is pointed to the new root node, forming a new directory index corresponding to the new full backup data, and a snapshot of the newly added node information is taken at the same time. Each time incremental backup data is synthesized, the node information before synthesis, including block device information, is not deleted. The backup data files before the incremental backup data are synthesized are retained. Furthermore, the directory index after each incremental backup data synthesis is snapshotted, and the directory index of the full backup data at multiple time points is saved. When performing data recovery, the full backup data is selected for recovery based on the backup time point.
2. The data synthesis method based on index redirection according to claim 1, characterized in that, The method further includes: After a new full backup of the data is created, the previously generated directory index is updated to form a new directory index.
3. The data synthesis method based on index redirection according to claim 2, characterized in that, When creating an initial or new directory index, the following is included: Configure multiple consecutive data blocks into a single interval block device; Disk space management is performed on the interval block device using an interval tree; A superblock is set up corresponding to the interval tree, and data retrieval is performed based on the directory index stored in the superblock.
4. The data synthesis method based on index redirection according to claim 1, characterized in that, The step of identifying unchanged data from the initial full backup data based on the bitmap information of the changed data includes: The deleted data is identified in the initial full backup data based on the bitmap information of the changed data; After removing the deleted data from the initial complete data, unchanged data is formed.
5. The data synthesis method based on index redirection according to claim 4, characterized in that, The step of integrating unchanged data and acquired incremental backup data to form new full backup data includes: Based on the bitmap information of the changed data, identify the unchanged data in the initial full backup data that is relative to the incremental backup data; The unchanged data in the initial full backup data that is opposite to the incremental backup data is integrated with the incremental backup data to form the changed data; The remaining unchanged data in the initial full backup data are combined with the changed data to perform a full backup, forming a new full backup data.
6. The data synthesis method based on index redirection according to claim 1, characterized in that, After each new full backup is created, it also includes: Delete the incremental backup data.
7. A data synthesis apparatus based on index redirection, characterized in that, The apparatus for implementing the index-redirected data synthesis method according to any one of claims 1 to 6, the apparatus comprising: The initial full backup data management module is used to perform a full backup based on the current stored data and obtain the initial full backup data; The incremental backup data acquisition module is used to acquire incremental backup data based on the updated stored data and to perform incremental backups. The new full backup data management module is used to obtain bitmap information of changed data, identify unchanged data from the initial full backup data based on the bitmap information of changed data, and integrate the unchanged data and the obtained incremental backup data to form new full backup data. The iterative data integration module is used to obtain the corresponding incremental backup data and bitmap information of the changed data when the stored data is updated again. Based on the bitmap information of the changed data, it identifies the unchanged data from the previously generated full backup data and integrates the unchanged data with the obtained incremental backup data to form a new full backup data.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Backup merging method, device and equipment
CN115269270A
Backup of incremental metadata in block based backup systems
US7873601B1