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
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