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% 복구되지 않을 수 있습니다.
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
266 | 삭제된 파일 복구 - 1 | 호스트웨이 | 2015.09.23 | 7127 |
265 | Linux ssh 무작위 공격 방어하기 - fail2ban | 호스트웨이 | 2015.09.24 | 7206 |
264 | i386, i586, i686, x86의 차이 | 호스트웨이 | 2012.11.01 | 7306 |
263 | /proc/sys/net/ipv4/conf/ 네트워크 세팅 | 호스트웨이 | 2015.09.22 | 7656 |
262 | hadoop 1.x 설치 & 설정 | 호스트웨이 | 2015.09.18 | 7690 |
261 |
리눅스 uniq 명령어
![]() | 호스트웨이 | 2012.12.27 | 7775 |
260 |
/tmp 디렉토리 보안 설정하기
![]() | 호스트웨이 | 2015.09.17 | 8172 |
259 | find 명령을 통한 소유자, 백도어, 파일 찾기 | 호스트웨이 | 2015.09.29 | 8381 |
258 | Linux 설치된 OS 커널의 Bit확인 | 호스트웨이 | 2015.09.26 | 8427 |
257 | 동일 네트워크의 중복 IP검색 | 호스트웨이 | 2015.09.23 | 8604 |
256 | vsFTPd 사용시 디렉토리 목록 조회가 안될때 | 호스트웨이 | 2012.11.30 | 8606 |
255 | 사용 가능한 쉘 확인 및 변경법 | 호스트웨이 | 2015.09.24 | 8884 |
254 | /etc/fstab 등록 | 호스트웨이 | 2015.09.22 | 9217 |
253 | 서버 계정을 다른서버로 이전하기 | 호스트웨이 | 2015.09.23 | 9438 |
252 |
Sysbench를 통한 System, MySQL 성능 테스트
![]() | 호스트웨이 | 2015.06.26 | 9727 |
251 | 서버시간 매시간마다 동기화 설정 | 호스트웨이 | 2015.09.23 | 9794 |
250 | 우분투 기본 쉘 dash 에서 bash로 변경하기 | 호스트웨이 | 2015.09.07 | 9924 |
249 | bonding mode 종류 알아보기 | 호스트웨이 | 2012.11.08 | 10275 |
248 | 두 파일 비교 diff 의 기본 사용법 | 호스트웨이 | 2015.09.14 | 10498 |
» | extundelete tool을 이용하여 삭제된 파일 복구하기 | 호스트웨이 | 2016.02.29 | 10513 |