An AppleScript to email Retrospect backup failures

Feb 27, '06 06:35:00AM

Contributed by: Anonymous

We wanted to have an email sent to us if a Retrospect backup failed to execute in the past X hours. On one of our servers, we have Retrospect running and if Retrospect crashes in the middle of a backup, it doesn't automatically notify us. So, we modified an included AppleScript, resulting in this new script. We compiled it as an application and have it execute twice a day using cron.

Key features for this to work are the python script macmail.py, which is included in Retrospect's Applescript -> Python directory (it needs to be placed in /Library -> Preferences -> Retrospect). Also, this script works by checking the last modified date of a file. We have Retrospect set to output a CSV file (this option is under Preferences) with backup statistics after a backup successfully completes, and so we are checking our time frames against the modification date of this file.

We had left in the code that emails for successful backup execution, but we have removed this and left it for debugging purposes only.

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060221145350354