The dd command is commonly used to make image backups of a drive or partition. However, it performs poorly if the source drive is unreliable or failing. I read that ddrescue/dd_rescue is a good tool to use to recover an image from a bad drive, since it intelligently attempts to re-read sectors that it failed to read the first time.

But in the Ubuntu repositories, I see two different ddrescue programs, with 3 different but similar names showing up in different places: ddrescue, gddrescue, dd_rescue. What's the difference?


1 Answer 1


ddrescue, confusingly, can refer to two completely separate programs, dd_rescue by Kurt Garloff, and GNU ddrescue. Both have the same purpose and are actively developed.

Garloff's program dd_rescue is the first attempt to improve on dd; GNU ddrescue is newer and was created to address shortcomings in dd_rescue.

Several sources prefer GNU ddrescue over dd_rescue. For example,

  • http://lwn.net/Articles/430000/

    ddrescue wins (in my book) because it is an efficient self-contained program written in C++ (not a shell script kludge), produces much cleaner output on the console/terminal, and (most importantly) handles unreadable blocks gracefully and intelligently.

  • http://www.toad.com/gnu/sysadmin/index.html#ddrescue

    GNU ddrescue is your best friend.

    It is modeled after the two preceding programs, dd_rescue (with an underbar), and dd_rhelp. But GNU ddrescue it's far better than both -- I've tried all three, on the same drive, as well as trying to use plain old "dd".

    Antonio Diaz Diaz's GNU ddrescue learned from these experiences. It combines both dd_rescue's ability to read big blocks and then shift gears, with dd_rhelp's ability to remember what parts of the disk have been looked at already. It keeps this info in a really simple logfile format, and keeps it updated every 30 seconds, or whenever it stops or is interrupted. It's written in C++ and it's small and fast.

One advantage of GNU ddrescue is that it backs up most data faster, by first skipping bad blocks (hich are slow to recover) and coming back to them only after good blocks have been backed up. One disadvantage of GNU ddrescue is that it doesn't support piped output, which means you can't compress the output image with gzip or lzop.

Ubuntu packages

Unfortunately, the package names in the Ubuntu repositories are confusing; dd_rescue is packaged under the name ddrescue, and ddrescue under gddrescue! From the package summaries:

  • gddrescue package:

    Please note that this is the GNU ddrescue version providing the /sbin/ddrescue executable. If you are searching for the ddrescue version of Kurt Garloff please check out the ddrescue package instead.

  • ddrescue package:

    Please note that this is the dd_rescue version of Kurt Garloff providing the /bin/dd_rescue executable. If you are searching for the GNU ddrescue version please check out the gddrescue package instead.

Summary of names:

Program name     Ubuntu package name     Executable name    Name in URL
GNU ddrescue     gddrescue               ddrescue           ddrescue
dd_rescue        ddrescue                dd_rescue          ddrescue
  • 4
    Two years late but: very good post for a problem that still affects people, and not just on Ubuntu! I'll throw in my own two cents, as it's only mentioned in the above answer: one of the advantages of GNU ddrescue is its log file feature. Not only does it let you resume partial recoveries and try again later, but because it's both human- and computer-readable, both humans and computers can use it for more advanced data recovery later. I had to do just this recently on a damaged drive; without the log file I wouldn't have known where to start!
    – andlabs
    Jan 20, 2015 at 7:19
  • 5
    Recent Ubuntu's (14.04 and up) appear to only have gddrescue, a Ubuntu package search for ddrescue only shows gddrescue (& ddrescueview) now, Kurt Garloff's ddrescue is only in 12.04
    – Xen2050
    May 17, 2016 at 11:21
  • 4
    The reason to "first skipping bad blocks" is to save the still intact data first before bad data is tried to recover. Activity on the drive can destroy more bits, especially repeated attempts to restor bad areas. Nov 26, 2017 at 0:31
  • 1
    In my opinion, Ubuntu packages section is overwritten. One sentence was enough. It was also self explanatory in the first heading ... Table may be attached tho. Such over-explanations makes reading distasteful to me and to some people. Nov 30, 2020 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .