Forum Discussion

noazara's avatar
noazara
Level 6
6 years ago

clients in active policies only

Hi Guys,   i have the below script to find the clients in activie policies only.   [root@bkp01 admincmd]# cat activeclients.sh #!/bin/ksh PATH=$PATH:/usr/openv/netbackup/bin/admincmd activec...
  • Marianne's avatar
    Marianne
    6 years ago

    noazara

    I do not have an active NBU installation to test myself.
    Please 'play' with samples found in this forum. 

    If you run the 1st part of above command : bppllist -L -allpolicies  | egrep "^Policy Name: |^Active:" 
    You should see something like this:  (I have used nbsu bppllist output from a customer)

    Policy Name: ADHOC_UNIX
    Active: no
    Policy Name: ADHOC_WINTEL
    Active: yes
    Policy Name: XXX_CATALOG
    Active: yes
    Policy Name: LINUX_DEV
    Active: yes

    If you then add 
     |^Client/HW
    to the 'egrep' section, you will see the client names as well. 
    Adding 
    | grep -v no
    will exclude all inactive policies. 

    Yes, the output will look 'messy', but you can use your scripting skills to tidy up the output. 

    I have managed to do the following with output of bppllist -L -allpolicies > NBU_bppllist.txt :

    cat NBU_bppllist.txt |egrep "^Policy Name: |^Active: |^Client/HW" |grep -v no >active.txt
    cat active.txt |grep Client |awk '{print $2}'|sort -u

    Also have a look at this post: https://vox.veritas.com/t5/NetBackup/Need-active-backup-clients-list/td-p/502761#M116656