Networker

Re: [Networker] Cloning all incrementals for a client or group

2008-05-30 18:04:01
Subject: Re: [Networker] Cloning all incrementals for a client or group
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 30 May 2008 16:58:45 -0500
In regard to: [Networker] Cloning all incrementals for a client or group,...:

I would like to be able to clone all incremental backups since the last
full for a client  or group to a tape each day. I cannot figure out how
to do this, or if it is even possible.

The hard part is answering "when was the last full?", in a robust way.  It
gets complicated when you account for the fact that different filesystems
may have had their most recent fulls on different days (for any number of
reasons, backup failures being the most common).

The way I would do it is to first figure out all of the filesystems for
a particular client.  That can be done with something like this (on
UNIX/Linux):

client=your_client_name_here
IFS='
'
for f in `mminfo -q "client=$client,level=full" -r 'name' | sort -u`
do
        last_full=`mminfo -ot \
                -q "client=$client,level=full,name=$f" -r 'savetime' | tail -n 
1`
        echo "Last full for $client fs=$f was $last_full"
done

Once you have that figured out, finding the incrementals is easy: you just
replace the "echo" with

        mminfo -ot \
                -q "client=$client,level=incr,savetime>$last_full,name=$f" \
                -r 'ssid'

That should generate the list of ssids for all incrementals since the
most recent full for all filesystems for the specified client.  Stick
those in a file and run nsrclone with that list of ssids, and it should
accomplish what you want.

Tim
--
Tim Mooney                                        Tim.Mooney AT ndsu DOT edu
Information Technology Services                   (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

<Prev in Thread] Current Thread [Next in Thread>