Solved Restore data when Input/Output error

Hallo!

Is there any cool way to restore data in directory when everytime you try to access it you get
"Input/Output error"? This is only for one of the directories on the drive.

The HDD is most likely failing due to aging and I managed to repair the blocks one time with Windows autorepair thingy and I then tried to rewrite the same data in a new directory and it was a success <<. However now in the middle of copying it went to I/O error again. (The files are now not obtainable from anywhere else.)

Tried copying the files and tar'ing them >> I/O error. Haven't tried anything with dd and I'd rather have a straight answer to know if it's arrivederci or not.
 
I think that that is exactly what I am looking for! Thanks.
Filesystem atm is ntfs and currently I am out of drives large enough but this may be the best method to use. :)

Edit: Haven't managed to image a file other than whole drives with dd but if possible I'd like to image the directory to an assigned partition on my HDD.
 
Well, in most filesystem implementations, the directories are actually magic files, containing names, metadata and some sort of location pointers (inode indexes in Unix). Since you/filesystem cannot read the directory, you/filesystem doesn't know where the files, kept in this directory, have been written on the hard drive. Given that, I believe your best bet is to mirror the drive with sysutils/ddrescue, then run filesystem recovery on the copy: either filesystem check utility, that will find non-referenced files/directories and will create references to them (in lost+found on Unix), albeit you'll lose their names; or, depending on file types, you can try some utility to locate files by their contents, like some undelete utility. The former would be better, as the latter might produce corrupted output for fragmented files.
 
Back
Top