Amanda-Users

Re: Upgrading via source from 2.4.4p3 to 2.4.4p4.

2004-12-03 04:19:37
Subject: Re: Upgrading via source from 2.4.4p3 to 2.4.4p4.
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Gavin Henry <ghenry AT suretecsystems DOT com>
Date: Fri, 03 Dec 2004 10:16:05 +0100
Gavin Henry wrote:

Just wondering if upgrading is just a simple case of compiling the new
sources with the same configure options, which should just replace the
existing binaries?

That's what I did.

To be honest, I do it a little bit different, but in this case,
the effect is the same.

I compile with :
./configure \
        --prefix=/pkgs/amanda-2.4.4p4 \
        --localstatedir=/var/opt/amanda \
        --with-configdir=/var/opt/amanda/etc \
        --with-user=... etc etc

This builds a program tree in a decidated directory, different
for each version, and the config and state files in a more stable
directory.

Then I use "graft" to place symlinks in /usr/local (a perl script,
see http://www.gormand.com.au/peters/tools/graft/graft.html, but site
was down just this minute):

    graft -d amanda-2.4.4p3   # remove old links
    graft -i amanda-2.4.4p4   # install new links

Now /usr/local/sbin/amadmin points to /pkgs/amanda-2.4.4p4/sbin/amadmin
and so for all files in the tree /pkgs/amanda-2.4.4p4.
My path still remains manageable, and contains /usr/local/bin etc,
but not /pkgs/amanda*.  The "production" version has the links
in /usr/local; the old or experimental versions keep their own
separate tree in /pkgs/amanda-VERSION.

Instead of "replacing the existing binaries" this replaces the links
to the binaries.  The additional advantage is that, if the new version
has LESS files, none of the obsolete files stay lingering around.

The advantage is that I can install and test a new version, without
disrupting the old version (the config and state files are the same;
only if the config requires incompatible settings, I need to be a
little more careful).

Should the new version suddenly show some problems, I can revert to
the old version in a few seconds.  I can even execute old or new
versions by giving the full path /pkgs/amanda-2.4.4p1/sbin/amadmin
if needed.  After a few months, I can uninstall the old version
by simply doing a "rm -rf /pkgs/amanda-2.4.4p3".


--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************