backups

How can I report on NetBackup policies from the command line?

To list all policies from the command line, you can use the bppllist command.

/usr/openv/netbackup/bin/admincmd/bppllist -allpolicies -U

To parse the output a bit more, you can pipe the output to an awk script.

# nbuhost: cat policy_report.awk
BEGIN{printf (“%-28s %-15s %-5s %-18s\n”, “Policy”, “Type”, “Active”, “Schedule\n=====================================================================================================”)}
/^Policy Name/{policy = $3}
/Policy Type/{ptype = $3}
/Active/{active = $2}
/ Schedule:/{schedule = $2}
/ Type:/{type = $2″ “$3” “$4;printf (“%-28s %-15s %-5s %-18s %-15s\n”, policy, ptype, active, schedule, type)}

So to use both bppllist with the awk script, you can run it like this:

/usr/openv/netbackup/bin/admincmd/bppllist -allpolicies -U | awk -f policy_report.awk

The output will look like this:

db_backup Standard no monthly_full Full Backup
db_backup Standard no full_backup Full Backup
db_backup Standard no diff_backup Differential Incremental Backup

Click to comment

Leave a Reply

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

To Top