wiki:NotifyScript
close Warning: Error with navigation contributor "AccountModule"

You are not required to have a NotifyScript, but it is advisable, as otherwise you may not find out about backup failures. The default script generated by bbackupd-config on Unix, and the supplied NotifySysadmin.vbs script for Windows users, will send you an email if a backup fails.

Please note that some event types have been added since 0.10. If you have a NotifyScript generated by 0.10, then it will send emails about Unknown error whenever it receives one of these events, because it doesn't know about them. Please see the Upgrading page to find out how to fix this.

The following notifications are sent to the NotifyScript. The notification name is sent as the first command-line parameter of the script.

Name Type When
backup-start Event At the beginning of every backup run
backup-finish Event At the end of every backup run
backup-ok Status When the backup run finished without errors
read-error Status When the backup failed to read one or more files due to a permissions problem
store-full Status When the store account is full or became full during the backup
backup-error Status When another error, such as an exception, occurred during the backup

Event notifications are sent every time they occur. Status notifications are sent if they differ from the previous status. That means that after you have been notified about the event once, you will not receive further notifications until bbackupd is restarted, or the state changes. For example, consider the following sequence of backup runs:

  • Backup finishes OK. backup-ok notification is sent.
  • Backup finishes OK. Duplicate backup-ok notification is suppressed.
  • Backup finishes OK. Duplicate backup-ok notification is suppressed.
  • Store becomes full during backup. store-full notification is sent.
  • Store is still full during the next backup. Duplicate store-full notification is suppressed.
  • A read error occurs. read-error notification is sent.
  • No read error occurs, but the store is still full. store-full notification is sent.
  • Store is still full during the next backup. Duplicate store-full notification is suppressed.
  • Store is no longer full. backup-ok notification is sent.
  • Backup finishes OK. Duplicate backup-ok notification is suppressed.

If you want to disable the suppression of duplicate notification, in order to receive one at the end of every backup, you can set the NotifyAlways? parameter to true.

Status notifications are always sent just before the backup-finish event. If you want to send a report at the end of every backup, and include the status of the backup, then catch the status notifications and save a record of the last one received to a file. Then when you receive the backup-finish event, you can read the contents of the file to determine the status of the last backup. This works even if the NotifyAlways? option is not enabled, as a status notification is sent to the script whenever the status changes, so you can be sure that the status file represents the status of the last backup.

Last modified 9 years ago Last modified on Mar 24, 2009, 8:27:19 PM