ddrescue
ddrescue
is a data recovery tool developed by Antonio Diaz Diaz. It is a command-line utility designed to copy data from one file or block device (hard drive, partition, optical disc, etc.) to another, attempting to rescue data in the event of read errors. Unlike standard copy tools like dd
, ddrescue
prioritizes recovering the good parts of the data first, then retries the failing sectors multiple times in varying ways to maximize the amount of data successfully recovered.
The program is particularly useful when dealing with failing hard drives, where sectors may become unreadable. ddrescue
intelligently skips over these bad sectors initially, quickly copying the accessible data. It then goes back and tries to read the bad sectors again, potentially using different sector sizes or retry counts to improve the chances of success. This approach minimizes the time spent hammering on failing sectors, reducing the risk of further damage to the drive and improving the overall recovery process.
Key features of ddrescue
include:
- Data Preservation: It aims to recover as much data as possible from a failing drive while minimizing further damage.
- Logfile: It uses a logfile to record the progress of the data recovery, including which blocks have been successfully copied, which are unreadable, and which need to be retried. This logfile is essential for resuming interrupted recovery sessions.
- Reverse Copying: It can optionally copy data from the end of the device towards the beginning, which can be useful if a failing drive has more errors in one area than another.
- Multiple Attempts: It allows for multiple passes over the unreadable sectors with varying retry counts, increasing the chances of recovering data from marginal sectors.
- GNU GPL License: It is free and open-source software, distributed under the GNU General Public License.
- Sparse Output: It can create sparse output files, which take up less space on the destination drive if large portions of the source device are unreadable.
ddrescue
is a powerful tool for data recovery and is often used by professionals in data recovery services and system administrators dealing with failing storage devices. It is typically used in conjunction with other diagnostic and recovery tools to assess the health of a drive and attempt to retrieve valuable data.