Veritas-bu

[Veritas-bu] Reporting scripts

2007-04-17 22:54:26
Subject: [Veritas-bu] Reporting scripts
From: jeff.cleverley at avagotech.com (Jeff Cleverley)
Date: Tue, 17 Apr 2007 20:54:26 -0600
Darren,

I actually feel better knowing that there wasn't a real easy solution 
:-)  I did some experimenting and came up with a way that seems 
relatively accurate for what I want.

 >>
cd /usr/openv/netbackup/db/images/
                                                                                
                            

if [ -f /tmp/stats ]
then
rm /tmp/stats
fi
                                                                                
                            

ls > /tmp/clients
for CLIENT in `cat /tmp/clients`
do
cat $CLIENT/STREAMS |grep -v ^T | awk '{print $2,$4,$8}' |grep -v ^0 
|sed 's/$/ '$CLIENT'/' >> /tmp/stats
done

<<

This gives me output looking like this for /stand on the host "silo-1":

1171155594 cumulative-inc /stand silo-1
1176858039 daily-inc /stand silo-1
1175908552 full /stand silo-1

The time stamps listed match the time the backup started to write.  I 
don't keep logs long enough to verify the cumulative and full backup 
times, but the daily-inc backups are correct.  With this raw data, I can 
start parsing and formatting in a number of ways.

I have been blessed with a number of session failures due to a faulty 
SAN switch, 1 known bad drive, and probably 1 more once I start 
rummaging through logs :-)  This has allowed me to see how this reacts 
to failed backups.  The failed backups do not show even though they ran 
after completed backups.  YMMV.

Jeff

Darren Dunham wrote:

>>I know things like this have been discussed but I haven't found a way to 
>>get what I want from the command line.  It looks like I need a little 
>>bit of output from bpdbjobs -all_columns, using the lastbackup column 
>>definition in the bp.conf file, and part of the bpcatlist command.  I 
>>have spent considerable time looking on the web and RTFM (several of 
>>them).  Here is what I'm trying to get.  If you know of a command that 
>>gives all of this or have a script that will dig all this up, I would 
>>greatly appreciate it.
>>
>>Client name, file system or mount point, last successful full date, last 
>>successful incremental date.  I want something like:
>>
>>client1,/,04/01/2007 19:20:00, 04/16/2007 20:00:03
>>client1,/mnt/data,04/01/2007 19:38:00, 04/16/2007 21:33:00
>>    
>>
>
>I don't have anything that does exactly that, but it's close.  I can at
>least tell you how I'm getting the data:
>
>Use 'bppllist' to get the list of clients in active policies.
>
>For each of those clients, get a list of images in the time frame of
>interest (can limit to full at this stage if you want) with 'bpimagelist'.
>
>For each of those images, use 'bpflist' to get the name of the first
>file in the backup.  That's normally the filesystem or directory that is
>being backed up.
>
>Sort the ones with the same name by date and report the last one.
>
>'bpdbjobs' would give you the filesystem mapping a bit more directly,

>but then you're limited to what's in the jobs list.  If you kept that
>and stored it in your own database, that would be easier to manipulate.
>I went to the file data because it hangs around longer.
>
>  
>
>>I'm guessing this is why Aptare and Bocada are in business :-)
>>    
>>
>
>Seems to be.  :-)
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.eng.auburn.edu/pipermail/veritas-bu/attachments/20070417/32e555dd/attachment.htm

<Prev in Thread] Current Thread [Next in Thread>