Rsync on webserver

Lachlan Cranswick l.m.d.cranswick at
Tue Jan 8 06:13:52 EST 2002

> Here is the problem.
>I have a primary and a secondary web server. I want to sync the home
>directory paths on the primary server with  the secondary server. I am
>fairly ignorant to rsync and wondering what is the best method of doing this
>and how would I call the procedure from say a "perl script".
>Both Servers are FreeBSD 4.2  and there are actually two directorys I want
>to sync 1) /www/home 2) /www/default.  Here is my rsyncd.conf file
>motd file = /etc/rsyncmotd
>max connections = 5
>syslog facility = local3
>    path = /www/home
>    comment = Home Directory Path
>    uid = nobody
>    gid = nobody
>    max connections = 2
>    read only = no
>   path = /www/default
>   comment = ASU Homepage Path
>   uid = nobody
>   gid = nobody
>   max connections = 2
>   read only = no

I sort of have this described at (is a bit out of date but may
give some ideas):

Though when will this secure_shell patch(?) be in rsync?


Normally I just call rsync via crontab as often as required - checking that
a previous instance of the script is not still running.  For an 8 Gig
web area - it is only taking rsync a few minutes to recheck for updates.
UK to US and UK to Canada.

43   8,11,14,17 * * *  ./mirroring/rsync.mirror.script


Corrections/suggestions appreciated but I use something like the
following in the rsyncd.conf - and restrict access to the required computer:

(I guess you would want the primary web server to be read only with rsync -
and restricted access by password and IP address?)

motd file = /etc/motd
max connections = 3
syslog facility = local3

        comment = regional mirror area
        path = /path/to/mirror
        read only = yes
        list = yes
        uid = nobody
        gid = nobody
        hosts allow = 666.66.66.66
        auth users = rsyncmir
        secrets file = /etc/where_this_is


Lachlan M. D. Cranswick
Collaborative Computational Project No 14 (CCP14)
    for Single Crystal and Powder Diffraction
  Birkbeck University of London and Daresbury Laboratory 
Postal Address: CCP14 - School of Crystallography,
                Birkbeck College,
                Malet Street, Bloomsbury,
                WC1E 7HX, London,  UK
Tel: (+44) 020 7631 6849   Fax: (+44) 020 7631 6803
E-mail: l.m.d.cranswick at

More information about the rsync mailing list