[Veritas-bu] script request
2004-05-20 14:16:36
--0-695864599-1085076996=:42537
Content-Type: text/plain; charset=us-ascii
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?
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.
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.
STUNIT="<target storage unit>"
NBPOOL="<target pool>"
ADM="/opt/openv/netbackup/bin/admincmd"
prep=/tmp/copyprep
disktgt="<disk image location>"
rm -f $prep
for client in `ls $disktgt|grep -v "lost"|sed -e "s/_.*_C.*F.*$/_/"|sort|uniq`
do
backupid=`ls $disktgt|grep "$client"|sed 's/_C1.*//'|sort|uniq`
for image in $backupid
do
# make sure the image isnt invalid/expired etc...
out=`$ADM/bpimagelist -l -backupid $image 2>/dev/null`
err=`echo $?`
if [ "$err" = "0" ]; then
outdup=`$ADM/bpduplicate -dstunit $STUNIT -dp $NBPOOL
-backupid $image -set_primary 1 -L /tmp/dup_$image`
# check for valid duplication
errdup=`echo $?`
# delete old image if duplication succeeds
if [ "$errdup" = "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,
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...
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...
TIA!
Maureen
___________________________________________
Maureen Loyless
Systems Engineer
Public Company Accounting Oversight Board
www.pcaobus.org
202.207.9267 (Office)
202.368.9673 (Mobile)
loylessm AT pcaobus DOT org
aaarrrggghhh!!!!
FreeBSD rocks
---------------------------------
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
--0-695864599-1085076996=:42537
Content-Type: text/html; charset=us-ascii
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>STUNIT="<target storage unit>"<BR>NBPOOL="<target
pool>"<BR>ADM="/opt/openv/netbackup/bin/admincmd"<BR>prep=/tmp/copyprep<BR>disktgt="<disk
image location>"</DIV>
<DIV>rm -f $prep</DIV>
<DIV>for client in `ls $disktgt|grep -v "lost"|sed -e
"s/_.*_C.*F.*$/_/"|sort|uniq`<BR>do<BR>
backupid=`ls $disktgt|grep "$client"|sed
's/_C1.*//'|sort|uniq`<BR> for image
in $backupid<BR> do<BR> #
make sure the image isnt invalid/expired
etc...<BR>
out=`$ADM/bpimagelist -l -backupid $image
2>/dev/null`<BR>
err=`echo
$?`<BR>
if [ "$err" = "0" ];
then<BR>
outdup=`$ADM/bpduplicate -dstunit $STUNIT -dp $NBPOOL -backupid $image
-set_primary 1 -L
/tmp/dup_$image`<BR>
# check for valid
duplication<BR>
errdup=`echo
$?`<BR>
# delete old image if duplication
succeeds<BR>
if [ "$errdup" = "0" ];
then<BR>
echo
"done"<BR>
$ADM/bpexpdate -backupid $image -d 0 -copy 1
-force<BR> # dump some stats to a
file<BR>
$ADM/bperror |grep "wrote backup id $image"|awk '{print $6,$15}'|sed -e
"s/,//"|sort|uniq >>
$prep<BR>
else<BR>
mailx -s "dup failed" <some one who cares> <
/tmp/dup_$image<BR>
fi<BR>
fi<BR>
done<BR>done<BR><BR><B><I>"Loyless, Maureen" <LoylessM AT pcaobus DOT
org></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
BORDER-LEFT: #1010ff 2px solid">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<DIV><SPAN class=427544115-20052004><FONT face=Arial size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial size=2>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...</FONT></SPAN></DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial size=2>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...</FONT></SPAN></DIV>
<DIV><SPAN class=427544115-20052004></SPAN><SPAN class=427544115-20052004><FONT
face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial
size=2>TIA!</FONT></SPAN></DIV>
<DIV><SPAN class=427544115-20052004><FONT face=Arial
size=2>Maureen</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt" align=left><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT
face=Arial>___________________________________________</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt" align=left><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT face=Arial>Maureen
Loyless</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial>Systems Engineer</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial color=#800000><STRONG>Public Company
Accounting Oversight Board</STRONG></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><A href="http://www.pcaobus.org/"><SPAN
style="FONT-FAMILY: Arial">www.pcaobus.org</SPAN></A></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial></FONT></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial>202.207.9267 (Office)</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial>202.368.9673 (Mobile)</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial><A href="mailto:loylessm AT pcaobus DOT
org">loylessm AT pcaobus DOT org</A> </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt;
FONT-FAMILY: Tahoma"><FONT face=Arial></FONT></SPAN> </P></DIV>
<DIV> </DIV></BLOCKQUOTE><BR><BR>aaarrrggghhh!!!!<br>FreeBSD rocks<p>
<hr size=1><font face=arial size=-1>Do you Yahoo!?<br>Yahoo!
Domains - <a
href="http://us.rd.yahoo.com/evt=23613/*http://smallbusiness.promotions.yahoo.com/offer">Claim
yours for only $14.70/year</a>
--0-695864599-1085076996=:42537--
|
|
|