[OT] rsync script
Denis Beauchemin
Denis.Beauchemin at USHERBROOKE.CA
Wed Jan 15 13:37:32 GMT 2003
James,
On our Web server we fetch the MRTG data every 5 minutes this way:
from root's crontab:
2-59/5 * * * * su - mrtg -c "/usr/bin/rsync -az --exclude=index.html -e ssh machine1:/var/www/html/mailscanner-mrtg/* /home/www/www1/htdocs/mrtgstats/machine1"
2-59/5 * * * * su - mrtg -c "/usr/bin/rsync -az --exclude=index.html -e ssh machine2:/var/www/html/mailscanner-mrtg/* /home/www/www1/htdocs/mrtgstats/machine2"
You will probably have to adjust the paths. All systems must have an
mrtg user and they have to trust one another for this SSH transfer to
work. Exchange of public keys between the machines and the Web server
is the way to go.
We do not transfer the index.html page because on the Web server the
things are in different directories to we built new index.html pages on
the Web server and we don't want to overwrite them with the transfert.
Hope this helps.
Denis
Le mer 15/01/2003 à 06:46, James Pifer a écrit :
> Hope you don't mind a somewhat off topic question...
>
> Can someone using rsync to transfer mrtg data to another machine share
> their rsync script? I'm trying to write one but have never used rsync
> before and having some trouble. I think it's close, but I'm missing
> something. I'm getting an error that says:
> The remote path must start with a module name not a /
>
> Not finding the correct way to do it on rsync's website, although I'm
> sure I'm just not seeing it.
>
> Any assistance is appreciated.
> James
--
Denis Beauchemin, analyste
Université de Sherbrooke, S.T.I.
T: 819.821.8000x2252 F: 819.821.8045
More information about the MailScanner
mailing list