[Veritas-bu] NB script that show size of data backed up

Mark.Donaldson@cexp.com Mark.Donaldson at cexp.com
Wed Mar 16 18:21:40 CST 2005


Slight change, a redirect of STDERR to the bpimagelist fixes the output in
the event that there was no backup in the past 24 hours, a bump to the awk
scripts finish prints GB, MB, or KB as appropriate to neaten the output
(watch out for line-wrap issues, Exchange seems to add them whenever it
wants):

#!/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin/admincmd

for client in `bpplclients -allunique -noheader | awk '{print $3}'`
do
 bpimagelist -client $client -hoursago 24 -l 2>/dev/null| \
  awk 'BEGIN {sum=0}
  {if ($1=="IMAGE"){sum=sum+$19}}
  END {if(sum<10000){printf("%20s %10.1f KB\n","'$client'",sum)}else
   {if(sum<10000000){printf("%20s %10.1f MB\n","'$client'",sum/1024)}else
   {printf("%20s %10.1f GB\n","'$client'",sum/1024/1024)}}}'
done
exit



-----Original Message-----
From: Donaldson, Mark - Broomfield, CO 
Sent: Wednesday, March 16, 2005 5:06 PM
To: 'carrd at ijet.com'
Cc: veritas-bu at mailman.eng.auburn.edu
Subject: RE: [Veritas-bu] NB script that show size of data backed up


Here's a quick and dirty script to sum every client over the past 24 hours:

#!/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin/admincmd
for client in `bpplclients -allunique -noheader | awk '{print $3}'`
do
  bpimagelist -client $client -hoursago 24 -l | \
                   awk 'BEGIN {sum=0}
                   {if ($1=="IMAGE"){sum=sum+$19}}
                   END {printf("%20s %10d KB\n","'$client'",sum)}'
done
exit


Bah! Reporting products?  That's what "awk" is for!  :-)

-M


-----Original Message-----
From: veritas-bu-admin at mailman.eng.auburn.edu
[mailto:veritas-bu-admin at mailman.eng.auburn.edu]On Behalf Of
carrd at ijet.com
Sent: Wednesday, March 16, 2005 1:43 PM
Cc: veritas-bu at mailman.eng.auburn.edu
Subject: RE: [Veritas-bu] NB script that show size of data backed up


I was just looking for a daily tally. 

-----Original Message-----
From: Ed Wilts [mailto:ewilts at ewilts.org]
Sent: Wednesday, March 16, 2005 3:41 PM
To: David Carr
Cc: veritas-bu at mailman.eng.auburn.edu
Subject: Re: [Veritas-bu] NB script that show size of data backed up


On Wed, Mar 16, 2005 at 02:44:13PM -0500, carrd at ijet.com wrote:
> I am looking for a script that shows the size of the data backed up per
client. We are using NetBackup 4.5 on Solaris master with Windows, Linux and
Solaris clients.

NetBackup does a pretty poor job of reporting out of the box, and
depending on what kind of time period you're looking at, it won't do it
at all.

We went with a 3rd party reporting product that gives us excellent
reporting functionality over wide user-defined time periods.  Management
loves the pretty pictures and techies love looking at the raw growth
numbers (grouped by whatever whatever you want/need).

http://www.aptare.com

        .../Ed

-- 
Ed Wilts, Mounds View, MN, USA
mailto:ewilts at ewilts.org

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



More information about the Veritas-bu mailing list