📜 ⬆️ ⬇️

dd_rescue vs GNU ddrescue: why do we need a clone when there is an original

In the article Copying partitions of a hard disk using GNU / Linux: how to manage a bootable USB flash drive where Acronis was previously needed , I advised you to use GNU ddrescue, rather than the original, which is obsolete to copy potentially damaged disks. But in the comments, nerfur pointed out to me that dd_rescue is updated regularly and can compress data on the fly for subsequent transmission via ssh. Since this GNU ddrescue task is beyond its power, rumors about the obsolescence of dd_rescue seem to be greatly exaggerated.

Understandably, you need to immediately find out how the modern version of dd_rescue differs from GNU ddrescue, which can and, possibly, remove the recommendation to avoid using the original from the article. And also write a new article about the differences between these two programs, which I did.

For those who want to quickly find out how it ended and are not interested in heart-breaking details, I’ll say that after studying the question my opinion has not changed - I still recommend using GNU ddrescue, but now for another, much more reasonable reason - GNU ddrescue first saves well-readable area of ​​the disk and then later proceeds to the rest. dd_rescue cannot do this by design.

History reference


dd


Traditionally, to create binary copies of physical drives in * nix systems, the dd program was used, which read the disk with pieces of a predetermined size. She coped well with the task when it came to copying data from healthy devices, but for handling the partially defective dd disks, she deservedly received the nickname disk destroyer.
')

dd_rescue


To remove data from the damaged surface, Kurt Garloff wrote a utility that worked roughly like dd, but didn’t read the disk to death and didn’t ignore errors, but reduced the speed to the lowest possible and saved everything that could be saved.

Despite the clear progress compared to dd, dd_rescue read the entire file in one pass, with a measured soldier step moving from beginning to end. Due to the presence of an unreadable area, the process of obtaining an exact copy could take hours, months, or even years, while the time to obtain a copy that was 99 percent reliable was measured in tens of minutes.

In addition, during the slow and thoughtful reading of sectors breathing incense, all the rest (normally read at the time of launching the program) could well have thrown off the hoofs because their time had come. If they had been read a minute or two before - everything would be fine, and so - the moment is missed - this happens.

The best option would be to save everything that is being read without problems first, and then proceed to reading unreliable fragments, but from the dd_rescue box she did not know how, although she had all the necessary arsenal of possibilities. Therefore, it was possible to carry out the above described only manually.

dd_rhelp


As you know, if the mountain does not go to Mohammed, then Mohammed may well approach her independently. I think that LAB Valentin somehow reasoned when he decided to write a bash script that uses dd_rescue to implement the optimal strategy for copying damaged files.

In the end, the author dd_rescue included this script, dd_rhelp, in the official version of the main program.

GNU ddrescue


dd_rhelp in conjunction with dd_rescue greatly simplified the process, but it had one fatal flaw - it was not written in C worked terribly slowly.

Not being able to put up with it, Antonio Diaz decided to file his program with an algorithm and constants, which he called - surprise - GNU ddrescue.

This is how dd_rhelp responded to this.
For a while, dd_rhelp was the only tool that could do this kind of work, but for several years now it’s not like that: Antonio Diaz wrote the perfect replacement for my tool: GNU 'ddrescue'.

Yes, calling the tool by the same name as Kurt Garloff's dd_rescue was not very clever (do you see a subtle difference between GNU ddrescue and dd_rescue?), But it seems that it was intended, as we warned Antonio Diaz, that this will surely bring confusion to the miniature world of hard disk recovery tools.

However, if this tool solves your problems (as it should be), I urge you to use it. Why? First you need to figure out what we are comparing:
- dd_rhelp (dirty bash script) + dd_rescue (C) on one side
- GNU ddrescue (C) on the other / * generally GNU ddrescue is written in C ++ * /

dd_rhelp was conceived as a quick hack to implement what dd_rescue did not do and that at that time could not be done at all.

Perhaps there are cases in which GNU ddrescue does not work and this is the main reason why I continue to support dd_rhelp. Such cases are very important to inform me and Antonio Diaz.

Original
For some times, it wasn’t anymore, since it was a tool for the GND 'GND' ddrescue.

I’m looking for a dag_rescue K K K catch catch catch and and and))))? This is a world of hard drive recovery tools.

Nevertheless, it should be the case. Why? Understand first what we are comparing:
- dd_rhelp (in dirty bash script) + dd_rescue (in C) in one hand
- GNU ddrescue (in C) in the other.

It wasn’t the time when it came to this time (AFAIK).

It is where you keep it in your dd_rhelp. It is important to tell me and Antonio Diaz when these cases occur.


Present tense


As already mentioned, dd_rescue and GNU ddrescue are still periodically updated, but dd_rhelp is frozen at the 2008 level and it looks like forever. Update in 2012, though made some cosmetic changes, but it did not change much.

How to be a simple user


Use GNU ddrescue to create copies of known problem disks.


Where dd_rhelp functionality is needed, it is better to use GNU ddrescue. As shown above, dd_rescue can replace GNU ddrescue only in conjunction with dd_rhelp, the author of which recommends that you not use your brainchild if possible.

Use dd_rescue when you need an improved version of dd


On the other hand, if dd_rhelp is redundant for you, then dd_rescue has a couple of tricks up its sleeve that GNU ddrescue doesn’t possess. First of all, dd_rescue can redirect the output to the pipe, which is simply indispensable for example when copying over ssh. In addition, there is a plug-in mechanism with which compression and decompression is supported on the fly, as well as various hash counting algorithms. dd_rescue works well where you need a simple dd substitute with advanced functionality and insurance in case of errors corrected by repeated reading. And the documentation also says that she draws a progress bar :).

To create a backup disk - all other things being equal, use GNU ddrescue


In my opinion, if we are talking about taking a disk image, and saving it on another disk directly connected to the same computer, there is no reason to refuse GNU ddrescue in favor of dd_rescue or dd, but using the optimal data copy strategy that is in them not implemented, can be a good insurance and will save the user from many unexpected troubles.

Source: https://habr.com/ru/post/236977/


All Articles