Veritas-bu

[Veritas-bu] Backups Issues

2003-01-06 11:22:59
Subject: [Veritas-bu] Backups Issues
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Mon, 6 Jan 2003 09:22:59 -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_01C2B59F.E10628E0
Content-Type: text/plain;
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

For example, say you've got a bunch of image fragments on tapes 000001,
000002, 000003, & 000004.  You want to consolidate them to a smaller =
number
of tapes.=20

While it's possible to duplicate just a media id, it's safer in my =
opinion
to duplicate images.  A media duplication will not duplicate all the
fragments of an image if that image is spread across media, it'll just
duplicate the fragments on the specified source media.

So, first I'd suggest finding all the images on the tapes you want to
consolidate:

# Null out the temp file for imagenames
cp /dev/null /tmp/imagelist

#for each tape in the list of source tapes, find the images & store =
them
for tape in 000001 000002 000003 000004
do
  # Query NB catalog for image on each tape
   bpimmedia -mediaid $tape | awk '$1=3D=3D"IMAGE" {print $4}' >> =
/tmp/imagelist
done

# Sort the list for uniqeness
sort -u -o /tmp/imagelist /tmp/imagelist

# Make a copy of the image, the bpduplicate
# command has a nasty bug where it'll delete
# the list when it's done reading it.
cp /tmp/imagelist /tmp/imagelist.save

Now that you've got a list of images, there's two methods, consolidate =
the
images to the same pool or to a new pool.

If you're going to write the duplication to the same pool name, you'll =
have
to suspend your source tapes so they're not used as destination tapes, =
too.
Use the "bpmedia -suspend <tapenum>" command to do this.  Probably
unnecessary but safe would be to unsuspend the tapes ("bpmedia =
-unsuspend
<tapenum>") when the duplications are complete.  For this reason, I =
like
using a different destination pool.

# Duplicate the list of images to your=20
# destination pool if tapes
bpduplicate -Bidfile /tmp/imagelist -v -L /tmp/logfile -dp <dstpool>

Verify with the log file that you've duplicated it all.  Redo anything
you've missed.

# Erase the original source images:
for bid in `cat /tmp/imagelist.save`
do
  bpexpdate -backupid $bid -d 0 -force -copy 1
done
bpexpdate -deassignempty -force

The newly duplicated images become the new primary image when the first =
copy
is expired.

Sorry for the late reply, I took the rest of the weekend off.

-Mark

-----Original Message-----
From: rafal wiosna [mailto:rafamiga AT uucp.polbox DOT pl]
Sent: Saturday, January 04, 2003 2:50 PM
To: Donaldson, Mark
Subject: Re: [Veritas-bu] Backups Issues


* Donaldson, Mark wrote:
> You might consider using bpduplicate to consolidate images into a =
smaller
> number of tapes, then expire the original copies with bpexpdate.

        Can you give me a example of bpduplicate action? I'm new to
netbackup, althou skeptic at the beginning I'm starting to getting used =
to
nb features but I didn't go that far in the procedures yet. I didn't =
pay
much attention to bpduplicate yet but seems to me it can do more than
duplicating tapes to be taken out of the robot for safe storage.

--
________________________________________________________________________=
__
rafal wiosna * TDC Internet Polska S.A. * Polbox * In ARP we trust * =
AR164
RAFD-RIPE * PGP nyckeln finns tillg=E4nglig p=E5 www.se.pgp.net (ID: =
3CDCB7A9)

------_=_NextPart_001_01C2B59F.E10628E0
Content-Type: text/html;
        charset="iso-8859-2"
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=3Diso-8859-2">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] Backups Issues</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>For example, say you've got a bunch of image =
fragments on tapes 000001, 000002, 000003, &amp; 000004.&nbsp; You want =
to consolidate them to a smaller number of tapes. </FONT></P>

<P><FONT SIZE=3D2>While it's possible to duplicate just a media id, =
it's safer in my opinion to duplicate images.&nbsp; A media duplication =
will not duplicate all the fragments of an image if that image is =
spread across media, it'll just duplicate the fragments on the =
specified source media.</FONT></P>

<P><FONT SIZE=3D2>So, first I'd suggest finding all the images on the =
tapes you want to consolidate:</FONT>
</P>

<P><FONT SIZE=3D2># Null out the temp file for imagenames</FONT>
<BR><FONT SIZE=3D2>cp /dev/null /tmp/imagelist</FONT>
</P>

<P><FONT SIZE=3D2>#for each tape in the list of source tapes, find the =
images &amp; store them</FONT>
<BR><FONT SIZE=3D2>for tape in 000001 000002 000003 000004</FONT>
<BR><FONT SIZE=3D2>do</FONT>
<BR><FONT SIZE=3D2>&nbsp; # Query NB catalog for image on each =
tape</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; bpimmedia -mediaid $tape | awk =
'$1=3D=3D&quot;IMAGE&quot; {print $4}' &gt;&gt; /tmp/imagelist</FONT>
<BR><FONT SIZE=3D2>done</FONT>
</P>

<P><FONT SIZE=3D2># Sort the list for uniqeness</FONT>
<BR><FONT SIZE=3D2>sort -u -o /tmp/imagelist /tmp/imagelist</FONT>
</P>

<P><FONT SIZE=3D2># Make a copy of the image, the bpduplicate</FONT>
<BR><FONT SIZE=3D2># command has a nasty bug where it'll delete</FONT>
<BR><FONT SIZE=3D2># the list when it's done reading it.</FONT>
<BR><FONT SIZE=3D2>cp /tmp/imagelist /tmp/imagelist.save</FONT>
</P>

<P><FONT SIZE=3D2>Now that you've got a list of images, there's two =
methods, consolidate the images to the same pool or to a new =
pool.</FONT>
</P>

<P><FONT SIZE=3D2>If you're going to write the duplication to the same =
pool name, you'll have to suspend your source tapes so they're not used =
as destination tapes, too.&nbsp; Use the &quot;bpmedia -suspend =
&lt;tapenum&gt;&quot; command to do this.&nbsp; Probably unnecessary =
but safe would be to unsuspend the tapes (&quot;bpmedia -unsuspend =
&lt;tapenum&gt;&quot;) when the duplications are complete.&nbsp; For =
this reason, I like using a different destination pool.</FONT></P>

<P><FONT SIZE=3D2># Duplicate the list of images to your </FONT>
<BR><FONT SIZE=3D2># destination pool if tapes</FONT>
<BR><FONT SIZE=3D2>bpduplicate -Bidfile /tmp/imagelist -v -L =
/tmp/logfile -dp &lt;dstpool&gt;</FONT>
</P>

<P><FONT SIZE=3D2>Verify with the log file that you've duplicated it =
all.&nbsp; Redo anything you've missed.</FONT>
</P>

<P><FONT SIZE=3D2># Erase the original source images:</FONT>
<BR><FONT SIZE=3D2>for bid in `cat /tmp/imagelist.save`</FONT>
<BR><FONT SIZE=3D2>do</FONT>
<BR><FONT SIZE=3D2>&nbsp; bpexpdate -backupid $bid -d 0 -force -copy =
1</FONT>
<BR><FONT SIZE=3D2>done</FONT>
<BR><FONT SIZE=3D2>bpexpdate -deassignempty -force</FONT>
</P>

<P><FONT SIZE=3D2>The newly duplicated images become the new primary =
image when the first copy is expired.</FONT>
</P>

<P><FONT SIZE=3D2>Sorry for the late reply, I took the rest of the =
weekend off.</FONT>
</P>

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

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: rafal wiosna [<A =
HREF=3D"mailto:rafamiga AT uucp.polbox DOT pl">mailto:rafamiga AT uucp.polbox 
DOT pl</=
A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Saturday, January 04, 2003 2:50 PM</FONT>
<BR><FONT SIZE=3D2>To: Donaldson, Mark</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [Veritas-bu] Backups Issues</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>* Donaldson, Mark wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; You might consider using bpduplicate to =
consolidate images into a smaller</FONT>
<BR><FONT SIZE=3D2>&gt; number of tapes, then expire the original =
copies with bpexpdate.</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can you =
give me a example of bpduplicate action? I'm new to</FONT>
<BR><FONT SIZE=3D2>netbackup, althou skeptic at the beginning I'm =
starting to getting used to</FONT>
<BR><FONT SIZE=3D2>nb features but I didn't go that far in the =
procedures yet. I didn't pay</FONT>
<BR><FONT SIZE=3D2>much attention to bpduplicate yet but seems to me it =
can do more than</FONT>
<BR><FONT SIZE=3D2>duplicating tapes to be taken out of the robot for =
safe storage.</FONT>
</P>

<P><FONT SIZE=3D2>--</FONT>
<BR><FONT =
SIZE=3D2>_______________________________________________________________=
___________</FONT>
<BR><FONT SIZE=3D2>rafal wiosna * TDC Internet Polska S.A. * Polbox * =
In ARP we trust * AR164</FONT>
<BR><FONT SIZE=3D2>RAFD-RIPE * PGP nyckeln finns tillg=E4nglig p=E5 =
www.se.pgp.net (ID: 3CDCB7A9)</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2B59F.E10628E0--

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