Stop worrying about partial rsync transfers during active database writes

Backup & Recovery (Rsync/Tar/Dd)

Stop worrying about partial rsync transfers during active database writes

🧩 The Challenge

Ever tried to rsync a live directory full of database files only to find your backup is effectively a pile of broken bits? I’ve wasted entire weekends recovering from inconsistent snapshots because a file changed the exact moment rsync read it.

💡 The Fix

Use the –delay-updates flag combined with a proper exclusion list to ensure you only flip over the finished, consistent versions of your files once the transfer is stable. It keeps your remote filesystem from seeing half-written files while the transfer is still chewing through bandwidth.

rsync -avz --delay-updates --exclude='*.lock' --exclude='*.tmp' /local/data/ user@remote:/backup/data/

⚙️ Why It Works

Setting the delay-updates flag forces rsync to put all the newly transferred files into a temporary space on the destination side before moving them into their final home simultaneously. It’s a lifesaver when you need that “all or nothing” consistency on the receiving end.

🚀 Pro-Tip: If you’re doing this over a flaky connection, add –partial to save your sanity and keep the progress you’ve already made.

Linux Tips & Tricks | © ngelinux.com | 7/20/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted