[oclug] rsync, ssh, and cron
Michael P. Soulier
msoulier at digitaltorque.ca
Tue Apr 6 18:02:02 EDT 2004
On 06/04/04 Dave Edwards said:
> I've created a cron job to regularly backup a remote directory. The
> command looks like:
> su - dle -c 'rsync -e ssh -aqz www.foo.bar:/usr/websites/foo.bar/www
> /home/dle/projects/foo/'
>
> However, something there -- either rsync or ssh -- does not like it.
> Something about being run by cron is tripping it up, as the command
> works fine when I run it by hand. I receive the error output via
> local email: standard in must be a tty.
>
> This has the earmarks of a self-kicker, but I need a little help to
> get there.
If you run that under vixie-cron, you can specify a user for the job to
run under.
ie.
0 0 * * * dle /usr/bin/rsync -e ssh -aqz
www.foo.bar:/usr/websites/foo.bar/www /home/dle/projects/foo/
Mike
--
Michael P. Soulier <msoulier at digitaltorque.ca>
GnuPG key: 5BC8BE08
Jabber ID: msoulier at digitaltorque.ca
HTML Email considered harmful: http://expita.com/nomime.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20040406/8db238e3/attachment.bin
More information about the OCLUG
mailing list