Amanda-Users

RE: magazine article, Solaris file system snapshots

2003-04-03 18:38:02
Subject: RE: magazine article, Solaris file system snapshots
From: "Ron Bauman" <RBauman AT HatterasNetworks DOT com>
To: "Kirk Strauser" <kirk AT strauser DOT com>, "Paul Bijnens" <paul.bijnens AT xplanation DOT com>
Date: Thu, 3 Apr 2003 17:17:39 -0500
Yeah, I was thinking that would be great, too.  I had to hack up the 
installation along the lines Jon was suggesting (thanks, Jon).  I needed to 
lock our ClearCase databases while dumping, so I wrap gtar with a shell script. 
 I use this script to configure amanda:

#!/bin/sh
#
# this is the configure shell script for Amanda on ccserv.
# list the command line options given to configure here "for the record."
# 3/11/03 Ron Bauman

./configure --prefix=/usr --with-user=amanda --with-group=disk \
        --libexecdir=/usr/lib/amanda --with-config=DailySet1 \
        --with-configdir=/etc/amanda --with-tape-device=/dev/tape \
        --without-debugging \
        --with-gnutar=/usr/lib/amanda/gtar-wrapper

# config file is in /etc/amanda/daily

----------------

And this script is /usr/lib/amanda/gtar-wrapper:

#!/bin/sh
#
# wrapper for the gtar utility.  used to find out what Amanda is backing up.
# if ClearCase vobs, we lock before and unlock after to insure a coherent
# backup.
#

# loop over .vbs files found in /vobstore. perform operation (lock or unlock)
# found in argument 1.

dovobs() {

        for file in `ls  -1d /vobstore/*.vbs`
        do
                base=`basename $file .vbs`
                sudo -u ccadmin /usr/atria/bin/cleartool $1 vob:/vobs/$base 
>>$DBGFILE
        done

}


if [ -d "/tmp/amanda" ]; then
        DBGFILE=/tmp/amanda/gtar-wrapper.debug
else
        DBGFILE=/dev/null
fi

echo "calling args-> $*" >>$DBGFILE

# if requesting a tar (instead of an estimate) and tarring vobstore...
if [ "$3" == "-" -a "$5" == "/vobstore" ]; then
        dovobs lock
        gtar $*
        result=$?
        dovobs unlock
else
        gtar $*
        result=$?
fi

exit $result

-----------------

It's a bit quirky in that the script has to be there before running configure, 
otherwise the check for gtar fails.  But it's working OK for us.  But a 
generalized pre- and post-dump option in the dumptypes would be very nice.

Ron Bauman


-----Original Message-----
From: Kirk Strauser [mailto:kirk AT strauser DOT com]
Sent: Thursday, April 03, 2003 4:23 PM
To: Paul Bijnens
Cc: Jon LaBadie; Amanda Users
Subject: Re: magazine article, Solaris file system snapshots


At 2003-04-03T16:24:07Z, Paul Bijnens <paul.bijnens AT xplanation DOT com> 
writes:

> I was investigating how to incorporate the feature more solid it into the
> program.

What I'd ideally like are settings for programs to be executed pre- and
post-dump for each filesystem.  Bonus points if the command is customizable
using variables like '%f' to mean the name of the filesystem.
-- 
Kirk Strauser
In Googlis non est, ergo non est.