Install
macOS
Ubuntu
$ sudo apt-get install rsync
Configuration of the rsync Daemon
The rsync daemon is an alternative to SSH for remote backups. Although more difficult to configure, it does provide some benefits. For example, using SSH to make a remote backup of an entire system requires that the SSH daemon allow root login, which is considered a security risk. Using the rsync daemon allows for root login via SSH to be disabled.
Edit the file /etc/default/rsync
to start rsync as daemon using xinetd. The entry listed below, should be changed from false to inetd.
Install xinetd because it’s not installed by default.
$ sudo apt-get -y install xinetd
Create the file /etc/xinetd.d/rsync
to launch rsync via xinetd. It should contain the following lines of text.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
flags = IPv6
}
Create the file /etc/rsyncd.conf
configuration for rsync in daemon mode. The file should contain the following. In the file, user should be replaced with the name of user on the remote machine being logged into.
max connections = 2
log file = /var/log/rsync.log
timeout = 300
[share]
comment = Public Share
path = /home/share
read only = no
list = yes
uid = nobody
gid = nogroup
auth users = user
...