Use Debugfs to recover RM deleted files under Linux

Source: Internet
Author: User
Use Debugfs to recover RM deleted files under Linux
?? The following methods are tested on the Ext3 file system and are implemented by root
? Mainly with the help of Debugfs

Fdisk/dev/vda
Mkdir/mnt/test
Mount/dev/vda3/mnt/test
1 running Debugfs, entering the dispatch mode
[Email protected] test]# debugfs-w/dev/vda3
[[email protected] test] #sudo debugfs-w/dev/vda3

??? 2 Executive Open/dev/vda3
3 Execution ls-d Lists the most recent operation for this directory, where you can see the log deletion record for <num>

4 Perform logdump-i <num> display this log content
Debugfs:logdump-i <13>

??? 5 Look for the block in the output to delete the file, record it down Blockid

??? 6 exit Debugfs, run [[email protected] test] #dd if=/dev/vda3 of=/tmp/saved? bs=1027 count=138476 skip=47
??? At this point, the deleted files restored, but this method has a problem, if the deletion is a large file, it occupies a number of blocks, the operation is more troublesome.
?? Debugfs in debug mode, the command line is difficult to use, but it supports the-r option, can be executed in the shell, is to use multiple-R to execute the command to connect, if the command needs to specify the parameters need to add "", or shell parsing will be problematic.

Use Debugfs to recover RM deleted files under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.