rijo79 |
02-25-2017 11:18 AM |
Root cron not working
Hey guys. I've set up two cron jobs under root to do daily incremental and weekly full backups to an S3 instance and then send an email when complete. The email is sent to root@localhost and I have postfix config'd to forward root's mail to a virtual user. If I copy and paste them into a terminal, the commands work perfectly. However the cron jobs do not run at 3 am as they are supposed to. I'm stumped. Don't know why this isn't working. Here are the output from crontab -l:
Code:
00 03 * * 1-6 /usr/local/bin/db_dump.sh && /usr/bin/duply srv1-bak backup && echo "Daily incremental backup for `date '+%d-%m-%Y'` complete at `date '+%H:%M:%S'`" | /usr/bin/mail -s "Backup complete" root@localhost
00 03 * * 7 /usr/local/bin/db_dump.sh && /usr/bin/duply srv1-bak full && echo "Weekly full backup for `date '+%d-%m-%Y'` complete at `date '+%H:%M:%S'`" | /usr/bin/mail -s "Backup complete" root@localhost
Any pointers would be much appreciated.
|