Networker

Re: [Networker] List last FULL using mminfo

2009-09-25 13:05:45
Subject: Re: [Networker] List last FULL using mminfo
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 25 Sep 2009 11:59:30 -0500
In regard to: [Networker] List last FULL using mminfo, Nelson, Allan said...:

Hi
Can someone with more knowledge of mminfo than me (not hard) tell me if there's 
a way to just list the last 'FULL' backup info for a client.

For example...

mminfo -q 'client=xyz, level=full' -r 'client, savetime, ssid'

will list me ALL the full's of client xyz.  I just want the latest one
and was curious if there's a way to do that just with mminfo without
resorting to more scripting to remove the other entries it returns.

There's no way to do this.  The closest you can get is to restrict to
fulls more recent than a certain date, something like

        mminfo -ot -q 'client=xyz,level=full,savetime<=last Saturday'

But I'll warn you that mminfo's parsing of relative times specified using
phrasing like this has been problematic in the past.  It generally works,
except when it doesn't.  ;-)  I also find I mix up the sense of the <, <=,
, and >= a lot when I use relative time vs. using something a bit more
absolute.

See nsr_getdate(3) for more info.

You probably also want '!suspect' somewhere in your query.

You'll have to resort to some type of scripting to solve the problem
you're facing.  The "no recent fulls" script I use does this:

- generate a list of all fulls for the last 3 months (savetime>=3 months
  ago) and save to a temp file.

- generate a list of all fulls for just the last N days, where N is
  something I specify based on our backup schedule.  Save this list to
  a second temp file.

- Use the UNIX "diff" command to diff the two files (sets).  Any results
  in set 1 (last 3 months) that are missing from set 2 (last N days) mean
  that

  - the client has been retired in the last 3 months

  or

  - the client missed its expected full backup

Not elegant, but it helps us identify what clients need to have their full
backups re-run.

Tim
--
Tim Mooney                                             Tim.Mooney AT ndsu DOT 
edu
Enterprise Computing & Infrastructure                  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 with 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

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