To limit the speed of an rsync
transfer and prevent it from consuming all of the available bandwidth, you can use the --bwlimit
option. This option allows you to specify a maximum data transfer rate in bytes per second.
For example, to limit the rsync
transfer to a maximum of 1 megabyte per second (8 megabits per second), you can use the following command:
rsync --bwlimit=1000000 source destination
This will limit the transfer to a maximum of 1 megabyte per second, which is equivalent to 8 megabits per second.
You can also specify the speed limit in kilobytes per second by using the k
suffix, or in megabytes per second by using the m
suffix. For example, the following command will limit the transfer to a maximum of 2 kilobytes per second:
rsync --bwlimit=2k source destination
Keep in mind that the actual transfer speed may be lower than the specified limit, due to factors such as network congestion and the performance of the source and destination systems.