2016.02.29 19:37
extundelete-0.2.4.tar.bz2 파일 다운 후 설치 진행
[root@localhost src]# tar xvf extundelete-0.2.4.tar.bz2
[root@localhost src]# cd extundelete-0.2.4
[root@localhost extundelete-0.2.4]# ./configure
Configuring extundelete 0.2.4
configure: error: Can't find ext2fs library
- 위와같이 ext2fs 라이브러리를 찾지 못한다고 하면 yum으로 설치 진행
[root@localhost extundelete-0.2.4]# yum install e2fsprogs-devel
- 설치 완료 후 컴파일 재실행
[root@localhost extundelete-0.2.4]# ./configure
Configuring extundelete 0.2.4
Writing generated files to disk
[root@localhost extundelete-0.2.4]# make
[root@localhost extundelete-0.2.4]# make install
설치 완료 후 파일 복구 진행
테스트 진행을 위해 임시로 파일을 복사
[root@localhost home]# cp -a /usr/local/apache2 /home/apache2
home 파티션 내용 삭제
[root@localhost /]# rm -rf /home/*
[root@localhost home]# ll
?⑷퀎 0
지워진 파티션을 umount
[root@localhost /]# umount /home
[root@localhost /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 18G 3.5G 14G 21% /
tmpfs tmpfs 936M 0 936M 0% /dev/shm
임시로 폴더를 생성하고 마운트 진행
[root@localhost /]# mkdir /backup
[root@localhost /]# mount /dev/sda3 /backup
[root@localhost /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 18G 3.5G 14G 21% /
tmpfs tmpfs 936M 0 936M 0% /dev/shm
/dev/sda3 ext4 128G 188M 122G 1% /backup
지워진 파티션 복구 진행
[root@localhost /]# extundelete /dev/sda3 --restore-all
NOTICE: Extended attributes are not restored.
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 ... 1040 groups loaded.
Loading journal descriptors ... 1844 descriptors loaded.
Searching for recoverable inodes in directory / ...
3798 recoverable inodes found.
Looking through the directory structure for deleted files ...
286 recoverable inodes still lost.
완료 후 확인
[root@localhost /]# cd RECOVERED_FILES
[root@localhost RECOVERED_FILES]# ll
?⑷퀎 8
drwxr-xr-x 16 root root 4096 2016-02-18 16:43 apache2
drwxr-xr-x 2 root root 4096 2016-02-18 16:43 lost+found
폴더의 내용을 확인해보면 복구 된 것을 비교 확인
[root@localhost apache2]# pwd
/RECOVERED_FILES/apache2
[root@localhost apache2]# du -sh
94M .
[root@localhost apache2]# cd /usr/local/apache2/
[root@localhost apache2]# du -sh
94M .
위의 경우 테스트로 진행하여 파일 삭제 후 바로 진행했기 때문에 파일 복구가 원활히 진행 된 것으로 예상되며,
100% 복구되지 않을 수 있습니다.
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
286 | 리눅스 touch 명령어 | 호스트웨이 | 2012.08.03 | 24832 |
285 | 로그 관리 | 호스트웨이 | 2008.05.19 | 24801 |
284 | 반복적인 수행 crontab - 기본편 | Namlyong | 2010.04.02 | 24733 |
283 | CGI 환경 테스트 | sylee | 2008.05.21 | 24613 |
282 | debian .vimrc 활용 | HOSTWAY | 2009.04.15 | 24476 |
281 | awk 를 이용한 패턴 처리 | 호스트웨이 | 2008.05.19 | 24463 |
280 | php-5.2.x 설치 옵션 | 호스트웨이 | 2009.02.05 | 24393 |
279 | 특정 사용자 계정 동시 로그인 수 제한 | 호스트웨이 | 2012.05.11 | 24333 |
278 | hdparm 옵션 알아보기 | sylee | 2010.02.04 | 24243 |
277 | Linux 서버 root password 분실시 변경 방법 | 호스트웨이 | 2012.03.30 | 24005 |
276 | samba 설정후, 한글 파일이 깨질때.. | jook | 2009.10.08 | 23924 |
275 | Rsync를 이용한 데이터 Sync, 백업하기 – 2탄 | 호스트웨이 | 2012.07.13 | 23901 |
274 | 리눅스 APM 소스설치시 Error 및 해결 방법 | 호스트웨이 | 2012.09.21 | 23876 |
273 | 계정 생성 시 ftp 계정만 주고 Shell 로그인 차단하기 | 호스트웨이 | 2012.04.06 | 23716 |
272 | History 삭제하는 방법 및 현재한 history 삭제하는 방법 | 호스트웨이 | 2012.08.24 | 23642 |
271 | DHCP 환경에서의 resolv.conf 초기화 현상 | 호스트웨이 | 2012.03.09 | 23623 |
270 | 리눅스 ss 명령어 | 호스트웨이 | 2012.07.20 | 23518 |
269 | grub-install 사용방법 | 호스트웨이 | 2012.05.04 | 23488 |
268 | Network File System | 호스트웨이 | 2008.05.19 | 23447 |
267 | 리눅스 커널 업데이트 및 커널 변경 부팅 방법 | 호스트웨이 | 2014.10.30 | 23426 |