cancel
Showing results for 
Search instead for 
Did you mean: 

How to Detemine the Size of Backup

Faisal_Saleem
Level 4
Partner Accredited

Dear Experts

How to determine the size of Backups displaying in Catalog ?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

'Converter'!

Or something along the lines of:

#!/bin/ksh

PATH=$PATH:/usr/openv/netbackup/bin/admincmd

#command line or 7 days
daysago=${1:-7}

echo "================================================="
echo "Report client read totals for past $daysago days."
echo "=================================================\n"

hoursago=`expr $daysago \* 24`


bpimagelist -hoursago $hoursago | \
  awk 'BEGIN {tsum=0}
   {if($1=="IMAGE"){
    clientnames[$2]
    csum[$2]=csum[$2] + $19}}
   END { for (c in clientnames) {
        UNIT="KB"
        tsum=tsum+csum[c]
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="MB"}
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="GB"}
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="TB"}
        printf("%20s %10.2f %s\n",c,csum[c],UNIT)
       }
      UNIT="KB"
      if (tsum>10240) {tsum=tsum/1024;UNIT="MB"}
      if (tsum>10240) {tsum=tsum/1024;UNIT="GB"}
      if (tsum>10240) {tsum=tsum/1024;UNIT="TB"}
      print "========================================="
      printf("%20s %10.2f %s\n","Total of all Clients",tsum,UNIT)
    }'
exit

 

Which can give output in GB, MB or KB depending on the values concerned. Run as is (default 7 days) or with a variable of the number of days.

Not my script by the way - will try & find the source.

***EDIT***

Source: http://mailman.eng.auburn.edu/pipermail/veritas-bu/2009-April/104006.html

Have quoted this script once before - my other alternative being:

Just run a client backups report via the GUI for your chosen period & export it (disk icon) - you can soon total it up via "Excel" or whatever!

View solution in original post

7 REPLIES 7

Marianne
Level 6
Partner    VIP    Accredited Certified

Rather use Client Backup Report.

Specify selection criteria and run the report. It gives the size for each image.

Faisal_Saleem
Level 4
Partner Accredited

Dear Marianne

Thanks for your kind reply, if you could define me a little more in detail would be more beneficial.

 

babu_beesetty
Level 4

Hello Faisal,

Netbackup Mangement--Reports--Client Backups.

Untitled9.png

Faisal_Saleem
Level 4
Partner Accredited

Thanks babu

But it is giving me size in kilobytes, is there anything which can give me in mb's or gb's ? or will I have to use a converter everytime ?

Andy_Welburn
Level 6

'Converter'!

Or something along the lines of:

#!/bin/ksh

PATH=$PATH:/usr/openv/netbackup/bin/admincmd

#command line or 7 days
daysago=${1:-7}

echo "================================================="
echo "Report client read totals for past $daysago days."
echo "=================================================\n"

hoursago=`expr $daysago \* 24`


bpimagelist -hoursago $hoursago | \
  awk 'BEGIN {tsum=0}
   {if($1=="IMAGE"){
    clientnames[$2]
    csum[$2]=csum[$2] + $19}}
   END { for (c in clientnames) {
        UNIT="KB"
        tsum=tsum+csum[c]
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="MB"}
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="GB"}
        if (csum[c]>10240) {csum[c]=csum[c]/1024;UNIT="TB"}
        printf("%20s %10.2f %s\n",c,csum[c],UNIT)
       }
      UNIT="KB"
      if (tsum>10240) {tsum=tsum/1024;UNIT="MB"}
      if (tsum>10240) {tsum=tsum/1024;UNIT="GB"}
      if (tsum>10240) {tsum=tsum/1024;UNIT="TB"}
      print "========================================="
      printf("%20s %10.2f %s\n","Total of all Clients",tsum,UNIT)
    }'
exit

 

Which can give output in GB, MB or KB depending on the values concerned. Run as is (default 7 days) or with a variable of the number of days.

Not my script by the way - will try & find the source.

***EDIT***

Source: http://mailman.eng.auburn.edu/pipermail/veritas-bu/2009-April/104006.html

Have quoted this script once before - my other alternative being:

Just run a client backups report via the GUI for your chosen period & export it (disk icon) - you can soon total it up via "Excel" or whatever!

revarooo
Level 6
Employee

Divide by 1024

babu_beesetty
Level 4

Hello Faisal,

You can copy the Data to an excel and give the formula to conver the vaule. type the formula in first cell and drag it until the last row.

Untitled10.png