Setup rsync Server

To configure Ubuntu as an rsync server perform the following configuration changes:

Initial Installation:

sudo -i
apt install rsync
touch /etc/rsyncd.conf
cp /lib/systemd/system/rsync.service /etc/systemd/system/
systemctl restart rsync

Configuration:

sudo nano /etc/rsyncd.conf
# Global configuration of the rsync service

pid file = /var/run/rsyncd.pid

# Username and group for working with backups
uid = local-user
gid = local-user

# Allow to modify the source files
read only = no

# rsync share
[rsync]
path = /path/to/rsync
list = yes
auth users = rsync-user
secrets file = /etc/rsyncd.passwd

Create the rsync user password file:

sudo touch /etc/rsyncd.passwd
sudo chmod 0600 /etc/rsyncd.passwd
sudo nano /etc/rsyncd.passwd
# rsync password file
rsync-user:password

Finally restart the service.

sudo systemctl restart rsync

DavisSystem

Consolidated Notes From the Desk of Sean Davis.


How to configure a rsync server

By Sean, 2022-12-08