0

I have rsyncd version 3.1.2 listening on port 873 and I want to limit the bandwidth with which my files are downloaded by a client connecting to me. I added a bwlimit both in the config file:

uid = nobody
gid = nogroup

[data]
path = /var/data/files/
comment = Repo
read only = yes
bwlimit = 10

and tried it on the daemon config file

[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf

[Service]
ExecStart=/usr/bin/rsync --daemon --no-detach --bwlimit=10

[Install]
WantedBy=multi-user.target

In either case when my client connects with rsync to download the file, the parameter gets ignored per logs:

Dec 29 08:27:12 pubserver systemd[1]: Started fast remote file copy program daemon.
Dec 29 08:27:12 pubserver rsyncd[32533]: rsyncd version 3.1.2 starting, listening on port 873
Dec 29 08:29:42 pubserver rsyncd[1534]: Unknown Parameter encountered: "bwlimit"
Dec 29 08:29:42 pubserver rsyncd[1534]: IGNORING unknown parameter "bwlimit"
Dec 29 08:29:42 pubserver rsyncd[1534]: connect from workspace (10.155.120.1)
Dec 29 08:29:42 pubserver rsyncd[1534]: rsync on repo/ from workspace (10.155.120.1)
Dec 29 08:29:42 pubserver rsyncd[1534]: building file list
Dec 29 08:29:44 pubserver rsyncd[1534]: sent 17567 bytes  received 72 bytes  total size 16787953

Is there a way to make this limit work? Alternatively, how to slow down/throttle rsync connections if bwlimit is no longer supported?

Dave M
  • 4,494
  • 21
  • 30
  • 30
Mnemosyne
  • 127
  • 5
  • Alternatively you could try to use [`trickle`](https://linux.die.net/man/1/trickle) to limit the bandwidth (though I'm not sure if it works in daemon mode, never tried it myself) – digijay Dec 29 '21 at 09:11

1 Answers1

3

bwlimit can be used only as a command-line parameter but not in /etc/rsyncd.conf

AlexD
  • 8,179
  • 2
  • 28
  • 38