Scripts executed after a failed backup finishes

 

Accessing the script that runs after each failed backup
To access the After failed backup script shown above:

  1. Click Jobs in the navigation bar
  2. Right-click on the desired job and select Edit.
  3. Click Scripts on the left menu.
  4. Click Run after each failed backup to expand the section.
Entering scripts to run after each failed backup

Scripts that run after each failed backup are useful if you want to execute certain commands but only if the backup failed to complete. Such scripts may involve alerting users to failed backups, preventing other backup jobs from running, or quarantining backup files from failed backups.

  1. Input scripts to be run only after a failed backup directly into the script window provided. Example below:
    net send Administrator "Backup failed"
    // This command will send a network broadcast to the Administrator user with the message: "Backup failed"
  2. You can further customize your script by inserting unique variables:
    1. Click Insert variable.
    2. Choose a variable from the list.
    3. The variable will now be inserted into your script enclosed with percentage signs (eg. %JOB_NAME%).
    4. You can insert as many additional variables as required.
    5. An example with variables:
      move "%BACKUPASSIST_FILENAME%" C:\backups\failed\
      // This command will move the backup file (example), "C:\Backups\Monday.bkf" to a different folder where it can then be tested for restore purposes.
  3. You can also determine how a failed script is flagged within the backup report using the drop-down menu to the right of the On script failure, report label:
    • No error
      If the script fails to execute the overall status of the backup job will not be affected.
    • Minor warning
      If the script fails to execute a minor warning will be logged and then displayed in the backup report.
    • Major warning
      If the script fails to execute a major warning will be logged and then displayed in the backup report.
    • Error
      If the script fails to execute an error will be logged and then displayed in the backup report. The job will also terminate at this point before completing any further processes.