작업하다가...
rm -Rf /etc
짜잔......
망했다...
복구 해보자.
wget http://sourceforge.net/projects/extundelete/files/extundelete-0.2.4.tar.bz2
파일 다운 받고 압축 푼다음 설치
# tar -xvf extundelete-0.2.4.tar.bz2
# cd extundelete-0.2.4/
# ./configure
Configuring extundelete 0.2.4
configure: error: Can't find ext2fs library
에러 뜨면
# apt-get install e2fslibs -y
# apt-get install e2fslibs-dev -y
설치
# ./configure
~~~~~~~~~~~~
~~~~~~~~~~~~~~~
Configuring extundelete 0.2.4
Writing generated files to disk
# make && make install
etc 복구해보자!
# extundelete /dev/sdb4 --restore-directory /etc
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 ... 3318 groups loaded.
Loading journal descriptors ... 28162 descriptors loaded.
Searching for recoverable inodes in directory /etc ...
7995 recoverable inodes found.
Looking through the directory structure for deleted files ...
7928 recoverable inodes still lost.
복구가 끝났다. 루트 경로에 RECOVERED_FILES 폴더 밑에 있을것이다.
# ls
bin cdrom etc initrd.img lib lost+found mnt proc root sbin srv tmp var
boot dev home initrd.img.old lib64 media opt RECOVERED_FILES run snap sys usr vmlinuz
있다. 가보자
#cd RECOVERED_FILES/
# ls
etc
폴더가 복구 된것을 확인 할 수 있다.!!
복구 명령어는
전체복구
extundelete /dev/sdb3 –restore-all
폴더복구
extundelete /dev/sdb3 –restore-directory /etc
파일복구
extundelete /dev/sdb3 –restore-file /etc/hosts
'Linux' 카테고리의 다른 글
폴더내 모든 압축 파일 풀기 (0) | 2020.04.17 |
---|---|
gitlab Whoops, GitLab is taking too much time to respond. (0) | 2020.03.18 |
gitlab install (0) | 2020.03.13 |
curl: (60) Peer's Certificate issuer is not recognized. (0) | 2020.03.13 |
linux CPU Throttling Issues (0) | 2020.02.25 |