Networker

[Networker] mminfo query for tape media savesets

2012-05-22 17:06:28
Subject: [Networker] mminfo query for tape media savesets
From: "Bowersock, Bryan" <Bryan.Bowersock AT AHSS DOT ORG>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 22 May 2012 21:00:38 +0000
I am looking for a query that will return all of the tape volumes in our 
library as well as the date of the most current saveset on the tape.  It seems 
simple and I have most of it down except for getting the latest "sscomp" or the 
latest "clonetime" for the entire tape volume.  The query I have started to 
build returns all savesets on the tape volume.  Any thoughts on how to get the 
info I need through some basic batch file scripting in Windows?  We have an 
issue where someone was sending tapes off site but not taking into account the 
date the tape was last written to.  This had led to us not getting a lot of our 
tapes returned to us on time and caused many headaches as well as messed up our 
retention for this set of tapes which is 6 months.  I am having to calculate 
out what the real return date from off site should be rather than the bogus 
date that could be up to 2 or 3 months longer.  Hopefully this makes sense.

Here is what I have so far: (either will work in my case)

mminfo -aV -q "family=tape" -r "volume,sscomp,ssretent"

OR

mminfo -aV -q "family=tape" -r "volume,clonetime,clretent"


And I would like the output to be something similar to below but it would be a 
listing of around 600 tape volumes (one per line with the timestamp):

volume   completed   retent
200600   3/16/2012   9/17/2012


There has to be a way to loop through the savesets on each tape volume and only 
output the one that is most current, but I am not great at scripting.  All of 
the savesets on these tapes are within a 24-36 hour window so this is the best 
approximation I can come up with.  If someone has a better methodology, I would 
love to hear it.

Without using the query, I have to go to the NMC > Media > Tape Volumes > 
Right-click a volume name > Show Save Sets > Sort by the "Save Time" field to 
get the last date it was written to > Manually record this date in an Excel 
spreadsheet.  I am only concerned about the day and not the time in this 
particular case.  If it is a day or two off due to the field used in the query 
(whether clonetime or sscomplete), that is okay with me too.  Some of our tapes 
are over 60 days past their correct retention period so getting within one or 
two days is a tremendous improvement.  Thanks in advance for any help!


Bryan

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