Davina,
Thanks so much. And why did I just know you'd have something
that does this?
Happy holidays to you and all.
Matt Temple
Davina Treiber wrote:
Matt Temple wrote:
I was looking for a script that would likst out the last full
backup of all filesystems on all clients. I looked through the
archives in ways that made sense to me, but didn't see what I was
looking for. Has anyone written a script to do this that he or
she would like to share?
#!/usr/bin/perl
open MMINFO, "mminfo -q \"!incomplete,level=full\" -r
\"nsavetime,savetime,client,totalsize(9),name\" |";
while (<MMINFO>) {
next if /^ save time /;
($nsavetime, $savetimeraw, $client, $size, $mult, @name) = split;
$name = join " ", @name;
$_ = $savetimeraw;
($mm, $dd, $yy) = split /\//;
$savetime = "$yy/$mm/$dd";
if (defined $latestnsavetime{$client}{$name}) {
$l_nsavetime = $latestnsavetime{$client}{$name};
if ($nsavetime gt $l_nsavetime) {
$latestnsavetime{$client}{$name} = $nsavetime;
$latestsavetime{$client}{$name} = $savetime;
$latestsize{$client}{$name} = "$size $mult";
}
else {
};
}
else {
$latestnsavetime{$client}{$name} = $nsavetime;
$latestsavetime{$client}{$name} = $savetime;
$latestsize{$client}{$name} = "$size $mult";
};
};
for $client (sort keys %latestnsavetime) {
for $name (sort keys %{ $latestnsavetime{$client} } ) {
printf "%10s %-15s%-40s%-10s%8s\n",
$latestnsavetime{$client}{$name}, $client, $name,
$latestsavetime{$client}{$name}, $latestsize{$client}{$name};
};
};
--
=============================================================
Matthew Temple Tel: 617/632-2597
Director, Research Computing Fax: 617/582-7820
Dana-Farber Cancer Institute mht AT research.dfci.harvard DOT edu
44 Binney Street, LG300/300 http://research.dfci.harvard.edu
Boston, MA 02115 Choice is the Choice!
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
wit 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
|