Tech C**P
14 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
Sometimes you have to send a very large file over network to a remote destination, or want to copy a huge file to a partition which is mounted by NFS (Network File System). This issue will eat up all you network bandwidth until the copy process is finished, it can take an hour or more depending on the file size being copied.

This issue can be an ISSUE when it's a production server and your server is already over load, to copy a file you can use rsync command to limit your bandwidth and prevent network hogs:

rsync --bwlimit=1000 /var/www/html/ backups@server1.example.com:~/mysite


--bwlimit is in KB so the above example puts limit of 1000 Kilo Bytes on your copy command.

#rsync #bwlimit #NSF
How to limit bandwidth of rsync linux command?

rsync is an awesome tool in order to move files via ssh into another server or from server to local system like what scp does but
far better in terms of features and incremental copy mechanism. To limit bandwidth use bwlimit like below:

The general form:

rsync --bwlimit=<kb/second> <source> <dest>

An example of usage with 2MB limit per second transfer:

rsync --bwlimit=2000 /backup/folder user@example-host:/remote/backup/folder/

#linux #sysadmin #rsync #bandwidth