Simple Guide to GNU ddrescue

Modified on Thu, 21 Apr 2022 at 10:45 AM

You can find ddrescue here.

Show the disks via Linux terminal

> lshw -short | grep disk

lshw_short.png (9.04 KiB) Viewed 22458 times

Clone the drive

General example

> ddrescue {source} {destination} {logfile}

Image to file on mounted drive (ie, /mnt/destination) that has enough free space to hold the full image of the source drive

> ddrescue /dev/sda /mnt/destination/driveimage.bin logfile.log

Image disk-to-disk

> ddrescue -f /dev/sda /dev/sdf logfile.log

The -f switch is to force the overwriting of the destination drive. Without this switch, ddrescue will not permit a drive-to-drive clone to start.

Note: the logfile will be stored in the location from which the command was run. You can always specify the direct path to store the log file, if needed.

A few useful switches, should you need them:

Generate a log file (considers all non-zeroed sectors as being unread):

Switch: -g

> ddrescue -g {source} {destination} newlogfile.log

No data is read from the source or written to the destination during this process.

Image in reverse:

Switch: -R

> ddrescue -R {source} {destination} logfile.log


Switch: -r {# of retries}

> ddrescue -r 3 {source} {destination} logfile.log

To view all possible switches:

> ddrescue --help

Once your clone/image has completed and you want to attempt a file system recovery, I suggest trying R-Studio. It is quite simple to use and supports most common file systems and RAID recoveries.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article