<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=744204016-18102007>Hints and answers in-line below...</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=330264121-17102007>I am trying to write menu for operator so they can do 
following task only in Netbackup .. If any body has script , please forward me. 
We are having NBU 6.5</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=330264121-17102007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>1). Check backup status whether failed , missed and 
completed for a host in last 24 hours&nbsp;?<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>bperror -client &lt;client&gt; -hoursago 
24 -U</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
color=#0000ff size=2><SPAN class=744204016-18102007><FONT color=#000000>(not 
very pretty but you could parse)</FONT>&nbsp;</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007></SPAN></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>2). Does catalog backup done or failed .<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>(harder - it's tracked differently)&nbsp; 
I'd start with:</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>bpimagelist -policy &lt;cat policy&gt; 
-hoursago 24 -U</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>...or build something around "bpdbjobs" 
output</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>3). What is % utilization for each volume pool .<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>used tapes in pool vs unused tapes? 
(inefficient- this could be done better with a awk 
hash)</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT 
color=#0000ff><SPAN class=744204016-18102007><FONT face=Arial color=#000000 
size=2>#!/bin/ksh<BR>export PATH=$PATH:/usr/openv/volmgr/bin<BR>echo 
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Poolname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Use"<BR>echo "====================&nbsp; ============"<BR>for p in `vmpool 
-listall -b | awk 'NR&gt;2 {print $1}'`<BR>do<BR>&nbsp; pc=`vmquery -pn $p 
-w|awk 'NR&gt;3 {print $1}'|wc -l`<BR>&nbsp; po=`vmquery -pn $p -w|awk 'NR&gt;3 
&amp;&amp; $20!~/00\/00\/00/ {print $1}'|wc -l`<BR>&nbsp; printf "%20s&nbsp; %4d 
of %4d\n" $p $po $pc<BR>done<BR>exit</FONT></DIV></SPAN></FONT></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007></SPAN></FONT></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>4). In last 24 hour was there any media error.<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>bperror -media -hoursago 24 
-U</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=330264121-17102007>5). run checkout for offsite eject ( for 
vaulting)&nbsp;</SPAN></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>6) Run checkin for expired tape from offsite.<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>don't know what you mean by this&nbsp;- 
probably you want to build something around 
"vmupdate"</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>7) Checking new scratch tapes in library.<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>number of Scratch tapes in 
library?</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>sp=`vmpool -listscratch | tail 
-1`</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>vmquery -pn $sp | awk 'BEGIN (sum=0} 
</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN 
class=744204016-18102007>&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; 
{if(NR&gt;3 &amp;&amp; $8!="-") {sum++}}</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN 
class=744204016-18102007>&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; 
END {print sum}'</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>8). what is Tape library utilization which tells how 
many assigned to each pool and how much left in scratch pool<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>My version, you can 
modify:</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>/usr/openv/volmgr/bin/vmquery -a -w | awk 
'NR&gt;3 {pool=$12;type=$3<BR>if (type=="HCART")&nbsp; { ++counth1[pool] }<BR>if 
(type=="HCART2") { ++counth2[pool] }<BR>if (type!="HCART" &amp;&amp; 
type!="HCART2") {++other[pool]}<BR>poolnames[pool]}<BR>END {print 
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Pool&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \t LTO1\t 
LTO2\tOther"<BR>&nbsp;&nbsp;&nbsp;&nbsp; print 
"====================\t=====\t=====\t====="<BR>for (p in poolnames) 
</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>&nbsp;&nbsp;&nbsp; 
{printf("%-20s\t%5d\t%5d\t%5d\n",p,counth1[p],counth2[p],other[p])}}' | sort 
-f<BR></DIV></SPAN></FONT></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>9) Operator can also find out specific detail about 
any tape&nbsp;<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
size=2><SPAN class=744204016-18102007>vmquery -m 
&lt;tapenum&gt;</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2><SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=330264121-17102007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>THX<SPAN 
class=744204016-18102007>&nbsp;</SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT><SPAN 
class=744204016-18102007></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT><FONT face=Arial 
color=#0000ff size=2><SPAN class=744204016-18102007><FONT color=#000000>Watch 
out for line-wrap issues above, in case this reply splits lines in bad 
places.&nbsp; Seriously, like I said before, check out the command-line 
reference manual.&nbsp; It's very good.</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=330264121-17102007></SPAN></FONT>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Mark.Donaldson@cexp.com 
[mailto:Mark.Donaldson@cexp.com] <BR><B>Sent:</B> Wednesday, October 17, 2007 
5:09 PM<BR><B>To:</B> Maurya, Anil PH/US/EXT; 
veritas-bu@mailman.eng.auburn.edu<BR><B>Subject:</B> RE: [Veritas-bu] Help in 
using command line.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>Anything that can be done in the NB GUI can be done via 
command line, usually faster (with the possible exception of cold building a 
policy and schedule set).&nbsp; Netbackup is very extensible via 
command-line.&nbsp; If it doesn't do what you want out of the box, you can 
probably script it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>That said, your request is a bit broad.&nbsp; I have 250 
custom scripts written for Netbackup and just burying you in them wouldn't make 
sense (plus at least half are specific to my environment).&nbsp; I'd suggest 
starting with the command line reference guide here:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2><A 
href="http://ftp.support.veritas.com/pub/support/products/NetBackup_Enterprise_Server/279299.pdf">http://ftp.support.veritas.com/pub/support/products/NetBackup_Enterprise_Server/279299.pdf</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2><A 
href="http://entsearch.symantec.com/search?p=R&amp;srid=S10%2d1&amp;lbc=symantec&amp;w=command%20line%20reference&amp;url=http%3a%2f%2fftp%2esupport%2everitas%2ecom%2fpub%2fsupport%2fproducts%2fNetBackup%5fEnterprise%5fServer%2f279299%2epdf&amp;rk=1&amp;uid=55146446&amp;sid=2&amp;ts=custom&amp;rsc=vA22G2AUThIvfJNV&amp;ed=edn%5f15143&amp;method=and&amp;af=cat2%5fnetbackupproducts%3a15143%20cat1%3anetbackupproducts%20&amp;isort=score&amp;filter=entity%5fid%3a15143"></A></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>..and just read it.&nbsp; It's boring to read cover to 
cover but it's a great way to see all what's possible.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>You also might just search the history of this mail list, I 
know many code snippets have been posted.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>Good Luck.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>I'll forward the pdf from my Veritas Vision presention on 
writing your own tools directly.&nbsp; It was written when v4.5 was the top 
version but a lot of it is still applicable.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2>-M</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> veritas-bu-bounces@mailman.eng.auburn.edu 
[mailto:veritas-bu-bounces@mailman.eng.auburn.edu] <B>On Behalf Of 
</B>Anil.Maurya@sanofi-aventis.com<BR><B>Sent:</B> Wednesday, October 17, 2007 
1:45 PM<BR><B>To:</B> veritas-bu@mailman.eng.auburn.edu<BR><B>Subject:</B> 
[Veritas-bu] Help in using command line.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><SPAN 
class=182191719-17102007>Hi</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=182191719-17102007>My company planning 
to migrate backup strategy from TSM to Netbackup. I am good in writing script in 
TSM but very bad in Netbackup. Do any body have command line examples or script 
i can use ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=182191719-17102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=182191719-17102007>THX</SPAN></FONT></DIV></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><STRONG><EM><FONT face="Script MT Bold" color=#0000ff>Anil 
Maurya</FONT></EM></STRONG></DIV>
<DIV align=left><STRONG><EM><FONT face="Script MT Bold" color=#0000ff>DCO&nbsp; 
Backup/Recovery&nbsp; team</FONT></EM></STRONG></DIV>
<DIV align=left><STRONG><EM><FONT face="Script MT Bold" color=#0000ff>Email : 
</FONT><A href="mailto:Anil.Maurya@Sanofi-aventis.com"><FONT 
face="Script MT Bold">Anil.Maurya@Sanofi-aventis.com</FONT></A></EM></STRONG></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>