Rsync server on Debian


Create/edit the Rsync server configuration file :

sudo vi /etc/rsyncd.conf

Here is my configuration file:

uid = nobody
gid = nogroup
max connections = 50
socket options = SO_KEEPALIVE
address = 10.8.0.1

[raspberry]
path = /var/backups/raspberry/
comment = Rpis backups
read only = no


Note that this configuration file is a bit specific as :
– Rsyncd is only listening to the VPN interface
– There is not authentification (as we are in a “safe” environment)

Create the folder :

sudo mkdir /var/backups/raspberry/

And adjust the owner :

sudo chown nobody:nogroup /var/backups/raspberry/

We can now start the server :

sudo /etc/init.d/rsync start

Check that it’s started :

sudo /etc/init.d/rsync status

You should have something like :

● rsync.service - fast remote file copy program daemon
   Loaded: loaded (/lib/systemd/system/rsync.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2017-09-19 14:16:34 CEST; 1s ago
 Main PID: 29652 (rsync)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/rsync.service
           └─29652 /usr/bin/rsync --daemon --no-detach

To start rsyncd automatically, edit the following file :

sudo vi /etc/default/rsync

And adjust the parameters as follow :

RSYNC_ENABLE=true

From a remote host, we can test the connection :

pi@raspberrypi:~ $ rsync rsync://10.8.0.1
raspberry       Rpis backups

Ready to sync !

One thought on “Rsync server on Debian”

Leave a Reply

Your email address will not be published. Required fields are marked *