Dave Dykstra dwd at
Wed Dec 19 08:04:54 EST 2001

On Mon, Dec 17, 2001 at 10:47:44PM -0500, Pierre Abbat wrote:
> On Monday 17 December 2001 11:17, David Nickel Jr. wrote:
> > Howdy,
> >  I am pretty "green" with rsync so any help will be much appreciated.
> > I want to mirror webserver A and webserver B. The two directories I want to
> > mirror are /www/home and /www/default. I was wondering how I would set this
> > up in rsycd.conf and how I would call it in a script? Thanks
> [www]
> path=/www
> hosts allow=webserverB
> read only=no
> rsync -avuz /www/home webserverA::www/

That's only one way to do it (and it leaves out /www/default), and a lot
depends on what you're trying to do.  In general, I recommend if you're
using a daemon and rsyncd.conf, that it's better to read from one than
send from one, something like 
    rsync -a webserverA::"www/home www/default" /www
because it has some foibles when writing.  If you've only got two machines
involved, I recommend dispensing with the daemon and rsyncd.conf altogether
and instead using a single colon to go over rsh, or if you have any
security concerns use "-e ssh" to go over ssh.  You shouldn't need "-u"
unless you're changing both sides (and running to rsync commands, one
in each direction), and that can get very tricky so if possible just
make one the master.  You don't want "-z" if you're going over a LAN, only
if it's relatively slow link.

- Dave Dykstra

More information about the rsync mailing list