09-20-2012 12:06 PM
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 :)
09-20-2012 12:19 PM
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
09-20-2012 12:25 PM
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
09-20-2012 02:16 PM
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
09-20-2012 02:36 PM
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
09-20-2012 03:12 PM
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
09-20-2012 03:17 PM
OK, give me a few minutes.
09-20-2012 03:21 PM
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)
bplist and its options are on pages 178-184.
09-20-2012 03:32 PM
Yes, I think -R 1 or perhaps -R 2 as below, or failing that just use |head -1 to get the first line.
09-20-2012 03:32 PM
09-21-2012 12:48 AM
Some other bplist examples:
http://www.mass.dk/netbackup/quick-hints/75-bplist-a-handy-tool-for-the-netbackup-admin.html
10-25-2012 05:28 AM
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
10-25-2012 06:07 AM
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?
10-26-2012 03:59 AM
Hi Andy,
That was a command i got it from google. if i use that command; yesterday's date will be displayed.
12-17-2012 01:01 PM
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
12-17-2012 11:49 PM
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