bandwidth limit Rsync
-
katla
- Posts: 4
- youtube meble na wymiar Warszawa
- Joined: Sat Mar 29, 2014 3:02 am
bandwidth limit Rsync
It would be nice to be able to limit bandwidth use when using rsync.
-
mafredri
- Posts: 371
- Joined: Sat Mar 22, 2014 8:41 am
Re: bandwidth limit Rsync
Would you like to limit bandwidth usage to or from the NAS by rsync?
For example, if you're running the rsync server on the NAS and syncing to it from another device, you need to specify the --bwlimit=100 option on the command line (100 KB/s in this case).
However, if you want to limit the speed when running rsync from the NAS to a rsync server it's not quite as simple. The only method I can think of is making some modifications on the filesystem as root:
Contents of rsync (vi rsync):
Where /volume1/Path would be some kind of unique identifier for what rsync gets called with, e.g. the path that is rsynced or the receiving server.
PS. I don't know if this will persist upon a reboot, if it does not one would need to create an init script which does this upon startup.
EDIT: Looks like it does need to be run as a init script, it will get overwritten on a reboot.
PPS. Although I posted an answer, I still support this feature request. It should be in the OS
Cheers,
Mathias
For example, if you're running the rsync server on the NAS and syncing to it from another device, you need to specify the --bwlimit=100 option on the command line (100 KB/s in this case).
However, if you want to limit the speed when running rsync from the NAS to a rsync server it's not quite as simple. The only method I can think of is making some modifications on the filesystem as root:
Code: Select all
cd /usr/builtin/bin
# rename the rsync executable
mv rsync rsync_client
# update the rsyncd symlink since the executable has changed name
rm rsyncd
ln -s /usr/builtin/bin/rsync_client rsyncd
# create a new rsync executable with customized options (see below for contents)
vi rsync
chmod +x rsync
Code: Select all
#/bin/sh
case $@ in
*"/volume1/Path"*) rsync_client --bwlimit=100 $@ ;;
*) rsync_client $@ ;;
esac
PS. I don't know if this will persist upon a reboot, if it does not one would need to create an init script which does this upon startup.
EDIT: Looks like it does need to be run as a init script, it will get overwritten on a reboot.
PPS. Although I posted an answer, I still support this feature request. It should be in the OS
Cheers,
Mathias
Hi, I'm new here. Looking to be active in the community and help with development
.
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)
Storage: AS-604T with 3GB RAM (Kingston KVR1333D3S8S9/2G)