This message is in MIME format.
---MOQ997900933b54c19a1d2cf4f96923548d324b0d2d6
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
Are you trying to get a report of AMOUNT of data per
client that was writtent to backup??
I haven't used this script in a while, and I don't even
have it on my website for download.
You are welcome to see if this will give you what you
are looking for.
I use bperror to get my information about the Kbytes
backedup, etc.
If it works for you, please let me know and I'll make
it available on my website.
thanks
David
Quoting Wesley Brown <wbrown AT cyrusone DOT com>:
> Ok, We don't have the reporter module for netbackup.
I 'm trying to
> parse the bpimmedia - U or the bpimagelist -L output
into a database.
> Has anyone else done this? I can't seem to get
consistent data fields
> from ether the fragments throw me off something awful.
>
> Thanks,
> Wesley Brown
> MS-SQL DBA
> CyrusOne LLC
> http://www.cyrusone.com
> _______________________________________________
> Veritas-bu maillist - Veritas-
bu AT mailman.eng.auburn DOT edu
>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-
bu
>
<><><><><><><><><><><><><><><><><><><><>
David A. Chapa
Consulting Manager
DataStaff, Inc.
847 413 1144
http://www.consulting.datastaff.com
---------------------------------------
http://www.xbpadm-commands.com
NBU-LSERV AT datastaff DOT com - Adv. Scripting
---MOQ997900933b54c19a1d2cf4f96923548d324b0d2d6
Content-Type: text/plain; name="total_data_per_client"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="total_data_per_client"
#!/bin/ksh
#********************************************************************
# Filename: data_backed_up
#
# Purpose: Determine amount of data being backed up with
# NetBackup for both Full and Incremental
# schedules. Generates two reports in the
# /usr/openv/netbackup/special/logs/reports
# directory called fullbackups.rpt and
# incrmbackups.rpt
#
# Note: This script is modified to create reports
# for a given list of clients.
#
# Author: David A. Chapa, DataStaff, Inc.
#
# Revision History:
# 06/26/98 Initial Creation
# 11/17/98 dac:Updated design and added more functionality
#*******************************************************************
#
MASTER="MASTER SERVER NAME HERE"
someone_who_cares="YOU ARE HERE"
cl_file=/usr/openv/netbackup/special/data/cl_file
KBYTES=0
logdir=/usr/openv/netbackup/special/logs/data_backedup
FULLS=cl_file_fulls
INCRM=cl_file_incrm
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 "This reports on the last five days (120 hours) of backups for clients" >
$HEADER
echo "currently managed by $MASTER, that will be moved to the new NetBackup
server" >> $HEADER
echo "">> $HEADER
echo " CLIENT IP ADDR 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 of the number.
#
grep -v ^"\ \{2,\}[2-9]\{2\}" |
#
# This regular expression excludes any status code between 00 and 99
# with one space in front of the number
#
grep -v ^"\ \{1,\}[0-9]\{2\}" |
#
# This regular expression excludes any status code between 000 and 999
# with no spaces in front of the number
#
grep -v ^"[0-9]\{3\}" > $logdir/$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\}" > $logdir/$INCRM
dupclient=""
for i in $FULLS $INCRM
do
cat $logdir/$i | tail +2 | while read status client class schedule server date
time
do
# if [ "$client" != "$dupclient" ];then
grep $client $cl_file > /dev/null
if [ $? = 0 ];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
IPADDR=`bpclntcmd -hn $client | awk '{print $5}'`
printf '%-12s' $client >> $OUTPUT
printf '%-15s' $IPADDR >> $OUTPUT
printf '%12s' $KBYTES" " >> $OUTPUT
printf '%-14.11s' $class >> $OUTPUT
printf '%-12s' $schedule >> $OUTPUT
printf '%-9s' $date >> $OUTPUT
printf '%11s\n' $time >> $OUTPUT
fi
# fi
dupclient=$client
KBYTES=0
done
cat $HEADER > $logdir/$i.rpt
cat $OUTPUT >> $logdir/$i.rpt
#
# Uncomment this line if you would like it emailed to
# someone who cares.
#cat $logdir/$i.rpt | mailx -s "$i Report" $someone_who_cares
cp /dev/null $OUTPUT
done
---MOQ997900933b54c19a1d2cf4f96923548d324b0d2d6--
|