Networker

Re: [Networker] Finding a tape

2006-08-03 12:04:50
Subject: Re: [Networker] Finding a tape
From: Brett Monroe <mr.bmonroe AT GMAIL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 3 Aug 2006 08:52:47 -0700

I definitely understand your frustrations.  Both Darren and Itzik had
good tips that might help in your situation.

If you only need to do this for one group, you could use Darren's nsradmin
example (the second one) and hardcode the group name in your nsradmin
command, and then use the time it returns exactly as he shows with
sscreate in the mminfo query.


Tim,

So this is what I've got:

GROUP_NAME=$(ptree $$ |fgrep savepnpc |sed 's/.*-g
\([a-zA-Z]\{1,\}\).*/\1/')
mminfo -v -t "$(echo "show last start\nprint type:nsr group;
name:${GROUP_NAME}\n" | nsradmin -i - | \
       awk -F\" '{print $2}')" -r volume

I think this should give me exactly what I want (with the understanding of
the caveat given by Darren).

The actual script needs the volumes to generate a report on all the saveset
IDs for the save group for the given backup:

...
for volume in $(mminfo -v -t "$(echo "show last start\nprint type:nsr group;
name:${GROUP_NAME}\n" | \
                         nsradmin -i - | awk -F\" '{print $2}')" -r volume)
do
     [[ -z ${volume} ]] && continue
     mminfo -a -v -q "volume=${volume}" |sed 's|\(.*\)|      \1|'
     print
done
...

Again, thanks to everyone who responded...I love this list!!!

--Brett

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu 
if you have any problems
wit this list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

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