Site icon New Generation Enterprise Linux

Stop blowing out your bandwidth with uncompressed rsync transfers

Backup & Recovery (Rsync/Tar/Dd)

Stop blowing out your bandwidth with uncompressed rsync transfers

đź§© The Challenge

You finally decide to back up that massive `/var/lib/mysql` directory to a remote server, and you watch your network interface flatline because rsync is sending every single byte of those giant data files uncompressed. I’ve wasted hours waiting for backups to finish over a capped link only to realize I was just pushing raw, redundant data.

đź’ˇ The Fix

Use the z-flag to tell rsync to compress the data during transit before it hits the wire. It’s a lifesaver when you’re moving large, compressible text or database dumps across a network that isn’t running on a local gigabit switch.

rsync -avz --partial --progress /local/path/ user@remote:/remote/path/

⚙️ Why It Works

Adding the z flag invokes zlib compression on the fly, which drastically shrinks the data stream before it actually touches the network card. Your CPU takes a minor hit, but your transfer time drops significantly if your files aren’t already encrypted or compressed.

🚀 Pro-Tip: Don’t bother with -z if you are moving massive pre-compressed archives or encrypted volumes; it just burns CPU cycles for zero gain.

Linux Tips & Tricks | © ngelinux.com | 11/12/2026

0 0 votes
Article Rating
Exit mobile version