Enabling Rsync daemon on unRAID

I used to rsync my data using a CIFS mount of the corresponding /mnt/user/share found on unRAID. I noticed that some of the files kept uploading even if they haven’t been modified. I also had issues with some long directories containing files with long filenames. After enabling rsync daemon on unRAID, all my problems went away and transfert speed was great.

Inetd provides an easy way to enable rsyncd.

Creating rsyncd configuration

Edit /boot/config/custom/etc/rsyncd.conf

 uid             = nobody
 gid             = users
 use chroot      = no
 max connections = 4
 pid file        = /var/run/rsyncd.pid
 timeout         = 3600

 path = /mnt
 comment = /mnt files
 read only = FALSE

Typical rsyncd.conf have root/root for uid/guid. I prefered to stick with what is used on user shares. I had to increase the timeout from the default 600s to longer because some VMs were taking ages to upload. Please not that the rsyncd mount point is called [mnt] and limits the rsync to /mnt and below. It is easy to use rsync on the remote machine using as source or destination address such as rsync:// On the other hand you won’t be able to use rsync://

Modify go

inetd needs to be modified to correctly start the rsyncd service. While the /etc/inetd.conf can be manually edited it is better to dynamically patch it and then kill the already running process.

Edit your /etc/config/go and add the following lines:

  if ! grep ^rsync /etc/inetd.conf > /dev/null ; then
   cat <<-EOF >> /etc/inetd.conf
       rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon
       read PID < /var/run/inetd.pid
       kill -1 ${PID}
  cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

Use rsync daemon

Reboot your unRAID to take into consideration your new settings (and make sure they are persistants).

Now rsync’ing to unRAID is a simple as:

  rsync -avz --stats --progress /mnt/mymount/ rsync://
Share Comments
comments powered by Disqus