Page last modified 19:16, 19 May 2006 by Ppragin?
Zmanda Documentation > Upgrading 2.4.5 community edition Server Redhat RPM install to 2.5 Enterprise Server

Upgrading 2.4.5 community edition Server Redhat RPM install to 2.5 Enterprise Server

Table of contents
No headers

Use this command to find where the old installation directories and files are located:
-bash-3.00$ amadmin x version

build: VERSION="Amanda-2.4.5"
      BUILT_DATE="Fri Apr 22 14:58:00 EDT 2005"
      BUILT_MACH="Linux tweety.build.redhat.com 2.6.9-1.906_ELsmp #1 SMP Sun Dec 12 22:58:08 EST 2004 i686 i686 i386 GNU/Linux"
paths: bindir="/usr/bin" sbindir="/usr/sbin"
      libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
      AMANDA_TMPDIR="/var/log/amanda"
      AMANDA_DBGDIR="/var/log/amanda" CONFIG_DIR="/etc/amanda"
      DEV_PREFIX="/dev/" RDEV_PREFIX="/dev/r"
      DUMP="/sbin/dump" RESTORE="/sbin/restore" VDUMP=UNDEF
      VRESTORE=UNDEF XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF
      VXRESTORE=UNDEF SAMBA_CLIENT="/usr/bin/smbclient"
      GNUTAR="/bin/tar" COMPRESS_PATH="/usr/bin/gzip"
      UNCOMPRESS_PATH="/usr/bin/gzip" LPRCMD="/usr/bin/lpr"
      MAILER="/usr/bin/Mail"
      listed_incr_dir="/var/lib/amanda/gnutar-lists"
defs:  DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
      DEFAULT_TAPE_SERVER="localhost"
      DEFAULT_TAPE_DEVICE="/dev/null" HAVE_MMAP HAVE_SYSVSHM
      LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE
      AMANDA_DEBUG_DAYS=4 BSD_SECURITY USE_AMANDAHOSTS
      CLIENT_LOGIN="amanda" FORCE_USERID HAVE_GZIP
      COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
      COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"

View you amanda confguraton file amanda.conf to gather more information:

org "zmanda"
mailto "[email protected]"
dumpcycle 7
runspercycle 5
tapecycle 5
dumpuser "amanda"
tpchanger "chg-disk"                            # a virtual tape changer
tapedev "file:/space/vtapes/test/slots"
changerfile "/var/lib/amanda/test/changerfile"
labelstr "TEST-.*" 
#label_new_tapes "TEST-%%"
tapetype DVD_SIZED_DISK
logdir "/var/lib/amanda/test"
infofile "/var/lib/amanda/test/curinfo"
indexdir "/var/lib/amanda/test/index"
tapelist "/var/lib/amanda/test/tapelist"
holdingdisk hd1 {
   directory "/space/amandahold/test"
}
define dumptype comp-tar {
   program "GNUTAR"
   compress fast
   index yes
   record no           # Important! avoid interfering with production runs
}
define tapetype DVD_SIZED_DISK {
   filemark 4 KB
   length 4482 MB
}


Look for and take note of these directory paths in the amanda.conf file:

logdir "/var/lib/amanda/test"
infofile "/var/lib/amanda/test/curinfo"
indexdir "/var/lib/amanda/test/index"
tapelist "/var/lib/amanda/test/tapelist"

Find out where the amanda home directory is located:

-bash-3.00$ cat /etc/passwd | grep amanda
amanda:x:33:6:Amanda user:/var/lib/amanda:/bin/bash

Make a list of all the amanda directories and files that will be affected on the upgrade:

bindir             /usr/bin 
sbindir            /usr/sbin                             
libexecdir         /usr/lib/amanda                                                  
AMANDA_DBGDIR      /var/log/amanda                         
CONFIG_DIR         /etc/amanda                    
listed_incr_dir    /var/lib/amanda/gnutar-lists 
logdir             /var/lib/amanda/test
infofile           /var/lib/amanda/test/curinfo
indexdir           /var/lib/amanda/test/index
tapelist           /var/lib/amanda/test/tapelist
tapedev            file:/space/vtapes/test/slots
changerfile        /var/lib/amanda/test/changerfile
holding disk path  /space/amandahold/test

Remove the old user amanda from the passwd and shadow files:

[root@vmservercomm ~]# cat /etc/passwd | grep amanda
amanda:x:501:6::/var/lib/amanda:/bin/bash
[root@vmservercomm ~]# cat /etc/shadow | grep amanda
amanda:!!:13276:0:99999:7:::

Remove the old user amanda from the group disk in /etc/group file:

disk:x:6:root,amanda

Create a temporary directory called /amandamove for amanda files to to copied to while upgrading:

mkdir /amandamove

Tar up the files and dirs containing the logs, curinfo, indexdir and tapelist in to the /amandamove directory:

[root@vmredhatserver tmp]# cd /var/lib/amanda
[root@vmredhatserver amanda]# tar -cvf /amandamove/index_curinfo.tar *
DailySet1/
DailySet1/index/
test/
test/amdump.1
test/changerfile-slot
test/oldlog/
test/tapelist.amlabel
test/index/
test/index/vmredhatclient.zmanda.com/
test/index/vmredhatclient.zmanda.com/_boot/
test/index/vmredhatclient.zmanda.com/_boot/20060510_0.gz
test/log.20060510.0
test/tapelist
test/changerfile-access
test/curinfo/
test/curinfo/vmredhatclient.zmanda.com/
test/curinfo/vmredhatclient.zmanda.com/_boot/
test/curinfo/vmredhatclient.zmanda.com/_boot/info
test/tapelist.yesterday
test/changerfile-clean

Tar up the files and dirs containing all the amanda config files in to the /amandamove directory:

[root@vmredhatserver amanda]# cd /etc/amanda
[root@vmredhatserver amanda]# tar -cvf /amandamove/amanda_config.tar *
crontab.sample
DailySet1/
DailySet1/disklist
DailySet1/amanda.conf
test/
test/disklist
test/amanda.conf

Copy the /var/lib/amanda/.amandahosts to /amandamove:

[root@vmredhatserver amanda]# cp /var/lib/amanda/.amandahosts /amandamove

Determine what amanda rpm packages are already installed:

[root@vmredhatserver ppragin]# rpm -q amanda
amanda-2.4.5-2
[root@vmredhatserver ppragin]# rpm -q amanda-server
amanda-server-2.4.5-2
[root@vmredhatserver ppragin]# rpm -q amanda-client
package amanda-client is not installed

Unistall the original Redhat amanda rpm:

[root@vmredhatserver ppragin]# rpm -e amanda-server-2.4.5-2
warning: /etc/xinetd.d/amidxtape saved as /etc/xinetd.d/amidxtape.rpmsave
warning: /etc/xinetd.d/amandaidx saved as /etc/xinetd.d/amandaidx.rpmsave
[root@vmredhatserver ppragin]# rpm -e amanda-2.4.5-2
warning: /var/lib/amanda/.amandahosts saved as /var/lib/amanda/.amandahosts.rpmsave
[root@vmredhatserver ppragin]#

Remove the old amanda xinetd files:

[root@vmredhatserver xinetd.d]# cd /etc/xinetd.d
[root@vmredhatserver xinetd.d]# ls -al | grep am
-rw-r--r--   1 root root   229 May 10 09:44 amandaidx.rpmsave
-rw-r--r--   1 root root   232 May 10 09:44 amidxtape.rpmsave
[root@vmredhatserver xinetd.d]# rm amandaidx.rpmsave amidxtape.rpmsave
rm: remove regular file `amandaidx.rpmsave'? y
rm: remove regular file `amidxtape.rpmsave'? y
[root@vmredhatserver xinetd.d]#

Remove the old amanda directories:

[root@vmredhatserver /]# rm -rf /var/lib/amanda
[root@vmredhatserver /]# rm -rf /etc/amanda
[root@vmredhatserver /]# rm -rf /var/log/amanda

Install the amanda enterprise rpm:

[root@vmredhatserver server]# rpm -ih amanda_enterprise-backup_server-2.5.0-1.fc4.i386.rpm
warning: amanda_enterprise-backup_server-2.5.0-1.fc4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 3c5d1c92
########################################### [100%]
May 10 2006 10:58:24: Checking for 'amandabackup' user...
May 10 2006 10:58:24:
May 10 2006 10:58:24:  The Amanda backup software is configured to operate as the
May 10 2006 10:58:24:  user 'amandabackup'.  This user exists on your system and has not
May 10 2006 10:58:24:  been modified.  To ensure that Amanda functions properly,May 10 2006 10:58:24
May 10 2006 10:58:24:
May 10 2006 10:58:24:  SHELL:          /bin/sh
May 10 2006 10:58:25:  HOME:           /var/lib/amanda
May 10 2006 10:58:25:  Default group:  disk
May 10 2006 10:58:25:
May 10 2006 10:58:25:  Checking ownership of '/var/lib/amanda'... correct.
May 10 2006 10:58:25:
May 10 2006 10:59:10: === Amanda Enterprise backup server installation started. ===
########################################### [100%]
May 10 2006 10:59:13: Updating system library cache...done.
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]
May 10 2006 10:59:14: Restarting xinetd...success.
May 10 2006 10:59:15: Installing '/etc/amandates'.
May 10 2006 10:59:15: Ensuring correct permissions for '/etc/amandates'.
May 10 2006 10:59:16: '/etc/amandates' Installation successful.
May 10 2006 10:59:17: Installing '/var/lib/amanda/.gnupg'.
May 10 2006 10:59:17: Ensuring correct permissions for '/etc/.gnupg'.
May 10 2006 10:59:17: '/var/lib/amanda/.gnupg' Installation successful.
May 10 2006 10:59:17: Setting ownership and permissions for '/var/lib/amanda/.ssh' and '/var/lib/amanda/.ssh/id_rsa*'
May 10 2006 10:59:17: Checking for '/var/lib/amanda/.profile' and ensuring correct environment.
May 10 2006 10:59:18: Setting ownership and permissions for '/var/lib/amanda/.profile'
May 10 2006 10:59:18: === Amanda Enterprise backup server installation complete. ===
Amanda installation log can be found in '/var/log/amanda/install.log' and errors (if any) in '/var/log/amanda/install.err'.

Extract the amanda config files from /amandamove in to /etc/amanda:

[root@vmredhatserver amanda]# cd /etc/amanda
[root@vmredhatserver amanda]# tar -vxf /amandamove/amanda_config.tar
crontab.sample
DailySet1/
DailySet1/disklist
DailySet1/amanda.conf
test/
test/disklist
test/amanda.conf

Extract the amanda logs, curinfo, indexdir and taplist from /amandamove in to /usr/lib/amanda:

[root@vmredhatserver amanda]# cd /var/lib/amanda
[root@vmredhatserver amanda]# tar -vxf /amandamove/index_curinfo.tar
DailySet1/
DailySet1/index/
test/
test/amdump.1
test/changerfile-slot
test/oldlog/ 
test/tapelist.amlabel
test/index/
test/index/vmredhatclient.zmanda.com/
test/index/vmredhatclient.zmanda.com/_boot/
test/index/vmredhatclient.zmanda.com/_boot/20060510_0.gz
test/log.20060510.0
test/tapelist
test/changerfile-access
test/curinfo/
test/curinfo/vmredhatclient.zmanda.com/
test/curinfo/vmredhatclient.zmanda.com/_boot/
test/curinfo/vmredhatclient.zmanda.com/_boot/info
test/tapelist.yesterday
test/changerfile-clean

Copy the .amandahost file from /amandamove to the /var/lib/amanda directory:

[root@vmredhatserver amanda]# cp /amandamove/.amandahosts /var/lib/amanda/
cp: overwrite `/var/lib/amanda/.amandahosts'? y

Change onwership on the following amanda directories:

[root@vmredhatserver amanda]# chown -R amandabackup:disk /var/lib/amanda
[root@vmredhatserver amanda]# chown -R amandabackup:disk /etc/amanda
[root@vmredhatserver amanda]# chown -R amandabackup:disk /space

Edit the /var/lib/amanda/.amandahosts file and chnage all the amanda user entries to amandabackup:

vmredhatclient.zmanda.com root
vmredhatclient.zmanda.com amandabackup

Edit the amanda.conf file in /etc/amanda/test/amanda.conf and change the user entry from amanda to amandabackup:

dumpuser "amandabackup" 

Run amcheck on the configuration to see if the upgrade is complete (the error below is expected if you havent upgraded the client yet):

sh-3.00$ amcheck test
Amanda Tape Server Host Check
-----------------------------
WARNING: holding disk /space/amandahold/test: only 15887336 kB free, using nothing
slot 2: read label `TEST-2', date `X'
NOTE: skipping tape-writable test
Tape TEST-2 label ok
WARNING: tapecycle (5) <= runspercycle (5).
Server check took 2.350 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: vmredhatclient.zmanda.com: [access as amanda not allowed from [email protected]] amandahostsauth failed
Client check: 1 host checked in 0.451 seconds, 1 problem found
(brought to you by Amanda 2.5.0)


After the client has been upgraded run amcheck:

sh-3.00$ amcheck test
Amanda Tape Server Host Check
-----------------------------
WARNING: holding disk /space/amandahold/test: only 15887336 kB free, using nothing
slot 2: read label `TEST-2', date `X'
NOTE: skipping tape-writable test
Tape TEST-2 label ok
WARNING: tapecycle (5) <= runspercycle (5).
Server check took 2.350 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.451 seconds, 0 problems found
(brought to you by Amanda 2.5.0)