I have just set this up, and thought i should summarize this fairly wordy and bitty Thread to a step by step guide.
To set up Unraid as a Rsync server for use as a Rsync destination for compatible clients, such as Synology hyperbackup.
1. (optional)
Open Unraid web interface and set up a new share('s) that you want to use with Rsync
2.
Open Unraid web interface and open a new web terminal window by clicking the 6th icon from the right, at the top right of the interface ( or SSH in to your unraid box)
3.
Type or copy and paste the following one line at a time. (SHIFT + CONTROL + V to paste in to the unraid web terminal)
mkdir /boot/custom
mkdir /boot/custom/etc
mkdir /boot/custom/etc/rc.d
nano /boot/custom/etc/rsyncd.conf
4. Type your Rsync config. As a guide use the below example, modified from @WeeboTech
uid = root
gid = root
use chroot = no
max connections = 4
pid file = /var/run/rsyncd.pid
timeout = 600
[backups] # Rsync Modual name (basicaly Rsync share name) Synology hyperbackup calls this "Backup Modual"
path = /mnt/user/backups # Unraid share location. /mnt/user/YOURSHARENAME could also be a subdirectory of a share
comment = Backups # Modual Description
read only = FALSE
[vmware] # Add multiple Rsync moduals as required
path = /mnt/user/backups/vmware
comment = VMWare Backups
read only = FALSE
5.
Press CONTROL + x then press y and then ENTER to save the config
6.
Type or copy and paste the following:
nano /boot/custom/etc/rc.d/S20-init.rsyncd
7.
Type or copy and paste the following:
#!/bin/bash
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
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi
cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf
8.
Press CONTROL + x then press y and then ENTER to save the Script
9.
To add your script to the Go file, its quicker to use echo to send a line to the end of the file. Type or Copy and paste:
echo "bash /boot/custom/etc/rc.d/S20-init.rsyncd" >> /boot/config/go
10.
Type or copy and paste the following: ( I am not sure if chmod is needed, however its something i did trying to get this to work)
chmod =x /boot/custom/etc/rc.d/S20-init.rsyncd
bash /boot/custom/etc/rc.d/S20-init.rsyncd
rsync rsync://127.0.0.1
11.
The last command above is to check rsync is working locally on your Unraid server. It should return the rsync module's and comments from your rsync.conf like below:
root@YOURUNRAIDSERVERNAME:/# rsync rsync://127.0.0.1
backups Backups
vmware VMWare Backups
12. If the last command Displays your rsync module's then you may want to quickly check if rsync can be reached by your unraids domain name or network interface IP:
rsync rsync://192.168.0.100 # replace ip with your unraid server ip
Or
rsync rsync://UNRAIDSERVERNAME.local #obviously replace with your sever name ;)
End.
Now check that your rsync client connects to unraid.
i used Synology Hyper Backup,
Created a new data backup,
Under file server selected rsync > next
change server type to "rsync-compatible server",
fill in your unraid server Ip or domain name,
transfer encryption "off" - not sure how to get encryption to work, please post below if you know how
port "873"
username "root" - i guess couldset up a second account and grant appropriate privileges using CLI on unraid?
password "YOURUNRAIDROOTPASSWORD"
Backup module: "your Rsync module from rsynd.conf"
directory "subdirectory inside your rsync module / unraid share"
Hope this helps someone.
( Edited, thanks Dr_Frankenstein )