How to recover RM command deleted files in Linux Extundelete compile installation and use

Source: Internet
Author: User

1, download Extundelete package, install dependent

I am using a centos system and need to install e2fsprogs,e2fsprogs-libs,e2fsprogs-devel before installing Extundelete.

Yum Install e2fsprogs e2fsprogs-libs e2fsprogs-devel

Then download the Extundelete program

: http://extundelete.sourceforge.net/

2. Compile and install Extundelete
compile step: Tar xjf extundelete-0.2. 4 . tar.bz2 CD extundelete-0.2. 4 . /

Extundelete's usage can be viewed in detail through help!

Extundelete Software Recovery principle

Extundelete the process of recovering data: After the data has been mistakenly deleted, the first thing to do is to unload the partition where the deleted data is located, if the data of the root partition is mistakenly deleted, you need to enter the system into single user mode and mount the root partition in read-only mode. The reason for this is simple, because after the file is deleted, only the sector pointer in the Inode node of the file is zeroed out, the actual file is also stored on disk, if the disk continues to mount in read-write mode, the data blocks of these deleted files may be reassigned by the operating system, after these databases are overwritten by new data, The data is really lost and the recovery tool is powerless. So! Mounting a disk in read-only mode minimizes the risk of data being overwritten in the database to increase the percentage of successful recovery data.

3. Uninstall the partition that needs to recover files
Fuser-k/mnt/test//mnt/test
4. Use Extundelete to view files that exist on the partition

and query the recoverable data information of the/DEV/SDB1 partition by executing the extundelete command

2 /DEV/SDB1     
Example of recovering files
 /dev//dev/sdb1/mnt/test/mv Recovered_files/file.  The/mnt/test/resolv.conf      recovery is complete and the content can be verified with cat.

Restore a single file: EXTUNDELETE/DEV/SDB1--restore-file passwd will generate a recovered_files directory in the current directory, which holds the recovered files.

Recovering a single directory: EXTUNDELETE/DEV/SDB1--restore-directory/mongodb

Recover all deleted files: extundelete/dev/sdb1--restore-allextundelete

You can also implement data recovery for a period of time. Can be achieved by "--after" and "--before" Parameters!

How to recover RM command deleted files in Linux Extundelete compile installation and use

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.