Veritas-bu

[Veritas-bu] bpduplicate tape selection question

2004-05-13 05:27:02
Subject: [Veritas-bu] bpduplicate tape selection question
From: ROHRBACH_MARTIN_NONLILLY AT Lilly DOT com (Martin Rohrbach NONLILLY)
Date: Thu, 13 May 2004 10:27:02 +0100
This is a multipart message in MIME format.
--=_alternative 0033EA2D80256E93_=
Content-Type: text/plain; charset="US-ASCII"

We have a seperate pool for the duplicated tapes as well but we're using a 
slightly simpler approach to identify the tapes to eject. 

The DUPLICATION pool just grabs tapes from SCRATCH. That way you can tell 
after the duplication that all tapes that are assigned and in the 
DUPLICATION pool and not in the library have to be ejected.

And yes, we think as well that it's worth having an additional tape with 
the catalog on it.

Regards

----
Martin Rohrbach
Storage Projects Analyst
Eli Lilly and Company
+44-(0)1256-775811





"Konstantin 'Kastus' Shchuka" <kastus AT epocrates DOT com>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
12/05/2004 20:32
 
        To:     veritas-bu AT mailman.eng.auburn DOT edu
        cc: 
        Subject:        Re: [Veritas-bu] bpduplicate tape selection 
question


On Wed, May 12, 2004 at 12:12:21PM -0700, Ben Rockwood wrote:
> Hello.
> 
> I'm working on building some offsite duplication scripts and 
> methodologies.  I'm hitting alittle hitch though.  I can't see how to 
> get bpduplicate to report which tape it selects for the duplication. 
> Currently, I tell it to use a tape out of the duplication pool (I'm just 

> using the default NB_Duplicate pool name) without specifying exactly 
> which tape to use... the idea is that I don't need to update the 
> duplication scripts daily/weekly with the tape id, I can just keep the 
> duplication pool full of tapes. 

I'm using the same approach of keeping a pool of tapes.

> But once the dup is done I can't find a 
> way of automating the discovery of which tape it used in order to eject 
> it.  I can visually scan the medialist and tell which one it used, but I 

> wouldn't want to script that method because it is inherently error 
prone. 
> Is there anyway for bpduplicate to output the tape it used?  Or should I 

> just invoke this thing manually.

I keep a copy of backup ids from bpduplicate command and then use a script
to find which tapes contain second copy of those backups.

bpduplicate is invoked as follows:

$BPDUPLICATE -dstunit $DSTUNIT -v -Bidfile $BIDLISTFILE -dp $POOL -L 
$BPDUPLOG

As bpduplicate deletes Bidfile, I create a second copy of $BIDLISTFILE
before executing bpduplicate.

After running bpduplicate I call

MEDIA=$(cat $BIDLISTFILESAVE | $MEDIALIST)

where MEDIALIST is the following script:

----------------------------------------------------------------
#!/usr/bin/perl
# find media ids where copies were written
#
while (<>) {
        open BPMEDIALIST, "/usr/openv/netbackup/bin/admincmd/bpimagelist 
-l -bac
kupid $_ |";
        while (<BPMEDIALIST>) {
                split ;
                $media{$_[8]} ++ if $_[0] eq 'FRAG' && $_[1] == 2 ;
        }
        close BPMEDIALIST;
}
foreach $evsn ( sort keys %media ) {
        print "$evsn ";
}
----------------------------------------------------------------


> 
> A little followup question... when doing offsites is it worthwhile/wise 
> to put a NB catalog backup on the offsite tape too?

I'm doing that. It takes an extra tape but in case you have to restore
everything from scratch, it helps.

Regards,
-- 
Konstantin 'Kastus' Shchuka
Unix System Administrator
ePocrates Inc.
tel 650.227.1786
fax 650.592.6995
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


--=_alternative 0033EA2D80256E93_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">We have a seperate pool for the duplicated
tapes as well but we're using a slightly simpler approach to identify the
tapes to eject. </font>
<br>
<br><font size=2 face="sans-serif">The DUPLICATION pool just grabs tapes
from SCRATCH. That way you can tell after the duplication that all tapes
that are assigned and in the DUPLICATION pool and not in the library have
to be ejected.</font>
<br>
<br><font size=2 face="sans-serif">And yes, we think as well that it's
worth having an additional tape with the catalog on it.</font>
<br>
<br><font size=2 face="sans-serif">Regards</font>
<br>
<br><font size=2 face="sans-serif">----</font>
<br><font size=2 face="sans-serif">Martin Rohrbach</font>
<br><font size=2 face="sans-serif">Storage Projects Analyst</font>
<br><font size=2 face="sans-serif">Eli Lilly and Company</font>
<br><font size=2 face="sans-serif">+44-(0)1256-775811<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>&quot;Konstantin 'Kastus' Shchuka&quot;
&lt;kastus AT epocrates DOT com&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: veritas-bu-admin AT 
mailman.eng.auburn DOT edu</font>
<p><font size=1 face="sans-serif">12/05/2004 20:32</font>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;veritas-bu AT mailman.eng.auburn DOT edu</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: [Veritas-bu] bpduplicate tape selection
question</font></table>
<br>
<br>
<br><font size=2><tt>On Wed, May 12, 2004 at 12:12:21PM -0700, Ben Rockwood
wrote:<br>
&gt; Hello.<br>
&gt; <br>
&gt; I'm working on building some offsite duplication scripts and <br>
&gt; methodologies. &nbsp;I'm hitting alittle hitch though. &nbsp;I can't
see how to <br>
&gt; get bpduplicate to report which tape it selects for the duplication.
&nbsp;<br>
&gt; Currently, I tell it to use a tape out of the duplication pool (I'm
just <br>
&gt; using the default NB_Duplicate pool name) without specifying exactly
<br>
&gt; which tape to use... the idea is that I don't need to update the <br>
&gt; duplication scripts daily/weekly with the tape id, I can just keep
the <br>
&gt; duplication pool full of tapes. &nbsp;<br>
<br>
I'm using the same approach of keeping a pool of tapes.<br>
<br>
&gt; But once the dup is done I can't find a <br>
&gt; way of automating the discovery of which tape it used in order to
eject <br>
&gt; it. &nbsp;I can visually scan the medialist and tell which one it
used, but I <br>
&gt; wouldn't want to script that method because it is inherently error
prone. <br>
&gt; Is there anyway for bpduplicate to output the tape it used? &nbsp;Or
should I <br>
&gt; just invoke this thing manually.<br>
<br>
I keep a copy of backup ids from bpduplicate command and then use a script<br>
to find which tapes contain second copy of those backups.<br>
<br>
bpduplicate is invoked as follows:<br>
<br>
$BPDUPLICATE -dstunit $DSTUNIT -v -Bidfile $BIDLISTFILE -dp $POOL -L 
$BPDUPLOG<br>
<br>
As bpduplicate deletes Bidfile, I create a second copy of $BIDLISTFILE<br>
before executing bpduplicate.<br>
<br>
After running bpduplicate I call<br>
<br>
MEDIA=$(cat $BIDLISTFILESAVE | $MEDIALIST)<br>
<br>
where MEDIALIST is the following script:<br>
<br>
----------------------------------------------------------------<br>
#!/usr/bin/perl<br>
# find media ids where copies were written<br>
#<br>
while (&lt;&gt;) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;open BPMEDIALIST, 
&quot;/usr/openv/netbackup/bin/admincmd/bpimagelist
-l -bac<br>
kupid $_ |&quot;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;while (&lt;BPMEDIALIST&gt;) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;split ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$media{$_[8]} ++
if $_[0] eq 'FRAG' &amp;&amp; $_[1] == 2 ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp;close BPMEDIALIST;<br>
}<br>
foreach $evsn ( sort keys %media ) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;print &quot;$evsn &quot;;<br>
}<br>
----------------------------------------------------------------<br>
<br>
<br>
&gt; <br>
&gt; A little followup question... when doing offsites is it worthwhile/wise
<br>
&gt; to put a NB catalog backup on the offsite tape too?<br>
<br>
I'm doing that. It takes an extra tape but in case you have to restore<br>
everything from scratch, it helps.<br>
<br>
Regards,<br>
-- <br>
Konstantin 'Kastus' Shchuka<br>
Unix System Administrator<br>
ePocrates Inc.<br>
tel 650.227.1786<br>
fax 650.592.6995<br>
_______________________________________________<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>
</tt></font>
<br>
--=_alternative 0033EA2D80256E93_=--

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