Fingerprint database recovery method and device, computer equipment, readable storage medium and program product
By obtaining and processing the backup fingerprint database, new data blocks and invalid fingerprints at the target time, the problem of inconsistent fingerprint database recovery and invalid fingerprints in the existing technology is solved, and efficient and accurate fingerprint database recovery is achieved.
Patent Information
- Application Number
- CN202411435857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In the prior art, when restoring fingerprint libraries, the restored fingerprint libraries have inconsistent problems with the data at the target moment, and may contain invalid fingerprints, resulting in the restored fingerprint libraries being unavailable.
By obtaining the backup fingerprint library closest to the backup time of the target time, obtaining the new data blocks closest to the backup time to the target time, and obtaining invalid fingerprints based on the space recycling redo log, the target backup fingerprint library is processed to obtain the target time. target fingerprint database.
The efficiency of fingerprint database recovery is improved, so that the restored target fingerprint database at the target time is consistent with the data file at the target time and does not contain invalid fingerprints.
Smart Images

Figure CN119336543A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of deduplication storage, and in particular to a fingerprint database recovery method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] In the actual application of deduplication storage technology, the fingerprint database may be damaged or lost due to various software and hardware failures, human factors or external factors. Therefore, corresponding measures are required to provide the ability to restore the fingerprint database.
[0003] Currently, the data of the fingerprint database can be backed up regularly. When the fingerprint database is damaged, the fingerprint database can be restored according to the backup fingerprint database closest to the backup time.
[0004] The method of restoring the fingerprint database according to the backup fingerprint database closest to the backup time has a high recovery efficiency, but the restored fingerprint database is inconsistent with the data at the target time, and the restored fingerprint database may contain invalid fingerprints, making the restored fingerprint database unusable. Summary of the invention
[0005] Based on this, it is necessary to provide a fingerprint database recovery method, apparatus, computer equipment, computer readable storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a fingerprint database recovery method, comprising:
[0007] Obtain a target backup fingerprint library according to the backup fingerprint library at the target time closest to the backup time;
[0008] Get the newly added data blocks from the backup time to the target time;
[0009] Obtaining an invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time;
[0010] The target backup fingerprint library is processed according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication.
[0011] In one embodiment, obtaining the newly added data block closest to the backup time to the target time includes:
[0012] According to the data files which are not newly added and have increased data volume from the closest backup time to the target time, a first type of data files is obtained;
[0013] Determine the file scanning starting point according to the data volume of the first type of data files at the time closest to the backup;
[0014] The first type of data files are scanned according to the file scanning starting point position to obtain newly added data blocks.
[0015] In one embodiment, scanning the first type of data files according to the scanning starting point position to obtain the newly added data blocks includes:
[0016] Determine the file scanning end position according to the data volume of the first type of data files at the target time;
[0017] The first type of data files are scanned according to the scanning starting point position and the scanning ending point position to obtain a newly added data block.
[0018] In one embodiment, the first type of data files are obtained based on the non-newly added data files with increased data volume from the closest backup time to the target time, including:
[0019] Determine the file number recorded in both the file record information closest to the backup time and the file record information at the target time;
[0020] Determine non-newly added data files based on the file number;
[0021] Determine the non-newly added data files with increased data volume according to the data volume of the non-newly added data files at the closest backup time and the data volume of the non-newly added data files at the target time;
[0022] Data files that are not newly added but have an increasing data volume are classified as the first type of data files.
[0023] In one embodiment, obtaining the newly added data block closest to the backup time to the target time includes:
[0024] Determine the newly added data files from the closest backup time to the target time according to the file record information at the closest backup time and the file record information at the target time;
[0025] According to the newly added data file, a newly added data block is obtained.
[0026] In one embodiment, the processing of the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time includes:
[0027] The invalid fingerprint is deleted from the target backup fingerprint library, and the fingerprint of the newly added data block is added to the target backup fingerprint library to obtain the target fingerprint library at the target time.
[0028] In a second aspect, the present application also provides a fingerprint database recovery device, comprising:
[0029] A target backup fingerprint library acquisition module is used to obtain a target backup fingerprint library according to a backup fingerprint library at a target time closest to the backup time;
[0030] A new data block acquisition module is added to acquire the new data blocks closest to the backup time to the target time;
[0031] An invalid fingerprint acquisition module, used to obtain an invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time;
[0032] The target fingerprint library acquisition module is used to process the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target moment; the target fingerprint library is used to perform duplicate data deletion.
[0033] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the above method.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the above method.
[0035] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and the computer program is executed by a processor to execute the above method.
[0036] The above-mentioned fingerprint library recovery method, device, computer equipment, computer-readable storage medium and computer program product obtain the target backup fingerprint library based on the backup fingerprint library closest to the backup time at the target time; obtain the newly added data blocks from the backup time to the target time; obtain the invalid fingerprints from the backup time to the target time based on the fingerprints of the space-reclaimed data blocks in the space-reclaimed redo log closest to the backup time; process the target backup fingerprint library based on the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication. The present application obtains the target backup fingerprint library based on the backup fingerprint library closest to the backup time at the target time; processes the target backup fingerprint library based on the fingerprints of the newly added data blocks and the invalid fingerprints to obtain the target fingerprint library at the target time. The fingerprint library recovery efficiency is high, and the target fingerprint library at the target time after recovery is consistent with the data file at the target time and does not contain invalid fingerprints. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A diagram showing an application environment of a fingerprint database recovery method in an embodiment;
[0039] Figure 2 A schematic diagram of a fingerprint database recovery method in one embodiment;
[0040] Figure 3 A schematic diagram of a process for obtaining a newly added data block in one embodiment;
[0041] Figure 4 is a structural block diagram of a fingerprint database recovery device in an embodiment;
[0042] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The present application embodiment provides a fingerprint database recovery method, which can be executed by a computer device, such as Figure 1As shown, the computer device can obtain the backup fingerprint library closest to the backup time at the target time, obtain the target backup fingerprint library, and then obtain the target fingerprint library at the target time. It can be understood that the computer device can be implemented by a server, a terminal, or an interactive system between a terminal and a server. In this embodiment, the method includes Figure 2 The steps shown are:
[0045] Step S201, obtaining a target backup fingerprint library according to the backup fingerprint library whose target time is closest to the backup time.
[0046] Data deduplication (DDR) storage technology achieves the effect of storing only non-duplicate data blocks by dividing the stored data into blocks, calculating fingerprints, and deleting duplicate data blocks based on duplicate fingerprints, thereby saving storage space. In deduplication storage technology, the technology for finding duplicate fingerprints is the key to affecting deduplication efficiency. The general implementation method is to use a data structure with fast search capabilities such as a database or hash table to store existing fingerprint information and achieve fast fingerprint search. This database or data structure is called a fingerprint library.
[0047] The fingerprint library can be backed up to the backup location regularly by physical backup or logical backup to obtain the backup fingerprint library at each backup time. And the process of backing up the fingerprint library does not require suspending the read and write business of the storage system. The snapshot backup of the fingerprint library can be obtained according to the snapshot mechanism provided by the fingerprint library itself. Take the hierarchical database (LevelDB) as an example: a target database can be created at the backup location, denoted as T1-B; a snapshot object can be created through the GetSnapshot method of the hierarchical database object, and the hierarchical database automatically generates a snapshot in memory; an iterator object can be created through the NewIterator method of the same hierarchical database object, and the returned snapshot object can be specified in the iterator parameter; all records in the snapshot generated by the hierarchical database can be traversed through the returned snapshot object, and the traversal results can be copied to the target database; finally, the iterator object and the snapshot object are released to complete the logical snapshot backup of the fingerprint library and obtain the backup fingerprint library.
[0048] When it is detected that the space recovery operation is being performed, the fingerprint database backup operation to be performed is suspended through the preset mutual exclusion switch; when it is detected that the space recovery operation is completed, the fingerprint database backup operation is performed to obtain the backup fingerprint database at the corresponding time, and avoid performing space recovery during the fingerprint database backup process. The start time of the fingerprint database recovery operation can be called the target time.
[0049] Step S202, obtaining the newly added data block closest to the backup time to the target time.
[0050] Usually, each data block has a data structure designed at the head to store the metadata of the data block, which is called a block header, which contains attributes such as fingerprint and data block size.
[0051] The newly added data blocks from the closest backup time to the target time can be obtained according to whether the data volume of the data file from the closest backup time to the target time increases and whether there are newly added data files at the target time.
[0052] Step S203, obtaining an invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time.
[0053] In order to save storage space, space can be reclaimed for unreferenced fingerprints and their corresponding data blocks. In the process of space reclamation, the unreferenced fingerprints can be called the fingerprints of the data blocks to be reclaimed. When the fingerprints of the data blocks to be reclaimed are deleted from the fingerprint library, the fingerprints can be recorded in the space reclamation redo log, which can be marked with the most recent backup time.
[0054] During the space reclamation process, if a data block has been reclaimed but the fingerprint corresponding to the data block still exists in the fingerprint database, the fingerprint will become an invalid fingerprint.
[0055] The fingerprints of the reclaimed data blocks deleted in the space recovery operation performed closest to the backup time still exist in the target backup fingerprint library. In order to make the restored target fingerprint library consistent with the data files at the target time, the fingerprints of the reclaimed data blocks from the closest backup time to the target time can be obtained and deleted from the target backup fingerprint library.
[0056] The fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time can be used as the invalid fingerprint closest to the backup time to the target time. For example, if the space-reclaimed redo log closest to the backup time is R1, and the fingerprints of the space-reclaimed data block in R1 are fingerprint A, fingerprint B, and fingerprint C, then the invalid fingerprints closest to the backup time to the target time are fingerprint A, fingerprint B, and fingerprint C; if the space-reclaimed redo log closest to the backup time is R2, and the fingerprints of the space-reclaimed data block in R2 are fingerprint D and fingerprint E, then the invalid fingerprints closest to the backup time to the target time are fingerprint D and fingerprint E.
[0057] If no space recovery operation has been performed since the last fingerprint database backup, there is no space recovery redo log closest to the backup time, so skip this step.
[0058] Step S204: Process the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication.
[0059] The target backup fingerprint library is consistent with the data file closest to the backup time. In the period from the closest backup time to the target time, there is new data and space recovery operations may have been performed. In order to make the restored target fingerprint library consistent with the data file at the target time, the newly added data blocks from the closest backup time to the target time can be obtained based on whether the data volume of the data file from the closest backup time to the target time has increased and whether there are new data files at the target time; the invalid fingerprints from the closest backup time to the target time can be obtained based on the fingerprints of the space-recovered data blocks in the space recovery redo log after the closest backup time. The target backup fingerprint library can be processed based on the fingerprints of the newly added data blocks and the invalid fingerprints to obtain a target fingerprint library that is consistent with the data file at the target time. The target fingerprint library is used for deduplication.
[0060] In the above fingerprint library recovery method, the target backup fingerprint library is obtained according to the backup fingerprint library at the target time that is closest to the backup time; the target backup fingerprint library is processed according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time. The fingerprint library recovery efficiency is high, and the target fingerprint library at the target time after recovery is consistent with the data file at the target time and does not contain invalid fingerprints.
[0061] In one embodiment, the step of obtaining the newly added data block closest to the backup time to the target time is as follows: Figure 3 As shown, step S301, obtain the first category of data files based on the non-new data files with increasing data volume from the closest backup time to the target time; step S302, determine the file scanning starting point position based on the data volume of the first category of data files closest to the backup time; step S303, scan the first category of data files according to the file scanning starting point position to obtain the newly added data blocks.
[0062] When backing up the fingerprint database, the data volume of all data files at the backup time can be recorded.
[0063] The non-newly added data files with increasing data volume from the closest backup time to the target time can be regarded as the first category data files; the file offset position corresponding to the data volume of the first category data files closest to the backup time can be regarded as the starting position of the file scan. For example, the data volume of the first category data file T closest to the backup time is 7GB, then the 7GB file offset position of the first category data file T is regarded as the starting position of the file scan. The 7GB file offset position refers to the file position starting from the file header of the first category data file T, i.e., 0GB, and skipping 7GB of data.
[0064] According to the file scanning starting point position, the first type of data files are scanned to obtain the newly added data blocks.
[0065] In this embodiment, the file scanning starting point is determined according to the data volume of the first type of data file closest to the backup time; the first type of data file is scanned according to the file scanning starting point to obtain the newly added data block. It is not necessary to scan the entire first type of data file, but only the newly added data area of the first type of data file needs to be scanned, which can improve the scanning efficiency and thus improve the efficiency of fingerprint library recovery.
[0066] In one of the embodiments, the first type of data files are scanned according to the scanning starting point position to obtain newly added data blocks, and the specific steps are as follows: according to the data amount of the first type of data files at the target time, the file scanning end position is determined; according to the scanning starting point position and the scanning end position, the first type of data files are scanned to obtain newly added data blocks.
[0067] The file offset position corresponding to the data volume of the first type of data file at the target time can be used as the file scanning end position. For example, if the data volume of the first type of data file T at the target backup time is 10GB, the file offset position of 10GB of the first type of data file T is used as the file scanning end position. The file offset position of 10GB refers to the file position starting from the file header of the first type of data file T, that is, 0GB, and skipping the file position of 10GB of data.
[0068] The first type of data files are scanned according to the scanning starting point position and the scanning end point position to obtain the newly added data blocks.
[0069] In this embodiment, the file scanning end position is determined according to the data volume of the first type of data files at the target time, and the first type of data files are scanned according to the scanning start position and the scanning end position, so that the newly added data blocks can be obtained quickly and accurately.
[0070] In one of the embodiments, a first category of data files is obtained based on non-new data files with increased data volume from the closest backup time to the target time, and the specific steps are as follows: determine the file number recorded in both the file record information at the closest backup time and the file record information at the target time; determine the non-new data files based on the file number; determine the non-new data files with increased data volume based on the data volume of the non-new data files at the closest backup time and the data volume of the non-new data files at the target time; and define the non-new data files with increased data volume as the first category of data files.
[0071] Each data file may be numbered, and different data files may have different file numbers, and each data file may have a unique file number. Whether there is a new data file at the target time may be determined based on the file record information closest to the backup time and the file record information at the target time. The data file corresponding to the file number recorded in both the file record information closest to the backup time and the file record information at the target time may be determined as a non-new data file.
[0072] When the data volume of a non-newly added data file closest to the backup time is smaller than the data volume at the target time, it is determined that the data volume of the non-newly added data file has increased; the non-newly added data file with increased data volume is regarded as a first-category data file.
[0073] In this embodiment, the first type of data files are determined quickly and accurately according to the file numbers and data volumes.
[0074] In one of the embodiments, the newly added data blocks from the time closest to the backup time to the target time are obtained, and the specific steps are as follows: based on the file record information closest to the backup time and the file record information at the target time, the newly added data files from the time closest to the backup time to the target time are determined; based on the newly added data files, the newly added data blocks are obtained.
[0075] The data file corresponding to the file number that is not recorded in the file record information closest to the backup time but is recorded in the file record information at the target time can be determined as the newly added data file.
[0076] The file header of the newly added data file is used as the starting position of the file scan; the file tail of the newly added data file is used as the ending position of the file scan; the newly added data file is scanned according to the scanning starting position and the scanning ending position to obtain the newly added data block.
[0077] In this embodiment, the newly added data file from the closest backup time to the target time is determined according to the file record information at the closest backup time and the file record information at the target time, so as to obtain the newly added data block.
[0078] In one of the embodiments, the target backup fingerprint library is processed according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time. The specific steps are as follows: deleting the invalid fingerprint from the target backup fingerprint library, and adding the fingerprint of the newly added data block to the target backup fingerprint library to obtain the target fingerprint library at the target time.
[0079] The target backup fingerprint library is consistent with the data file closest to the backup time, but there is new data and space recovery operations may be performed during the period from the closest backup time to the target time.
[0080] In order to make the target fingerprint library after recovery consistent with the data files at the target time, the newly added data blocks from the closest backup time to the target time can be obtained based on whether the data volume of the data files from the closest backup time to the target time has increased and whether there are new data files at the target time; the invalid fingerprints from the closest backup time to the target time can be obtained based on the fingerprints of the space-reclaimed data blocks in the space-reclaimed redo log after the closest backup time.
[0081] The space recovery redo log records the data block storage location corresponding to the fingerprint of the space recovered data block, so the data block storage location corresponding to the invalid fingerprint can be obtained. The invalid fingerprint can be deleted from the target backup fingerprint library according to the data block storage location corresponding to the invalid fingerprint.
[0082] By deleting invalid fingerprints from the target backup fingerprint library and adding fingerprints and other metadata information corresponding to the newly added data blocks to the target backup fingerprint library in the fingerprint library format, a target fingerprint library consistent with the data file at the target time can be obtained.
[0083] In this embodiment, invalid fingerprints are deleted from the target backup fingerprint library, and fingerprints of newly added data blocks are added to the target backup fingerprint library, so that the target fingerprint library can be obtained quickly and accurately.
[0084] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0085] Based on the same inventive concept, the embodiment of the present application also provides a fingerprint database recovery device for implementing the fingerprint database recovery method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more fingerprint database recovery device embodiments provided below can refer to the limitations of the fingerprint database recovery method above, and will not be repeated here.
[0086] In an exemplary embodiment, Figure 4 As shown, a fingerprint database recovery device is provided, wherein:
[0087] The target backup fingerprint library acquisition module 401 is used to obtain the target backup fingerprint library according to the backup fingerprint library closest to the backup time at the target time;
[0088] A newly added data block acquisition module 402 is used to acquire the newly added data block closest to the backup time to the target time;
[0089] The invalid fingerprint acquisition module 403 is used to obtain the invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time;
[0090] The target fingerprint library acquisition module 404 is used to process the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target moment; the target fingerprint library is used for deduplication.
[0091] In one of the embodiments, the newly added data block acquisition module 402 is also used to: obtain a first type of data file based on the non-new data files with an increased data volume from the closest backup time to the target time; determine the file scanning starting point position based on the data volume of the first type of data files at the closest backup time; and scan the first type of data files according to the file scanning starting point position to obtain newly added data blocks.
[0092] In one of the embodiments, the newly added data block acquisition module 402 is also used to: determine the file scanning end position according to the data volume of the first type of data file at the target time; scan the first type of data file according to the scanning start position and the scanning end position to obtain the newly added data block.
[0093] In one of the embodiments, the newly added data block acquisition module 402 is also used to: determine the file numbers recorded in both the file record information at the time closest to the backup moment and the file record information at the target moment; determine non-newly added data files based on the file numbers; determine non-newly added data files with increased data volume based on the data volume of the non-newly added data files at the time closest to the backup moment and the data volume of the non-newly added data files at the target moment; and classify non-newly added data files with increased data volume as first-category data files.
[0094] In one embodiment, the newly added data block acquisition module 402 is also used to: determine the newly added data files from the closest backup time to the target time based on the file record information at the closest backup time and the file record information at the target time; and obtain the newly added data blocks based on the newly added data files.
[0095] In one embodiment, the target fingerprint library acquisition module 404 is further used to: delete the invalid fingerprint from the target backup fingerprint library, and add the fingerprint of the newly added data block to the target backup fingerprint library to obtain the target fingerprint library at the target moment.
[0096] Each module in the fingerprint database recovery device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0097] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of an embodiment of the fingerprint library recovery method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fingerprint library recovery method is implemented.
[0098] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0100] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0101] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0103] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 application.
[0105] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A fingerprint database recovery method, characterized in that: The method comprises: Obtain a target backup fingerprint library according to the backup fingerprint library at the target time closest to the backup time; Get the newly added data blocks from the backup time to the target time; Obtaining an invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time; The target backup fingerprint library is processed according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time; the target fingerprint library is used for deduplication.
2. The method according to claim 1, characterized in that The step of obtaining the newly added data block closest to the backup time to the target time includes: According to the data files which are not newly added and have increased data volume from the closest backup time to the target time, a first type of data files is obtained; Determine the file scanning starting point according to the data volume of the first type of data files at the time closest to the backup; The first type of data files are scanned according to the file scanning starting point position to obtain newly added data blocks.
3. The method according to claim 2, characterized in that The scanning of the first type of data files according to the scanning starting point position to obtain the newly added data blocks includes: Determine the file scanning end position according to the data volume of the first type of data files at the target time; The first type of data files are scanned according to the scanning starting point position and the scanning ending point position to obtain a newly added data block.
4. The method according to claim 2, characterized in that: The first type of data files are obtained according to the non-newly added data files with increased data volume from the closest backup time to the target time, including: Determine the file number recorded in both the file record information closest to the backup time and the file record information at the target time; Determine non-newly added data files based on the file number; Determine the non-newly added data files with increased data volume according to the data volume of the non-newly added data files at the closest backup time and the data volume of the non-newly added data files at the target time; Data files that are not newly added but have an increasing data volume are classified as the first type of data files.
5. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining the newly added data block closest to the backup time to the target time includes: Determine the newly added data files from the closest backup time to the target time according to the file record information at the closest backup time and the file record information at the target time; According to the newly added data file, a newly added data block is obtained.
6. The method according to claim 1, characterized in that The processing of the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target time includes: The invalid fingerprint is deleted from the target backup fingerprint library, and the fingerprint of the newly added data block is added to the target backup fingerprint library to obtain the target fingerprint library at the target time.
7. A fingerprint database recovery device, characterized in that: The device comprises: A target backup fingerprint library acquisition module is used to obtain a target backup fingerprint library according to a backup fingerprint library at a target time closest to the backup time; A new data block acquisition module is added to acquire the new data blocks closest to the backup time to the target time; An invalid fingerprint acquisition module, used to obtain an invalid fingerprint from the closest backup time to the target time according to the fingerprint of the space-reclaimed data block in the space-reclaimed redo log closest to the backup time; The target fingerprint library acquisition module is used to process the target backup fingerprint library according to the fingerprint of the newly added data block and the invalid fingerprint to obtain the target fingerprint library at the target moment; the target fingerprint library is used to perform duplicate data deletion.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for storing data
CN102982180A
A method and a device for deleting repeated data
CN109947731A
Method for deleting repeated data on line during data backup
CN112698990A
Space recovery method and device of data deduplication storage system
CN115357384A
Method and device for recovering data file and client
CN115357429A