[wplug] directory replication in linux.

Casey R. Tweten crt at kiski.net
Sat Jan 27 21:38:26 EST 2001


Today around 7:02pm, Rob Nelson hammered out this masterpiece:

: >that is what i was thinking, but i was wondering if it would get stuck in
: >some sort of cyclic problem. if i were to use this method, (correct me if
: >i am wrong) after make changes on one computer i would have to run rsync
: >on the second computer to sync the changes. is there any way make this
: >work like a daemon and make the updates automatically?
: 
: The short answer: crontab.
: 
: The long answer: judicious use of crontab. You want to make crontab run at
: reasonable times. Like, have it run at 5 at work, to sync what you did

Here's my suggestion and example:

A = 'Computer at home'
B = 'Computer on the road'

A will have a directory '/var/rsync/mainfiles' that you want B to sync
to '~/mainfiles'.  On B you have a crontab entry that syncs with A
every 5 minutes since you could be working activley on those files on
A and need current versions on B.

B will have a directory '/var/rsync/mainchanges' that computer A will
sync to '/var/rsync/mainfiles' every 5 minutes.  This approach will
make sure that A only gets files when you take action to make it
so.  This will help mistakes to not happen.  On B you should also have
a crontab that clears '/var/rsync/mainchanges' every 5 minutes in
alternation of A's crontab.

I hope this is understandable and reasonable.  There were some other
options discussed in a previous post that may be what you want.

-- 
print(join(' ', qw(Casey R. Tweten)));my $sig={mail=>'crt at kiski.net',site=>
'http://home.kiski.net/~crt'};print "\n",'.'x(length($sig->{site})+6),"\n";
print map{$_.': '.$sig->{$_}."\n"}sort{$sig->{$a}cmp$sig->{$b}}keys%{$sig};
my $VERSION = '0.01'; #'patched' by Jerrad Pierce <belg4mit at MIT dot EDU>




More information about the wplug mailing list