Skip to main content

Nightly Database Backup Monitoring

Summary​

This script will create a ticket in our (ProValtech's) Halo PSA if the ConnectWise Automate nightly backup fails.

Sample Run​

It is a client script and should be scheduled in the Dashboard's Offline Computer.

Sample Run

Variables​

NameDescription
BackupAuditOutcome of the SQL query used to rectify the backup status
SubjectEmail's Subject
BodyEmail's Body

System Properties​

NameDefaultRequiredDescription
ProVal_Alerts_Email_AddressAlerts@provaltech.comTrueBy default, the system property ProVal_Alerts_Email_Address will be set to alerts@provaltech.com. This can be changed if these alerts should be directed elsewhere.

System Properties

Process​

  1. Verifies whether the previous backup was successful or not.
  2. Sends an email to the address(es) saved in the Global Variable @Email@ if there's a failure in the previous database backup.

Email Subject: Nightly Database Backup Failed for %redirhostname%

Email Body:

The scheduled nightly MySQL backup for ConnectWise Automate did not appear to run. Every night, a SQL backup job is supposed to create a zip file containing a backup of all the tables for CWA. Please investigate.

OR

The last nightly MySQL backup for ConnectWise Automate has failed. Every night, a SQL backup job is supposed to create a zip file containing a backup of all the tables for CWA. Please investigate.

OR

A MySQL backup for ConnectWise Automate was generated last night, but it is lower than 100 MB in size. Typically, these backup files are greater than 1 GB in size, so this generally means the backup failed. Please investigate.

Output​

  • Email

Changelog​

2025-04-10​

  • Initial version of the document