Forum Discussion

Praba_micro's avatar
12 years ago

Clients and backup selection

Hi All,


I would like to know if anyone has a script to get the backup selection alone for a specific set of clients in report format.

In other words a script to find backup selection of each client in Netbackup will be helpful.

 

Regards,
Prabaharan

  • * pseudocode, modify to fit your OS * # get all clients bpclient -All > /tmp/clientlist # get backup selection for each client for CLIENT in /tmp/clientlist do echo $CLIENT bppllist -byclient $CLIENT -U | grep "Include" done

6 Replies

  • Hi its very easy, if you will install OPSCENTER (comes with netbackup), and then click on Policies and take the report to your email ,having backup selections of all jobs

  • bppllist -allpolicies -U can be used to list your policies and the clients in them along with the paths backed up If you need it as a different type of listing then: bppllist on its own just pipes out a lits of policy names bpplinclude policyname -l will pipe out the file list for each policy so that you can see what is included against the policies Sure you could script something to give an output of the two to give what you need Hope this helps
  • * pseudocode, modify to fit your OS * # get all clients bpclient -All > /tmp/clientlist # get backup selection for each client for CLIENT in /tmp/clientlist do echo $CLIENT bppllist -byclient $CLIENT -U | grep "Include" done
  • Hi Prabaharan,

     
    You can use below commands to get filtered output with only details which needed.
     
    1) bppllist -byclient  clientname -L  | grep "Policy Name:" | awk '{print $3}'
    It'll give ouput of only policy name no additional information, see below eg.
     
    #-> ./bppllist -byclient   xyz.abc.com -L  | grep "Policy Name:" | awk '{print $3}'
    XYZ_POLICY
     
    Now run below command to get the backup selection.
     
    2) bpplinclude policyname -L  | awk '{print $2}'
    It'll only give output with backup selection, no extra details, see below eg.
     
    #-> ./bpplinclude XYZ_POLICY -L  | awk '{print $2}'
    ALL_LOCAL_DRIVES
    This will give you clear filtered output no extra/additional information.
    Only details you are looking for (backup selection, policy name for client)
    You can surely use these to script.
     
    Cheers...!
  • Thanks guys. I will try these over and will get back to you incase of queries.

  • This one gives the needed output but the backup selection get truncated....