Veritas-bu

[Veritas-bu] the amount of backup data in the last 24h

2004-03-07 04:21:12
Subject: [Veritas-bu] the amount of backup data in the last 24h
From: scott.kendall AT abbott DOT com (scott.kendall AT abbott DOT com)
Date: Sun, 7 Mar 2004 03:21:12 -0600
This is a multipart message in MIME format.
--=_alternative 00338FC286256E50_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

here's a snippet from what I use.  you'll have to set the variable for=20
bpimagelist, hours and master or enter them in to what youd like...


# ******************************************************************
#       Add total backup kbytes to report
# ******************************************************************

$bpimagelist -U -hoursago $hours -M $master | tail +3 |

awk '{
    kbytes=3D kbytes + $5
}
END {
    mbytes=3D kbytes / 1024
    gbytes=3D mbytes / 1024
    tbytes=3D gbytes / 1024
    if (gbytes < 1024) {
        print "A total of",gbytes,"GB of data has been backed up during=20
the last",hours,"hours."
    } else {
        print "A total of",tbytes,"TB of data has been backed up during=20
the last",hours,"hours."
    }
}' hours=3D$hours



- Scott





"kurbis gemuse" <kurbisgemuse AT hotmail DOT com>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
03/05/2004 06:01 PM

=20
        To:     veritas-bu AT mailman.eng.auburn DOT edu
        cc:=20
        Subject:        [Veritas-bu] the amount of backup data in the last =
24h


Hi all! I'd like do know if is there another way to generate a result of=20
the=20
last 24 hours of backed up data in a Netbackup 4.5 Datacenter server.

Here's the code we have:


date > /tmp/backup.txt

echo "Backups executed in the last 24 hours" >> /backups.txt

/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep=20
"successfully wrote backup id" | awk '{bytes=3Dbytes + $20} END {print=20
"backed=20
up",bytes," Kbytes of data"}' >> /backups.txt

/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep=20
"successfully wrote backup id" | wc -l | awk '{print "Backups with sucess: =


",$1}' >> /backups.txt


I would like to know if this is the rightest way to do it or if is there a =


better way.


Tks

Kurbis

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
MSN Messenger: instale gr=E1tis e converse com seus amigos.=20
http://messenger.msn.com.br

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu



--=_alternative 00338FC286256E50_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"Arial">here's a snippet from what I use. &nbsp;y=
ou'll have to set the variable for bpimagelist, hours and master or enter t=
hem in to what youd like...</font>
<br>
<br>
<br><font size=3D2 face=3D"Arial"># ***************************************=
***************************</font>
<br><font size=3D2 face=3D"Arial"># &nbsp; &nbsp; &nbsp; &nbsp;Add total ba=
ckup kbytes to report</font>
<br><font size=3D2 face=3D"Arial"># ***************************************=
***************************</font>
<br>
<br><font size=3D2 face=3D"Arial">$bpimagelist -U -hoursago $hours -M $mast=
er | tail +3 |</font>
<br>
<br><font size=3D2 face=3D"Arial">awk '{</font>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; kbytes=3D kbytes + $5</font>
<br><font size=3D2 face=3D"Arial">}</font>
<br><font size=3D2 face=3D"Arial">END {</font>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; mbytes=3D kbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; gbytes=3D mbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; tbytes=3D gbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; if (gbytes &lt; 1024) {</fo=
nt>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; print &quot;A=
 total of&quot;,gbytes,&quot;GB of data has been backed up during the last&=
quot;,hours,&quot;hours.&quot;</font>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; } else {</font>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; print &quot;A=
 total of&quot;,tbytes,&quot;TB of data has been backed up during the last&=
quot;,hours,&quot;hours.&quot;</font>
<br><font size=3D2 face=3D"Arial">&nbsp; &nbsp; }</font>
<br><font size=3D2 face=3D"Arial">}' hours=3D$hours</font>
<br>
<br>
<br>
<br><font size=3D2 face=3D"Arial">- Scott</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>&quot;kurbis gemuse&quot; &lt;kur=
bisgemuse AT hotmail DOT com&gt;</b></font>
<br><font size=3D1 face=3D"sans-serif">Sent by: veritas-bu-admin AT mailman DOT 
en=
g.auburn.edu</font>
<p><font size=3D1 face=3D"sans-serif">03/05/2004 06:01 PM</font>
<br>
<td><font size=3D1 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbs=
p; &nbsp; &nbsp; &nbsp;veritas-bu AT mailman.eng.auburn DOT edu</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbs=
p; &nbsp; &nbsp; &nbsp;</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:=
 &nbsp; &nbsp; &nbsp; &nbsp;[Veritas-bu] the amount of backup data in the l=
ast 24h</font></table>
<br>
<br>
<br><font size=3D2 face=3D"Courier New">Hi all! I'd like do know if is ther=
e another way to generate a result of the <br>
last 24 hours of backed up data in a Netbackup 4.5 Datacenter server.<br>
<br>
Here's the code we have:<br>
<br>
<br>
date &gt; /tmp/backup.txt<br>
<br>
echo &quot;Backups executed in the last 24 hours&quot; &gt;&gt; /backups.tx=
t<br>
<br>
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep <br>
&quot;successfully wrote backup id&quot; | awk '{bytes=3Dbytes + $20} END {=
print &quot;backed <br>
up&quot;,bytes,&quot; Kbytes of data&quot;}' &gt;&gt; /backups.txt<br>
<br>
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep <br>
&quot;successfully wrote backup id&quot; | wc -l | awk '{print &quot;Backup=
s with sucess: <br>
&quot;,$1}' &gt;&gt; /backups.txt<br>
<br>
<br>
I would like to know if this is the rightest way to do it or if is there a =
<br>
better way.<br>
<br>
<br>
Tks<br>
<br>
Kurbis<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
MSN Messenger: instale gr=E1tis e converse com seus amigos. <br>
http://messenger.msn.com.br<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Veritas-bu maillist &nbsp;- &nbsp;Veritas-bu AT mailman.eng.auburn DOT edu<br>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu<br>
</font>
<br>
<br>
--=_alternative 00338FC286256E50_=--

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