Re: [Veritas-bu] command to figure out size of all backups in a given period
2010-07-15 12:25:01
I have a unix script that emails me the Total.
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 "Production Weekend Backups" someonewhocares AT
domain DOT com
set z to 0 so we start out at 0
What the for loop does.
Run the bpimagelist command (this will run for each server you have configured)
and get info back to 64 hours - I do 64 because I only run this for the weekend
backups. You would want two - one to run for 24 hours to get your daily backup
totals. And one to run for your weekend (or just do one each day))
It then greps for all lines except for the header (has a KB in it) or the
separator line which has a - in it)
Then we awk out column 5 which is the kb's backed up for each server. That
amount is the x variable
Add that x to z which started out as 0
And do it again, adding to z until you get the total for all you backed up in
the last number of hours.
Then it emails that total.
Which for me gets put into a chart once a week so I can watch how much we grow.
-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Heathe
Yeakley
Sent: Thursday, July 15, 2010 10:59 AM
To: VERITAS-BU AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] command to figure out size of all backups in a given
period
How much data was backed up in the last week
- /usr/openv/netbackup/bin/admincmd/bpimagelist -U -hoursago 336
How much data was backed up on April 26th
- /usr/openv/netbackup/bin/admincmd/bpimagelist -U -d 04/26/02
00:00:00 -e 04/27/02 00:00:00
How much data was backed up on client XYZ in the last week
- /usr/openv/netbackup/bin/admincmd/bpimagelist -U -client XYC -hoursago 168
- /usr/openv/netbackup/bin/admincmd/bpcatlist -client xxx
On Thu, Jul 15, 2010 at 1:25 AM, ddobek
<netbackup-forum AT backupcentral DOT com> wrote:
>
> I am using NBU 6.0 on a unix mst/media server, and i need to find out the
> size of all backups in a given week. I need to request disk size to have
> backups written to, as we change from using tape to disk for storage.
> i can use either the gui or command line, CLI is my preference is there is a
> command to find this info.
> thanks for the help.
>
> +----------------------------------------------------------------------
> |This was sent by devon_dobek AT mentor DOT com via Backup Central.
> |Forward SPAM to abuse AT backupcentral DOT com.
> +----------------------------------------------------------------------
>
>
> _______________________________________________
> Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
|
|