Networker

Re: [Networker] saveset Full dump query using mminfo or ???

2002-09-13 07:14:30
Subject: Re: [Networker] saveset Full dump query using mminfo or ???
From: "Maarten Boot (CWEU-USERS/CWNL)" <Maarten_Boot AT NL.COMPUWARE DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Fri, 13 Sep 2002 13:04:23 +0200
Thanks Davina, that is a much better way at it than the one I have now
in my scripts for dynamic full backup after 30 days (used for destop
machines).

Small note: I would put a mminfo -a -q'!ssrecyle,!incomplete' in the
script and maybe work on the continued savesets as they mess up the
savesetname.

Maarten

Davina Treiber wrote:
>
> On Thu, 12 Sep 2002 08:12:44 -0400, Matt Divens <divens AT STSCI DOT EDU> 
> wrote:
>
> >   I'm trying to find a fast, efficient way to quesry the networker
> database
> >and get a report of all savesets that have NOT had a full dump in the past
> 5
> >weeks.  I assume mminfo would give this to me, but I am having trouble
> >getting the query right. Does anyone have input on this?
>
> I don't think there's a single query you could run to give this
> information, anything you do would need further processing. I wrote a
> script recently to list the most recent instance of every save set in the
> media DB. This might be useful to you so that you could then pick out any
> dates more than 5 weeks ago. I will post the script here, but warn you that
> it is a bit rough and ready, with no comments, and not particularly well
> tested yet. Here it is:
>
> #!/app/bin/perl
>
> # show_latest_full
>
> open MMINFO, "mminfo -a |";
> while (<MMINFO>) {
>         ($vol, $client, $savetimeraw, undef, undef, $level, @name) = split;
>         $name = join "sPaCe", @name;
>         $_ = $savetimeraw;
>         ($mm, $dd, $yy) = split /\//;
>         $savetime = "$yy/$mm/$dd";
>         if ($level eq "full") {
>                 if (defined $latestsavetime{$client}{$name}) {
>                         $l_savetime = $latestsavetime{$client}{$name};
>                         if ($savetime gt $l_savetime) {
> #                               print "old = $l_savetime, new =
> $savetime\n";
>                                 $latestsavetime{$client}{$name} = $savetime;
>                                 $latestvol{$client}{$name} = $vol;
>                         }
>                         else {
> #                               print "not replacing $l_savetime with
> $savetime\n";
>                         };
>                 }
>                 else {
> #                       print "new = $savetime\n";
>                         $latestsavetime{$client}{$name} = $savetime;
>                         $latestvol{$client}{$name} = $vol;
>                 };
>         };
> };
>
> for $client (sort keys %latestsavetime) {
>         for $name (sort keys %{ $latestsavetime{$client} } ) {
>                 $rightname = $name;
>                 $rightname =~ s/sPaCe/ /g ;
>                 printf "%-15s%-40s%-11s%-20s\n", $client, $rightname,
> $latestsavetime{$client}{$name}, $latestvol{$client}{$name};
>         };
> };
>
> --
> Note: To sign off this list, send a "signoff" 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.
> =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

--
One of the problems with Java is that they swept a bit too much
of the innate complexity of life under the carpet of the libraries.
And so now they've had to replace the carpets several times.
(Larry
Wall,http://interviews.slashdot.org/article.pl?sid=02/09/06/1343222)

--
Note: To sign off this list, send a "signoff" 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.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=