Veritas-bu

[Veritas-bu] Operator tape removal & backup scripts

2002-12-02 16:54:29
Subject: [Veritas-bu] Operator tape removal & backup scripts
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Mon, 2 Dec 2002 14:54:29 -0700
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C29A4D.639A6FA0
Content-Type: text/plain

The benefit for the operations staff is that I've figured out the command
line for them, for the most part, they run a one-word scriptname like
"inject_tapes".  The script itself does the lookups and presets for the
exact set of NB CLI commands.

One concern with your intentions for Monday morning is what is "all the
tasks needed".  This is, at best, a nebulous list.  I've got a post job
script that is run after every job and sends mail on failed jobs. I've also
got reports that run daily that report on both media errors & backup
failures in the aggregate.  For the most part, I handle all of these, I
don't leave it to the 24 Hr. staff.

The inject is pretty simple, it's built around the "vmupdate" command.

Here's the core of the inject:
  vmupdate -rn $robnum -rt $robtype -rh $robhost \
           -empty_ie \
           -use_barcode_rules \
           -involgrp $INVOLGRP \
           -outvolgrp $OUTVOLGRP 

Here's the core of the eject, built around vmchange:
        vmchange -rn $robnum -res -m $tapenum -mt dlt -e -sec 1
        vmchange -new_v $OUTVG -m $tapenum

...the first line is the eject and the second updates the volume group - the
first form is undocumented.  There's more to the script, of course, but it's
all just input checking, etc.  

By "vaulting", you'll have to define it further. Do you mean ordinary tape
rotation, ie: removal of full tapes and insertion of new empty ones, or do
you mean a set of duplicates (or originals) sent offsite & all the tracking
that entails?

As far as the other application start/stop, anything you can script can be
implemented.  Look for /usr/openv/netbackup/bin/bpstart_notify &
./bpend_notify in the admin guide.  They're client-side scripts that are run
pre- & post- backup, respectively.  I usually use the form:
bpstart_notify.classname and build specific classes (policies) for the
application sets.  You'll also want to limit the non-application backups on
those same servers to not accidentally backup the application stuff by using
either a specific filelist in the general OS class or by use of an
"exclude_list".

I'm willing to share anything I've written.  Yup - some of it was hard to
write - why should I cause anyone else pain?  I've posted a lot of scripts
here before, search the archives and you'll turn up a bunch.

-M
  

-----Original Message-----
From: Timothy Arnold [mailto:timothy.arnold AT becta.org DOT uk]
Sent: Monday, December 02, 2002 11:56 AM
To: 'Donaldson, Mark'; Timothy Arnold; 'veritas-bu AT mailman.eng.auburn DOT 
edu'
Subject: RE: [Veritas-bu] Operator tape removal & backup scripts


Mark, 

Thanks for this information, it is very useful!

>From my experiance with Netbackup, the command line is a quick and easy
method to achieve your desired result but with a cost that it is not
intuative and you have to know the exact command you want in order to
acomplish this. 

Ideally I would like a foolproof system which would allow an operator to
come into work on Monday morning and perform all the tasks needed - that is
my next question, what sort of tasks does an operator need to do to ensure
that everything is OK?

I would like, if possible to look at your inject and vaulting scripts. I
would guess not since you have spent alot of time on them ;) - what kind of
things do the scripts do, and how does the vaulting element work?

In regards to cold backup of oracle. How does this extend to other
applications? We use Veritas Cluster here and it would be very easy to
create scripts to stop/start services. Where do I place the scripts for
these?

Regards,

Tim.

<snip>

------_=_NextPart_001_01C29A4D.639A6FA0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] Operator tape removal &amp; backup =
scripts</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>The benefit for the operations staff is that I've =
figured out the command line for them, for the most part, they run a =
one-word scriptname like &quot;inject_tapes&quot;.&nbsp; The script =
itself does the lookups and presets for the exact set of NB CLI =
commands.</FONT></P>

<P><FONT SIZE=3D2>One concern with your intentions for Monday morning =
is what is &quot;all the tasks needed&quot;.&nbsp; This is, at best, a =
nebulous list.&nbsp; I've got a post job script that is run after every =
job and sends mail on failed jobs. I've also got reports that run daily =
that report on both media errors &amp; backup failures in the =
aggregate.&nbsp; For the most part, I handle all of these, I don't =
leave it to the 24 Hr. staff.</FONT></P>

<P><FONT SIZE=3D2>The inject is pretty simple, it's built around the =
&quot;vmupdate&quot; command.</FONT>
</P>

<P><FONT SIZE=3D2>Here's the core of the inject:</FONT>
<BR><FONT SIZE=3D2>&nbsp; vmupdate -rn $robnum -rt $robtype -rh =
$robhost \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
-empty_ie \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
-use_barcode_rules \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
-involgrp $INVOLGRP \</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
-outvolgrp $OUTVOLGRP </FONT>
</P>

<P><FONT SIZE=3D2>Here's the core of the eject, built around =
vmchange:</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vmchange =
-rn $robnum -res -m $tapenum -mt dlt -e -sec 1</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vmchange =
-new_v $OUTVG -m $tapenum</FONT>
</P>

<P><FONT SIZE=3D2>...the first line is the eject and the second updates =
the volume group - the first form is undocumented.&nbsp; There's more =
to the script, of course, but it's all just input checking, etc.&nbsp; =
</FONT></P>

<P><FONT SIZE=3D2>By &quot;vaulting&quot;, you'll have to define it =
further. Do you mean ordinary tape rotation, ie: removal of full tapes =
and insertion of new empty ones, or do you mean a set of duplicates (or =
originals) sent offsite &amp; all the tracking that entails?</FONT></P>

<P><FONT SIZE=3D2>As far as the other application start/stop, anything =
you can script can be implemented.&nbsp; Look for =
/usr/openv/netbackup/bin/bpstart_notify &amp; ./bpend_notify in the =
admin guide.&nbsp; They're client-side scripts that are run pre- &amp; =
post- backup, respectively.&nbsp; I usually use the form: =
bpstart_notify.classname and build specific classes (policies) for the =
application sets.&nbsp; You'll also want to limit the non-application =
backups on those same servers to not accidentally backup the =
application stuff by using either a specific filelist in the general OS =
class or by use of an &quot;exclude_list&quot;.</FONT></P>

<P><FONT SIZE=3D2>I'm willing to share anything I've written.&nbsp; Yup =
- some of it was hard to write - why should I cause anyone else =
pain?&nbsp; I've posted a lot of scripts here before, search the =
archives and you'll turn up a bunch.</FONT></P>

<P><FONT SIZE=3D2>-M</FONT>
<BR><FONT SIZE=3D2>&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Timothy Arnold [<A =
HREF=3D"mailto:timothy.arnold AT becta.org DOT uk">mailto:timothy.arnold@becta.=
org.uk</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, December 02, 2002 11:56 AM</FONT>
<BR><FONT SIZE=3D2>To: 'Donaldson, Mark'; Timothy Arnold; =
'veritas-bu AT mailman.eng.auburn DOT edu'</FONT>
<BR><FONT SIZE=3D2>Subject: RE: [Veritas-bu] Operator tape removal =
&amp; backup scripts</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Mark, </FONT>
</P>

<P><FONT SIZE=3D2>Thanks for this information, it is very =
useful!</FONT>
</P>

<P><FONT SIZE=3D2>From my experiance with Netbackup, the command line =
is a quick and easy method to achieve your desired result but with a =
cost that it is not intuative and you have to know the exact command =
you want in order to acomplish this. </FONT></P>

<P><FONT SIZE=3D2>Ideally I would like a foolproof system which would =
allow an operator to come into work on Monday morning and perform all =
the tasks needed - that is my next question, what sort of tasks does an =
operator need to do to ensure that everything is OK?</FONT></P>

<P><FONT SIZE=3D2>I would like, if possible to look at your inject and =
vaulting scripts. I would guess not since you have spent alot of time =
on them ;) - what kind of things do the scripts do, and how does the =
vaulting element work?</FONT></P>

<P><FONT SIZE=3D2>In regards to cold backup of oracle. How does this =
extend to other applications? We use Veritas Cluster here and it would =
be very easy to create scripts to stop/start services. Where do I place =
the scripts for these?</FONT></P>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>

<P><FONT SIZE=3D2>Tim.</FONT>
</P>

<P><FONT SIZE=3D2>&lt;snip&gt;</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C29A4D.639A6FA0--

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