首页 > 其他 > 详细

系统文件误删除恢复

时间:2016-04-25 19:49:00      阅读:264      评论:0      收藏:0      [点我收藏+]

wget http://nchc.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2

tar -jxvf extundelete-0.2.4.tar.bz2 

yum install e2fsprogs* e2fslibs* gcc gcc-c++ gcc-g77 -y

cd extundelete-0.2.4

./configure --prefix=/usr/local/extundelete

make

make install

[root@vm40 home]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/vda3        51G  3.5G   45G   8% /

tmpfs           1.9G  224K  1.9G   1% /dev/shm

/dev/vda1       194M   34M  151M  19% /boot

/dev/sr0        4.2G  4.2G     0 100% /media/CentOS_6.5_Final

/dev/sr0        4.2G  4.2G     0 100% /mnt

/dev/vda2        97G  188M   92G   1% /u01

[root@vm40 home]# cp /etc/passwd /u01/

[root@vm40 home]# sync

[root@vm40 home]# rm -f /u01/passwd 

[root@vm40 home]# sync

[root@vm40 home]# umount /u01

[root@vm40 home]# /usr/local/extundelete/bin/extundelete --restore-file passwd /dev/vda2

NOTICE: Extended attributes are not restored.

Loading filesystem metadata ... 782 groups loaded.

Loading journal descriptors ... 82 descriptors loaded.

Successfully restored file passwd

[root@vm40 home]# ls

oracle  RECOVERED_FILES

[root@vm40 home]# ls RECOVERED_FILES/

passwd

[root@vm40 home]# rm -fr RECOVERED_FILES/

[root@vm40 home]# mount /dev/vda2 /u01/

[root@vm40 home]# sync


系统文件误删除恢复

原文:http://plking.blog.51cto.com/8198599/1767545

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!