Stop your dd backups from hanging when they hit a bad disk sector

Backup & Recovery (Rsync/Tar/Dd)

Stop your dd backups from hanging when they hit a bad disk sector

🧩 The Challenge

You know that pit in your stomach when you start a dd copy of a dying drive and it hits a bad block, freezing the whole process indefinitely? I’ve spent way too many nights watching a progress bar sit at the same spot while I wonder if the drive is actually dead or just being stubborn.

💡 The Fix

Use the conv=noerror,sync flags to keep dd moving past those read errors. Adding these will force it to write zeros for the bad bits, keeping your backup stream alive even when the hardware is throwing a tantrum.

dd if=/dev/sdb of=/backup/disk_image.img bs=64K conv=noerror,sync status=progress

⚙️ Why It Works

Setting noerror tells the utility to keep going even after a read failure, while the sync flag ensures the output file stays perfectly aligned with the source by padding the missing data with zeros.

🚀 Pro-Tip: Toss in bs=64K or larger blocks to significantly speed up the transfer on healthy sections of the disk.

Linux Tips & Tricks | © ngelinux.com | 8/13/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted