Linux Backup and Disk Imaging Cheat Sheet/Recover an unhealthy disk with ddrescue

Preferred over dd for failing disks because it tracks progress and retries.

Section: Images and Clones

Recover an unhealthy disk with ddrescue

bash
bash
sudo ddrescue -f -n /dev/sdb disk.img disk.log
Explanation

Preferred over dd for failing disks because it tracks progress and retries.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Images and Clones
Create a raw disk image
Image a disk device to a raw file.
OpenIn sheetbashsame section
Write a raw image back to disk
Restore a disk image onto a target device.
OpenIn sheetbashsame section
Backup a GPT partition table
Save GPT headers and partition entries to a file.
OpenIn sheetbashsame section
Restore a GPT partition table backup
Restore GPT layout from a saved backup file.
OpenIn sheetbashsame section
Inspect a virtual disk image
Show image format, virtual size, and backing file info.
OpenIn sheetbashsame section
Convert a virtual disk image
Convert between raw, qcow2, and other image formats.
OpenIn sheetbashsame section