06-22-2021 08:12 AM
Anyone knows the command to list netbackup clients with their backup set.
i want to run the command in NBU server to generate list
please post or email me "swaqar@tangerine.ca"
06-22-2021 08:38 AM
Are you looking for something like the script check_coverage? This lists clients and the policies/backup selection that they are protected by.
06-22-2021 08:44 AM
No the script check coverage. Just a simple NBU command to list all the clients and respective backup set. I used the following commands that did not help
-bppclients ( this did not give you everything even not all the hosts)
06-22-2021 12:07 PM - edited 06-22-2021 01:09 PM
I haven't seen/heard about any simple command which does this. But you could cook up an easy enough script. Below is something to get you started (in BASH, as my servers are RHEL, syntax not verified):
get a list of clients
/usr/openv/netbackup/bin/admincmd/bpplclients -allunique -noheader | sort -k 3.1 | awk '{print $3,$1,$2}' > ${CLIENT_LIST}
use the list of clients and loop over each client to get the policy(ies) that protect them
for client in `cat ${CLIENT_LIST}`
do
echo "${CLIENT}"
/usr/openv/netbackup/bin/admincmd/bppllist -byclient ${client} -U | grep "^Policy Name" | awk '{print $3}'
done
Good luck!
06-22-2021 12:42 PM
Look like this script will grab the policy information per client. I could be wrong.
If this will generate the clients with their associate backup set for each, that will be awesome.
I will wait for your feed back before execute.
06-22-2021 01:08 PM
The first command generates the list of all unique clients on your master. I usually direct it to a file.
Second command uses the client list generated above, and prints out policy(ies) which backs up each client.
NB: You will need to add/edit to get the output in the format you want. I added some code to separate out the policies for clients.
06-22-2021 03:26 PM
Hi @swaqar
Can you clarify what you are expecting/wanting to see in the output? Providing an example output of what you want will help us help you. e.g.
client1 policy1, policy2
client2 policy2
It is probably that there is no single command that will produce this, although depending on what you want there may be an OpsCenter report that could (may require customer sql though).
Thanks
David
06-22-2021 11:43 PM
This command will show you all the backups policies configured for all clients
bppllist -allpolicies -U
But if what you are looking for is all he backups that have been completed for each client..
bpimagelist is the command you need.
06-22-2021 11:49 PM - edited 06-22-2021 11:52 PM
There are several commands to get client/file list.
The main problem with policies is that If you use filters, you can not get full client list. (VM, databases etc)
I vote for bpimagelist
06-23-2021 12:59 AM - edited 06-23-2021 01:47 AM
I am in favor of bpimagelist as well. But output needs formatting
Command will list all images (backups) made between the -d and -e and extract some information. See the the "How to interpret .." below.
bpimagelist [-d mm/dd/yyyy hh:mm:ss] [-e mm/dd/yyyy hh:mm:ss] | grep IMAGE | awk '{ print $2" "$7" "$11" "$19}'
Also see tech note "How to interpret the different fields in "bpimagelist -l" output?"
https://www.veritas.com/support/en_US/article.100017904