> -----Original Message-----
> From: Martijn Lievaart
> Sent: Thursday, October 14, 2004 1:48 PM

> The problem is that I use a cronjob for backups. It never 
> sends mails. 
> All other cronjobs send mail fine. The  only difference is 
> that this job runs for almost two hours. If it stops on 
> mounting the backup directory or fails quickly for any other 
> reason, it sends mail fine. Anyone seen this? Any solution or 
> workaround?

For various reasons, I like to run backup cron jobs using scripts of the
form:

[ Pseudo script only... ]

( pre_backup_prep; backup_tasks; post_backup_cleanup; )
>/var/backup/log.`date +%Y%J` 2>&1; \
if grep -v success /var/backup/log.`date +%Y%J` then \
         mail -s "Backup problems" admin </var/backup... \
Fi

[ Summary: dump the output from the backup into a file, and if the thing
didn't complete successfully, mail that file to you.  And you'll probably
also want a "after X days, clean out the old logs" job, too. ]

This lets me look a *successful* backup logs if I want to, but not if I
don't, and if (for whatever reason) I'm having issues with mail, I still can
see what happened (this is especially important if the destination address
if off-domain).

> Martijn Lievaart

Malc.



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to