What's the difference between ddrescue, gddrescue, and dd_rescue?

83,650

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
Share:
83,650

Related videos on Youtube

Mechanical snail
Author by

Mechanical snail

🐌. Native speaker of American English. Linux user. Familiar with several programming languages in the procedural, OO, and functional paradigms. Worst Code Golf ever New badge proposals! Shakespeare bug in Ubuntu The Great Question Deletion Audit of 2012 Chat Horrible spiders Adorable fluffy things LASERS! Link rot is evil. Archive everything. The keyboard is king. Correctness over performance. Canonicalize, normalize, deduplicate. Don't repeat yourself. UTF-8 > UTF-16. Use static typing: good for tooling. Re-use; don't re-invent. Correctness, then clarity, then concision and elegance. Play devil's advocate. First understand opponents' positions.

Updated on September 18, 2022

Comments

  • Mechanical snail
    Mechanical snail almost 2 years

    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?

  • Xen2050
    Xen2050 about 8 years
    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
  • Jonas Stein
    Jonas Stein over 6 years
    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.
  • Gediz GÜRSU
    Gediz GÜRSU over 3 years
    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.