I'm currently trying to make a cron script to do an hourly backup of the files on my Ubuntu 6.06 file server using rsync. I've included below the code for /etc/cron.hourly/rsync
Code:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
rsync -ae ssh --delete-after backup@192.168.0.100:/mnt/drive1/Shared /mnt/backup > /home/admin/rsync.hourly.log
Also, thinking that the problem could be with file ownership stuff, I double checked that out, and it has an owner and group of root, and the permissions are -rwxrwxr-x. When I run the command manually in bash, it works just fine. So I went into /var/log/syslog, and found the following:
Quote:
Sep 28 08:17:01 localhost /USR/SBIN/CRON[31613]: (root) CMD ( run-parts --report /etc/cron.hourly)
Sep 28 08:17:01 localhost /USR/SBIN/CRON[31612]: (root) MAIL (mailed 152 bytes of output but got status 0x0001 )
|
My rsync script is the only script in /etc/cron.hourly, so I'm assuming that this entry from syslog is referring to my script. If anyone has an idea of why my cron script is not working, your help would be appreciated.
crashsystems
P.S.
I have configured passwordless logins for ssh, so that can't be the problem.