Sunday, July 8, 2012

Recover data from failing drive.

I have used dd in the past, but dd is intelligent when copying data from a failing disk. What you want is some software that intelligently copies byte data from different part of the drive not to stick in a failing area.

ddrescue to the rescue! (phun intended). ddrescue covers all of the above and is available via
apt-get install gddrescue
(There is another software called dd_rescue, but this has largely been superseded by GNU ddrescue).

Just fire up ddrescue with infile and outfile, I'll use a logfile as well since I don't want it to try previously read sectors from a failing drive.

ddrescue /dev/sdX failingdrive.img failingdrive.log

And that's it!

When people have a failing drive they usually prioritize images for recovery, and for that we can use the splendid tool photorec. Photorecovery can work directly on a drive or file, but since I'm trying to be as gentle as possible with the failing drive I rather use it on my drive image. I'll use a logfile here to for resuming recovery and specifying a directory for the recovered images:

photorec /log failing-photos.log /d ~/recovered_images failingdrive.img

After that you will have to select which partition to search for images, or just specify the whole drive and search. Use apt-get install photorec to install.


1 comment:

  1. I really like your this work hope so every one who visit this page too share his comments. Thanks for share this.
    access 1337x in UK