Backup & Recovery (Rsync/Tar/Dd)
Stop blindly trusting tar archives to be error-free
đź§© The Challenge
Everyone thinks their backup script is solid until they try to restore a mission-critical database dump and tar spits out a checksum error halfway through. I once spent an entire Saturday trying to salvage a partial archive because I never actually verified the files after they were written to tape.
đź’ˇ The Fix
Start using the built-in verification flag when you create your backups, or run a post-process check to make sure the data on disk matches what you thought you backed up. It adds a bit of time to the job, but it saves your bacon when disaster strikes.
tar -cvzf backup.tar.gz /data/important/ --verify
⚙️ Why It Works
Adding the verify flag forces the utility to re-read the archive after writing and compare it against the original files bit by bit. If it doesn’t match perfectly, it’ll let you know immediately instead of keeping you in the dark until you need the data back.
🚀 Pro-Tip: Use the -W flag for tape backups specifically, but check your tar version first as it’s not supported on every single implementation.
Linux Tips & Tricks | © ngelinux.com | 9/30/2026
