Networker

Re: [Networker] List last FULL using mminfo

2009-09-28 03:29:31
Subject: Re: [Networker] List last FULL using mminfo
From: "Nelson, Allan" <an AT CEH.AC DOT UK>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 28 Sep 2009 08:23:00 +0100
Thanks for this Tim.  Very useful.  I'll certainly be including something to 
check for suspect or aborted savesets.  And thanks for the warning about 
relative times being 'problematic'. I'll watch out for that.
Early days but I have something working for test purposes.  Thanks again for 
everyones help/pointers with this.
Cheeers... allan. 

-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On 
Behalf Of Tim Mooney
Sent: 25 September 2009 18:00
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: Re: [Networker] List last FULL using mminfo

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

-- 
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.

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>