Ben's

ext3grep 고마워 본문

리눅스/백업

ext3grep 고마워

Ben Ko (SINCE 2013) 2013. 1. 30. 08:59
728x90

* ext3grep 사용: rm 으로 삭제된 파일/디렉토리 복구

 

1. 삭제즉시 해당 파티션 read only로 바꾸거나 umount(umount 권장)

 

    mount -o remount,ro /home

 

2. 추가 디스크 장착하여 파티셔닝/파일시스템 생성 / 임의의 마운트 포지션에 mount

 

3. ext3grep 설치

    - http://ext3grep.googlecode.com/files/ext3grep-0.10.2.tar.gz

    - ./configure && make && make install

 

4. cd "임의의 마운트 포지션"

 

5. ext3grep 복구 진행(주의!! dump, restore 같은 디렉토리에서 명령 내려야함.)

 

- dump  : ext3grep --after=1359385200 --dump-names --accept-all /dev/sda4
- restore: ext3grep --restore-all --after=1359385200 /dev/sda4

 

6. unix time 계산(utc 기준이라서 kst에서 -9 시간해야함)

 

[root@zenoss ~]# date -d "Apr 16 15:00" +%s
1366092000
[root@zenoss ~]# date -d "Apr 16 18:00" +%s
1366102800