Forum Discussion

Dan_Giberson's avatar
15 years ago
Solved

Report for total Tb backed up daily

Hey guys,

I'm hoping someone can suggest a "quick and dirty" way to generate a report that tells me how much data I am backing up every day. Currently we are running NBU 7.01 with everything going to tape except our dailies which stage to disk then go to tape. What I am trying to do is generate some data that will show how much we are backing up every day so that we can look at some of the newer technologies like VLT etc...(also looking for some reading material on the current strategies).

I tried playing with OpsCenter a  bit, but found that it kept producing data for the wrong time period.

 

Any help, and or, reading material suggestions will be greatly appreciated as always.

 

Dan

  • 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!

  • OPscenter will give you the data for 60 days . If you have configured opscenter then you should able to get the report ..

    Click on the Reports Tab and select "Job Reports" in that go to 'Job Details' you will able to see the backup size for all the clients.

    Even from the below you can able to get the details

    go to the reports tab in the click on "Client Reports" go for the "Jobs by application" there you can able to see the size of the backup client wise.

  • Script will take the number of days as an input variable otherwise defaults to 7 e.g. ./script_name 2 to run for last two days. If necessary you could hardcode it to amend the bpimagelist command to utilse start & end dates (-d & -e options) if you need specific time periods.

    #!/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

  • 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!

  • z=0

    for x in $(/usr/openv/netbackup/bin/admincmd/bpimagelist -U -hoursago 64 | grep -v "^[KB-]" | awk  { print $5 }')

    do

    z=$(( $x + z ))

    done

    echo $z | /usr/bin/mail -s "Daily backup amount" someonewhocares@mydomain.com  

     

     

    Set the hoursago to what you need.  This one is for my weekend backups which start 64 hours before I run this.

    you can do a daily for 24 hours.

    you can append it to a two column file of date and total that can be put into a spreadsheet for charting

    or just take the total each day and add it to your spreadsheet. 

  • Thanks Andy...the script wasn't playing well with Powershell, so for now I am using your second choice, but I will be working on a proper Powersheel script which I will post in the future.