Xmanager。extundelete
方法1:
通过inode结点查看被删除的文件名字:
[root@xuegod63~]# mkdir test
[root@xuegod63~]# cd test/
[root@localhost~]#extundelete /dev/sda4 --inode 2 查看节点
通过inode节点来恢复:
[root@localhost~]#extundelete/dev/sda4 --restore-inode12
NOTICE:Extended attributes are not restored.
Loadingfilesystem metadata ... 16 groups loaded.
Loadingjournal descriptors ... 32 descriptors loaded.
[root@localhost ~]# ls RECOVERED_FILES/#恢复成功
file.12
[root@xuegod63 test]# diff /etc/passwd /root/test/RECOVERED_FILES/file.12
方法二,通过文件名恢复
恢复某个文件:
[root@xuegod63test]# rm -rf RECOVERED_FILES/
[root@localhost~]# extundelete /dev/sda4 --restore-file passwd
恢复某个目录,如目录a下的所有文件:
[root@localhost~]#extundelete /dev/sda4 --restore-directorya#恢复目录a,不用
恢复所有的文件
[root@localhost ~]#extundelete/dev/sda4 --restore-all