Stop piping tar through compression when the disk is already dying

Backup & Recovery (Rsync/Tar/Dd)

Stop piping tar through compression when the disk is already dying

🧩 The Challenge

Dealing with a drive that is throwing I/O errors is a special kind of hell, especially when your backups take hours and then choke on a single bad sector. Nobody tells you that you’re just putting more stress on a dying head by forcing it to calculate gzip compression on the fly.

💡 The Fix

Skip the compression during the initial rescue phase to get your data off the platters as fast as humanly possible. You can worry about shrinking those files later once they are safely sitting on a healthy drive.

ddrescue -d -r3 /dev/sda1 /mnt/backup/image.img /mnt/backup/logfile.map

⚙️ Why It Works

Using ddrescue is a lifesaver here because it actually tracks the bad sectors in a map file and skips over them instead of just hanging or failing entirely like plain old dd. It lets you go back and retry the damaged areas after you have saved everything that was easy to read.

🚀 Pro-Tip: Always keep your map file on a separate, reliable partition so you don’t lose your progress if the destination drive dies mid-copy.

Linux Tips & Tricks | © ngelinux.com | 10/5/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted