Linux instance recovery file deleted

  
 

Today I suddenly thought of testing the file recovery. I saw a lot of people using an ext3grep software on the Internet. After using it, I found that the effect was not good. I could only restore small files and could not restore the directory. Later, I found a software called extundelete, which was found to be good after use. The official website is said to be able to restore the files under the ext4 file system.

The following is the experimental record:

[root@localhost tmp] # cd /boot[root@localhost boot]# mount -o remount,rw /boot[root@localhost boot]# ll Total 10795-rw-r--r-- 1 root root 12288 2009-01-22 config-2.6 .18-128.el5drwxr-xr-x 2 root root 1024 05-13 01:49 grubdrwxr-xr-x 2 root root 1024 05-12 01:57 grub_bak-rw------- 1 root root 3383766 02 -24 17:09 initrd-2.6.18-128.el5.imgdrwx------ 2 root root 12288 02-24 16:52 lost+found-rw-r--r-- 1 root root 80032 2009- 03-17 messagedrwxr-xr-x 2 root root 1024 05-12 01:53 mynewkernel-rw-r--r-- 1 root root 102182 05-13 02:11 symvers-2.6.18-128.el5.gz_bak- Rw-r--r-- 1 root root 1784432 05-11 23:45 System.map-rw-r--r-- 1 root root 1188481 2009-01-22 System.map-2.6.18-128.el5 -rw-r--r-- 1 root root 1889308 2009-01-22 vmlinuz-2.6.18-128.el5-rw-r--r-- 1 root root 2538768 05-12 01:50 vmlinuz-2.6. 38.6[root@localhost boot]# rm -rf config- 2.6.18-128.el5 [root@localhost boot]# sync confirmed to delete the config-2.6.18-128.el5 file [root@localhost boot]# mount -o remount,ro /boot for security, to restore The partition mount is read-only extundelete download and installation will not be written

Start now to restore cd /tmp

[root@localhost tmp]# /usr/local/extundelete/bin /extundelete /dev/sda1 --ls --inode 2#Use the command to retrieve the file under the partition File name

Copyright © Windows knowledge All Rights Reserved