Hints and answers in-line below...
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
1). Check backup status whether failed , missed and
completed for a host in last 24 hours ?
bperror -client <client> -hoursago
24 -U
(not
very pretty but you could parse)
2). Does catalog backup done or failed .
(harder - it's tracked differently)
I'd start with:
bpimagelist -policy <cat policy>
-hoursago 24 -U
...or build something around "bpdbjobs"
output
3). What is % utilization for each volume pool .
used tapes in pool vs unused tapes?
(inefficient- this could be done better with a awk
hash)
#!/bin/ksh export PATH=$PATH:/usr/openv/volmgr/bin echo
"
Poolname
Use" echo "==================== ============" for p in `vmpool
-listall -b | awk 'NR>2 {print $1}'` do pc=`vmquery -pn $p
-w|awk 'NR>3 {print $1}'|wc -l` po=`vmquery -pn $p -w|awk 'NR>3
&& $20!~/00\/00\/00/ {print $1}'|wc -l` printf "%20s %4d
of %4d\n" $p $po $pc done exit
4). In last 24 hour was there any media error.
bperror -media -hoursago 24
-U
5). run checkout for offsite eject ( for
vaulting)
6) Run checkin for expired tape from offsite.
don't know what you mean by this -
probably you want to build something around
"vmupdate"
7) Checking new scratch tapes in library.
number of Scratch tapes in
library?
sp=`vmpool -listscratch | tail
-1`
vmquery -pn $sp | awk 'BEGIN (sum=0}
{if(NR>3 && $8!="-") {sum++}}
END {print sum}'
8). what is Tape library utilization which tells how
many assigned to each pool and how much left in scratch pool
My version, you can
modify:
/usr/openv/volmgr/bin/vmquery -a -w | awk
'NR>3 {pool=$12;type=$3 if (type=="HCART") { ++counth1[pool] } if
(type=="HCART2") { ++counth2[pool] } if (type!="HCART" &&
type!="HCART2") {++other[pool]} poolnames[pool]} END {print
"
Pool \t LTO1\t
LTO2\tOther" print
"====================\t=====\t=====\t=====" for (p in poolnames)
{printf("%-20s\t%5d\t%5d\t%5d\n",p,counth1[p],counth2[p],other[p])}}' | sort
-f
9) Operator can also find out specific detail about
any tape
vmquery -m
<tapenum>
THX
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.
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.
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:
..and just read it. It's boring to read cover to
cover but it's a great way to see all what's possible.
You also might just search the history of this mail list, I
know many code snippets have been posted.
Good Luck.
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.
-M
Hi
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 ?
THX
Anil
Maurya
DCO
Backup/Recovery team
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|