Veritas-bu

Re: [Veritas-bu] Any body have script to accomplish following ?

2010-08-20 10:27:25
Subject: Re: [Veritas-bu] Any body have script to accomplish following ?
From: "Chapa, David" <David.Chapa AT netapp DOT com>
To: "bolobaboo kabootar" <bolobaboo AT gmail DOT com>, <veritas-bu AT mailman.eng.auburn DOT edu>
Date: Fri, 20 Aug 2010 07:27:07 -0700
As you can see from the creation date, we're in the "way back machine"
on this one.

The construct should still work, Class is the policy - so you should be
able to tweak this one to get the output you're looking for.

Hope that helps

-chapa
------------------------------------------------------------------------
----

#!/bin/ksh
#******************************************************************** 
# Filename:     data_backed_up
# 
# Purpose:      Determine amount of data being backed up with 
#               NetBackup for both Full and Incremental
#               schedules.
#
# Author: David A. Chapa
#
# Revision History:
# 06/26/98      Initial Creation 
# 11/17/98      dac:Updated design and added more functionality 
#*******************************************************************
#
KBYTES=0
FULLS=/tmp/fullbackups
INCRM=/tmp/incrmbackups
HEADER=/tmp/workfil.kb
OUTPUT=/tmp/data_jobs
OUTPUT1=/tmp/data_backup_full
OUTPUT2=/tmp/data_backup_incrm
ALLBKUPS=/tmp/allbkups
#
if [ -f $OUTPUT ];then
rm $OUTPUT
fi
if [ -f $OUTPUT1 ];then
rm $OUTPUT1
fi
#
if [ -f $OUTPUT2 ];then
rm $OUTPUT2
fi
echo " CLIENT       KBytes      CLASS       SCHEDULE      DATE
COMPLETED" > $HEADER
echo
"=======================================================================
" >> $HEADER
#
#       Find the successful Backups (Status 0 and 1) minus any
unnecessary data
#
#bperror -hoursago 120 -backstat -U| fgrep -vi daily | fgrep -v "(" | 
#
bperror -hoursago 120 -backstat -U | fgrep -v "(" > $ALLBKUPS 
#
#       Find FULL Backups first
#
cat $ALLBKUPS | fgrep -vi daily |
#
#       This regular expression excludes any status code between   2 and
9
#       with two spaces in front to the number.
#
grep -v ^"\ \{2,\}[2-9]\{2\}" | 
#
#       This regular expression excludes any status code between  00 and
99
#       with one space in front to the number
#
grep -v ^"\ \{1,\}[0-9]\{2\}" | 
#
#       This regular expression excludes any status code between 000 and
999
#       with no spaces in front to the number
#
grep -v ^"[0-9]\{3\}" > $FULLS
#
#       Then puts all of this in a file called fullbackups
#
#       Now find the Incrementals
#
cat $ALLBKUPS | fgrep -vi weekly | fgrep -vi monthly | fgrep -vi year |
grep -v ^"\ \{2,\}[2-9]\{2\}" | 
grep -v ^"\ \{1,\}[0-9]\{2\}" |
grep -v ^"[0-9]\{3\}" > $INCRM

dupclient=""

for i in $FULLS $INCRM
do
cat $i | tail +2 | while read status client class schedule server date
time
do
  if [ "$client" != "$dupclient" ];then
        bperror -d $date -e $date $time -client $client -server $server
| grep Kbytes |
        awk -F\, '{print $4}' | awk '{print $1}' | while read total
         do
          KBYTES=`expr $total + $KBYTES`
         done
        printf '%-12s' $client >> $OUTPUT
        printf '%12s' $KBYTES"   " >> $OUTPUT
        printf '%-14.11s' $class >> $OUTPUT
        printf '%-12s' $schedule >> $OUTPUT
        printf '%-9s' $date >> $OUTPUT
        printf '%11s\n' $time >> $OUTPUT
  fi
dupclient=$client
KBYTES=0
done
cat $HEADER > $i.rpt
cat $OUTPUT >> $i.rpt
cp /dev/null $OUTPUT
done



David A. Chapa
Director, DP Strategy/Global Alliance

NetApp
720-272-8452 Mobile
chapa AT netapp DOT com
www.netapp.com

Read my blog at http://blogs.netapp.com/barandgrill 

Follow my tweets on twitter: http://www.twitter.com/davidchapa


-----Original Message-----
From: Chapa, David 
Sent: Friday, August 20, 2010 8:05 AM
To: bolobaboo kabootar; veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Any body have script to accomplish following ?

I'm sure I do somewhere...but it will be in ksh - since I'm old :-)

I'll do a quick search, if I find something I'll post it here.  You may
need to modify it for policy type.  I think I wrote the original to give
me per client, per schedule.

-chapa 


David A. Chapa
Director, DP Strategy/Global Alliance

NetApp
720-272-8452 Mobile
chapa AT netapp DOT com
www.netapp.com

Read my blog at http://blogs.netapp.com/barandgrill 

Follow my tweets on twitter: http://www.twitter.com/davidchapa


-----Original Message-----
From: bolobaboo kabootar [mailto:bolobaboo AT gmail DOT com]
Sent: Friday, August 20, 2010 7:57 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Any body have script to accomplish following ?

Hi
I have NBU 6.5 enviornment. I want report which lists client name and
total data as per policy type. Example ...which are excahnge client and
what is total data size , which are unix client and their data
size...etc ..Then at end give total size for entire enviornment.

Thank you.
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu