Centos – Rsync Throttle Upload Bandwidth –bwlimit=KBPS

bandwidthcentoscentos5rsync

I am looking to throttle the upload speed of my file transfers during an rsync process.

Does –bwlimit=KBPS mean it sets the internet transfer speed, or the hard drive disk write speed?

–bwlimit=KBPS limit I/O bandwidth; KBytes per second

Also, in the manual it says

Rsync can also be run as a daemon, in which case the following
options are accepted:

And that's where the description for –bwlimit=KBPS is listed.

Does that mean rsync has to be run in daemon mode in order to use that command?

IF… –bwlimit=KBPS is referring to the internet transfer speed of my files…

Can anyone provide an example of how I can alter my command line in order to limit the upload speed of my file transfers using rsync?

Here is what I am currently using:

rsync -avz -e 'ssh' someuser@server1.example.com:/var/www/* /var/www/

Best Answer

I tested with this extensively while I was setting up my in house yum repositories.

This option seems to be intended - and in my opinion much more useful for - daemon mode but it does work correctly between local files and over SSH as well.

In your case the following should work.

rsync --bwlimit=x -avz -e 'ssh' someuser@server1.example.com:/var/www/* /var/www/

The big thing to note is that the bwlimit option takes kilobytes per second not kilobits per second. That caused me some headaches until I reread the man page.