Networker

[Networker] mminfo for getting tapes 4 months old?

2013-02-05 20:39:13
Subject: [Networker] mminfo for getting tapes 4 months old?
From: bingo <networker-forum AT BACKUPCENTRAL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 5 Feb 2013 17:38:53 -0800
The mminfo command seems to be clear:    mminfo -q 
"family=tape,savetime>=start_date,savetime<end_date,..." -r volume > 
volnames.txt

There are 2 challenges:
  - calculating the correct days
  - determine unique volume names as the command only returns save sets
For such issues i prefer MS's PowerShell as it provides all possibilities. 

To calculate the dates let me suggest that you run commands like this:
  $start_date = (get-date).addmonths(-4)
  $end_date  =  get-date.($start_date).adddays(7)
Finally extract the date. This is not so easy but you will find lots of 
examples in the internet.

To determine the unique volume names you may proceed as follows:
  $volumes = import-csv $path_to_volnames.txt | select volume | get-unique 
-asstring

Finally prepare the mminfo command and execute it.

------------------------------------------------------------------------------------------------------------------

Another alternative would be to use additional criteria to avoid such 
complicated script. For example:
  mminfo -q "savetime>=-4months,location='<your_jbox_name>'" -r volume
This command already returns a unique list of all volumes, which are old enough 
but still in the jukebox. Older ones should have been moved already, correct?
This would also help in case you must re-export tapes again which you have 
imported for recoveries in the interim.

+----------------------------------------------------------------------
|This was sent by carsten_reinfeld AT avus-cr DOT de via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------