10-14-2014 10:30 AM
Hi guys,
I'd really like to be able to run a script or command against out master server to get a list of tapes that are available to be written too but they must meet a criteria:
Tapes must be from the "Weekly" Pool \ Pool 5
Tapes listed must be expired
Tapes must be within a timeframe (from 01/01/2008 -> 3 months before current date)
and the media id \ label must be present in the output.
I've tried VMQUERY, BPIMAGELIST with a few syntax's but i honestly thought netbackup would have a command switch for outputting tapes that are expired and older than 3 months old to a text file!
Anyone?
Solved! Go to Solution.
10-14-2014 10:53 AM
so you are looking for tapes which are expired date has older than 3 months now..
i am curious to know... any reason why you are not looking for all expired tapes.. or expired tapes with in 3 months...
10-14-2014 10:53 AM
so you are looking for tapes which are expired date has older than 3 months now..
i am curious to know... any reason why you are not looking for all expired tapes.. or expired tapes with in 3 months...
10-14-2014 01:28 PM
The available_media script in the netbackup/bin/goodies dir may assist you here ... I don't have the output to hand, but you should be able to see the tapes that are unused, sorted by pool, then take these tape and run through vmquery -m to get the date info ...
10-14-2014 01:44 PM
nbemmcmd command might be the way to proceed.
nbemmcmd -listmedia -poolname Scratch
will provide details of scratch volumes (use the actual scratch pool name in your own environment)
then look at Previous Pool Name: (Pool 5 in your case)
then look at Last Written: (unfortunately Data Expiration: field will aready be erased)
Sorry I'm not that proficient in Windows scripts; guessing you could use findstr to extract what you need.
10-14-2014 02:31 PM
Sorry it's probably not that clear... basically the retention date of the tapes in the weekly pool are 3 months... so any tapes that are older than 3 months from today should be expired... so i'm after all weekly tapes older than 3 months..
10-14-2014 02:35 PM
I dont think we actually use a scratch pool so i can't reference it... I looked into the available media script but dont know how to filter it using findstr... as the it's hard to reference a date that is 90 days in the past from the current day hence why i was hoping to use a netbackup command with a built in syntax like bpimagelist's switch for stating 2 dates X and Y ... I was wondering whether anyone had any example script in batch for me to look into? or something in VB as a last result?
10-14-2014 02:45 PM
10-14-2014 06:05 PM
As WR wrote, you can not get expiration date of media that have been already expired. only media you can get its expiration date is currently assigned media.
10-15-2014 03:02 AM
What does the expiration date field default too when the tape has been expired? something like? "---"
10-20-2014 01:31 PM
just a single dash -
10-22-2014 02:46 AM
Best to be proactive and see when tapes are due to expire rather than trying to find information that no longer exists (expiration date of 3 months ago).
Use 'Media Summary' report with Verbose option selected.
Run this report on a regular basis.