[Veritas-bu] Amount of Data backed up.
2001-02-20 10:28:26
Subject: |
[Veritas-bu] Amount of Data backed up. |
From: |
David A. Chapa david AT datastaff DOT com |
Date: |
Tue, 20 Feb 2001 09:28:26 -0600 |
This is a multi-part message in MIME format.
------=_NextPart_000_0023_01C09B1F.7A41FBD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Dan:
I have a script that I wrote a couple years ago that may do the trick with
some modifications.
David
PS. This will be up on the Adv. Script web soon
<><><><><><><><><><><><><><><><><><><><>
David A. Chapa
Consulting Manager
DataStaff, Inc.
847 413 1144
http://www.consulting.datastaff.com
---------------------------------------
NBU-LSERV AT datastaff DOT com - Adv. Scripting
-----Original Message-----
From: veritas-bu-admin AT Eng.Auburn DOT EDU
[mailto:veritas-bu-admin AT Eng.Auburn DOT EDU]On Behalf Of Sixbury, Dan
Sent: Tuesday, February 20, 2001 8:59 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Amount of Data backed up.
Sensitivity: Confidential
Is there a command or an easy way to determine how much data is backed up
every night?
I remember looking at this information on a per client basis, but I have
been asked to provide the current data being backed up for all clients per
night.
thanks,
Dan
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
------=_NextPart_000_0023_01C09B1F.7A41FBD0
Content-Type: application/octet-stream;
name="data_backed_up"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="data_backed_up"
#!/bin/ksh
#********************************************************************=20
# Filename: data_backed_up
#=20
# Purpose: Determine amount of data being backed up with=20
# NetBackup for both Full and Incremental
# schedules.
#
# Author: David A. Chapa, DataStaff, Inc.
#
# Revision History:
# 06/26/98 Initial Creation=20
# 11/17/98 dac:Updated design and added more functionality=20
#*******************************************************************
#
KBYTES=3D0
FULLS=3D/tmp/fullbackups
INCRM=3D/tmp/incrmbackups
HEADER=3D/tmp/workfil.kb
OUTPUT=3D/tmp/data_jobs
OUTPUT1=3D/tmp/data_backup_full
OUTPUT2=3D/tmp/data_backup_incrm
ALLBKUPS=3D/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 =
"=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" >> =
$HEADER
#
# Find the successful Backups (Status 0 and 1) minus any unnecessary =
data
#
#bperror -hoursago 120 -backstat -U| fgrep -vi daily | fgrep -v "(" |=20
#
bperror -hoursago 120 -backstat -U | fgrep -v "(" > $ALLBKUPS=20
#
# Find FULL Backups first
#
cat $ALLBKUPS | fgrep -vi daily |
#
# This excludes any status code between 2 and 9
# with two spaces in front to the number.
#
grep -v ^"\ \{2,\}[2-9]\{2\}" |=20
#
# This excludes any status code between 00 and 99
# with one space in front to the number
#
grep -v ^"\ \{1,\}[0-9]\{2\}" |=20
#
# This 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\}" |=20
grep -v ^"\ \{1,\}[0-9]\{2\}" |
grep -v ^"[0-9]\{3\}" > $INCRM
dupclient=3D""
for i in $FULLS $INCRM
do
cat $i | tail +2 | while read status client class schedule server date =
time
do
if [ "$client" !=3D "$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=3D`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=3D$client
KBYTES=3D0
done
cat $HEADER > $i.rpt
cat $OUTPUT >> $i.rpt
cp /dev/null $OUTPUT
done
------=_NextPart_000_0023_01C09B1F.7A41FBD0--
|
|
|