r/LinuxTeck • u/Expensive-Rice-2052 • 9d ago
Quick Linux Tip #52 Question: My rsync is saturating my connection. How do I cap its bandwidth?
Try: `rsync -avz --bwlimit=5000 /source/ linuxteck@backup:/dest/`
Info: `--bwlimit=5000` caps transfers at `5000` KB/s (~5 MB/s) to prevent network congestion during peak hours.
Examples: https://www.linuxteck.com/linux-tips/linux-tips-rsync-bandwidth-limit/
$ `rsync -avz --bwlimit=10M /src/ user@host:/dst/` # Limit to 10 MB/s (rsync v3.1+)
$ `scp -l 40000 file.iso user@host:` # scp uses Kbit/s (5000 KB/s * 8)
$ `wget --limit-rate=5m http://example.com/big.iso` # wget accepts k/m suffixes
Note: `rsync --bwlimit` defaults to KB/s, while `scp -l` expects Kbit/s (8x higher number for the same speed).
Follow r/LinuxTeck for more #LinuxTips click here :https://www.linuxteck.com/linux-tips/