Forum Discussion

ericcruz_telus's avatar
2 years ago

command to list active backup and client name

how to list the active policy and its client name via CLI

  • Hi DPeaco 

    To see the VM query filter, look at the INCLUDE string for the polilcy, the first string after INCLUDE should be "vmware:/?filter=" followed by the filter string. I don't think you can assume that if the CLIENT is listed as MEDIA_SERVER then the policy is a VIP one - the key differentiator is the INCLUDE string.

    David

     

5 Replies

  • Hi ericcruz_telus 

    This topic has been asked and answered previously. A quick google search would have provided you with lots of solutions that have been asked here over the years.

    The command to use is bppllist and you will need to filter the output. There is no simple solution.

    Here is one simple shell command that will display what you are after (maybe not in the form you want)

    for p in `bppllist -U -verbose -allpolicies | egrep '^Policy Name|Active' | awk '/Active.*yes/{print x};{x=$3}'`; do
    bppllist $p | egrep '^CLASS|^CLIENT' | awk '{ print $1, $2 }' | sed 's/^CLASS/POLICY/'
    done

    The output of this will be a list something like (active policies with the clients from each policy): 

    POLICY Policy1
    CLIENT client1
    CLIENT client2
    POLICY Policy2 
    CLIENT client3
    ....

    Note that the output from intelligent policies (VMware, SQL & Oracle) may not show what you expect.

    The basis for that command came form the following post https://vox.veritas.com/t5/NetBackup/Command-line-to-find-all-clients-with-active-policies/td-p/651483

    Cheers
    David

    • ericcruz_telus's avatar
      ericcruz_telus
      Level 2

      Hi David,

      I've seen this article but  I am curious if there is cli command to list it and not a shell script.

      • davidmoline's avatar
        davidmoline
        Level 6

        There is no specific command that will display what you want.

        You do not need to put the commands I provided into a  script - it can be run directly from a shell prompt.

  • Ah...!!! This is a good post!

    I was wondering about the following:

    How to check to see if a policy is a VM Query and not a client list?

    Best way to dump the list of VM Query hosts out of a bppllist if the only known client is MEDIA_SERVER?

    ericcruz_telus brings up a very good topic that I wish I had a really clean way to do that but as davidmoline  stated above, there's no clean/easy way to do just this.

    Maybe this post needs to be in a thread all its own, but it is directly related to the OP's curiosity. :) 

    • davidmoline's avatar
      davidmoline
      Level 6

      Hi DPeaco 

      To see the VM query filter, look at the INCLUDE string for the polilcy, the first string after INCLUDE should be "vmware:/?filter=" followed by the filter string. I don't think you can assume that if the CLIENT is listed as MEDIA_SERVER then the policy is a VIP one - the key differentiator is the INCLUDE string.

      David