A large rsync job can crowd a shared uplink, VPN, storage network, or backup window if it sends as fast as the path allows. Adding a bandwidth ceiling keeps the copy moving while leaving room for interactive sessions, monitoring, and other scheduled traffic on the same link.
The –bwlimit option sets the maximum rate for data sent over the rsync transfer socket. A value such as --bwlimit=2M asks rsync to average about 2 MiB per second, while an unsuffixed value is treated as KiB per second. A value of 0 means no rsync bandwidth limit.
Rsync applies the limit by writing blocks and sleeping when needed, so short progress updates can look bursty even when the end-of-run average stays near the configured cap. Use –stats or –info=progress2 on long transfers to confirm the actual rate, and choose a limit below the bandwidth that must remain available for other traffic.
Steps to limit rsync bandwidth during a transfer:
- Open a terminal on the sending host with rsync installed and access to the destination host.
- Choose the sustained transfer rate to leave spare bandwidth on the link.
Use suffixes such as K, M, or G for binary units, or use a decimal suffix such as MB when the rate must match a decimal service-plan number. The linked calculator can estimate how long a file will take at the chosen cap.
- Run rsync with –bwlimit, keeping the normal source and destination paths for the copy.
$ rsync -a --bwlimit=2M --human-readable --stats ./archive.img user@server:/srv/incoming/ Number of files: 1 (reg: 1) Number of created files: 1 (reg: 1) Number of regular files transferred: 1 Total file size: 16.78M bytes Total transferred file size: 16.78M bytes ##### snipped ##### sent 16.78M bytes received 35 bytes 1.97M bytes/sec total size is 16.78M speedup is 1.00
The final summary shows the average transfer rate for the run. In this example, 1.97M bytes/sec is close to the 2M limit.
- Add live progress output when the transfer is large enough that the final summary is too late.
$ rsync -a --bwlimit=2M --info=progress2 ./large-backup/ user@server:/srv/incoming/
Progress output can be uneven because rsync buffers data internally. Treat the final –stats summary as the better proof of the average transfer rate.
- Confirm the file or directory arrived at the destination path.
$ ssh user@server 'ls -lh /srv/incoming/archive.img' -rw-r--r-- 1 user user 16M Jun 6 03:39 /srv/incoming/archive.img
- Raise, lower, or remove the cap on later runs based on the observed average rate and available link capacity.
Omit –bwlimit, or set --bwlimit=0, when the next transfer should run without an rsync bandwidth cap.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.