Important Update: Cohesity Products Knowledge Base Articles
All Cohesity Knowledge Base Articles are now managed via the Cohesity Support Portal: https://support.cohesity.com/s/searchunify. The Knowledge Base articles available here will not reflect the latest information or may no longer be accessible.
How to easily determine which policies are active/inactive (for a large number of policies) when getting error status code 247
Problem
How to easily determine which policies are active/inactive (for a large number of policies) when getting error status code 247.
Error Message
Status Code: 247 - the specified policy is not active.
Solution
Normally, when checking if a single policy is active, this could be done via the NetBackup Administration Console under NetBackup Management > Policies to see which policy is grayed out (inactive), indicating that the Action > Deactivate option had been utilized. To make a single inactive policy active again, utilize the Action > Activate option.
However, if there are hundreds of policies involved, this can be very tedious process. A better approach to view the status of multiple policies is by using the bppllist command paired with operating system level filtering commands, to determine which are active, or not, as seen in the examples below.
Linux Examples:/usr/openv/netbackup/bin/admincmd/bppllist -allpolicies -L | grep 'Policy Name\|Active' > /tmp/allpolicies.txt
...OR...
/usr/openv/netbackup/bin/admincmd/bppllist -allpolicies -L | egrep "Policy Name|Active" > /tmp/allpolicies.txt
Windows Example:install_path\Veritas\NetBackup\bin\admincmd\bppllist -allpolicies -L | findstr /C:"Policy Name" /C:"Active" > C:\Temp\allpolicies.txt
The contents of the output file (allpolicies.txt) should look similar to this:
Policy Name: Catalog
Active: yes
Policy Name: Oracle-prod
Active: yes
Policy Name: Standard-prod
Active: yes
Policy Name: Windows-prod
Active: yes
Policy Name: Test-dev
Active: no
Policy Name: VMware-online
Active: yes
Policy Name: Test-AIR-MSDP
Active: no
Policy Name: SLP_dup-to-tape
Active: yes
Note: If the grep, egrep, or findstr command is not used, as applicable, then it will give a long listing of each policy, which will potentially create hundreds of pages of output, if there are large number of policies to list.