[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mirror sites with sarge



Hi,

Siju George wrote:

Hi,

To start with.

I have a set of folders "A" on a computer "Sarge1".
I have another computer "Sarge2" with a copy of the same set of folders "A"..

The contents of the set of folders "A" on "Sarge1" gets deleted,
updated, modified continously.
How can I get those changes on to the set of folders "A" on "Sarge2"
as soon as possible??

i.e The changes to "A" on "Sarge1" should be propogated to "A" on
"Sarge2" as quickly as possible.

is running
#rsync -avz root@Sarge1:A root@Sarge2:A

continously as a cronjob the best way to do it???

if so how will I give the password for "root" on "Sarge1" while
executing the above command  in a shell script as a cronjob??

Could someone please guide me if there are better ways of doing the
propagation of changes??

Thankyou so much

Kind Regards

Siju

If the machines are very remote then rsync from a cron job is probably the best way, yep. Look at the ssh manpage about using public-key authentication so you don't need to type the password (simply create a key with no password).

If, however, the machines are really close together you might like to look into using NFS instead. That was you only need to keep the files on Sarge1 and mount A onto Sarge2, which will _always_ have the latest version.

HTH,
Chris

--
Chris Boot
bootc@bootc.net
http://www.bootc.net/



Reply to: