Your loop below searches the media servers for a volDB, not a list of master
servers. vmquery is specific to the volume database, there's only one per
environment and it's usually on the master server.
Frozen/suspended is per media server, but the volDB contains everything
else.
This is ugly but:
for tape in <tape1> <tape2> <tape3> ...
do
echo "## $tape"
for master in <master1> <master2> <master3> ...
do
vmquery -h $master -m $tape 2>/dev/null
if [ $? -eq 0 ]
then
for mediasvr in `bpstulist -M $master | awk '{print $3}' | sort -u`
do
bpmedialist -m $tape -M $master -h $mediasvr 2>/dev/null
done
else
echo "## Tape $tape not in VolDB on $master."
fi
done
done
This can be prettified a bunch but it's functional. Watch out for line-wrap
issues in this posting.
Note also this this is untested but I think, if nothing else, that the logic
is sound.
-M
-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu]On Behalf Of
manuel.j.desousa AT jpmchase DOT com
Sent: Wednesday, February 08, 2006 7:58 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Help finding the status of tapes!
Justin,
for tape in ID1 ID2 ID3 ID4...
do
for i in `bpstulist | awk '{print $3 | sort -u `
do
vmquery -m $tape -h $i
done
done
where "ID1 ID2 ID3 ID4" etc are your media id's...
should do it...
JdS
Justin Piszcz <jpiszcz.backup AT gmail DOT com>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
08/02/2006 14:19
To: "WEAVER, Simon" <simon.weaver AT astrium.eads DOT net>
cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Help finding the status of tapes!
Yes, this'll work but I am trying to figure out the best way to do it via
the command line as I am looking for tapes amongst a vast array of master &
media servers.
Justin.
On 2/8/06, WEAVER, Simon <simon.weaver AT astrium.eads DOT net> wrote:
Justin
Here to be proved wrong, but if Netbackup knows about the tapes, then surely
they should be listed in the Reports Module "Media Lists".
Also, to prove if Netbackup does know about them and they are in the Robot,
doing a "Media Contents" report will load the tape and give you all the
backup ID's it knows about!
Is this of any help?
Simon Weaver
Technical Support
Windows Domain Administrator
EADS Astrium
Tel: 02392-708598
Email: Simon.Weaver AT Astrium.eads DOT net
-----Original Message-----
From: Justin Piszcz [mailto: jpiszcz.backup AT gmail DOT com]
Sent: 08 February 2006 13:46
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Help finding the status of tapes!
Problem:
I have a few tapes:
L00123
L00124
L00125
I need to find the status of these tapes across multiple master servers.
Is there a text equivalent to list all of the tapes in the:
* Media and Device Management
-> Media
In the Media Manager's Media List?
I have several tapes I need to find the status of, whether they are frozen,
expired or scratch, etc...
bpmedialist does not show the complete listing of all of the media that has
ever been in the robot.
I am looking at the documentation now but thought I'd send this out if
anyone knew it off the top of their head?
Thanks,
Justin. This email is for the intended addressee only.
If you have received it in error then you must not use, retain, disseminate
or otherwise deal with it.
Please notify the sender by return email.
The views of the author may not necessarily constitute the views of EADS
Astrium Limited.
Nothing in this email shall bind EADS Astrium Limited in any contract or
obligation.
EADS Astrium Limited, Registered in England and Wales No. 2449259
Registered Office: Gunnels Wood Road, Stevenage, Hertfordshire, SG1 2AS,
England
|