Networker

Re: [Networker] mminfo - date sorting and reporting

2004-01-27 12:14:37
Subject: Re: [Networker] mminfo - date sorting and reporting
From: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Tue, 27 Jan 2004 11:14:30 -0600
In regard to: [Networker] mminfo - date sorting and reporting, Denny, John...:

>At present I want to send all tapes
>that are full backups of a specific client that are 6 days old and older
>offsite.

In theory I understand what you're asking for, but there are a number of
cases that you'll need to be sure you handle or have planned for.

>   The tool of choice for scripting this would seem to be mminfo.
>However, the date options on mminfo all go from a specific date and newer,
>not older!

mminfo can handle both newer than and older than type queries:

Newer than:

        mminfo -q 'client=yourclientname,level=full,savetime>=01/21/2004' \
                -r 'nsavetime,savetime,ssid,client,name,level,volume'

Older than:

        mminfo -q 'client=yourclientname,level=full,savetime<01/21/2004' \
                -r 'nsavetime,savetime,ssid,client,name,level,volume'

or

        mminfo -q 'client=yourclientname,level=full,savetime<6 days ago' \
                -r 'nsavetime,savetime,ssid,client,name,level,volume'


(notice the < ).  It's handling of certain date-related queries has been
a little buggy over the years, but I think a lot of that has been fixed.
I've taken to not using the (handy) "N days ago" or "N weeks ago" syntax,
instead calculating current time in seconds and then subtracting the
appropriate number of seconds from that, and using an `nsavetime'
comparison.  That worked reliably for me when other queries did not,
though it may not be a useful workaround anymore (if the mminfo syntax
works for you, use it)

>    I've read through the docs and through this mail list archive
>and haven't stumbled across a way to reverse this.   I find myself wondering
>2 things.   Does anybody else do it this way and if so, how, and secondly if
>no one is doing it this way, then what are people doing for getting tapes
>offsite.   i.e..  Does everybody clone?

Not everybody, but a lot of people certainly do.

Tim
--
Tim Mooney                              mooney AT dogbert.cc.ndsu.NoDak 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

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

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