Networker

[Networker] [Fwd: Re: [Networker] Need advice on mminfo command]

2003-11-24 19:33:52
Subject: [Networker] [Fwd: Re: [Networker] Need advice on mminfo command]
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Mon, 24 Nov 2003 19:32:36 -0500
-------- Original Message --------
Subject: Re: [Networker] Need advice on mminfo command
Date: Mon, 24 Nov 2003 19:32:15 -0500
From: George Sinclair <george.sinclair AT noaa DOT gov>
Reply-To: george.sinclair AT noaa DOT gov
To: Darren Dunham <ddunham AT taos DOT com>
References: <200311242350.PAA18733 AT redwood.taos DOT com>

Thanks, Darren. To be more specific, I don't care how long ago the
saveset was backed up. What I want to know is that if there is an entry
in the database for it, then I need to know if it's complete, not
suspect and either recoverable or recyclable. It's okay if it's
recylable as long as it's recylable because it's beyond the retention
policy (one year) and not for some other reason. If a saveset is
recylable, how do you know that is was not something other than time
that made it that way? Can NetWorker mark a saveset as recycable for
some other reason and if so, is there some attributes I can add to check
for that?

I guess I need to put some kind of 'or' condition on the command to
check for either recoverable or ssrecycle, but I don't see any way to do
that, so I'm thinking I would need to run the command first as:

mminfo -s server -q
'name=path,client=client,recoverable,!ssrecycle,!incomplete,!suspect' -r
'client,ssid,savetime,name'

and if it returns nothing then run it again as:

mminfo -s server -q 'name=path,client=client,ssrecycle,!recoverable,
!incomplete,!suspect' -r 'client,ssid,savetime,name'

to be sure it's not still in there as recyclable and if this returns
something then check to see that it's older than one year? If not then
back up.

Looks like the mminfo command also supports the clflags showing aborted,
incomplete and suspect for clones savesets. Guess I can use that for
that.

George

Darren Dunham wrote:
>
> >
> > Hi,
> >
> > I want to query the database from a shell or perl script to determine if
> > a particular saveset (pathname) has already been backed up. The pathname
> > is a one-time full that is recoverable but not browsable. Indexing is
> > turned off on the backup pool for the affected saveset(s). If it has not
> > been backed up yet, or if it has, but for some reason it's reported as
> > incomplete or suspect or bad or anything like that then I want to back
> > it up; otherwise, don't. I'm okay with spanning savesets. I'm thinking I
> > need to run the mminfo command from my script like:
> >
> > mminfo -s server -c client -v -q 'name=path'
>
> -v (instead of -r <report>) will give you a particular canned report.
>
> > and then if it returns something then check the flag values?
>
> Just query for what you want the first time so you don't have to check
> something later.  Do you care how old this backup is?  Is a 5 year old
> copy enough to keep you from doing another backup?
>
> mminfo -s server -q 
> 'name=path,client=client,recoverable,!ssrecycle,!incomplete,!suspect' -r 
> 'client,ssid,savetime,name'
>
> > I know
> > there are a lot of other switches and options, though. Does anyone have
> > any advice on a better way to run this command. Will this work? What
> > options should I be checking? Maybe I'm forgetting something?
>
> The better you can define what you want to see or not see, the better we
> can help you with it.  Take a look at all the options in the mminfo man
> page and see if any of them are what you want.  Ask if you have
> questions.
>
> > I will also need to determine if it's been cloned, and if the clone is
> > good, and if not I need to clone it.
>
> "clone is good"?  I don't know what you mean by that.  The media
> database can only tell you if there's a copy that has been done in the
> past that is still tracked in the database.  It can't tell you if
> anything is good, really.
>
> You could just ask for savesets with only one copy (indicating no
> clone)...
>
> -q '....,copies=1'
>
> Or you could report on the cloneid and have the script notice that one
> ssid has two cloneids (and must be cloned).
>
> -r '...,ssid,cloneid'
>
> > Would appreciate any suggestions on how to run the command(s) to
> > determine this. I can write perl or Bourne shell. If perl, it will
> > probably be executed from cron using Bourne shell.
>
> Running the command should be the easy part.  Parsing the output can be
> done with whatever you feel comfortable.  I use perl, generally.
>
> --
> Darren Dunham                                           ddunham AT taos DOT 
> com
> Unix System Administrator                    Taos - The SysAdmin Company
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >

--
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.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=