ext3パーティションから破損したディレクトリを回復する

ext3パーティションから破損したディレクトリを回復する

フォルダを復元するインストールディレクトリですostani。これには多くのPHP、CSS、Javascript、その他のファイルが含まれています。どうやってアクセスできますか?dd_rhelperイメージを作成してfsck修正しようとしました。しかし、破損したフォルダを削除しました。

root@asgharserver:~# ls -la /root/oldhard/
ls: /root/oldhard/bina: Input/output error
ls: cannot access /root/oldhard/ostani: Input/output error
total 1187011436
drwxr-xr-x  26 root      root            4096 Jan  3 00:56 .
drwx------   4 root      root            4096 Jan 11 12:20 ..
drwxr-xr-x   2      1007      1007       4096 Aug 19 14:14 afshin
?--------- 512       512  33554432 2256582144 Jan 24  1971 bina
drwxr-xr-x   6 superuser superuser       4096 Nov 15 07:15 mahalleha
d?????????   ? ?         ?                  ?            ? ostani
drwxr-xr-x   2      1012      1012       4096 Aug 26 08:15 tvasr

ベストアンサー1

ディレクトリostaniのinode情報が破損しているようです。しかし、実際のデータは悪くないかもしれません。

その場合は、debugfsを使用して復元できます。ハードドライブをアンマウントして続行します。

debugfs -c /dev/sdNP     #  replace N and P with the hard disk letter and partition
                         #  the -c option opens the filesystem in read-only mode without looking for inode information

# At the debugfs prompt do the following
ls -l                    #  this lists down the dir/file
rdump ostani  /tmp       #  this saves the recovered data of ostani dir to /tmp/ostani

おすすめ記事