Veritas-bu

[Veritas-bu] Backup Growth Stats

2005-12-28 10:59:20
Subject: [Veritas-bu] Backup Growth Stats
From: wtsmith AT maine DOT edu (Wayne T Smith)
Date: Wed, 28 Dec 2005 10:59:20 -0500
Paul Porcelli wrote, in part,  on 12/28/2005 10:13 AM:
> are there any Netbackup stats which will show me the amount of data backed up.
>
> I'm hoping to go as far back as possible and thus build up a picture of
> growth in the amount of data backed up over the last year.
>   

You could use the logs or jobs DB to calculate amount of data backed 
up.   I take a different tact and sum the size of images written on each 
of the past n days.  Note that images expire according to your retention 
policies, so how far back you can go depends on your shortest retentions 
(after that, this method understates the amount of data backed up, for 
it is really displaying the amount of data now in storage).

For example, I have a script named "GBperDay.rex" that runs daily.  It 
uses bpimagelist, grep and awk (Unix).  Here is a sample report:

          GigaBytes and KiloFiles of data backed up each day for preceding 4 
weeks
                                     (all clients)
 
   Date   GBytes Kfiles   Date   GBytes Kfiles   Date   GBytes Kfiles   Date   
GBytes Kfiles
 11/30/05    509   5661 12/07/05    495   5617 12/14/05    529   6475 12/21/05  
  511   6002
 12/01/05    515   6498 12/08/05    491   6807 12/15/05    577   7060 12/22/05  
  554   6751
 12/02/05   1246  10741 12/09/05   1033   9319 12/16/05   1159  10433 12/23/05  
 1103  10677
 12/03/05   2324  33430 12/10/05   2215  34080 12/17/05   2044  33295 12/24/05  
 2118  33471
 12/04/05    489   4828 12/11/05    371   3475 12/18/05    314   3382 12/25/05  
  291   3323
 12/05/05    377   4883 12/12/05    474   6194 12/19/05    428   5091 12/26/05  
  402   4841
 12/06/05    442   5613 12/13/05    510   6132 12/20/05    464   5411 12/27/05  
  243   4714


(Please note that the current day is often understated, for backups in progress 
or not yet started are not reported).

Here is "GBperDay.rex", a Rexx script, ... probably fairly easy to translate to 
your platform and language of choice:

#!/usr/local/bin/rexx
/* GBperDay.rex -- display the number of gigsbytes backed up for all clients
   for each day during the past 28 (4 weeks)

   2003-09-09 wts AT maine DOT edu

   Note: Using col 19 of IMAGE records instead of col 4 of FRAG records
   means we're measuring data backed up, not data stored which would
   include extra copies for offsite backup.

*/

daytoday = date('B')

say "          GigaBytes and KiloFiles of data backed up each day for preceding 
4 weeks"
say "                                     (all clients)"
say " "
say "   Date   GBytes Kfiles   Date   GBytes Kfiles   Date   GBytes Kfiles   
Date   GBytes Kfiles"
do i=daytoday-27 by 1 for 7 /* each of 7 days of a week */
   line = ''
   do j=i by 7 for 4
      call bpimagelist /* do j'th day w/result in "n." */
      line = line date("U",j,"B") ,
             format(word(d.1,1)/1024/1024,6,0),
             format(word(d.1,2)/1024,6,0)
      end
      say line
   end

j = daytoday-1  /* stash yesterday's values in a permanent record */
call bpimagelist
line = date("U",j,"B") format(word(d.1,1)/1024/1024,6,0),
                       format(word(d.1,2)/1024,6,0)
'echo' line '>> GBperDay.history'
exit 0

bpimagelist:  /* sum images and files for day "j"" */
              /* returns result pair in stem d.    */
address SYSTEM ,
   "/usr/openv/netbackup/bin/admincmd/bpimagelist -l",
      "-d" date("U",j,"B") "-e" date("U",j,"B"),
      "| grep IMAGE",
      "| awk ' {    totKB+=$19; totFiles+=$20 }",
          "END { print totKB, totFiles }'",
      with output stem d.
return

(end of "GBperDay.rex")

cheers, wayne


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