Veritas-bu

[Veritas-bu] script request

2004-05-20 16:37:02
Subject: [Veritas-bu] script request
From: LoylessM AT pcaobus DOT org (Loyless, Maureen)
Date: Thu, 20 May 2004 16:37:02 -0400
This is a multi-part message in MIME format.

------_=_NextPart_001_01C43EAA.34F82691
Content-Type: text/plain;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

basically, the thought is to do the disk backups in the remote offices,
then once a week copy the full b/u image over to hq, and duplicate the
image from hq to tape... we have enough bandwidth to support this,
however, we don't want to do backups over the WAN.
=20
i hope that is more clear?
=20
thanks,
maureen

  _____ =20

From: K Chapman [mailto:tech2187 AT yahoo DOT com]=20
Sent: Thursday, May 20, 2004 2:17 PM
To: Loyless, Maureen; veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] script request


you are going to backup to disk local and than duplicate over the wan or
am i not reading this correctly...  or duplicate local as well?
=20
you dont mention your ver...  5 has disk for staging built in (though
this may not be what you want..  earlier version could use the vault add
on or you can do what youre looking for which is script it.
=20
everyone has diff req's for doing this, so here is what i use for doing
mass disk to tape dups, from one of our disk stu's and clear out the
space if the dup works...  sort -u can replace sort|uniq, as well as
some other things that could be updated/replaced...  i have my own
scripts for doing stats which is what the $prep var is..  the formating
is bad for cut and paste.
=20
STUNIT=3D"<target storage unit>"
NBPOOL=3D"<target pool>"
ADM=3D"/opt/openv/netbackup/bin/admincmd"
prep=3D/tmp/copyprep
disktgt=3D"<disk image location>"
rm -f $prep
for client in `ls $disktgt|grep -v "lost"|sed -e
"s/_.*_C.*F.*$/_/"|sort|uniq`
do
        backupid=3D`ls $disktgt|grep "$client"|sed =
's/_C1.*//'|sort|uniq`
        for image in $backupid
        do
  # make sure the image isnt invalid/expired etc...
                out=3D`$ADM/bpimagelist -l -backupid $image 2>/dev/null`
                err=3D`echo $?`
                if [ "$err" =3D "0" ]; then
                        outdup=3D`$ADM/bpduplicate -dstunit $STUNIT -dp
$NBPOOL -backupid $image -set_primary 1 -L /tmp/dup_$image`
                        # check for valid duplication
                        errdup=3D`echo $?`
                        # delete old image if duplication succeeds
                        if [ "$errdup" =3D "0" ]; then
                                echo "done"
                                $ADM/bpexpdate -backupid $image -d 0
-copy 1 -force
    # dump some stats to a file
                                $ADM/bperror |grep "wrote backup id
$image"|awk '{print $6,$15}'|sed -e "s/,//"|sort|uniq >> $prep
                        else
                                mailx -s "dup failed" <some one who
cares> < /tmp/dup_$image
                        fi
                fi
        done
done

"Loyless, Maureen" <LoylessM AT pcaobus DOT org> wrote:

        Hi all,
        =20
        Does anyone have a bpduplicate script that they use to duplicate
a disk image to tape, make it primary and then expire the disk image?
Or, alternatively, a location online that might have one?  I know
backupscripts.com has shutdown...
        =20
        I'd be very interested in a script that does this.  We are
trying to change our backups to disk rather than tapes in each of our
WAN locations, and then centralize the tapes.  I've seen a few threads
that talk about this and then suggest a script for bpduplicate...
        =20
        TIA!
        Maureen
        =20

        ___________________________________________

        Maureen Loyless

        Systems Engineer

        Public Company Accounting Oversight Board

        www.pcaobus.org <http://www.pcaobus.org/>=20

        =20

        202.207.9267 (Office)

        202.368.9673 (Mobile)

        loylessm AT pcaobus DOT org=20

        =20

        =20



aaarrrggghhh!!!!
FreeBSD rocks=20

  _____ =20

Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
<http://us.rd.yahoo.com/evt=3D23613/*http://smallbusiness.promotions.yaho=
o
.com/offer>=20

------_=_NextPart_001_01C43EAA.34F82691
Content-Type: text/html;
        charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>basically, the thought is to do the disk =
backups in the=20
remote offices, then once a week copy the full b/u image over to hq, and =

duplicate the image from hq to tape... we have enough bandwidth to =
support this,=20
however, we don't want to do backups over the WAN.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>i hope that is more clear?</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>thanks,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D833203520-20052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>maureen</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> K Chapman =
[mailto:tech2187 AT yahoo DOT com]=20
<BR><B>Sent:</B> Thursday, May 20, 2004 2:17 PM<BR><B>To:</B> Loyless, =
Maureen;=20
veritas-bu AT mailman.eng.auburn DOT edu<BR><B>Subject:</B> Re: [Veritas-bu] =
script=20
request<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>you are going to backup to disk local and than duplicate over the =
wan or am=20
i not reading this correctly...&nbsp; or duplicate local as well?</DIV>
<DIV>&nbsp;</DIV>
<DIV>you dont mention your ver...&nbsp; 5 has disk for staging built in =
(though=20
this may not be what you want..&nbsp; earlier version could use the =
vault add on=20
or you can do what youre looking for which is script it.</DIV>
<DIV>&nbsp;</DIV>
<DIV>everyone has diff req's for doing this, so here is what i use for =
doing=20
mass disk to tape dups, from one of our disk stu's and clear out the =
space if=20
the dup works...&nbsp; sort -u can replace sort|uniq, as well as some =
other=20
things that could be updated/replaced...&nbsp; i have my own scripts for =
doing=20
stats which is what the $prep var is..&nbsp; the formating is bad for =
cut and=20
paste.</DIV>
<DIV>&nbsp;</DIV>
<DIV>STUNIT=3D"&lt;target storage unit&gt;"<BR>NBPOOL=3D"&lt;target=20
pool&gt;"<BR>ADM=3D"/opt/openv/netbackup/bin/admincmd"<BR>prep=3D/tmp/cop=
yprep<BR>disktgt=3D"&lt;disk=20
image location&gt;"</DIV>
<DIV>rm -f $prep</DIV>
<DIV>for client in `ls $disktgt|grep -v "lost"|sed -e=20
"s/_.*_C.*F.*$/_/"|sort|uniq`<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
backupid=3D`ls $disktgt|grep "$client"|sed=20
's/_C1.*//'|sort|uniq`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for =
image=20
in $backupid<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
do<BR>&nbsp;&nbsp;#=20
make sure the image isnt invalid/expired=20
etc...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
out=3D`$ADM/bpimagelist -l -backupid $image=20
2&gt;/dev/null`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
err=3D`echo=20
$?`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
if [ "$err" =3D "0" ];=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
outdup=3D`$ADM/bpduplicate -dstunit $STUNIT -dp $NBPOOL -backupid $image =

-set_primary 1 -L=20
/tmp/dup_$image`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
# check for valid=20
duplication<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
errdup=3D`echo=20
$?`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

# delete old image if duplication=20
succeeds<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
if [ "$errdup" =3D "0" ];=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
echo=20
"done"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
$ADM/bpexpdate -backupid $image -d 0 -copy 1 =
-force<BR>&nbsp;&nbsp;&nbsp;&nbsp;#=20
dump some stats to a=20
file<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
$ADM/bperror |grep "wrote backup id $image"|awk '{print $6,$15}'|sed -e=20
"s/,//"|sort|uniq &gt;&gt;=20
$prep<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
mailx -s "dup failed" &lt;some one who cares&gt; &lt;=20
/tmp/dup_$image<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
fi<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
fi<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
done<BR>done<BR><BR><B><I>"Loyless, Maureen"=20
&lt;LoylessM AT pcaobus DOT org&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=3Dreplbq=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px =
solid">
  <META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial size=3D2>Hi=20
  all,</FONT></SPAN></DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial size=3D2>Does =
anyone have a=20
  bpduplicate script that they use to duplicate a disk image to tape, =
make it=20
  primary and then expire the disk image?&nbsp; Or, alternatively, a =
location=20
  online that might have one?&nbsp; I know backupscripts.com has=20
  shutdown...</FONT></SPAN></DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial size=3D2>I'd =
be very=20
  interested in a script that does this.&nbsp; We are trying to change =
our=20
  backups to disk rather than tapes in each of our WAN locations, and =
then=20
  centralize the tapes.&nbsp; I've seen a few threads that talk about =
this and=20
  then suggest a script for bpduplicate...</FONT></SPAN></DIV>
  <DIV><SPAN class=3D427544115-20052004></SPAN><SPAN=20
  class=3D427544115-20052004><FONT face=3DArial =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial=20
  size=3D2>TIA!</FONT></SPAN></DIV>
  <DIV><SPAN class=3D427544115-20052004><FONT face=3DArial=20
  size=3D2>Maureen</FONT></SPAN></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV align=3Dleft>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt" align=3Dleft><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT=20
  =
face=3DArial>___________________________________________</FONT></SPAN></P=
>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt" align=3Dleft><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT =
face=3DArial>Maureen=20
  Loyless</FONT></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT =
face=3DArial>Systems=20
  Engineer</FONT></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT face=3DArial=20
  color=3D#800000><STRONG>Public Company Accounting Oversight=20
  Board</STRONG></FONT></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><A=20
  href=3D"http://www.pcaobus.org/";><SPAN=20
  style=3D"FONT-FAMILY: Arial">www.pcaobus.org</SPAN></A></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT=20
  face=3DArial></FONT></SPAN>&nbsp;</P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT =
face=3DArial>202.207.9267=20
  (Office)</FONT></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT =
face=3DArial>202.368.9673=20
  (Mobile)</FONT></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT face=3DArial><A=20
  =
href=3D"mailto:loylessm AT pcaobus DOT org">loylessm AT pcaobus DOT 
org</A>&nbsp;</FONT=
></SPAN></P>
  <P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT=20
  face=3DArial></FONT></SPAN>&nbsp;</P></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE><BR><BR>aaarrrggghhh!!!!<BR>FreeBSD =
rocks
<P>
<HR SIZE=3D1>
<FONT face=3Darial size=3D-1>Do you Yahoo!?<BR>Yahoo! Domains - <A=20
href=3D"http://us.rd.yahoo.com/evt=3D23613/*http://smallbusiness.promotio=
ns.yahoo.com/offer">Claim=20
yours for only $14.70/year</A></FONT></BODY></HTML>

------_=_NextPart_001_01C43EAA.34F82691--

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