I do exactly this between a pair of linux boxen between home and
office.  As long as the date/time on both machines is accurate (set
every 24 hours from the NIST clock) it has worked flawlessly for
many months.  The only goofups have come when the date was messed up
on one of the machines.  I ran with backup for a long time, but they
never were useful so took them out.  The entire office file tree is
replicated this way, accounting, documents, everything, so I have
offsite live backups.

I run the following every 30 minutes.  That's enough time to get
home and see the changes.

rsync -auz --exclude-from=/exclude /shared machinea:/
rsync -auz --exclude-from=/exclude.machinea machinea:/shared /

For ssh, set up for RSAAuthentication; you'll need to put the public
keys of the machines that can log in ~/.ssh/authorized_keys.  See
the ssh docs for details.

   -- Michael

On Fri, 15 Sep 2000, Robin M. Braun wrote:

> I would like to automatically synchronize two directory trees.
> Say I have two machines that I use regularly. One is at the
> office and one is at home. (I would like to avoid having
> anything like an NFS mount.) If I am at the office and I work on
> a document, then I would like to see those changes reflected in
> the copy at home by the time I get to open it there. Likewise,
> if I am at home and I have worked on a document overnight, I
> would like to see those changes in the document on my office
> machine by the time I open it there next morning.
> 
> I have tried something like this.
> 
> rsync -avuzb --rsh=/usr/local/bin/ssh --exclude �*~�
> [EMAIL PROTECTED]:/home/rob/toppage .
> rsync -Cavuzb --rsh=/usr/local/bin/ssh .
> [EMAIL PROTECTED]:/home/rob/toppage
> 
> All it seems to do is copy all the files across and then back again. I
> would imagine the answer is simple, but I can't figure it out.
> 
> On another matter, how do I get ssh to log in automatically without
> prompting for a password.


Reply via email to