Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams
Google

Rsync Server


To set up an rsync server simply install the rsync package then copy /usr/share/doc/rsync/sample-rsyncd.conf.gz to /etc/rsyncd.conf. Edit it to perhaps turn logging on:



log file=/var/log/rsyncd
... 
        transfer logging = yes

Make sure that port 873 is allowed through your firewall. Add the following line to /etc/inetd.conf:

rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon

Then restart inetd by sending it a HUP.

The rsync server works with modules. Modules are defined in the configuration file. A list of modules is returned from an rsync server when the server is queried:



  $ rsync datamining.csiro.au::
  debianbook     Graham's Debian GNU/Linux Survival Guide

For each module (debianbook in the above) you identify a it's configuration, including a path to where it lives, for example:



[debianbook]

        comment = Graham's Debian GNU/Linux Survival Guide
        path = /var/www/debian/book
        read only = yes
        list = yes
        uid = nobody
        gid = nogroup
        transfer logging = yes
...

To get a directory listing from an rsync server:



  $ rsync datamining.csiro.au::debianbook/

To have your local server start up at boot time add the following to /etc/inetd.conf:



rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon

After editing the /etc/rsyncd.conf file be sure to send the process a HUP signal.

Copyright © 1995-2006 [email protected]
Contribue and access the PDF Version