CN112379839A - Data recovery method and device, computer equipment and storage medium - Google Patents

Data recovery method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112379839A
CN112379839A CN202011271664.3A CN202011271664A CN112379839A CN 112379839 A CN112379839 A CN 112379839A CN 202011271664 A CN202011271664 A CN 202011271664A CN 112379839 A CN112379839 A CN 112379839A
Authority
CN
China
Prior art keywords
folder
cluster
folders
module
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011271664.3A
Other languages
Chinese (zh)
Inventor
王志雄
彭重阳
孙守贤
蔡文锦
谢智宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanxing Technology Group Co ltd
Original Assignee
Wanxing Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanxing Technology Group Co ltd filed Critical Wanxing Technology Group Co ltd
Priority to CN202011271664.3A priority Critical patent/CN112379839A/en
Publication of CN112379839A publication Critical patent/CN112379839A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from or digital output to record carriers, e.g. RAID, emulated record carriers, networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from or digital output to record carriers, e.g. RAID, emulated record carriers, networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks

Abstract

The invention relates to a data recovery method, a data recovery device, computer equipment and a storage medium; the method comprises the following steps: acquiring all folder information; calculating physical address information of all clusters meeting the requirements in all folder information; and calculating and acquiring the positions of the folders in the information of all the folders in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data. According to the invention, the physical address of the cluster meeting the requirements is accurately restored through the position offset information in all the folders and the cluster number information of the file folder, so that the problem of inaccurate physical address caused by calculating the cluster meeting the requirements through the changed DBR is solved, and when partition parameter adjustment occurs before and after the file system is formatted, the condition that the restored file data effect is failed to be restored due to parameter adjustment is avoided.

Description

Data recovery method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data recovery, in particular to a data recovery method, a data recovery device, computer equipment and a storage medium.
Background
At present, for a data storage device, during formatting, formatting parameters of the device, including parameters such as adjusting a file system and a cluster size, may be adjusted. Once these parameters are adjusted, the location of the DBR of the formatted device is adjusted accordingly, and the location of the DBR affects the starting location of the "0" cluster of the file system, thereby playing a crucial role in calculating the accurate physical address of the file in the storage medium.
At present, the main data recovery means in the market is to search a recording item of a file to obtain a related cluster number, and calculate a physical address of the file on a storage medium according to the position of the cluster number relative to a cluster with a number of '0', and the position of the cluster with the number of '0' adopts the physical address of the current storage medium, however, once the position of the current DBR and the position of the file system DBR in which data is originally stored have a deviation, an error occurs in the calculation of the physical address of the cluster with the number of '0', so that the data on the storage medium before formatting can hardly be completely recovered accurately.
Disclosure of Invention
Embodiments of the present invention provide a data recovery method, apparatus, computer device, and storage medium, to overcome the defects in the prior art.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme:
the data recovery method comprises the following steps:
acquiring all folder information;
calculating physical address information of all clusters meeting the requirements in all folder information;
and calculating and acquiring the positions of the folders in the information of all the folders in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data.
The further technical scheme is as follows: the acquiring of all folder information includes:
traversing the whole disk to obtain all folders;
judging whether all folders have folder starting marks or not;
if not, returning to the execution step of traversing the whole disk to obtain all folders;
if so, recording the starting positions and cluster numbers of all the folders to form all the folder information.
The further technical scheme is as follows: the step of calculating the physical address information of all clusters meeting the requirements in all folder information comprises the following steps:
traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
judging whether the second folder is the last folder or not;
if not, acquiring the next folder of the first folder, and marking the next folder as a second folder;
calculating the cluster size according to the first folder and the second folder;
judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64 KB;
if yes, calculating the position of the cluster meeting the requirement and storing the position to obtain the physical address information of the cluster meeting the requirement.
The further technical scheme is as follows: the step of calculating and acquiring the positions of the folders in all the folder information stored in the disk partitions according to the physical address information of the clusters meeting the requirements so as to recover the data comprises the following steps:
acquiring file cluster numbers of all folders needing to calculate specific physical address information;
and calculating and acquiring the storage positions of the file folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
A data recovery apparatus comprising: an acquisition unit, a calculation unit, and a calculation acquisition unit;
the acquisition unit is used for acquiring all folder information;
the computing unit is used for computing the physical address information of all clusters meeting the requirements in all the folder information;
and the calculation acquisition unit is used for calculating and acquiring the positions of the folders stored in the disk partitions in all the folder information according to the physical address information of the clusters meeting the requirements so as to recover the data.
The further technical scheme is as follows: the acquisition unit includes: the device comprises a traversing module, a first judging module and a recording module;
the traversal module is used for traversing the whole disk to obtain all folders;
the first judging module is used for judging whether all folders have folder starting marks or not;
the recording module is used for recording the initial positions and cluster numbers of all the folders to form all the folder information.
The further technical scheme is as follows: the calculation unit includes: the device comprises a traversal acquisition module, a second judgment module, an acquisition marking module, a first calculation module, a third judgment module and a calculation storage module;
the traversal acquisition module is used for traversing all folder information, sequentially acquiring the starting positions and cluster numbers of two different folders and recording the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module is used for judging whether the second folder is the last folder or not;
the acquisition marking module is used for acquiring the next folder of the first folder and marking the next folder as a second folder;
the first calculation module is used for calculating the cluster size according to the first folder and the second folder;
the third judging module is configured to judge whether the cluster size is an integer multiple of 512B and is less than or equal to 64 KB;
and the calculation and storage module is used for calculating and storing the positions of the clusters meeting the requirements so as to obtain the physical address information of the clusters meeting the requirements.
The further technical scheme is as follows: the calculation acquisition unit includes: the device comprises an acquisition module and a second calculation module;
the acquisition module is used for acquiring the file cluster numbers of all folders needing to calculate specific physical address information;
and the second calculation module is used for calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
A computer device comprising a memory having a computer program stored thereon and a processor that, when executed, implements a data recovery method as described above.
A storage medium storing a computer program comprising program instructions which, when executed by a processor, implement a data recovery method as described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the physical address of the cluster meeting the requirements is accurately restored through the position offset information in all the folders and the cluster number information of the file folder, so that the problem that the physical address is inaccurate due to the fact that the cluster meeting the requirements is calculated through the changed DBR is solved, and when partition parameter adjustment occurs before and after the file system is formatted, the situation that the restored file data effect is failed to be restored due to the fact that the parameter adjustment occurs is avoided.
Embodiments of the invention are further described below with reference to the drawings and the detailed description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first schematic flow chart of a data recovery method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a data recovery method according to an embodiment of the present invention;
fig. 3 is a third schematic flowchart of a data recovery method according to an embodiment of the present invention;
fig. 4 is a fourth schematic flowchart of a data recovery method according to an embodiment of the present invention;
FIG. 5 is a first schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 6 is a second schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 7 is a third schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 8 is a fourth schematic block diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without any creative efforts shall fall within the protection scope of the embodiments of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the description of embodiments of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to the embodiments shown in fig. 1 to 9, wherein, referring to fig. 1 to 4, an embodiment of the present invention discloses a data recovery method, including the following steps:
s1, acquiring all folder information;
s2, calculating the physical address information of all clusters meeting the requirements in all folder information;
and S3, calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the physical address information of the clusters meeting the requirements so as to recover the data.
In this embodiment, the satisfactory cluster is the "0" cluster, and the data recovery is for multi-DBR data recovery.
As shown in fig. 2, the step S1 obtains all folder information, including:
s11, traversing the whole disk to obtain all folders;
s12, judging whether all folders have folder start marks or not; if not, returning to execute step S11 "go through the whole disk to obtain all folders";
s13, if yes, recording the start positions and cluster numbers of all folders to form all folder information.
Referring to fig. 3, the step S2 "calculating the physical address information of all clusters meeting the requirement in all folder information" includes the following steps:
s21, traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
in this embodiment, the first folder and the second folder are respectively marked as folders DIR1 and DIR2, the starting position corresponding to the folder DIR1 is DIR1_ POS, and the cluster number is DIR1_ ID;
s22, judging whether the second folder is the last folder or not; if yes, ending;
s23, if not, acquiring the next folder of the first folder, and marking the next folder as the second folder;
in this embodiment, the starting position corresponding to the second folder (folder DIR2) is DIR2_ POS and the cluster number is DIR2_ ID;
s24, calculating the cluster size according to the first folder and the second folder;
in this embodiment, the CLUSTER size is denoted as CLUSTER _ SZ, where the calculation formula is: CLUSTER _ SZ ═ (DIR2_ POS-DIR1_ POS)/(DIR2_ ID-DIR1_ ID);
s25, judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64 KB; if not, the step S21 is executed again;
wherein, if the folder DIR1 and the folder DIR2 are exactly in the same file system environment, the calculated CLUSTER _ SZ should be an integer multiple of 512B and less than or equal to the maximum CLUSTER size (64KB) supported by the file system, and the calculated value satisfying this condition is assumed to be the physical address of the CLUSTER "0" of a certain existing history partition.
And S26, if yes, calculating the position of the cluster meeting the requirement and storing the position of the cluster meeting the requirement so as to obtain the physical address information of the cluster meeting the requirement.
In this embodiment, the cluster meeting the requirement is denoted as ROOT _ POS, and the calculation formula is as follows: ROOT _ POS ═ DIR2_ POS- (DIR2_ ID × CLUSTER _ SZ).
In this embodiment, after step S26, the method further includes: the records of the folder DIR1 and the folder DIR2 are removed, and execution returns to step S21 to acquire other folders.
As shown in fig. 4, the step S3 "calculating and acquiring the storage positions of folders in the disk partition in all the folder information according to the physical address information of the clusters that meet the requirement, so as to recover the data" includes the following steps:
s31, acquiring the file cluster numbers of all folders needing to calculate the specific physical address information;
in this embodiment, the FILE CLUSTER number is denoted as FILE _ CLUSTER _ ID;
and S32, calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
In this embodiment, the storage location is denoted as FILE _ POS, and the calculation formula is: FILE _ POS ═ ROOT _ POS + (FILE _ CLUSTER _ ID ═ CLUSTER _ SZ).
In this embodiment, since the storage medium may be formatted, when the file attribute information is obtained, it is unknown that the storage location of the file is specific to the file system, and may be before formatting or after formatting; at this time, all the possible clusters with 0 numbers are traversed, all the possibilities of the relative physical addresses of the current file in the file system environment can be obtained (if the previous and subsequent formatting is carried out three times, three possible cluster information with 0 numbers are calculated, and the file can obtain three stored physical address information of the data), wherein one of the possible results is correct, all the possible results are restored in sequence, and the correct file can be obtained with certainty.
The embodiment of the invention accurately restores the physical address of the 0 cluster through the position offset information in the related folder and the cluster number information of the embodiment, thereby offsetting the problem of inaccurate physical address caused by calculating the 0 cluster through the changed DBR, and avoiding the condition of restoration failure caused by parameter adjustment of the restored file data effect when the partition parameter adjustment occurs before and after the file system is formatted.
Wherein, the abbreviations and key terms to which the embodiments of the present invention apply define:
a DBR that partitions a boot sector; DIR, folder; DIR1_ POS \ DIR2_ POS, location address of folder on device; DIR1_ ID \ DIR2_ ID, the number of the cluster where the folder is located; CLUSTER _ SZ, the size of a CLUSTER is partitioned; FILE _ CLUSTER _ ID, a CLUSTER number corresponding to the position of the FILE data on the disk; ROOT _ POS, the position of the cluster corresponding to cluster No. 0 on the disk; FILE _ POS, calculating the exact physical address of the FILE on the disk.
Referring to fig. 5 to 8, an embodiment of the present invention further discloses a data recovery apparatus, including: an acquisition unit 10, a calculation unit 20, and a calculation acquisition unit 30;
the acquiring unit 10 is configured to acquire all folder information;
the calculating unit 20 is configured to calculate physical address information of all clusters that meet the requirement in all folder information;
the calculation and acquisition unit 30 is configured to calculate and acquire the positions of the folders stored in the disk partition in all the folder information according to the physical address information of the cluster meeting the requirement, so as to restore the data.
Referring to fig. 6, the obtaining unit 10 includes: the traversing module 11, the first judging module 12 and the recording module 13;
the traversal module 11 is configured to traverse the entire disk to obtain all folders;
the first judging module 12 is configured to judge whether all folders have folder start flags;
the recording module 13 is configured to record the start positions and cluster numbers of all folders to form all folder information.
Referring to fig. 7, the calculating unit 20 includes: a traversal obtaining module 21, a second judging module 22, a obtaining marking module 23, a first calculating module 24, a third judging module 25 and a calculating and storing module 26;
the traversal obtaining module 21 is configured to traverse information of all folders, sequentially obtain starting positions and cluster numbers of two different folders, and record the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module 22 is configured to judge whether the second folder is the last folder;
the acquiring and marking module 23 is configured to acquire a next folder of the first folder, and mark the next folder as a second folder;
the first calculating module 24 is configured to calculate a cluster size according to the first folder and the second folder;
the third determining module 25 is configured to determine whether the cluster size is an integer multiple of 512B and is less than or equal to 64 KB;
the calculating and storing module 26 is configured to calculate and store the position of the cluster meeting the requirement, so as to obtain the physical address information of the cluster meeting the requirement.
Referring to fig. 8, the calculation acquiring unit 30 includes: an acquisition module 31 and a second calculation module 32;
the acquiring module 31 is configured to acquire file cluster numbers of all folders whose specific physical address information needs to be calculated;
the second calculating module 32 is configured to calculate and obtain the storage positions of the folders in the disk partition in all the folder information according to the cluster size, the cluster meeting the requirements, and the file cluster number.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the data recovery apparatus and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.
The data recovery apparatus may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 9.
Referring to fig. 9, fig. 9 is a schematic block diagram of a computer device according to an embodiment of the present application; the computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 9, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a data recovery method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a data recovery method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Therefore, the embodiment of the invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program comprises program instructions which, when executed by a processor, may implement the data recovery method described above.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the embodiment of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method of the embodiment of the present invention.
The technical contents of the embodiments of the present invention are further described by the examples only, so as to facilitate the reader to understand more easily, but not to represent that the implementation manner of the embodiments of the present invention is limited thereto, and any technical extension or re-creation performed by the embodiments of the present invention is protected by the embodiments of the present invention. The protection scope of the embodiments of the present invention is subject to the claims.

Claims (10)

1. A data recovery method, comprising the steps of:
acquiring all folder information;
calculating physical address information of all clusters meeting the requirements in all folder information;
and calculating and acquiring the positions of the folders in the information of all the folders in the disk partition according to the physical address information of the cluster meeting the requirement so as to recover the data.
2. The data recovery method of claim 1, wherein the obtaining all folder information comprises:
traversing the whole disk to obtain all folders;
judging whether all folders have folder starting marks or not;
if not, returning to the execution step of traversing the whole disk to obtain all folders;
if so, recording the starting positions and cluster numbers of all the folders to form all the folder information.
3. The data recovery method according to claim 2, wherein said step of calculating physical address information where all clusters that meet the requirements in all folder information are located comprises the steps of:
traversing all folder information, sequentially acquiring the initial positions and cluster numbers of two different folders, and recording as a first folder and a second folder;
judging whether the second folder is the last folder or not;
if not, acquiring the next folder of the first folder, and marking the next folder as a second folder;
calculating the cluster size according to the first folder and the second folder;
judging whether the cluster size is an integral multiple of 512B and is less than or equal to 64 KB;
if yes, calculating the position of the cluster meeting the requirement and storing the position to obtain the physical address information of the cluster meeting the requirement.
4. The data recovery method of claim 3, wherein the step of calculating and acquiring the positions of folders stored in the disk partition in all the folder information according to the physical address information of the clusters meeting the requirement to recover the data comprises the following steps:
acquiring file cluster numbers of all folders needing to calculate specific physical address information;
and calculating and acquiring the storage positions of the file folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
5. A data recovery apparatus, comprising: an acquisition unit, a calculation unit, and a calculation acquisition unit;
the acquisition unit is used for acquiring all folder information;
the computing unit is used for computing the physical address information of all clusters meeting the requirements in all the folder information;
and the calculation acquisition unit is used for calculating and acquiring the positions of the folders stored in the disk partitions in all the folder information according to the physical address information of the clusters meeting the requirements so as to recover the data.
6. The data recovery apparatus according to claim 5, wherein the obtaining unit includes: the device comprises a traversing module, a first judging module and a recording module;
the traversal module is used for traversing the whole disk to obtain all folders;
the first judging module is used for judging whether all folders have folder starting marks or not;
the recording module is used for recording the initial positions and cluster numbers of all the folders to form all the folder information.
7. The data recovery apparatus according to claim 6, wherein the calculation unit includes: the device comprises a traversal acquisition module, a second judgment module, an acquisition marking module, a first calculation module, a third judgment module and a calculation storage module;
the traversal acquisition module is used for traversing all folder information, sequentially acquiring the starting positions and cluster numbers of two different folders and recording the starting positions and the cluster numbers as a first folder and a second folder;
the second judging module is used for judging whether the second folder is the last folder or not;
the acquisition marking module is used for acquiring the next folder of the first folder and marking the next folder as a second folder;
the first calculation module is used for calculating the cluster size according to the first folder and the second folder;
the third judging module is configured to judge whether the cluster size is an integer multiple of 512B and is less than or equal to 64 KB;
and the calculation and storage module is used for calculating and storing the positions of the clusters meeting the requirements so as to obtain the physical address information of the clusters meeting the requirements.
8. The data recovery apparatus according to claim 7, wherein the calculation acquisition unit includes: the device comprises an acquisition module and a second calculation module;
the acquisition module is used for acquiring the file cluster numbers of all folders needing to calculate specific physical address information;
and the second calculation module is used for calculating and acquiring the storage positions of the folders in the disk partitions in all the folder information according to the cluster size, the cluster meeting the requirements and the file cluster number.
9. A computer device, characterized in that the computer device comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program implements the data recovery method according to any one of claims 1-4.
10. A storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the data recovery method according to any one of claims 1-4.
CN202011271664.3A 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium Pending CN112379839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011271664.3A CN112379839A (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011271664.3A CN112379839A (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112379839A true CN112379839A (en) 2021-02-19

Family

ID=74582418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011271664.3A Pending CN112379839A (en) 2020-11-13 2020-11-13 Data recovery method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112379839A (en)

Similar Documents

Publication Publication Date Title
US8688651B2 (en) Dynamic deduplication
WO2018095299A1 (en) Time sequence data management method, device and apparatus
US9081792B1 (en) Optimizing backup of whitelisted files
US8914325B2 (en) Change tracking for multiphase deduplication
CN103403709A (en) Method, device and system for data reading and writing
CN112379839A (en) Data recovery method and device, computer equipment and storage medium
WO2021093461A1 (en) Method and apparatus for aggregation calculation in blockchain-type ledger, and device
CN107526656B (en) Cloud restoration method and device
NL2014199B1 (en) A computer implemented method for generating a variant call file.
CN110471625B (en) Bad block information protection method and device, computer equipment and storage medium
CN108604201A (en) A kind of snapshot rollback method, device, storage control and system
US20190205223A1 (en) Metadata recovery for de-duplicated data
CN109614054B (en) data reading method and system
CN112988880A (en) Data synchronization method and device, electronic equipment and computer storage medium
CN110908840A (en) Method, device, equipment and storage medium for restoring bak backup files
EP2820548B1 (en) Versioned memories using a multi-level cell
CN110874285A (en) Method for realizing reducible write operation of EXT file system
WO2017050029A1 (en) Method, device, and equipment for data block processing
CN110287164B (en) Data recovery method and device and computer equipment
CN110941508B (en) Post-disaster recovery system, method and device for virtualization system and readable storage medium
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
CN109614273B (en) Method and system for reading incremental data
JP6708086B2 (en) Operation information recording program, operation information recording device, and operation information recording method
JP2008198001A (en) Correction patch selection support system and method
CN111984460A (en) Method and device for recovering metadata

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination