I manage a diverse set of backup systems, the only commonality is email notifications, There status being "Failed", "Success", "Success with exceptions" and "unknown" (where the email isn't sent).

  • Case 1) Expect email from system3@example.net every day, at least once a day.

    This would catch those instances where the backup server went offline, internet outage, or another unforeseen issue that prevented the backup from run and send out a notification of success/fail.

  • Case 2) Backup ran but failed

    The backup ran, but failed, and an email went out stating such event occurred.

  • Case 3) Backup success

    Great, the thing did what it was suppose to do.

  • If Case 1 or 2, notify me, if case 3, log for audit

    The application would email me on failure, weekly status reports of all events (simple HTML email would suffice, tables with servers, days and status of each day)

Update: I am strictly looking for email based solutions. Template assignments for each email address may be needed to properly parse different backup types, I'll list some systems here:
FreePBX, BackupExec, Appassure, WinSCP Scripts, CrushFTP alerts, qnap sync, syncback software, rsync solutions, Classic windows backup, Bash Expect scripts (to log-in and backup routers via ssh/expect), monthly maintenance tasks like battery backup tests, and other unknown items that would give the same 3 options.

Update: I'm looking for packed software, not vague options in python, php, or others. The information should be removed from various mailboxes and entered into a database.


Since, presumably, you are going to use a dedicated email address for all of these reports, (I would anyway), you should be able to use the mail server for your historic part and simply fetch, and parse, say twice your longest backup cycle.

You would then simply need to run through the emails, against a list of known sources, extracting the latest from each to get the current status, obviously the initial status of each would be "Offline" or "Unknown", and then parsing the title for the status. Each backup task could have an expected update period that could be checked for "Overdue".

All of the above could be handled with a simple python script using the standard libraries but the details would depend on the server type of the email account(s) that the status reports are going to, and the access permissions in your organisation. There are several examples on Stack Overflow of how to use python to fetch mails.

Personally I would use a separate email account for the status reports, with auto-archive set based on how long a history you need, and simply run such a script on demand but you could also have a chron, or scheduled task, that runs the script at specific times and, if there are any problems, uses that account to send you a mail at your personal address(es).

| improve this answer | |
  • I'm looking for existing software. – Jacob Evans Sep 27 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.