文档太给力了!误删了几个重要文件,抖抖嗦嗦偷偷恢复了,救了我!!!
http://jingyan.baidu.com/article/2f9b480d6c2bcd41cb6cc223.html
注意几个地方:
1)最后cd到误删目录下操作,否则有可能 logdump时告诉你不存在
2)df -T 可以查看文件系统,找你熟悉的试试看是不是。
[[email protected] tmp]# cd ../data/admin/weblog_wireless/
[[email protected] weblog_wireless]# debugfs
debugfs 1.41.12 (17-May-2010)
debugfs: open /dev/vdb
debugfs: ls -d /admin/weblog_wireless
25165988 (12) . 25165825 (12) .. 25296905 (16) ready
25427970 (20) old 25296902 (12) pre
25184874 (4024) weblog_wireless_20160505_3.txt.bk
<25184874> (44) weblog_wireless_20160427_part1.txt
<25190394> (3936) weblog_wireless_20160505_3.txt
<25190392> (3896) weblog_wireless_20160505_2.txt
<25187335> (3856) weblog_wireless_20160504_2.txt
debugfs: logdump -i weblog_wireless_20160505_2.txt
weblog_wireless_20160505_2.txt: File not found by ext2_lookup
debugfs: logdump -i <25190392>
Inode 25190392 is at group 3074, block 100664607, offset 2944
Journal starts at block 30019, transaction 28238
Found sequence 26118 (not 29531) at block 9458: end of journal.
debugfs: quit
[[email protected] weblog_wireless]# dd if=/dev/vdb of=/tmp/weblog_wireless_20160505_2.txt.bk bs=4096 count=1 skip=100664607
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000172198 s, 23.8 MB/s
[[email protected] weblog_wireless]# dd if=/dev/vdb of=/tmp/weblog_wireless_20160504_2.txt.bk bs=4096 count=1 skip=100664607
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000162519 s, 25.2 MB/s
[[email protected] weblog_wireless]# cd /tmp/
[[email protected] tmp]# ll