Page last modified 19:15, 19 May 2006 by Ppragin?

Upgrading 2.4.5 community edition Server to 2.5 Enterprise Server

Table of contents
No headers

Use this command to find where the old installation directories and files are located:

amanda@vmservercomm ~]$ amadmin x version
build: VERSION="Amanda-2.4.5b1"
      BUILT_DATE="Mon May 8 10:07:46 PDT 2006"
      BUILT_MACH="Linux vmservercomm.zmanda.com 2.6.11-1.1369_FC4smp"
      CC="gcc"
      CONFIGURE_COMMAND="'./configure' '--with-user=amanda' '-with-group=disk'"
paths: bindir="/usr/local/bin" sbindir="/usr/local/sbin"
      libexecdir="/usr/local/libexec" mandir="/usr/local/man"
      AMANDA_TMPDIR="/tmp/amanda" AMANDA_DBGDIR="/tmp/amanda"
      CONFIG_DIR="/usr/local/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/gtar"
      COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
      LPRCMD="/usr/bin/lpr" MAILER="/usr/bin/Mail"
      listed_incr_dir="/usr/local/var/amanda/gnutar-lists"
defs:  DEFAULT_SERVER="vmservercomm.zmanda.com"
      DEFAULT_CONFIG="DailySet1"
      DEFAULT_TAPE_SERVER="vmservercomm.zmanda.com"
      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:

[amanda@vmservercomm test]$ cat amanda.conf
org "zmanda"
mailto "[email protected]"
dumpcycle 4
runspercycle 4
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:

[amanda@vmservercomm test]$ cat /etc/passwd | grep amanda
amanda:x:501:6::/var/lib/amanda:/bin/bash

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

bindir             /usr/local/bin 
sbindir            /usr/local/sbin                             
libexecdir         /usr/local/libexec                                                  
AMANDA_DBGDIR      /tmp/amanda                           
CONFIG_DIR         /usr/local/etc/amanda                    
listed_incr_dir    /usr/local/var/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

Remove the old amanda xinetd files:

[root@vmservercomm ~]# cd /etc/xinetd.d
[root@vmservercomm xinetd.d]# ls | grep amanda
amanda
[root@vmservercomm xinetd.d]# rm amanda
rm: remove regular file `amanda'? y

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@vmservercomm amanda]# pwd
/var/lib/amanda
[root@vmservercomm amanda]# ls
test
[root@vmservercomm amanda]# tar -cvf /amandamove/index_curinfo.tar *
test/
test/amdump.1
test/changerfile-slot
test/oldlog/
test/log.20060508.0
test/tapelist.amlabel
test/index/
test/index/vmclientcomm.zmanda.com/
test/index/vmclientcomm.zmanda.com/_boot/
test/index/vmclientcomm.zmanda.com/_boot/20060508_0.gz
test/index/vmclientcomm.zmanda.com/_boot/20060508_1.gz
test/tapelist
test/changerfile-access
test/curinfo/
test/curinfo/vmclientcomm.zmanda.com/
test/curinfo/vmclientcomm.zmanda.com/_boot/
test/curinfo/vmclientcomm.zmanda.com/_boot/info
test/tapelist.yesterday
test/log.20060508.1
test/amdump.2
test/changerfile-clean
 

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

[root@vmservercomm amanda]# pwd
/usr/local/etc/amanda
[root@vmservercomm amanda]# ls
test
[root@vmservercomm amanda]# tar -cvf /amandamove/amanda_config.tar *
test/
test/disklist
test/amanda.conf

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

cp /var/lib/amanda/.amandahosts /amandamove

Remove the old amanda directories:

[root@vmservercomm var]# rm -rf /var/lib/amanda
[root@vmservercomm var]# rm -rf /usr/local/etc/amanda
[root@vmservercomm var]# rm -rf /tmp/amanda

Remove all amanda files from /usr/local/sbinand /usr/local/bin:

[root@vmservercomm sbin]# ls
amadmin    amcleanup  amflush    ammt        amreport   amstatus    amtoc
amcheck    amdd       amgetconf  amoverview  amrestore  amtape      amverify
amcheckdb  amdump     amlabel    amrecover   amrmtape   amtapetype  amverifyrun
[root@vmservercomm sbin]# rm -rf *

Install the amanda enterprise rpm:

[root@vmservercomm server]# rpm -ivh amanda_enterprise-backup_server-2.5.0int9-1.fc4.i386.rpm
warning: amanda_enterprise-backup_server-2.5.0int9-1.fc4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 3c5d1c92
Preparing...                ########################################### [100%]
chown: `amandabackup:disk': invalid user
  1:amanda_enterprise-backu########################################### [100%]
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]

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

[root@vmservercomm amandamove]# pwd
/amandamove
[root@vmservercomm amandamove]# cd /etc/amanda
[root@vmservercomm amanda]# tar -vxf /amandamove/amanda_config.tar
test/
test/disklist
test/amanda.conf

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

[root@vmservercomm amanda]# cd /var/lib/amanda
[root@vmservercomm amanda]# ls
gnutar-lists  template.d
[root@vmservercomm amanda]# tar -vxf /amandamove/index_curinfo.tar
test/
test/amdump.1
test/changerfile-slot
test/oldlog/
test/log.20060508.0
test/tapelist.amlabel
test/index/
test/index/vmclientcomm.zmanda.com/
test/index/vmclientcomm.zmanda.com/_boot/
test/index/vmclientcomm.zmanda.com/_boot/20060508_0.gz
test/index/vmclientcomm.zmanda.com/_boot/20060508_1.gz
test/tapelist
test/changerfile-access
test/curinfo/
test/curinfo/vmclientcomm.zmanda.com/
test/curinfo/vmclientcomm.zmanda.com/_boot/
test/curinfo/vmclientcomm.zmanda.com/_boot/info
test/tapelist.yesterday
test/log.20060508.1
test/amdump.2
test/changerfile-clean

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

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

Change onwership on the following amanda directories:

[root@vmservercomm amanda]# chown -R amandabackup:disk /var/lib/amanda
[root@vmservercomm amanda]# chown -R amandabackup:disk /etc/amanda
[root@vmservercomm 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 15855092 kB free, using nothing
slot 3: read label `TEST-3', date `X'
NOTE: skipping tape-writable test
Tape TEST-3 label ok
Server check took 2.728 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: vmclientcomm.zmanda.com: [access as amanda not allowed from [email protected]] amandahostsauth failed
Client check: 1 host checked in 0.208 seconds, 1 problem found
(brought to you by Amanda 2.5.0int9)
-sh-3.00$

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 15855092 kB free, using nothing
slot 3: read label `TEST-3', date `X'
NOTE: skipping tape-writable test
Tape TEST-3 label ok
Server check took 2.728 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.208 seconds, 0 problems found
(brought to you by Amanda 2.5.0int9)
-sh-3.00$