11-21-2013 04:25 AM
Hi All,
Any ideas please how do i generate a policy list along with storage unit configured in command line using bppllist or any other command?
I also need it to get generated in a txtfile may be...
please help.
Thanks, anish
Solved! Go to Solution.
11-21-2013 05:30 AM
My ears were burning!
for POLICY in `bppllist`
do
RESIDENCE=`bppllist $POLICY -L|grep "^Residence"|grep -v Lifecycle|awk '{print $2}'`
echo "$POLICY $RESIDENCE" >> policy_stu.txt
done
But bear in mind that this only shows the storage unit associated with the policy - it could be over-ridden by the schedule settings, hence my original quoted by sri vani above
11-21-2013 04:35 AM
Try these: https://www-secure.symantec.com/connect/forums/how-do-i-get-policy-settings-netbackup
11-21-2013 04:37 AM
also another good one by Andy
https://www-secure.symantec.com/connect/forums/list-storage-unit-all-policies-environemnt
for POLICY in `bppllist`
do
echo
bppllist $POLICY -L|egrep "^Policy Name|^Residence|^Schedule|^ Residence"|grep -v Lifecycle
done
11-21-2013 04:43 AM
Are you saying you just want the policy name along with its storage unit?
If you want everything then bppllist -allpolicies -U>c:\policies.txt does the job
11-21-2013 05:07 AM
Any ideas if i would want the report as follows:
Policy | Storage_UNIT |
do i add the -L switch please?
11-21-2013 05:12 AM
Have you tried Andy's command?
It really does not matter if you use -U or -L for the info you want.
11-21-2013 05:30 AM
My ears were burning!
for POLICY in `bppllist`
do
RESIDENCE=`bppllist $POLICY -L|grep "^Residence"|grep -v Lifecycle|awk '{print $2}'`
echo "$POLICY $RESIDENCE" >> policy_stu.txt
done
But bear in mind that this only shows the storage unit associated with the policy - it could be over-ridden by the schedule settings, hence my original quoted by sri vani above
11-21-2013 05:34 AM
I use the following command but not getting any output.. anything I am missing please?
bppllist -U -allpolicies|egrep "^Policy name|^Residence">/tmp/policy.txt
11-21-2013 05:38 AM
If you run bppllist -U -allpolicies without the egrep you'll see why:
^Policy Name - upper case "N"
^Residence - no lines begin with the word "Residence" they start with 2 or 4 spaces then Residence (that is one subtle difference between the output using -U cf -L)
11-21-2013 06:45 AM
Just to supplement Andy:
Use the -i qualifier for egrep to ignore upper/lower case
11-21-2013 07:00 AM
Quiet obvious ,
The reverberation of the names Mariana & Andy,(Martin,Mark,Nicolai,...........) will spill knowledge and kill issues