Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

bplist

Created: 20 Sep 2012 | 15 comments
Darklord's picture

hi everyone,

Everyday windows team provides a list of 200 servers to check for latest system state backup so that they can go ahead and perform some patching activity. so we sit and check all the servers if they are having system state backups and its eating a lot of time to check those things. I just came through this bplist command and tried it but i couldnt crack it.

My master server is AIX nbu version 6.5.5

My requirement is to know what drives are getting backed up

Eg : C:/ , D:/ , System State:/

when i try bplist it says

bash-4.1# ./bplist -C wm-flor-ap612.b-disney.pvt -R -t 13 -s 09/12/2012 -e 09/13/2012 -nt_files /System
EXIT STATUS 227: no entity was found
 

I will be glad if anyone can suggest me what we can do for this asap!!!!

Thanks in advance :)

Comments 15 CommentsJump to latest comment

Darklord's picture

Wanted to add up one more thing. since i have many policies i wont be able to add up the policy names for each and every client

mph999's picture

Try this example, but add -t 13 onto the commands (example was on unix and didn't need the -t option )

http://www.symantec.com/docs/TECH145113

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Darklord's picture

Hi Martin,

Thanks for the reply but it dint work. I get the same output. Im trying to get info only for a windows client from a AIX master server.

Since i have many client policies i will not be able to use -k.

cs-flor-bm01:/usr/openv/netbackup/bin# bplist -R 99 -C WM-FLOR-AP545-b.disney.pvt -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/"
EXIT STATUS 227: no entity was found
 

From the link you sent me.i dint get what i need

Darklord's picture

Martin,

When i tried this below command i get huge info which i don't need :)

it is not allowing me to grep with system state 

bash-4.1#  bplist -R 99 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -i state

drwx------ root      root                0 Sep 12 08:05 /System State/
drwx------ root      root                0 Sep 12 08:05 /System State/System Files/
-rwx------ root      root                0 Sep 12 08:05 /System State/System Files/System Files
drwx------ root      root                0 Sep 12 08:07 /System State/Registry/
-rwx------ root      root                0 Sep 12 08:07 /System State/Registry/Registry
drwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/
-rwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/COM+ REGDB
drwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/
-rwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/IISMETABASE
drwx------ root      root                0 May 16  2011 /D/wprog/RPASClient/RPASServer/devkit/include/boost/statechart/
drwx------ root      root                0 May 16  2011 /D/wprog/RPASClient/RPASServer/devkit/include/boost/statechart/detail/
-rwx------ root      root                0 Sep 12 08:08 /C/Program Files/HP Openview/data/conf/fsmstate.xml
-rwx------ root      root             2256 Sep 12 08:04 /C/Program Files/Symantec AntiVirus/SerState.dat
-rwx------ root      root             2256 Sep 12 08:00 /C/Program Files/Symantec AntiVirus/SerState.dat.bak
drwx------ root      root                0 Jun 19 16:19 /C/WINDOWS/inf/000/aspnet_state/
drwx------ roo

Darklord's picture

Martin,

i somehow cracked the command but still i get partial result. i need only first line in the output

bash-4.1#  bplist -R 99 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -L "/System State/"
drwx------ root      root                0 Sep 12 08:05 /System State/
drwx------ root      root                0 Sep 12 08:05 /System State/System Files/
-rwx------ root      root                0 Sep 12 08:05 /System State/System Files/System Files
drwx------ root      root                0 Sep 12 08:07 /System State/Registry/
-rwx------ root      root                0 Sep 12 08:07 /System State/Registry/Registry
drwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/
-rwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/COM+ REGDB
drwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/
-rwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/IISMETABASE
 

mph999's picture

OK, give me a few minutes.

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
CRZ's picture

Since you don't need to traverse the directories, change the "-R 99" command line switch to "-R 1" (or is it "-R 2?") to lower the recursion to just the root.  (I THINK that's right.  I'm sure Martin will be along to confirm or correct soon)

Veritas NetBackup (tm) 6.5 Commands for UNIX and Linux
 http://symantec.com/docs/TECH52832

bplist and its options are on pages 178-184.


bit.ly/76LBN | APPLBN | 75LBN

mph999's picture

Yes, I think -R 1 or perhaps -R 2 as below, or failing that just use |head -1 to get the first line.

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
mph999's picture
bash-4.1#  bplist -R 99 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -L "/System State/"
drwx------ root      root                0 Sep 12 08:05 /System State/
drwx------ root      root                0 Sep 12 08:05 /System State/System Files/
-rwx------ root      root                0 Sep 12 08:05 /System State/System Files/System Files
drwx------ root      root                0 Sep 12 08:07 /System State/Registry/
-rwx------ root      root                0 Sep 12 08:07 /System State/Registry/Registry
drwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/
-rwx------ root      root                0 Sep 12 08:07 /System State/COM+ Class Registration Database/COM+ REGDB
drwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/
-rwx------ root      root                0 Sep 12 08:07 /System State/Internet Information Services/IISMETABASE
 
 
OK, as you can see the bplist /flist commands are very difficult to get to work, which is why the TN I posted was created.
 
Coulple of things you can try:
 
bplist -R 99 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -L "/System State/" |head -1
 
or
 
bplist -R 1 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -L "/System State/"
 
or
 
bplist -R 2 -C WM-FLOR-AP545-b.disney.pvt -t 13 -l -s 09/12/2012 01:00:00 -e 09/12/2012 23:59:59 -l "/" | grep -L "/System State/"
 
Regards,
 
Martin
Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Nicolai's picture

Some other bplist examples:

http://www.mass.dk/netbackup/quick-hints/75-bplist-a-handy-tool-for-the-netbackup-admin.html

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

Darklord's picture

Thanks martin,

Now i want to make this as a script so that i can check all the servers at once. help me out if you are familiar with the coding

bash-4.1# cat system_state_checktry.sh
#!/bin/sh
startdate=`YESTERDAY=$(TZ=EST23EDT date)`
echo $startdate
#location='/home/hcladmin/servers.txt'
servers="xx-xx-xx057"
for i in $servers
do
echo $i
/usr/openv/netbackup/bin/bplist  -l  -R  -C $i -s $startdate -t 13 "/" | grep -L "/System State/Registry/" >> /home/hcladmin/system_state_output
if [ $? = 0 ]
then
echo "Below are the recent SS Backup for client $i "
cat /home/hcladmin/system_state_output
else
echo "No System State Backup Between these date for Client $i "
fi
done
 and the output is

bash-4.1# ./system_state_checktry.sh

xx-xxxx-xx057
Invalid start date: -t 13
EXIT STATUS 144: invalid command usage
No System State Backup Between these date for Client xx-xxxx-xx057

Andy Welburn's picture

Looks to me like it didn't set a value to your 'startdate' variable ..... nothing from echo $startdate

What is startdate=`YESTERDAY=$(TZ=EST23EDT date)` *supposed* to do?

Darklord's picture

Hi Andy,

That was a command i got it from google. if i use that command; yesterday's date will be displayed.

raj08's picture

Hi,

I dont know how `YESTERDAY=$(TZ=EST23EDT date)` works as I am not familiar with AIX. But if this command gives you yesterdays date in your normal shell. Then the issue may be with "/bin/sh".

Either you need to give the full path of the command or you need to check if `YESTERDAY=$(TZ=EST23EDT date)` command works in sh.

Did you check your login shell where it got successful?

..RAJ

..Raj

Yasuhisa Ishikawa's picture

How about below?

#!/bin/sh
startdate=`perl -e '@t=localtime(time()-86400);printf("%02d/%02d/%04d",$t[4]+1,$t[3],$t[5]+1900)'`
servers="xx-xx-xx057"
for i in $servers
do
/usr/openv/netbackup/bin/bplist  -l  -R  -C $i -s $startdate 00:00:00 -e $startdate 23:59:59 -t 13 "/" | grep -L "/System State/Registry/" >> /home/hcladmin/system_state_output
if [ $? = 0 ]
then
echo "Below are the recent SS Backup for client $i "
cat /home/hcladmin/system_state_output
else
echo "No System State Backup Between these date for Client $i "
fi
done
 

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan