Simple Guide to GNU ddrescue

A place to discuss disk imaging and cloning software and hardware.
Post Reply
lcoughey
Site Admin
Posts: 303
Joined: Thu Jan 08, 2015 7:23 pm

Simple Guide to GNU ddrescue

Post by lcoughey » Mon Aug 22, 2016 5:19 pm

You can find ddrescue here.

Show the disks via Linux terminal
> lshw -short | grep disk
lshw_short.png
lshw_short.png (9.04 KiB) Viewed 2798 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

Retries:
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.

pclab
Posts: 4
Joined: Thu Jan 29, 2015 4:21 pm

Re: Simple Guide to GNU ddrescue

Post by pclab » Thu Feb 09, 2017 5:30 pm

You can use the GUI, making it more "fun" to work.

https://launchpad.net/ddrescue-gui

lcoughey
Site Admin
Posts: 303
Joined: Thu Jan 08, 2015 7:23 pm

Re: Simple Guide to GNU ddrescue

Post by lcoughey » Tue May 16, 2017 5:47 pm

For those who want to take ddrescue to the next step and image only the sectors which contain files referenced in the MFT, there is another program that was designed to work with ddrescue in this way and has been out for quite a while.

ddrutility

If the drive is mostly full, there probably isn't much point in using this add-on. However, if the drive is less than half full, you could save yourself the time of mirroring unused sectors, increasing your chances of getting a clean recovery of your files.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest