Veritas-bu

[Veritas-bu] bpduplicate

2001-12-19 15:05:06
Subject: [Veritas-bu] bpduplicate
From: JCamara AT NaviSite DOT com (Camara, John)
Date: Wed, 19 Dec 2001 15:05:06 -0500
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_01C188C8.7447E4F0
Content-Type: text/plain;
        charset="ISO-8859-1"

I'm writing a script that will expire tapes greater than 30 days old and
move them into the scratch pool.  Before I do that however, I'd like to run
a test to verify that the tapes have been vaulted.  The method I've been
attempting to use in Solaris 2.7 is as follows:
 
bpduplicate -p -id ${TAPE_ID}
If the command returns
  INF - found no images or media matching the selection criteria
Then I know the tape has been duplicated.
 
That's fine one at a time, but when I script it I want to assign it to a
variable.
However, I can't seem to assign the above string to a variable.
 
for example:
VALIDATE=`bpduplicate -p -id ${TAPE_ID}`
If I echo $VALIDATE it returns nothing.
 
Does anyone know how I can get the output of bpduplicate into a variable.
If not, does anyone out there have a different way of validating that a tape
has been vaulted?
 
Thanks,
John Camara
 
 
 
 

------_=_NextPart_001_01C188C8.7447E4F0
Content-Type: text/html;
        charset="ISO-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">


<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>I'm writing a 
script 
that will expire tapes greater than 30 days old and move them into the scratch 
pool.&nbsp; Before I do that however, I'd like to run a test to verify that the 
tapes have been vaulted.&nbsp; The method I've been attempting to use in 
Solaris 
2.7 is as follows:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>bpduplicate -p -id 
${TAPE_ID}</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>If the command 
returns</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>&nbsp; INF - found 
no images or media matching the selection criteria</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>Then I know the 
tape 
has been duplicated.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>That's fine one at 
a 
time, but when I script it I want to assign it to a 
variable.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>However, I can't 
seem to assign the above string to a variable.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>for 
example:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001>VALIDATE=`bpduplicate -p -id 
${TAPE_ID}`</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>If I echo $VALIDATE 
it returns nothing.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>Does anyone know 
how 
I can get the output of bpduplicate into a variable.&nbsp; If not, does anyone 
out there have a different way of validating that a tape has been 
vaulted?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=522083319-19122001>John 
Camara</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=522083319-19122001></SPAN></FONT>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C188C8.7447E4F0--

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