cancel
Showing results for 
Search instead for 
Did you mean: 

Need active backup clients list

susindran_surul
Level 6

Hi Folks,

I need to take out only active backup clients for my licence renewel process.

-->We have more then 600 clients and some of the clients is decommisoned.

---->We may forgot to remove client from the list(Summary of all backup policies).

I need only active client name,policy and client.Is there any way to take out.

 

Thanks,

Susi.S

2 ACCEPTED SOLUTIONS

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

I have another idea - you can see all deactivated policies in the GUI, right?

Make a list of the policy names, the go to /usr/openv/netbackup/db/class. 
All policies are represented as folders in this directory.
Move all inactive policies to a non-NBU folder.
Best to do this with GUI closed and NBU shut down.

If you now start NBU and list clients (bpplclients -allunique .....) you will only see clients in active policies.

PS: No need to keep deactivated policies for decommissioned clients around. There is no need for policies to exist in order to perform restores.

View solution in original post

Andy_Welburn
Level 6

Marked Mariannes post as the solution as it looked like that was the way you were intending to go, but just for completeness, & as promised, a cobbled together script using the correct commands in the right places.

Based on the command you'd already got (which I believe came from an earlier post of Martins)

for POLICY in `bppllist -U -verbose -allpolicies | egrep '^Policy Name|Active' | awk '/Active.*yes/{print x};{x=$3}'`
do
bpplclients $POLICY -noheader | awk '{print $3}' >> /tmp/active_clients.tmp
done
sort -u /tmp/active_clients.tmp
rm /tmp/active_clients.tmp

 

[[Editted]]

View solution in original post

11 REPLIES 11

Andy_Welburn
Level 6

You'll probably need something along the lines of bpplinfo to produce a list of 'Active' policies & then bpplist to list out the clients of those policies. Obviously it cannot cater for any clients that you are still backing up that you shouldn't be!

If I was at work I'd try to cobble something together but ....

susindran_surul
Level 6

I got some commands to list out only active policy and wantto know what & all server using that policy..Any idea..

 

sudo /usr/openv/netbackup/bin/admincmd/bppllist -U -verbose -allpolicies |egrep '^Policy Name|Active' |awk '/Active.*yes/{print x};{x=$0}'

 

Thanks,

Susi.S

Andy_Welburn
Level 6

Sorry, my mistake - said I wasn't at work got my bppl commands mixed up! - you could try using that list of active policies in conjunction with bpplclients

Marianne
Level 6
Partner    VIP    Accredited Certified

I have another idea - you can see all deactivated policies in the GUI, right?

Make a list of the policy names, the go to /usr/openv/netbackup/db/class. 
All policies are represented as folders in this directory.
Move all inactive policies to a non-NBU folder.
Best to do this with GUI closed and NBU shut down.

If you now start NBU and list clients (bpplclients -allunique .....) you will only see clients in active policies.

PS: No need to keep deactivated policies for decommissioned clients around. There is no need for policies to exist in order to perform restores.

susindran_surul
Level 6

Thanks Marianne.This is the best way to check the details,..I am bit lazy thats why planed to go for command with script..ANy way i will take client list with use of your tips :)

Andy_Welburn
Level 6

Marked Mariannes post as the solution as it looked like that was the way you were intending to go, but just for completeness, & as promised, a cobbled together script using the correct commands in the right places.

Based on the command you'd already got (which I believe came from an earlier post of Martins)

for POLICY in `bppllist -U -verbose -allpolicies | egrep '^Policy Name|Active' | awk '/Active.*yes/{print x};{x=$3}'`
do
bpplclients $POLICY -noheader | awk '{print $3}' >> /tmp/active_clients.tmp
done
sort -u /tmp/active_clients.tmp
rm /tmp/active_clients.tmp

 

[[Editted]]

susindran_surul
Level 6

Thanks Andy for your help...Perfect...

Twinkle_Sapra
Level 5
Certified

 

1st Script 

Below script will produce the active policy list and deactivated policy list

#!/bin/sh
rm /tmp/classstatus
bppllist=/usr/openv/netbackup/bin/admincmd/bppllist
bpplinfo=/usr/openv/netbackup/bin/admincmd/bpplinfo
classlist=/tmp/classlist
classstatus=/tmp/classstatus
active_policy_list=/tmp/active_policy_list
deactive_policy_list=/tmp/deactive_policy_list
$bppllist > $classlist
for policy in `cat  $classlist`
do
state=`$bpplinfo $policy -L | grep Active | awk '{print $2}'`
if [ "$state" = "yes" ]
then
status="Yes $policy is active"
echo "$policy" >> $active_policy_list
else
status="No  $policy is not active"
echo "$policy" >> $deactive_policy_list
fi
echo "$status" >> $classstatus
done
 

2nd script 

 

Below script will produce the clients from active policy list
 

 for i in `cat /tmp/active_policy_list`;do sudo bpplclients $i -noheader | awk '{print $3}';done 

 

 

 

susindran_surul
Level 6

Hi Twinkle,

 

It will be better.Ii prints corresponding policy name with client on the output.

 

Because same server having two or 3 policies suppose it should be on database client.

 

Thanks,

Susi.S

Andy_Welburn
Level 6

It will be better.Ii prints corresponding policy name with client on the output.

Isn't that "moving the goalposts" a little? wink

Twinkle_Sapra
Level 5
Certified

Vote the post if it works for You.