backups

What are some ways I can report on the status of backups in NetBackup?

To view the status of backups that have run in the past hour, you can use the bperror command. Despite the “error” in it’s name, it doesn’t just report errors.

The command below for example, will display the status of all backups in the past 24 hours.

bperror -backstat -U -hoursago 24

If you want to find unsuccessful backups in the past 24 hours, you can run the same command, but pipe the output to awk like this:

bperror -backstat -U -hoursago 24 | awk ‘$1 != “0”‘

Technically a status code 1 is “partially successful”, so if you wanted to filter out status code 0 and status code 1 and find other status codes, you can use this command:

bperror -backstat -U -hoursago 24 | awk ‘$1 != “0” && $1 != “1” && $0 !~ /the requested operation was partially successful/’

The “the requested operation was partially successful” part is there because when you have a status code 1 it prints the status of the backup and on the following line it prints information about it.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top