Ddrescue

is a tool provided by GNU to retrieve data from failing (block) storage devices like hard disk drives, cdrom or memory sticks etc. It uses a similar technique as dd and copies block by block, but has an intelligent algorithm to recover failed data.

Emerge
Install using the following command:

Usage
The general purpose of is to recover data from failing block devices. It can be also used as a general disk (or even file) copying tool with quite a good efficiency and a nice progress bar.

Copy data
can use block devices or files as input and output. The main difference to other programs used to copy files, is that the destination needs to be specified:

Rescue data
The strategy is to read and copy as much data as possible in the first round, since every access to the storage device could be the last one before it totally fails. Then try to copy the data off the failed/failing areas of the drive. Things to check before getting started:


 * The exact device name of the drive to rescue and any other device involved.
 * The health of the disk drive using smartmontools.
 * The drive should not be mounted during the process.
 * Enough disk space for recovered data.
 * Enough time, as the process may take a couple of hours.

Disk to image
In this scenario the hard disk drive is about to fail and we want to create an exact copy in the form of an image.


 * First round, copy every block without read error and log the errors to.






 * Second round, copy only the bad blocks and try 3 times to read from the source before giving up.






 * Now the image can be mounted as loop device and the file system checked for corruption.

Disk to disk
In this scenario the hard disk drive is about to fail and we want to create an exact copy on a new hard disk drive, which should be at least the same size as the source drive.


 * First round, copy every block without read error and log the errors to.


 * Second round, copy only the bad blocks and try 3 times to read from the source before giving up.


 * Now the new drive could be mounted and the file system checked for corruption.

External resources

 * http://www.garloff.de/kurt/linux/ddrescue/ - A tutorial written by Kurt Garloff.
 * http://www.cyberciti.biz/tips/how-do-i-save-recover-data-from-crashed-disks-with-dd-and-ddrescue-command.html
 * http://forensicswiki.org/wiki/Ddrescue - ddrescue on the Forensics Wiki.