SETUP OF AMANDA ON LINUX (x86) AND SOLARIS (SPARC, X86) MACHINES

1. Short description what I have and what I want to achieve:

We have 12 machines:
* 1 Ultra Sparc 1, OS – Solaris 2.5.1
* 1 Sparc 20, OS – Solaris 2.5.1
* 10 PCs : 3 of them x86 Solaris 2.6, rest of them Linux RedHat 6.1

Server is running RedHat 6.1 and it is not backed up (–without-client in ./configure you will see below) rest of machines are just clients. We run backups with 60 tapes in tapecycles by 20 tapes per cycle (you should definitely read through amanda.conf). We are using GNU tar, because of compatibility of this software across platforms and versions. Our backups will have a name ASPgroup (as you can see in ./configure below). You can choose what ever you want, but do not forget change it everywhere you see ASPgroup.

2. Both client and server – amanda-2.4.1p1

1. Download tar gzip file of amanda amanda-2.4.1p1.tar.gz .
* Download patch for RedHat 6.1 glibc22.patch if you need it.
* Download patch for RedHat 6.0 glibc21.patch if you need it.
2. Download GNU tar tar.1.13.tar.
3. Download gzip gzip-1.2.4.tar.
4. Make account for backup (ID, groupID and home directory as /u/backup as well) .
5. In home directory of backup create file .amandahosts own by backup, containing full name of backup server following by user backup (server.backup.com backup) .
6. cd /usr/local/src
7. tar xvfz amanda-2.4.1p1.tar.gz

#

For server server.backup.com – amanda-2.4.1p1 (This is for Linux Server!)

1. ./configure –without-client –with-index-server=server.backup.com –with-user=backup –with-group=backup –with-config=ASPgroup –with-tape-server=server.backup.com –with-tape-device=/dev/nst0 –with-gnutar=/bin/tar –with-gnutar-listdir=/usr/local/etc/amanda/gnutar-lists –with-amandahosts –with-buffered-dump –with-assertions –with-debugging=/var/log/debug –enable-shared
2. if you are going to use samba you have to add two following options: –with-smbclient=/usr/bin/smbclient –with-samba-user=backup and create /etc/amandapass file with umask 400, containing path to winPC (//vega/c) + password for backup(“blable”)
3. make
4. make check
5. make install
6. mkdir /var/log/debug
7. chown backup /var/log/debug
8. chgrp backup /var/log/debug
9. mkdir /usr/local/etc/amanda
10. mkdir /usr/local/etc/amanda/gnutar-lists
11. mkdir /usr/local/etc/amanda/ASPgroup
12. mkdir /usr/local/etc/amanda/ASPgroup/curinfo
13. mkdir /usr/local/etc/amanda/ASPgroup/log
14. mkdir /usr/local/etc/amanda/ASPgroup/index
15. touch /usr/local/etc/amanda/ASPgroup/disklist
16. touch /usr/local/etc/amanda/ASPgroup/tapelist
17. touch /usr/local/etc/amanda/ASPgroup/exclude
18. chown -R backup /usr/local/etc/amanda
19. chgrp -R backup /usr/local/etc/amanda
20. touch /etc/amandates
21. chown backup /etc/amandates
22. chgrp backup /etc/amandates
23. vi /etc/inetd.conf  and add following lines
24.
* #amanda dgram udp wait backup /usr/local/libexec/amandad amandad (this is need it for client computers)
* amandaidx stream tcp nowait bin /usr/local/libexec/amindexd amindexd
* amidxtape stream tcp nowait bin /usr/local/libexec/amidxtaped amidxtaped
25. check if you have following services in /etc/services
* amanda 10080/udp            # amanda backup services
* amandaidx 10082/tcp         # amanda backup services
* amidxtape 10083/tcp          # amanda backup services
26. /etc/rc.d/rc5.d/S50inetd restart

#

For client client.backup.com – amanda-2.4.1p1

1. ./configure –without-server –with-index-server=server.backup.com –with-user=backup –with-group=backup –with-config=ASPgroup –with-tape-server=server.backup.com –with-tape-device=/dev/nst0 –with-gnutar=/bin/tar –with-gnutar-listdir=/usr/local/etc/amanda/gnutar-lists –with-amandahosts –with-buffered-dump –with-assertions –with-debugging=/var/log/debug –enable-shared
2. Note: if you sharing /usr/local add your binaries into /var/local including gnutar-lists -> change in  ./configure line –prefix=/var/local and change –with-gnutar-listdir=/usr/local/etc/amanda/gnutar-lists instead of –with-gnutar-listdir=/var/local/amanda/gnutar-lists
3. Note: for Solaris 2.6 (x86) change -D_LARGEFILE_SOURCE to -D_LARGEFILE64_SOURCE in following Makefiles:
* ./changer-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
* ./common-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
* ./recover-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
* ./restore-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
* ./server-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
* ./tape-src/Makefile:CPPFLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
4. make
5. make check
6. make install
7. mkdir /var/log/debug
8. chown backup /var/log/debug
9. chgrp backup /var/log/debug
10. mkdir /usr/local/etc/amanda (or /var/local/amanda)
11. mkdir /usr/local/etc/amanda/gnutar-lists (or /var/local/amanda/gnutar-lists)
12. chown -R backup /usr/local/etc/amanda (or /var/local/amanda)
13. chgrp -R backup /usr/local/etc/amanda (or /var/local/amanda)
14. touch /etc/amandates
15. chown backup /etc/amandates
16. chgrp backup /etc/amandates
17. check if you have following services in /etc/services
* amanda 10080/udp # amanda backup services
* amandaidx 10082/tcp # amanda backup services
* amidxtape 10083/tcp # amanda backup services
18. vi /etc/inetd.conf and add
* amanda dgram udp wait backup /usr/local/libexec/amandad amandad   (or amanda dgram udp wait backup /var/local/libexec/amandad amandad # just if you are sharing /usr/local # this actually for just client)
* #amandaidx stream tcp nowait bin /usr/local/libexec/amindexd amindexd ( or  #amandaidx stream tcpnowait bin /var/local/libexec/amindexd amindexd  # this actually for just server)
* #amidxtape stream tcp nowait bin /usr/local/libexec/amidxtaped amidxtaped (#amidxtape stream tcpnowait bin /var/local/libexec/amidxtaped amidxtaped # this actually for just server)
19. /etc/rc.d/rc5.d/S50inet restart (path to S50inet will be different for Solaris

Steps after compilations

* After all these steps you should be OK and kind of ready. Now you have to decide which directories on clients will be backed up and what type of dumps you will use (please read in amanda.conf). Your wish list transfer to file /usr/local/etc/amanda/ASPgroup/disklist, which should look like this:
o client1 /u0/user1   user-high
o clinet2 /u2/user3   user-root
o etc.
* If you did not find your tapedrive in listing of amanda’s selection in amanda.conf you have to spend some time by running “tapetype”. How to compile it you will find again in amanda.conf. There you will find expression “it is slow like hell”. That guy is not joking, Have run it for my Eliant 820 and two runs took like ten hours, I am strongly suggest you to run it at least twice do get specific parameters for your tape drive.
* Now you should again go to amanda.conf and decide how your label for tapes will looks. Our has name of backup server and volume number (server-volume00). Be careful it is case sensitive.
* You should also assign one partition on server as a holding disk it is good to have at least same size as tape is. This has to be specified in amanda.conf too.
* So lets go label your first tape by typing: /usr/local/sbin/amlabel -f ASPgroup sulfur-volume00 (obviously you will type names which you choose in your amanda.conf). All data on tape are destroyed.
* Now type /usr/local/sbin/amcheck ASPgroup to check your configuration, tape, server and clients.You should get something like this:
* Amanda Tape Server Host Check
—————————–
/backup: 6440197 KB disk space available, using 6255877 KB.
NOTE: skipping tape-writable test.
Tape sulfur-volume00 label ok.

Server check took 10.160 seconds.

Amanda Backup Client Hosts Check
——————————–
Client check: 11 hosts checked in 4.723 seconds, 0 problems found.

(brought to you by Amanda 2.4.1p1)
* If you have got something similar you can start with backups by typing /usr/local/sbin/amdump ASPgroup. If not you should check for error messages on screen and in files in /var/log/debug.

What to do to get files from backups?

* Type amrestore -p /dev/nst0 client1 /u0/user1 | tar xvf -