Hey, I just figured out how to total up the number of GB I'm backing up nightly all in one simple script. I realize there many ways of doing this already but most require you to export data to something else to add up all the savesets. Plus, I'm not big on UNIX scripting so this was a significant accomplishment for me.
Anyone interested, Please take a look:
hermxl1
#!/bin/ksh
SEARCHDATE=$1
TOTAL=`mminfo -av -r 'savetime,totalsize' | grep $SEARCHDATE | awk '{sum += $2} END {print sum}'`
let TOTALGB=$TOTAL/1024/1024/1024
echo $TOTAL
echo On $SEARCHDATE $TOTALGB GB of data was backed up.
Anyone interested, Please take a look:
hermxl1
#!/bin/ksh
SEARCHDATE=$1
TOTAL=`mminfo -av -r 'savetime,totalsize' | grep $SEARCHDATE | awk '{sum += $2} END {print sum}'`
let TOTALGB=$TOTAL/1024/1024/1024
echo $TOTAL
echo On $SEARCHDATE $TOTALGB GB of data was backed up.