<!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> </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> </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 ?<SPAN
class=744204016-18102007> </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 <client> -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> </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> </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> </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)
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 <cat policy>
-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> </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> </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> </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
"
Poolname
Use"<BR>echo "==================== ============"<BR>for p in `vmpool
-listall -b | awk 'NR>2 {print $1}'`<BR>do<BR> pc=`vmquery -pn $p
-w|awk 'NR>3 {print $1}'|wc -l`<BR> po=`vmquery -pn $p -w|awk 'NR>3
&& $20!~/00\/00\/00/ {print $1}'|wc -l`<BR> printf "%20s %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> </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></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> </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> </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) </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> </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 -
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> </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> </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> </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>
{if(NR>3 && $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>
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> </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> </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> </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>3 {pool=$12;type=$3<BR>if (type=="HCART") { ++counth1[pool] }<BR>if
(type=="HCART2") { ++counth2[pool] }<BR>if (type!="HCART" &&
type!="HCART2") {++other[pool]}<BR>poolnames[pool]}<BR>END {print
"
Pool \t LTO1\t
LTO2\tOther"<BR> 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>
{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> </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 <SPAN
class=744204016-18102007> </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
<tapenum></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></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=330264121-17102007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=330264121-17102007><FONT face=Arial><FONT
color=#0000ff><FONT size=2>THX<SPAN
class=744204016-18102007> </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> </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. Seriously, like I said before, check out the command-line
reference manual. 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> </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). Netbackup is very extensible via
command-line. 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> </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. 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). 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> </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&srid=S10%2d1&lbc=symantec&w=command%20line%20reference&url=http%3a%2f%2fftp%2esupport%2everitas%2ecom%2fpub%2fsupport%2fproducts%2fNetBackup%5fEnterprise%5fServer%2f279299%2epdf&rk=1&uid=55146446&sid=2&ts=custom&rsc=vA22G2AUThIvfJNV&ed=edn%5f15143&method=and&af=cat2%5fnetbackupproducts%3a15143%20cat1%3anetbackupproducts%20&isort=score&filter=entity%5fid%3a15143"></A></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=380500321-17102007><FONT face=Arial
color=#0000ff size=2>..and just read it. 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> </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> </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> </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. 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> </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> </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> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=182191719-17102007>THX</SPAN></FONT></DIV></FONT></DIV>
<DIV> </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
Backup/Recovery 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> </DIV></BODY></HTML>