cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the client NBu version form master?

amit30
Level 4
Certified

I would like to know how to get the Netbackup client version info from the master server by using script.


 


Requirement is like need to know version for clients.


 


ex:- for one master out of 300 servers i required info for 100.


 


so i am looking for script.


 


is there any script to get the information ?


2 ACCEPTED SOLUTIONS

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

You can use this script (originally provided by Mark Donaldson in veritas-bu mailing list some time ago):

 

#!/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd
echo "      Client         \t         OS Level        \t Release"
echo "=====================\t ========================\t ======="
for c in `bpplclients -allunique -noheader | awk '{print $3}'`
do
  bpgetconfig -s $c -L -A | \
    awk -F'=' '{if($1~/Client.OS/){os=$2}
                if($1~/Patch/)   {p=$2}
                if($1~/Protocol/){v=$2}}
                END { if(p~/^ *$/){r=v}else{r=p}
                      printf("%-22s\t%-25s\t%s\n","'$c'",os,r)} '
done
 
 
Master server needs to be able to connect to all clients - similar to loading Clients under Host Properties.

View solution in original post

Marianne
Level 6
Partner    VIP    Accredited Certified

"few servers"?

As in 100 clients as per your opening post?

Simply put the list of client names in a text file (e.g. /tmp/clients),

You may want to send output of
bpplclients -allunique -noheader | awk '{print $3}'
to a file (e.g. /tmp/clients),

bpplclients -allunique -noheader | awk '{print $3}' >/tmp/clients
then edit the file to delete the names you don't want.
(Sorry - there is no easy way - you need to compile the list of 
"few servers".)
 

Then replace this line in the script :
for c in `bpplclients -allunique -noheader | awk '{print $3}'`
with

for c in `cat /tmp/clients`

Hope this helps.

 

View solution in original post

6 REPLIES 6

Marianne
Level 6
Partner    VIP    Accredited Certified

You can use this script (originally provided by Mark Donaldson in veritas-bu mailing list some time ago):

 

#!/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd
echo "      Client         \t         OS Level        \t Release"
echo "=====================\t ========================\t ======="
for c in `bpplclients -allunique -noheader | awk '{print $3}'`
do
  bpgetconfig -s $c -L -A | \
    awk -F'=' '{if($1~/Client.OS/){os=$2}
                if($1~/Patch/)   {p=$2}
                if($1~/Protocol/){v=$2}}
                END { if(p~/^ *$/){r=v}else{r=p}
                      printf("%-22s\t%-25s\t%s\n","'$c'",os,r)} '
done
 
 
Master server needs to be able to connect to all clients - similar to loading Clients under Host Properties.

sri_vani
Level 6
Partner

Please try this

https://www-secure.symantec.com/connect/forums/how-get-client-nbu-version-form-master#comment-5605721

Courtesy of Mark Donaldson on the Veritas-bu mailing list:

# cat cl-version

#!/bin/ksh

PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd

echo "      Client         \t         OS Level        \t Release">> /tmp/cl.out

echo "=====================\t ========================\t =======" >>/tmp/cl.out

for c in `bpplclients -allunique -noheader | awk '{print $3}'`

do

  bpgetconfig -s $c -L -A | \

    awk -F'=' '{if($1~/Client.OS/){os=$2}

                if($1~/Patch/)   {p=$2}

                if($1~/Protocol/){v=$2}}

                END { if(p~/^ *$/){r=v}else{r=p}

                      printf("%-22s\t%-25s\t%s\n","'$c'",os,r)} ' >>/tmp/cl.out

done

Will_Restore
Level 6

ha-ha, "great minds" and all of that smiley

amit30
Level 4
Certified

Thanks for the script.

Its gives result for all clients under that master server .

What i am looking for if we required for few servers .

Please help....

Marianne
Level 6
Partner    VIP    Accredited Certified

"few servers"?

As in 100 clients as per your opening post?

Simply put the list of client names in a text file (e.g. /tmp/clients),

You may want to send output of
bpplclients -allunique -noheader | awk '{print $3}'
to a file (e.g. /tmp/clients),

bpplclients -allunique -noheader | awk '{print $3}' >/tmp/clients
then edit the file to delete the names you don't want.
(Sorry - there is no easy way - you need to compile the list of 
"few servers".)
 

Then replace this line in the script :
for c in `bpplclients -allunique -noheader | awk '{print $3}'`
with

for c in `cat /tmp/clients`

Hope this helps.

 

amit30
Level 4
Certified

Thanks

Its working . Its helps me .