CN110659254B - Deleted file recovery method, device, equipment and readable storage medium - Google Patents

Deleted file recovery method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110659254B
CN110659254B CN201910927749.3A CN201910927749A CN110659254B CN 110659254 B CN110659254 B CN 110659254B CN 201910927749 A CN201910927749 A CN 201910927749A CN 110659254 B CN110659254 B CN 110659254B
Authority
CN
China
Prior art keywords
directory
index node
file
deleted file
deleted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910927749.3A
Other languages
Chinese (zh)
Other versions
CN110659254A (en
Inventor
赵培文
张立强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201910927749.3A priority Critical patent/CN110659254B/en
Publication of CN110659254A publication Critical patent/CN110659254A/en
Application granted granted Critical
Publication of CN110659254B publication Critical patent/CN110659254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • G06F11/1423Reconfiguring to eliminate the error by reconfiguration of paths
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a deleted file recovery method, a deleted file recovery device, deleted file recovery equipment and a readable storage medium, wherein the method comprises the following steps: traversing a free directory in a cache of a metadata server to obtain a directory entry and an index node of a deleted file; acquiring the path name of the deleted file by using the index node; renaming the path name in the directory entry to be the path name; and restoring the states of the directory entry and the index node to the state before deletion. The method can recover the deleted files in the Unix/Linux system, and can continuously access the data contents of the deleted files.

Description

Deleted file recovery method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a deleted file recovery method, device, and apparatus, and a readable storage medium.
Background
The Windows system has the function of a recycle bin, and files deleted at ordinary times are all placed in the recycle bin and can be recovered from the recycle bin when recovery is needed.
However, in the Unix/Linux system, after the terminal executes the command to delete the file, the file is difficult to restore, and if the important file is deleted by mistake, the workload is undoubtedly increased, and a great loss is also brought. And the Unix/Linux system is not provided with a recycle bin similar to that in the Windows system, and file recovery is difficult to realize.
In summary, how to effectively solve the problems of file recovery in the Unix/Linux system and the like is a technical problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a deleted file recovery method, a deleted file recovery device, deleted file recovery equipment and a readable storage medium, so as to realize file recovery in a Unix/Linux system.
In order to solve the technical problems, the invention provides the following technical scheme:
a file recovery method, comprising:
traversing a free directory in a cache of a metadata server to obtain a directory entry and an index node of a deleted file;
acquiring the path name of the deleted file by using the index node;
renaming the path name in the directory entry to the path name;
and restoring the states of the directory entry and the index node to a state before deletion.
Preferably, the obtaining the pathname of the deleted file by using the index node includes:
and reading the path name from a data structure corresponding to the index node.
Preferably, the traversing the free directory in the metadata server cache, obtaining the directory entry and the inode of the deleted file, includes:
acquiring an index node of the deleted file;
traversing the free directory to obtain a directory item to be selected and an index node to be selected;
and determining the directory entry to be selected corresponding to the index node to be selected which is the same as the index node as the directory entry.
Preferably, the obtaining the inode of the deleted file includes:
and executing a file name viewing instruction to obtain the index node.
Preferably, traversing the free directory to obtain a directory entry to be selected and an inode to be selected includes:
traversing the free directory, and acquiring an associated container for storing directory entries according to the directory sharding objects;
traversing the directory items to be selected in the associated container;
and acquiring a link by using the directory item to be selected, and acquiring the index node to be selected by using the link.
Preferably, the method further comprises the following steps:
and executing a free directory zero deletion setting instruction to reserve the free directory.
Preferably, after restoring the state of the directory entry and the inode to the pre-deletion state, the method includes:
and accessing the original directory corresponding to the deleted file to acquire the data content of the deleted file.
A deleted file recovery apparatus comprising:
the free directory traversal module is used for traversing the free directory in the cache of the metadata server to obtain directory entries and index nodes of deleted files;
a pathname obtaining module, configured to obtain a pathname of the deleted file by using the index node;
a renaming module, configured to rename a path name in the directory entry to the path name;
and the file recovery module is used for recovering the directory entry and the state of the index node to a state before deletion.
A deleted file recovery apparatus comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the deleted file recovery method when the computer program is executed.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned deleted file restoration method.
By applying the method provided by the embodiment of the invention, the free directory in the cache of the metadata server is traversed to obtain the directory entry and the index node of the deleted file; acquiring the path name of the deleted file by using the index node; renaming the path name in the directory entry to be the path name; and restoring the states of the directory entry and the index node to the state before deletion.
In the Unix/Linux system, when a file is deleted, the deleted file and the corresponding data structure of the directory are stored in the free directory. That is, in the operation of deleting the file, the operating system does not empty the contents of the data blocks storing the file one by one, but only releases the index nodes and the data blocks occupied by the file. Based on the method, the directory entry and the index node of the deleted file are found by traversing the free directory, and then the path name of the deleted file is obtained according to the index node. And obviously renaming the path in the directory entry, and finally restoring the states of the directory entry and the index node to the state before deletion. Therefore, the deleted files in the Unix/Linux system can be restored, and the data content of the deleted files can be continuously accessed.
Accordingly, embodiments of the present invention further provide a deleted file recovery apparatus, a device, and a readable storage medium corresponding to the deleted file recovery method, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a deleted file recovery method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a deleted file recovery apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a deleted file recovery apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a deleted file recovery apparatus according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart illustrating a deleted file recovery method in an embodiment of the present invention, which can be applied to a Unix/Linux system.
The data is finally stored in the form of data blocks on a disk divided into data blocks. And the operating system manages this data through the file system. In an operating system, a file system is represented in a hierarchical form, which can be represented as an inverted tree. All files and subdirectories are positioned by searching parent directory entries, corresponding inode numbers (inodes) can be found in the directory entries by matching file names, and the positions of the files on a disk can be found by searching an inode table (inode table). In the Unix/Linux system, a directory is only one specific file. The directory and the file are distinguished by a file _ type field, and specifically, a value of 1 indicates a normal file, and a value of 2 indicates a directory.
In the operation of deleting the file, the operating system does not empty the contents of the data blocks storing the file one by one, but only releases the index nodes and the data blocks occupied by the file. Based on this, in this embodiment, by finding the index node corresponding to the deleted file, the corresponding data block can be found, and further, the deleted file can be recovered from the disk. In the Unix/Linux system, when a file is deleted, the deleted file and the corresponding data structure of the directory are stored in the free directory. Therefore, the index node and the directory entry are found from the free directory, and the deleted file is recovered by renaming the path name of the deleted file in the directory entry. The method comprises the following steps:
s101, traversing the free directory in the cache of the metadata server to obtain the directory entry and the index node of the deleted file.
Among them, a metadata Server (Meta Data Server, MDS).
When a file of the distributed file system is deleted, the metadata of the file to be deleted is usually mounted in a flattened free directory by using an MDS, and then information of successful file deletion is returned to the client.
However, the file deletion under the free directory is asynchronous processing, the metadata of the file to be deleted is also stored in the local cache of the MDS, and the file deletion speed depends on the deletion speed of the OSD (Object-based Storage Device). It can be seen that when the client is informed that the file has been successfully deleted, the data blocks of the file may still be recorded in the disk, and the corresponding metadata may still be in the cache of the MDS until overwritten by new data.
Wherein, the free directory is the place where the deleted file and directory are stored corresponding to the data structure; the directory entry is a structure including a file name and an inode number; an inode is a structure that includes the base information of a file and pointers to data blocks.
In this embodiment, when the deleted file needs to be restored (for example, the file is deleted by mistake), the free directory in the metadata server cache may be traversed to obtain the directory entry and the index node of the deleted file. It should be noted that when it is known that an inode corresponding to a certain or partially deleted file that needs to be restored is determined, only a directory entry and an inode corresponding to the certain or partially deleted file may be obtained from the free directory; when the index node of a certain deleted file or a part of deleted files needing to be recovered is needed, all directory entries and index nodes in the free directory can be read.
In the following, a detailed description is given of an acquisition process for acquiring directory entries and inodes of deleted files, where the process includes:
step one, acquiring an index node of a deleted file;
traversing the free directory to obtain a directory item to be selected and an index node to be selected;
and step three, determining the directory entries to be selected corresponding to the index nodes to be selected which are the same as the index nodes as the directory entries.
For convenience of description, the above three steps will be described in combination.
And obtaining the index node of the deleted file, namely executing a file name viewing instruction and obtaining the index node. Wherein the inode of the deleted file is viewed by the instruction [ ls-i filename ].
The method for traversing the free directory to obtain the directory entries to be selected and the index nodes to be selected comprises the following steps:
step 1, traversing the free directory, and acquiring an associated container for storing directory entries according to the directory sharding objects;
step 2, traversing the directory items to be selected in the associated container;
and 3, acquiring the link by using the directory item to be selected, and acquiring the index node to be selected by using the link.
Wherein, the associated container can be specifically map. Map is one of many containers in C + + STL, and is somewhat similar to the dictionary of python, and serves as an association Container to associate key and value, where key is a key and is not alterable, and value is the corresponding value of the key value. Map can provide a one-to-one data mapping relationship.
When the association container is a map, all the free directories in the MDS cache can be traversed, and the map for storing directory entries is obtained according to the directory fragment object; and traversing each directory entry in the map, acquiring the link according to the directory entry, and acquiring the index node according to the link.
And comparing the index node to be selected with the index node of the deleted file, and when the index node to be selected which is the same as the index node of the deleted file is found, indicating that the deleted file is in the free directory, determining the directory item to be selected for the UI of the index node to be selected as the directory item.
S102, the path name of the deleted file is obtained by utilizing the index node.
The pathnames of deleted files are stored in the inodes, so the pathnames can be read from the data structures corresponding to the inodes. Specifically, the path name of the deleted file is recorded in the string _ prior _ path member in the data structure corresponding to the index node, that is, the path name of the deleted file can be obtained by reading the string _ prior _ path member.
S103, renaming the path name in the directory entry to the path name.
Renaming a pathname may be seen in common implementations of pathrenaming. For example, the renaming process may specifically include:
step 1, acquiring links and index nodes of a source directory entry and a target directory entry;
step 2, declaring renamed index nodes and target index nodes, and setting target predicted index nodes;
step 3, setting the predicted link of the source directory entry to be null;
step 4, moving source directory entries: and marking the parent directory of the target directory entry as dirty data, and pre-marking the directory where the source directory entry is positioned as dirty data.
The source directory entry is a directory where the deleted file is located, and the target directory entry is a directory entry corresponding to the deleted file.
And S104, restoring the states of the directory entry and the index node to the states before deletion.
After the path name of the deleted file is renamed in the corresponding directory entry in the free directory, the deleted file can be restored to the original directory from the free directory. I.e., the directory entry and inode are the same at this time as the storage location before deletion.
The following describes the steps S101 to S104 with a simple file recovery example:
1. the ls-i file name is executed and the file inode is viewed.
2. Executing the icfs-query-dir to query which MDS the directory of the file belongs to;
3. the icfs schema mds string _ restore is executed to restore the file index nodes and the deleted file.
Preferably, as can be seen from the above steps, in this embodiment, the deleted file can be recovered when the inode and the directory entry of the deleted file are in the free directory. In order to improve the recovery possibility of the erroneously deleted file, in this embodiment, a live directory zero deletion setting instruction may be further executed to reserve the live directory. Specifically, mds _ max _ purge _ file =0 is set in the configuration file, that is, the directory entry indicating that the free directory is not deleted; if the value is other value (such as 1 or 2), it represents the number of files allowed to be deleted simultaneously at the same time.
In the Unix/Linux system, during the file deletion operation, the operating system does not empty the contents of the data blocks storing the file one by one, but only releases the index nodes and the data blocks occupied by the file. That is, the data block and the inode actually exist in the disk, and after the states of the directory entry and the inode are restored to the states before deletion, the original directory corresponding to the deleted file can be accessed, and the data content of the deleted file is acquired. At this time, the deleted file after the recovery is accessed, and the file access can be normally performed when the file is not deleted.
By applying the method provided by the embodiment of the invention, the free directory in the cache of the metadata server is traversed to obtain the directory entry and the index node of the deleted file; acquiring the path name of the deleted file by using the index node; renaming the path name in the directory entry to be the path name; and restoring the states of the directory entry and the index node to the state before deletion. In the Unix/Linux system, when a file is deleted, the deleted file and the corresponding data structure of the directory are stored in the free directory. That is, in the operation of deleting the file, the operating system does not empty the contents of the data blocks storing the file one by one, but only releases the index nodes and the data blocks occupied by the file. Based on the method, the directory entry and the index node of the deleted file are found by traversing the free directory, and then the path name of the deleted file is obtained according to the index node. And obviously renaming the path in the directory entry, and finally restoring the states of the directory entry and the index node to the state before deletion. Therefore, the deleted files in the Unix/Linux system can be restored, and the data content of the deleted files can be continuously accessed.
Example two:
corresponding to the above method embodiment, an embodiment of the present invention further provides a deleted file recovery apparatus, and the deleted file recovery apparatus described below and the deleted file recovery method described above may be referred to in a corresponding manner.
Referring to fig. 2, the apparatus includes the following modules:
the free directory traversal module 101 is configured to traverse a free directory in a cache of the metadata server to obtain a directory entry and an index node of a deleted file;
a pathname obtaining module 102, configured to obtain a pathname of the deleted file by using the index node;
a renaming module 103, configured to rename the path name in the directory entry to a path name;
and the file recovery module 104 is configured to recover the states of the directory entry and the inode to the state before deletion.
By applying the device provided by the embodiment of the invention, the free directory in the cache of the metadata server is traversed to obtain the directory entry and the index node of the deleted file; acquiring the path name of the deleted file by using the index node; renaming the path name in the directory entry to be the path name; and restoring the states of the directory entry and the index node to the state before deletion. In the Unix/Linux system, when a file is deleted, the deleted file and the corresponding data structure of the directory are stored in the free directory. That is, in the operation of deleting the file, the operating system does not empty the contents of the data blocks storing the file one by one, but only releases the index nodes and the data blocks occupied by the file. Based on this, in the device, the directory entry and the index node of the deleted file are found by traversing the free directory, and then the pathname of the deleted file is obtained according to the index node. And obviously renaming the path in the directory entry, and finally restoring the states of the directory entry and the index node to the state before deletion. Therefore, the deleted files in the Unix/Linux system can be restored, and the data content of the deleted files can be continuously accessed.
In an embodiment of the present invention, the pathname obtaining module 102 is specifically configured to read pathnames from data structures corresponding to the index nodes.
In one embodiment of the present invention, the free directory traversal module 101 includes:
the index node acquisition unit is used for acquiring the index node of the deleted file;
the free directory traversal unit is used for traversing the free directory to obtain a directory item to be selected and an index node to be selected;
and the directory entry acquisition unit is used for determining the directory entries to be selected corresponding to the index nodes to be selected which are the same as the index nodes as the directory entries.
In a specific embodiment of the present invention, the index node obtaining unit is specifically configured to execute a file name viewing instruction to obtain an index node.
In a specific embodiment of the present invention, the free directory traversal unit is specifically configured to traverse the free directory, and obtain an association container storing directory entries according to the directory fragment object; traversing the directory items to be selected in the associated container; and acquiring the link by using the directory item to be selected, and acquiring the index node to be selected by using the link.
In one embodiment of the present invention, the method further comprises:
and the free directory reserving module is used for executing a free directory zero deletion setting instruction so as to reserve the free directory.
In a specific embodiment of the present invention, the file access module is configured to, after restoring the states of the directory entry and the index node to the pre-deletion state, access the original directory corresponding to the deleted file, and acquire the data content of the deleted file.
Example three:
corresponding to the above method embodiment, an embodiment of the present invention further provides a deleted file recovery apparatus, and a deleted file recovery apparatus described below and a deleted file recovery method described above may be referred to in a corresponding manner.
Referring to fig. 3, the deleted file restoring apparatus includes:
a memory D1 for storing computer programs;
a processor D2 for implementing the steps of the deleted file recovery method of the above method embodiments when executing the computer program.
Specifically, referring to fig. 4, fig. 4 is a schematic diagram illustrating a specific structure of a deleted file recovery device provided in this embodiment, where the deleted file recovery device may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the deleted file restoration device 301.
Deleted file restoration device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341. Such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps in the deleted file restoration method described above may be implemented by the structure of the deleted file restoration apparatus.
Example four:
corresponding to the above method embodiment, an embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and a deleted file recovery method described above may be referred to in correspondence.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the deleted file recovery method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this 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 invention.

Claims (8)

1. A deleted file recovery method, comprising:
traversing a free directory in a cache of a metadata server to obtain a directory entry and an index node of a deleted file;
acquiring the path name of the deleted file by using the index node;
renaming the path name in the directory entry to the path name;
restoring the states of the directory entry and the index node to a state before deletion; the free directory is a place where the deleted files and directories are stored corresponding to the data structures; the directory entry is a structure comprising a file name and an inode number; the index node is a structure comprising basic information of a file and a pointer of a data block;
the traversing of the free directory in the metadata server cache to obtain the directory entry and the index node of the deleted file includes:
acquiring an index node of the deleted file;
traversing the free directory to obtain a directory item to be selected and an index node to be selected;
determining the directory entry to be selected corresponding to the index node to be selected which is the same as the index node as the directory entry;
traversing the free directory to obtain a directory item to be selected and an index node to be selected, comprising:
traversing the free directory, and acquiring an associated container for storing directory entries according to the directory sharding objects;
traversing the directory items to be selected in the associated container;
and acquiring a link by using the directory item to be selected, and acquiring the index node to be selected by using the link.
2. The method for recovering the deleted file according to claim 1, wherein the obtaining the pathname of the deleted file by using the inode comprises:
and reading the path name from a data structure corresponding to the index node.
3. The deleted file recovery method according to claim 1, wherein obtaining the inode of the deleted file comprises:
and executing a file name viewing instruction to obtain the index node.
4. The deleted file recovery method according to claim 1, further comprising:
executing a free directory zero deletion setting instruction to reserve the free directory; the zero deletion setting instruction is an instruction for not deleting the free directory.
5. The deleted file recovery method according to any one of claims 1 to 4, comprising, after recovering the states of the directory entry and the inode to the pre-deletion state:
and accessing the original directory corresponding to the deleted file to acquire the data content of the deleted file.
6. A deleted file restoration apparatus, comprising:
the free directory traversal module is used for traversing the free directory in the cache of the metadata server to obtain directory entries and index nodes of deleted files;
a pathname obtaining module, configured to obtain a pathname of the deleted file by using the index node;
a renaming module, configured to rename a path name in the directory entry to the path name;
the file recovery module is used for recovering the directory entry and the state of the index node to a state before deletion; the free directory is a place where the deleted files and directories are stored corresponding to the data structures; the directory entry is a structure comprising a file name and an inode number; the index node is a structure comprising basic information of a file and a pointer of a data block;
the traversing of the free directory in the metadata server cache to obtain the directory entry and the index node of the deleted file includes:
acquiring an index node of the deleted file;
traversing the free directory to obtain a directory item to be selected and an index node to be selected;
determining the directory entry to be selected corresponding to the index node to be selected which is the same as the index node as the directory entry;
traversing the free directory to obtain a directory item to be selected and an index node to be selected, comprising:
traversing the free directory, and acquiring an associated container for storing directory entries according to the directory sharding objects;
traversing the directory items to be selected in the associated container;
and acquiring a link by using the directory item to be selected, and acquiring the index node to be selected by using the link.
7. A deleted file restoration device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the deleted file recovery method according to any one of claims 1 to 5 when executing said computer program.
8. A readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the deleted file restoration method according to any one of claims 1 to 5.
CN201910927749.3A 2019-09-27 2019-09-27 Deleted file recovery method, device, equipment and readable storage medium Active CN110659254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910927749.3A CN110659254B (en) 2019-09-27 2019-09-27 Deleted file recovery method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910927749.3A CN110659254B (en) 2019-09-27 2019-09-27 Deleted file recovery method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110659254A CN110659254A (en) 2020-01-07
CN110659254B true CN110659254B (en) 2022-04-22

Family

ID=69039599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910927749.3A Active CN110659254B (en) 2019-09-27 2019-09-27 Deleted file recovery method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110659254B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400101B (en) * 2020-03-18 2021-06-01 北京北亚宸星科技有限公司 Data recovery method and system for deleting JFS2 file system data
CN112052118B (en) * 2020-08-20 2022-08-23 厦门市美亚柏科信息股份有限公司 GlobalFs deleted file recovery method and system
CN113986617B (en) * 2021-11-03 2022-07-22 厦门市美亚柏科信息股份有限公司 Data recovery method and system based on MMKV file format
CN115098447A (en) * 2022-07-18 2022-09-23 重庆紫光华山智安科技有限公司 File recovery method and device, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199750A (en) * 2014-08-26 2014-12-10 上海天脉聚源文化传媒有限公司 File recovery method and device of linux system
CN105204959A (en) * 2015-08-28 2015-12-30 小米科技有限责任公司 Method and device for restoring deleted files in ext file system
CN106648977A (en) * 2016-12-05 2017-05-10 武汉斗鱼网络科技有限公司 Recovery method and device of Android system file
CN107402846A (en) * 2017-07-24 2017-11-28 广州三星通信技术研究有限公司 Document handling method and device
CN109582500A (en) * 2018-11-26 2019-04-05 万兴科技股份有限公司 Data reconstruction method, device, computer equipment and storage medium
CN109739815A (en) * 2019-01-10 2019-05-10 北京达佳互联信息技术有限公司 Document handling method, system, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8271445B2 (en) * 2007-06-08 2012-09-18 Apple Inc. Storage, organization and searching of data stored on a storage medium
KR101605156B1 (en) * 2014-12-11 2016-03-21 네이버비즈니스플랫폼 주식회사 Device, method, and computer for providing file deleting service
US10503605B2 (en) * 2017-09-25 2019-12-10 ArcServe (USA) LLC Method of detecting source change for file level incremental backup

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199750A (en) * 2014-08-26 2014-12-10 上海天脉聚源文化传媒有限公司 File recovery method and device of linux system
CN105204959A (en) * 2015-08-28 2015-12-30 小米科技有限责任公司 Method and device for restoring deleted files in ext file system
CN106648977A (en) * 2016-12-05 2017-05-10 武汉斗鱼网络科技有限公司 Recovery method and device of Android system file
CN107402846A (en) * 2017-07-24 2017-11-28 广州三星通信技术研究有限公司 Document handling method and device
CN109582500A (en) * 2018-11-26 2019-04-05 万兴科技股份有限公司 Data reconstruction method, device, computer equipment and storage medium
CN109739815A (en) * 2019-01-10 2019-05-10 北京达佳互联信息技术有限公司 Document handling method, system, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Linux操作系统文件的维护;王亚军;《濮阳职业技术学院学报》;20151031;第28卷(第05期);第154-155页 *
Recovering deleted browsing artifacts from web browser log files in Linux environment;P. Anuradha et al.;《2016 Symposium on Colossal Data Analysis and Networking (CDAN)》;20160919;第1-4页 *
基于Hash的YAFFS2文件各版本恢复算法研究;李亚萌等;《信息网络安全》;20160510(第05期);第51-57页 *

Also Published As

Publication number Publication date
CN110659254A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN110659254B (en) Deleted file recovery method, device, equipment and readable storage medium
US10956364B2 (en) Efficient data synchronization for storage containers
US9811522B2 (en) System and method for transforming a source virtual machine without copying of payload data
US5991753A (en) Method and system for computer file management, including file migration, special handling, and associating extended attributes with files
US5261088A (en) Managing locality in space reuse in a shadow written B-tree via interior node free space list
US8548965B2 (en) Changed files list with time buckets for efficient storage management
US8484172B2 (en) Efficient search for migration and purge candidates
KR100622801B1 (en) Rapid restoration of file system usage in very large file systems
US5761677A (en) Computer system method and apparatus providing for various versions of a file without requiring data copy or log operations
US9189342B1 (en) Generic process for determining child to parent inheritance for fast provisioned or linked clone virtual machines
US8103621B2 (en) HSM two-way orphan reconciliation for extremely large file systems
US8095678B2 (en) Data processing
US11847028B2 (en) Efficient export of snapshot changes in a storage system
US11288128B2 (en) Indexing a relationship structure of a filesystem
US8640136B2 (en) Sharing objects between computer systems
US11500817B2 (en) Asynchronous deletion of large directories
US11775482B2 (en) File system metadata deduplication
EP4172777A1 (en) Updating a virtual machine backup
US8086638B1 (en) File handle banking to provide non-disruptive migration of files
US11645161B2 (en) Catalog of files associated with snapshots
US11294877B2 (en) Efficient file renames using B-tree based persistence for file system name spaces
US20220222146A1 (en) Versioned backup on an object addressable storage system
CN112262378A (en) Hydration of a hierarchy of dehydrated documents
US20230409438A1 (en) Creating file recipes for copy overwrite workloads in deduplication file systems
US11977460B1 (en) File system namespace reconstruction

Legal Events

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