Running NetBackup Reports from Command line
There are a slew of reports available in the NetBackup GUI and CLI interfaces and these reports cover everything from NetBackup errors to tape reports to what is occurring with vault jobs. This post provides the command line equivalents for running the reports which are available in the GUI.
Two reports which I run daily are jobs report and the errors report. These reports can be access through the
bperror commands, and produce a nice summary of the jobs that ran and any errors that occurred.
# bpdbjobs -summary -L -keep_hours 24 Summary of jobs on smurf1 Queued: 5 Waiting-to-Retry: 0 Active: 3 Successful: 3802 Partially Successful: 4 Failed: 27 Incomplete: 3 Suspended: 0 Total: 3845
# bperror -U -problems -hoursago 24 TIME SERVER/CLIENT TEXT 12/02/2009 18:18:32 smurf1 schlumpf9a backup of client schlumpf9a exited with status 13 (file read failed) 12/02/2009 22:54:08 smurf1 pico13 socket read failed: errno = 62 - Timer expired
Command Line Interface for NetBackup Reports
This is a list of the command line tools that run the same reports as the NetBackup GUI.
- <start_date> and <end_date> syntax:
- <start_time> and <end_time> syntax:
- <media_id> is the six-character media identification number
Backup Status Report The Backup Status report shows status and error information on jobs completed within the specified time period. If an error has occurred, a short explanation of the error is included.
bperror -U -backstat -s info \ [-d <start_date> <start_time> -e <end_date> <end_time>]
Client Backups Report The Client Backups report shows detailed information on backups completed within the specified time period.
bpimagelist -U [-A|-client name] \ [-d <start_date> <start_time> -e <end_date> <end_time>]
Problems Report The Problems report lists the problems that the server has logged during the specified time period. This information is a subset of the information you get from the All Log Entries report.
bperror -U -problems \ [-d <start_date> <start_time> -e <end_date> <end_time>]
All Log Entries Report The All Log Entries report lists all log entries for the specified time period. This report includes the information from the Problems report and Media Log Entries report. This report also shows the transfer rate, which is useful in determining and predicting rates and backup times for future backups (the transfer rate does not appear for multiplexed backups).
bperror -U -all \ [-d <start_date> <start_time> -e <end_date> <end_time>]
Media List Report The Media Lists report shows information for volumes that have been allocated for backups. This report does not show media for Disk type storage units or for backups of the NetBackup catalogs.
bpmedialist -U -mlist [-m <media_id>
Media Contents Report The Media Contents report shows the contents of a volume as read directly from the media header and backup headers. This report lists the backup IDs (not each individual file) that are on a single volume. If a tape has to be mounted, there will be a longer delay before the report appears.
bpmedialist -U -mcontents [-m <media_id>]
Images on Media Report The Images on Media report lists the contents of the media as recorded in the NetBackup image catalog. You can generate this report for any type of media (including disk) and filter it according to client, media ID, or path.
bpimmedia -U [-client <client_name>] [-mediaid <media_id>]
Media Log Entries Report The Media Logs report shows media errors or informational messages that are recorded in the NetBackup error catalog. This information also appears in the All Log Entries report.
bperror -U -media [-d <start_date> <start_time> -e <end_date> <end_time>]
Media Summary Report The Media Summary report summarizes active and non-active volumes for the specified server according to expiration date. It also shows how many volumes are at each retention level. In verbose mode, the report shows each media ID and its expiration date.
Media Written Report The Media Written report identifies volumes that were used for backups within the specified time period.
bpimagelist -A -media \ [-d <start_date> <start_time> -e <end_date> <end_time>]
Volume detail (vmquery) There is no NetBackup GUI equivalent for the Volume detail report. This is a command line method to get details for all tapes or a specific tape. This can be used as a complement to other Media reports.
vmquery -a -or- vmquery -m <media_id>
- NetBackup DataCenter 4.5 System Administrator's Guide for UNIX (page 200-209)
- VERITAS NetBackup (tm) 5.0 System Administrator's Guide, Volume I for UNIX (pages 261-272)
- VERITAS NetBackup (tm) 5.1 System Administrators Guide for UNIX, Volume I (pages 263-274)