New Community Zone script: Minion Backup alerts!

We’ve written and released a good, simple missing backup report, together with a sample job you can use to alert you on missing Minion Backup backups!

productimg_backupWe’ve written and released a good, simple missing backup report, together with a sample job you can use to alert you on missing Minion Backup backups!

The function

Minion.AlertMissingBackup returns a list of databases that do not have a recent backup. You define what “recent” means with one of two Threshold parameters, and you can further narrow the scope of the alert by backup type and/or database type.

The function takes a handful of parameters:

  • @BackupType – can be Full, Diff, or Log
  • @DBType – can be User, System, or All
  • @BackupThresholdDays – This is a the threshold to report on; if we don’t have a backup that’s less than @BackupThresholdDays old, that database shows up in the list.
  • @BackupThresholdHours – Instead of days, you can instead use hours as the threshold.
    IMPORTANT: Either @BackupThresholdDays or @BackupThresholdHours must be NULL.

So: the function returns a list of databases that do not have an (undeleted) backup of type @BackupType within the last @BackupThresholdDays days (or alternately, within the last @BackupThresholdHours hours).

For example:

will return a list of user databases that do not have a full backup dated within the last 7 days.

The job

MinionBackup-Missing backup alert is a custom alert to determine if we are missing backups. By default, it sends an alert if:

  • Any database does not have a full backup < 7 days old
  • Any FULL database does not have a log backup < 1 hour old

 

Customize the job script before running it, as outlined in the file itself.

 

Download the scripts here and then take a look around the Community Zone for more!