linux实现数据恢复 extundelete

extundelete,可以实现对ext3 ext4等基于Linux分区的数据修复

试验环境

centos-5.5


实验软件

e2fsprogs e2fsprogs-devel

extundelete-0.2.0.tar.bz2


软件安装

yum -y install e2fsprogs e2fsprogs-devel

tar jxf extundelete-0.2.0.tar.bz2

cd extundelete-0.2.0

./configure

make

make install


使用方法

extundelete /dev/sdb7 --restore-all               恢复分区

extundelete /dev/sdb7 --restore-file /file1.txt   恢复某一个文件


测试

fdisk -l

Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1460    11727418+  83  Linux

/dev/sdb2            1461        2610     9237375    5  Extended

mkdir file

mount /dev/sdb1 file

cd file

touch  aa.txt bb.txt cc.txt

rm -rf file/*

umount /dev/sdb1


extundelete /dev/sdb1 --restore-all   测试恢复分区

WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.

The partition should be unmounted to undelete any files without further data loss.

If the partition is not currently mounted, this message indicates

it was improperly unmounted, and you should run fsck before continuing.

If you decide to continue, extundelete may overwrite some of the deleted

files and make recovering those files impossible.  You should unmount the

file system and check it with fsck before using extundelete.

Would you like to continue? (y/n)

y

Loading filesystem metadata ... 90 groups loaded.

Loading journal descriptors ... 19 descriptors loaded.

Writing output to directory RECOVERED_FILES/

Searching for recoverable inodes in directory / ...

1 recoverable inodes found.

Looking through the directory structure for deleted files ...

Failed to restore inode 11 to file RECOVERED_FILES/lost+found:Inode does not correspond to a regular file.

0 recoverable inodes still lost.


Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1460    11727418+  83  Linux

/dev/sdb2            1461        2610     9237375    5  Extended


extundelete /dev/sdb1 --restore-file /aa.txt    测试恢复文件

WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set.

The partition should be unmounted to undelete any files without further data loss.

If the partition is not currently mounted, this message indicates

it was improperly unmounted, and you should run fsck before continuing.

If you decide to continue, extundelete may overwrite some of the deleted

files and make recovering those files impossible.  You should unmount the

file system and check it with fsck before using extundelete.

Would you like to continue? (y/n)

Loading filesystem metadata ... 90 groups loaded.

Loading journal descriptors ... 19 descriptors loaded.

Unable to restore inode 48961 (aa.txt): No undeleted copies found in the journa

经测试,次软件的恢复能力对分区有效,对文件效果不大



本文转自 mailfile 51CTO博客,原文链接:http://blog.51cto.com/mailfile/1329839,如需转载请自行联系原作者

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值