您的位置:首页 > 运维架构 > Linux

Linux ext3/ext4误删文件,数据恢复方法

2014-11-05 17:42 791 查看
测试环境:Ubuntu 12.04 X86 +ext4恢复文件使用的工具:extundelete(点击下载)说明:当文件异常消失或者rm误删除后,避免在该分区中继续读、写、删除等操作。如果是恢复整块硬盘,请考虑安装extundelete所在分区的空间大小。安装extundelete:tar -xjf extundelete-0.2.2.tar.bzcd extundelete-0.2.2./configuremake&make install
 make -s all-recursive
Making all in src
Making install in src/usr/bin/install -c ‘extundelete’ ‘/usr/local/bin/extundelete’
说明安装成功。
--恢复文件

恢复/dev/sda5中所有数据

xtundelete
/dev/sda5
--restore-all

恢复/dev/sda5中/tool目录下所有数据

extundelete
/dev/sda5
--restore-directory
/tool

恢复/dev/sda5中某一个文件数据

extundelete
/dev/sda5
--restore-files
/etc/passwd



此程序不能指定恢复文件到指定目录,默认恢复的文件保存在
extundelete所在目录RECOVERED_FILES下,
[code]
extundelete
路径为:[code]/usr/local/bin/extundelete

文件恢复路径:
/usr/local/bin/extundelete
/RECOVERED_FILES

因此
extundelete
所在分区一定要大,否则会会提示空间不足。
[code]

extundelete-0.2.2.tar.bz下载路径:下载



安装出现问题:
在ubuntu上安装之前,./configure 配置 extundelete-0.2.0的时候发现提示 没有找到 ext2fs 库
extundelete-0.2.0$ ./configure
Configuring extundelete0.2.0
configure: error: Can't find ext2fs library

解决办法:
extundelete-0.2.0$sudo apt-get install e2fslibs-dev e2fslibs-dev
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: