In Linux operating system, we have many tools for copy data, out of that we used rsync a lot for copy with it’s various options that used to manage sync data from remote or local machine.

But sometime we have limited bandwidth to which we can only transfer data, in that case we should run rsync with some bandwidth limit options that rsync provided. So for those case where rsync scripts could consume all bandwidth between two sites, we should use rsync –bwlimit option.So in this post we will How to Limit Rsync speed through option –bwlimit

Syntax

rsync --bwlimit=KBPS [options] src dst

or 

rsync --bwlimit=KBPS [options] src:/path dst:/path

Examples
Like an example, i tried to copy data from remote machine on present directory.

rsync -avx --bwlimit=1000 192.168.123.170:/etc/* .

sent 25,771 bytes  received 25,748,602 bytes  904,363.96 bytes/sec
total size is 26,459,698  speedup is 1.03

In below example we try to sync 4GB of file from remote machine on local machine on speed of 50 MB per second.

 rsync -avx  --bwlimit=51200 192.168.123.170:/root/rsync_file .
root@192.168.123.170's password: 
receiving incremental file list
rsync_file

sent 30 bytes  received 4,295,491,665 bytes  49,091,333.66 bytes/sec
total size is 4,294,967,296  speedup is 1.00