Veritas-bu

[Veritas-bu] How to find amount of data backed up by all clients in a server in a week.

2003-09-08 13:24:22
Subject: [Veritas-bu] How to find amount of data backed up by all clients in a server in a week.
From: david.chapa AT adic DOT com (David Chapa)
Date: Mon, 8 Sep 2003 11:24:22 -0600
I wrote this a long, long time ago....it should still work...

HTH
-David

#!/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, Personal Archives
#
# 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

-----Original Message-----
From: Balasubramanian Krishnamurthy [mailto:krish AT synopsys DOT com] 
Sent: Monday, September 08, 2003 10:48 AM
To: veritas list
Subject: [Veritas-bu] How to find amount of data backed up by all
clients in a server in a week.

Hi,

I am trying to find out the amount of data that was backed up by all
clients
in a week.
Is there a command to do this.? Or could I find out the amounts for all
clients in the last full ?
I am trying to size the server and need to find out amount of data
backed up
by clients and the database sizes for
Various netbackup servers.

Most of the servers are 4.5 and some are 3.4


Thanks

Bala Krishnamurthy
krish AT synopsys DOT com

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


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