Re: [Networker] Finding a tape
2006-08-02 11:53:06
In regard to: Re: [Networker] Finding a tape, Brett Monroe said (at 8:33am...:
Thanks for all the quick replies but I don't think I was being clear (in
fact I know I wasn't).
I have a script that is fired off by a savegroup compleation notification
and within it, I would like to deturmine the volumes used by said savegroup
(and only said savegroup).
That's much more challenging. You need to know one of two things:
- all the saveset ids that were written as part of the savegroup
or
- when the group started (approximately).
Once you have one of those, you make that an additional restriction in
your mminfo query.
When I needed to do what you're doing, I chose the latter, because it was
easy for me to know exactly when the group started. We don't use the
NetWorker scheduler, we run our savegrps via a script run from cron, so
I just added something to the script to record what the time was right
before the savegroup ran, and then afterwards I use that time in the
mminfo query as a restriction.
That section of our script that runs our overnight backups looks like
this:
#
# get the number of seconds since the Epoch, and save it to a variable
# for later use. Requires GNU date.
#
epoch_seconds=`date "+%s"`
#
# Now run our backup group containing the email servers.
#
$nsrbindir/savegrp 'Email2Week'
#
# Now that the group is finished, mark all tapes that were used for that
# group as "full". This is why we grabbed the time (in seconds) before
# we ran the group.
sleep 300
nsrjb -u
$nsrscriptdir/nsr-make-tapes-readonly.pl --pool 'Email2Week' --browse "2 weeks"
--retention "2 weeks" --since $epoch_seconds
That perl script (nsr-make-tapes-readonly.pl) ends up running an mminfo
query similar to
mminfo -q "near,sscreate>=$epoch_seconds,pool=Email2Week" -r volume
where $epoch_seconds contains a value similar to 1154533747 (UNIX seconds
since the epoch).
That's how we do it, but then we're not using the internal NetWorker
scheduler.
Tim
--
Tim Mooney Tim.Mooney AT ndsu DOT edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
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
|
|
|