Rsyncd rsync daemon

Let’s quickly set up a rsync server on an Ubuntu 12.04 server and run some backups.

We well do this logged in as root at each of the computers.

1. Setting up the server

  • Edit the server configuration file /etc/rsyncd.conf, enter:
motd file = /etc/rsyncd.motd

    path = /home/test/Documents
    comment = Test folder
    uid = user
    gid = user
    read only = no
    auth users = test
    secrets file = /etc/rsyncd.scrt

The path /home/test/Documents shall exist or you will receive error.

  • Edit the Message of the Day file /etc/rsyncd.motd, enter anything, its just a welcoming message, e.g.:
Hi there!

Edit rsyncd password file (“secrets file”) /etc/rsyncd.scrt (rsycn uses its own username/password system), enter:


This is just a plain text, so change its permissions for you only to see its contents:

chmod 600 /etc/rsyncd.scrt
  • Enable rsync daemon by editing /etc/default/rsync , changing the following settings:
  • Start the daemon and then check its status:
service rsync start
service rsync status

Everything is fine if you see the following message:

 * rsync is running

2. Setting up the client

  • Edit password file ~/rsync/test.pwd to avoid typing the password manually and enter the password only:

Also hide its contents:

chmod 600 ~/rsync/test.pwd
  • Copy some test directory over to the rsync server:
rsync --password-file ~/rsync/test.pwd -av /tmp/myTest test@remoteserver::test


  1. /tmp/myTest will copy the directory and its contents, /tmp/myTest/ will copy only the contents
  2. Important: using two colons in the remote address ( :: ) tells the program to use rsync protocol and connect to the rsyncd server (as opposed to the ssh )

One Comment on “Rsyncd rsync daemon”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.