Networker

Re: [Networker] List last FULL using mminfo

2009-09-29 07:22:13
Subject: Re: [Networker] List last FULL using mminfo
From: Mats Atari <mats.atari AT GMAIL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 29 Sep 2009 07:18:25 -0400
Hello Allan!

I wrote this yesterday. Will list latest full backups for all clients in
your system. 
You can use this and add more reports (-r), like for example add an extra
column for "suspect" save sets.

Also bare in mind that this info is incorrect with some module backups like
for example Oracle rman backups, where you need to adjust the script to
splitted backups into 1 entity.

# cat latestfull.bash
#!/bin/bash
. /etc/profile

#
# Find all clients for server
#
SERVER=$1
export SERVER

LEVEL=full

mminfo -s $SERVER -avr client | sort -u > /tmp/clientlist
echo > /tmp/result.csv

for i in `cat /tmp/clientlist | grep -v $SERVER`; do mminfo -s $SERVER -avr
name -q client=$i | sort -u | sed -e 's/\\/\\\\/' >> /tmp/names; while read
name; do echo -n "$i; " >> /tmp/result.csv; echo -n "$name; " >>
/tmp/result.csv; mminfo -s $SERVER -ot -avr totalsize'(20)',savetime -q
client=$i,name="$name",level=$LEVEL | tail -1 | awk '{ s = $1 }{ print
s/1024/1024/1000, " GB",";",$2 }' | sed -e 's/\./,/' >> /tmp/result.csv;
done < /tmp/names ; rm /tmp/names; done

cat /tmp/result.csv
echo ""; echo "this file is stored in /tmp/result.csv"

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>