Rsync problems when run as a cron job

Tony Arnold tony.arnold at manchester.ac.uk
Wed Aug 30 06:46:36 UTC 2006


Gabe,

On Wed, 2006-08-30 at 11:45 +0100, Gabriel M Dragffy wrote:

> I have the entry for root's crontab:
> 
> $ sudo crontab -l | grep rsync
> Password:
> 00 08,15,20,00 * * * /usr/bin/rsync -rlvt
> --delete /home /media/LACIE/Backup
> 
> 
> This is a single example from syslog:
> Aug 30 08:00:02 worldventuresltd /USR/SBIN/CRON[14748]: (root) CMD
> (/usr/bin/rsync -rlvt --delete /home /media/LACIE/Backup)
> 
> Which shows the command got executed. However I am now certain that it
> doesn't work, the data isn't transferred as it should. If I copy the
> command exacatly from crontab (/usr/bin/rsync -rlvt
> --delete /home /media/LACIE/Backup) and paste it into a terminal it does
> it's job properly and very well.
> 
> Why isn't it working properly under cron?

Try appending '&> some-log-file' (without quotes) to the rsync command
in the crontab and let it run again. You'll see any error message from
the rsync command then in some-log-file (choose your own location and
name!).

Regards,
Tony.
-- 
Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: tony.arnold at manchester.ac.uk, H: http://www.man.ac.uk/Tony.Arnold




More information about the ubuntu-users mailing list