ddrescue /dev/sda /backup/disk.img /backup/rescue.log

Category: Backup & Restore

ddrescue /dev/sda /backup/disk.img /backup/rescue.log

Recover data from a failing disk to an image

Copies as much of /dev/sda as possible into /backup/disk.img, skipping bad sectors instead of aborting, and records progress in the log file. Rerun the same command to continue where it stopped. Keep the log file, since it is essential between runs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.