Tech Tip: Use “On Backup Shutdown” Method to Alert Administrators of Backup Fail
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: December 20, 2022
In the event of a backup failure, it is important to define protocols so that necessary steps can be taken to ensure future backups can run properly (e.g., alerting system administrators in case human intervention is needed). The On Backup Shutdown database method can be used to catch backup errors and execute a procedure when these failures occur.
The method takes in an input parameter…
- 0, if the backup was successful
- An integer value other than 0, if the backup was interrupted by a user or an error has occurred
If an error code was returned, you can use the GET BACKUP INFORMATION command to gather additional data on the last attempted backup to then report to system administrators. Moreover, you can run certain protocols depending on the error code that was returned or obtain other pieces of information that would not otherwise be given by default database commands at the time of backup execution (e.g., amount of available disk space, current users, etc.).