NAS4Free rsync daemon client
Setting up a NAS4Free box to push/pull date to a remote system via rsync running as a daemon, rather than rsync over SSH, can be a little tricky. Here is what’s required.
On the server, ie NOT NAS4Free, but the remote system:
- Install rsync.
- Set rsync daemon to run on startup
- Create and configure /etc/rsync.conf
- Create and configure /etc/rsync.secrets
After all this is completed, you can setup the rsync client on NAS4Free.
1 is usually accomplished with your package manager (yum/apt-get/aptitude/ports), if not already installed.
2 depends on your Linux distro in use. For Debian based Linux systems, edit /etc/default/rsync, and set the following line:
RSYNC_ENABLE=true
3 depends on the folder you are trying to sync, but here is a sample
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid[documents]
path = /home/user/Documents
uid = user
gid = user
read only = yes
list = yes
secrets file = /etc/rsyncd.secrets
hosts allow = 192.168.0.250/255.255.255.255
You might see some examples online that tell you to put this line:
auth users = pub
Do NOT add this line, as it won’t work. If you see the error below, make sure you remove ‘auth users’ from your config file.
2015/05/31 12:00:00 [17310] auth failed on module documents from nas4free.local (192.168.0.250) for rsync: password mismatch
4. Create the secrets file, as such:
rsync_user:password123
Obviously, select your own username and password combination.
5. On your NAS4Free box, create a new user under Access->Users and Groups, making sure the username and password you set in rsync.secrets match.
Finally, you are ready to setup your client config in Services->Rsync->Client.
Leave a Reply