Linux

ext4 삭제파일 복구 extundelete

Naan 2013. 8. 5. 20:50
반응형

ext4 삭제 파일 복구 방법이다.

우선 복구 프로그램 설치

설치전에 

# yum install e2fsprogs-devel

미리 설치를 하자 그리고

[root@localhost tmp]# wget http://sourceforge.net/projects/extundelete/files/extundelete-0.2.4.tar.bz2

[root@localhost tmp]# tar -xvf extundelete-0.2.4.tar.bz2

[root@localhost tmp]# cd extundelete-0.2.4.tar.bz2

[root@localhost extundelete-0.2.4]# ./configure
[root@localhost extundelete-0.2.4]# make && make install
 

[root@localhost tmp]# df

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/sda2             14877092   6918260   7190928  50% /

/dev/sda7            126235228    192192 119527076   1% /work

/dev/sda6              2030736     35912   1890004   2% /tmp

/dev/sda5              4061540     73792   3778104   2% /user

/dev/sda1               124427     19351     98652  17% /boot

tmpfs                  2013944         0   2013944   0% /dev/shm

 

만약 /work/test 폴더가 삭제가 되었다면

[root@localhost tmp]# extundelete /dev/sda7 --restore-directory=/work/test

 

만약 /work/ 모든 파일을 복구 하고 싶다면

[root@localhost tmp]# extundelete /dev/sda7 --restore-all

하면 된다.

 

반응형