日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

Linux平臺(tái)ext4magic數(shù)據(jù)恢復(fù)軟件

 亭下走馬 2015-12-31

針對(duì)于ext4文件系統(tǒng)數(shù)據(jù)恢復(fù)軟件,看了網(wǎng)上好多都在介紹extundelete這個(gè)工具,下載最新版本實(shí)驗(yàn)時(shí)(在Centos5.8、Centos6.7上實(shí)驗(yàn)效果不是很好)。最終發(fā)現(xiàn)ext4magic對(duì)于ext4數(shù)據(jù)恢復(fù)支持還是非常強(qiáng)大的。也可以做到基于時(shí)間點(diǎn)、inode、指定文件恢復(fù)等等?;謴?fù)時(shí)需要卸載分區(qū),以只讀方式掛載恢復(fù)。具體軟件下載地址為:

http:///projects/ext4magic/

1、安裝

可以參考官方INSTALL文件進(jìn)行安裝,如有依賴(lài)需處理好包依賴(lài)方可進(jìn)行安裝。系統(tǒng)必須安裝make、file

、gcc工具。以下libmagic、libext2fs、libz、libbz2庫(kù)必須安裝,


 # tar -xzf ext4magic-0.3.2.tar.gz

 # cd ext4magic-0.3.2

 # ./configure

 # make

 # make install

2、測(cè)試

(1)、基于時(shí)間恢復(fù)(以1970-01-01 00:00:00 UTC的秒數(shù)開(kāi)始計(jì)算)

[root@jason1 ~]# mount /dev/sdb1 /media/

[root@jason1 ~]# cp -rp /boot/* /media/

[root@jason1 ~]# cd /media/

[root@jason1 media]# ll

total 34884

-rw-r--r--. 1 root root   107134 Jul 24 00:13 config-2.6.32-573.el6.x86_64

drwxr-xr-x. 3 root root     4096 Dec 10 19:20 efi

-rw-r--r--. 1 root root   166756 Jul 20  2011 elf-memtest86+-4.10

drwxr-xr-x. 2 root root     4096 Dec 10 19:33 grub

-rw-------. 1 root root 27925110 Dec 10 19:31 initramfs-2.6.32-573.el6.x86_64.img

drwx------. 2 root root    16384 Dec 10 18:17 lost+found

-rw-r--r--. 1 root root   165080 Jul 20  2011 memtest86+-4.10

-rw-r--r--. 1 root root   205998 Jul 24 00:14 symvers-2.6.32-573.el6.x86_64.gz

-rw-r--r--. 1 root root  2585052 Jul 24 00:13 System.map-2.6.32-573.el6.x86_64

-rw-r--r--. 1 root root   289193 Oct 15  2014 tboot.gz

-rw-r--r--. 1 root root    12277 Oct 15  2014 tboot-syms

-rwxr-xr-x. 1 root root  4220560 Jul 24 00:13 vmlinuz-2.6.32-573.el6.x86_64

[root@jason1 media]# date

Mon Dec 14 19:36:06 CST 2015

[root@jason1 media]# rm -rf *

[root@jason1 media]# cd

[root@jason1 ~]# umount /dev/sdb1

[root@jason1 ~]# mount -o ro /dev/sdb1 /media

[root@jason1 ~]# ext4magic /dev/sdb1 -d /home -a 1450086000 -m  3##改時(shí)間通過(guò)date命令獲取當(dāng)前時(shí)間秒數(shù)減去3600秒得來(lái)。

Warning: Activate magic-scan or disaster-recovery function, may be some command line options ignored

"/home"  accept for recoverdir

Filesystem in use: /dev/sdb1


Using  internal Journal at Inode 8

Activ Time after  : Mon Dec 14 17:40:00 2015

Activ Time before : Mon Dec 14 19:44:26 2015

Inode 2 is allocated

--------        /home/config-2.6.32-573.el6.x86_64

--------        /home/efi/EFI/redhat/grub.efi

--------        /home/elf-memtest86+-4.10

--------        /home/grub/menu.lst

--------        /home/grub/reiserfs_stage1_5

--------        /home/grub/e2fs_stage1_5

--------        /home/grub/xfs_stage1_5

--------        /home/grub/fat_stage1_5

--------        /home/grub/stage1

--------        /home/grub/iso9660_stage1_5

--------        /home/grub/splash.xpm.gz

--------        /home/grub/vstafs_stage1_5

--------        /home/grub/ufs2_stage1_5

--------        /home/grub/device.map

--------        /home/grub/stage2

--------        /home/grub/ffs_stage1_5

--------        /home/grub/minix_stage1_5

--------        /home/grub/jfs_stage1_5

--------        /home/grub/grub.conf

--------        /home/initramfs-2.6.32-573.el6.x86_64.img

--------        /home/memtest86+-4.10

--------        /home/symvers-2.6.32-573.el6.x86_64.gz

--------        /home/System.map-2.6.32-573.el6.x86_64

--------        /home/tboot.gz

--------        /home/tboot-syms

--------        /home/vmlinuz-2.6.32-573.el6.x86_64

MAGIC-1 : start lost directory search

MAGIC-2 : start lost file search

MAGIC-2 : start lost in journal search

MAGIC-3 : start ext4-magic-scan search

--------        /home/MAGIC-3/text/plain/0000028685.txt

--------        /home/MAGIC-3/text/plain/0000045944.txt

ext4magic : EXIT_SUCCESS

驗(yàn)證是否恢復(fù)成功

[root@jason1 ~]# cd /home/

[root@jason1 home]# ll

total 34872

-rw-r--r--. 1 root root   107134 Jul 24 00:13 config-2.6.32-573.el6.x86_64

drwx------. 3 root root     4096 Dec 14 19:44 efi

-rw-r--r--. 1 root root   166756 Jul 20  2011 elf-memtest86+-4.10

drwx------. 2 root root     4096 Dec 14 19:44 grub

-rw-------. 1 root root 27925110 Dec 10 19:31 initramfs-2.6.32-573.el6.x86_64.img

drwx------. 3 root root     4096 Dec 14 19:44 MAGIC-3

-rw-r--r--. 1 root root   165080 Jul 20  2011 memtest86+-4.10

-rw-r--r--. 1 root root   205998 Jul 24 00:14 symvers-2.6.32-573.el6.x86_64.gz

-rw-r--r--. 1 root root  2585052 Jul 24 00:13 System.map-2.6.32-573.el6.x86_64

-rw-r--r--. 1 root root   289193 Oct 15  2014 tboot.gz

-rw-r--r--. 1 root root    12277 Oct 15  2014 tboot-syms

-rwxr-xr-x. 1 root root  4220560 Jul 24 00:13 vmlinuz-2.6.32-573.el6.x86_64

[root@jason1 home]# 


(2)、整個(gè)文件系統(tǒng)恢復(fù)

[root@jason1 ~]# ext4magic /dev/sdb1 -d /home -m

Warning: Activate magic-scan or disaster-recovery function, may be some command line options ignored

"/home"  accept for recoverdir

Filesystem in use: /dev/sdb1


Using  internal Journal at Inode 8

Activ Time after  : Mon Dec 14 19:36:37 2015

Activ Time before : Mon Dec 14 19:56:58 2015

Inode 2 is allocated

--------        /home/config-2.6.32-573.el6.x86_64

--------        /home/efi/EFI/redhat/grub.efi

--------        /home/elf-memtest86+-4.10

--------        /home/grub/menu.lst

--------        /home/grub/reiserfs_stage1_5

--------        /home/grub/e2fs_stage1_5

--------        /home/grub/xfs_stage1_5

--------        /home/grub/fat_stage1_5

--------        /home/grub/stage1

--------        /home/grub/iso9660_stage1_5

--------        /home/grub/splash.xpm.gz

--------        /home/grub/vstafs_stage1_5

--------        /home/grub/ufs2_stage1_5

--------        /home/grub/device.map

--------        /home/grub/stage2

--------        /home/grub/ffs_stage1_5

--------        /home/grub/minix_stage1_5

--------        /home/grub/jfs_stage1_5

--------        /home/grub/grub.conf

--------        /home/initramfs-2.6.32-573.el6.x86_64.img

--------        /home/memtest86+-4.10

--------        /home/symvers-2.6.32-573.el6.x86_64.gz

--------        /home/System.map-2.6.32-573.el6.x86_64

--------        /home/tboot.gz

--------        /home/tboot-syms

--------        /home/vmlinuz-2.6.32-573.el6.x86_64

MAGIC-1 : start lost directory search

MAGIC-2 : start lost file search

MAGIC-2 : start lost in journal search

MAGIC-3 : start ext4-magic-scan search

--------        /home/MAGIC-3/text/plain/0000028685.txt

ext4magic : EXIT_SUCCESS

[root@jason1 ~]# 


(3)、指定文件恢復(fù)

[root@jason1 ~]# ext4magic /dev/sdb1 -r -f grub/grub.conf -d /home

"/home"  accept for recoverdir

Filesystem in use: /dev/sdb1


Using  internal Journal at Inode 8

Inode found "grub/grub.conf"   655377 

--------        /home/grub/grub.conf

ext4magic : EXIT_SUCCESS

[root@jason1 ~]# cd /home/

[root@jason1 home]# ll

total 4

drwx------. 2 root root 4096 Dec 14 20:08 grub

[root@jason1 home]# ll grub/grub.conf 

-rw-------. 1 root root 843 Dec 10 19:33 grub/grub.conf

[root@jason1 home]#

指定文件恢復(fù)時(shí),需要注意指定恢復(fù)文件的路徑書(shū)寫(xiě)問(wèn)題。以下給出官方的示例:

An example: the mount point for this filesystem is " /home " an the filename for Linux is " /home/usr1/Document " you can use now

# ext4magic /dev/sda3 -f usr1/Document

(去掉掛在點(diǎn)目錄指定文件目錄)。

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多