실수로 파일을 삭제하거나, 오래전에 지웠던 파일의 복구가 필요할 때
지푸라기라도 잡는 심정으로.. 설령 복구가 안 되더라도 시도할 가치가 있는 testdisk 라는 tool 의 설치 및 사용법에 정리해 보았다.
1. testdisk 설치
*repository 에 해당 패키지가 없거나, 공인 통신이 안되는 경우
아래 사이트에서 원하는 OS 에 맞게 받아서 설치하면 된다
https://www.cgsecurity.org/wiki/TestDisk_Download
[root@xbackup4 /etc/yum.repos.d]# yum install testdisk Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package testdisk.x86_64 0:7.0-4.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================= Package Arch Version Repository Size ================================================================================================================================================================================================================= Installing: testdisk x86_64 7.0-4.el6 epel 449 k Transaction Summary ================================================================================================================================================================================================================= Install 1 Package(s) Total download size: 449 k Installed size: 1.5 M Is this ok [y/N]: y Downloading Packages: testdisk-7.0-4.el6.x86_64.rpm | 449 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : testdisk-7.0-4.el6.x86_64 1/1 Verifying : testdisk-7.0-4.el6.x86_64 1/1 Installed: testdisk.x86_64 0:7.0-4.el6 Complete! |
2. testdisk 실행
[root@xbackup4 /etc/yum.repos.d]# testdisk |
3. 복원 과정
하지만, 100% 복구가 되지 않기 때문에
항상 삭제 할 때에는 조심하고 백업하는 습관을 들여야한다.