AMANDA, the Advanced Maryland Automated Network Disk Archiver, is a public domain utility developed at the University of Maryland. For more information (and a good read) see:
-bash-2.05b$ /usr/sbin/amdump
could not open conf file "/etc/amanda/amanda.conf": No such file or directory
amgetconf: errors processing config file "/etc/amanda/amanda.conf"
-bash-2.05b$
-bash-2.05b$ /usr/sbin/amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
ERROR: tape list /etc/amanda/DailySet1/tapelist: parse error
Holding disk /var/tmp: 4639792 KB disk space available, that's plenty
ERROR: /dev/null: rewinding tape: Inappropriate ioctl for device
(expecting a new tape)
NOTE: skipping tape-writable test
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/localhost: does not exist
Server check took 30.110 seconds
Amanda Backup Client Hosts Check
--------------------------------
WARNING: localhost: selfcheck request timed out. Host down?
Client check: 1 host checked in 30.002 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
-bash-2.05b$
-bash-2.05b$ /usr/sbin/amlabel
. This requires a couple of arguments:Usage: /usr/sbin/amlabel [-f] <conf> <label> [slot<slot-number>]
<conf> represents the configuration, in my case it was DailySet1 (default from the RedHat installaion) and the <label> is specified in amanda.conf. , in my case "^DailySet1[0-9][0-9]*$" I had to create a directory to represent the tape and give amanda write permission. I used /fake_tape and added it to the amanda.conf file:
tapetype hard-disk
define tapettype hard-disk {
comment "Dump onto hard disk"
length 2048 mbytes #specify 2GB
}
tapedev "file:/fake_tape" # the no-rewind tape device to be used
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
ERROR: tape list /etc/amanda/DailySet1/tapelist: parse error
Holding disk /var/tmp: 4639540 KB disk space available, that's plenty
ERROR: /fake_tape/data/: No such file or directory
ERROR: /fake_tape/data/: No such file or directory
ERROR: file:/fake_tape: rewinding tape: Input/output error
(expecting a new tape)
NOTE: skipping tape-writable test
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.238 seconds
Amanda Backup Client Hosts Check
--------------------------------
WARNING: linux-snort.itas.ca: selfcheck request timed out. Host down?
Client check: 1 host checked in 30.243 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
bash-2.05b$ touch /etc/amanda/DailySet1/tapelist
bash-2.05b$ mkdir /fake_tape/data/
bash-2.05b$
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4640508 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.107 seconds
Amanda Backup Client Hosts Check
--------------------------------
WARNING: linux-snort.itas.ca: selfcheck request timed out. Host down?
Client check: 1 host checked in 30.004 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$>
[root@linux-snort /]# vi /etc/xinetd.d/amandaidx
and set:disable = no
then:[root@linux-snort /]# vi /etc/xinetd.d/amidxtape
and set:disable = no
[root@linux-snort /]# vi /etc/xinetd.d/amanda
and set:disable = no
after restarting the xinetd service running amcheck gave:
[root@linux-snort /]# vi /etc/xinetd.d/ambash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4640416 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.299 seconds
Amanda Backup Client Hosts Check
--------------------------------
WARNING: linux-snort.itas.ca: selfcheck request timed out. Host down?
Client check: 1 host checked in 30.359 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$andaidx
linux-snort.itas.ca amanda
linux-snort.itas.ca root
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4640368 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.003 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: linux-snort.itas.ca: [ip address 142.25.97.100 is not in the ip list for linux-snort]
Client check: 1 host checked in 0.105 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4640056 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.006 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: linux-snort.itas.ca: [Can't open exclude file '/usr/local/lib/amanda/exclude.gtar': No such file or directory]
Client check: 1 host checked in 0.379 seconds, 1 problem found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$
[root@linux-snort /]# mkdir /usr/local/lib/amanda
[root@linux-snort /]# touch /usr/local/lib/amanda/exclude.gtar
[root@linux-snort /]# chown amanda:disk /usr/local/lib/amanda/exclude.gtar
[root@linux-snort /]# ls -l /usr/local/lib/amanda/
total 0
-rw-r--r-- 1 amanda disk 0 Jan 19 16:58 exclude.gtar
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4640000 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
NOTE: it will be created on the next run
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca: does not exist
Server check took 0.019 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.335 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
[root@linux-snort /]# mkdir /var/lib/amanda/DailySet1/curinfo
[root@linux-snort /]# mkdir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca
[root@linux-snort /]# chown amanda:disk /var/lib/amanda/DailySet1/curinfo
[root@linux-snort /]# chown amanda:disk /var/lib/amanda/DailySet1/index/linux-snort.itas.ca
[root@linux-snort /]#
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639952 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca: does not exist
NOTE: index dir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca/_etc: does not exist
Server check took 0.020 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.429 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
bash-2.05b$ mkdir /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca
bash-2.05b$ mkdir /var/lib/amanda/DailySet1/index/linux-snort.itas.ca/_etc
bash-2.05b$
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639912 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
NOTE: info dir /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca/_etc: does not exist
Server check took 0.309 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 1.047 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
bash-2.05b$ mkdir /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca/_etc
bash-2.05b$
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639892 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
WARNING: info file /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca/_etc/info: does not exist
Server check took 0.006 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 10.364 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
bash-2.05b$ touch /var/lib/amanda/DailySet1/curinfo/linux-snort.itas.ca/_etc/info bash-2.05b$
and run amcheck again:
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639868 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
Server check took 0.568 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.489 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
bash-2.05b$
AT LAST!!!!!!
bash-2.05b$ amd DailySet1
You have new mail in /var/spool/mail/root
bash-2.05b$
amcheck still gives:
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639604 KB disk space available, that's plenty
ERROR: cannot overwrite active tape DailySet100
(expecting a new tape)
NOTE: skipping tape-writable test
Server check took 0.005 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.157 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$
Running amdump now produces the following:
*** A TAPE ERROR OCCURRED: [cannot overwrite active tape DailySet100].
Some dumps may have been left in the holding disk.
Run amflush to flush them to tape.
The next tape Amanda expects to use is: a new tape.
Mod the respective clients to enable their xinetd daemons to start the communications
[root@ororkep root]# vi /etc/xinetd.d/amanda
[root@ororkep root]# vi /etc/xinetd.d/amandaidx
[root@ororkep root]# vi /etc/xinetd.d/amidxtape
[root@ororkep root]#
disable = no
Directories to make:
bash-2.05b$
bash-2.05b$ mkdir -p /var/lib/amanda/DailySet1/curinfo/paulororke.net/_etc
bash-2.05b$ mkdir -p /var/lib/amanda/DailySet1/curinfo/ororkep.itas.ca/_etc
bash-2.05b$ mkdir -p /var/lib/amanda/DailySet1/index/paulororke.net/_etc
bash-2.05b$ mkdir -p /var/lib/amanda/DailySet1/index/ororkep.itas.ca/_etc
The -p means make parent directories if needed. Nice time saver there.
Files to touch:
bash-2.05b$ touch /var/lib/amanda/DailySet1/curinfo/paulororke.net/_etc/info
bash-2.05b$ touch /var/lib/amanda/DailySet1/curinfo/ororkep.itas.ca/_etc/info
Modified paulororke.net/etc/hostsand ororkep.itas.ca/etc/hosts adding a line linux-snort.itas.ca 42.25.97.100
restarted xinetd on both clients
now amcheck gives:
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4639016 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
Server check took 0.003 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: ororkep.itas.ca: [Can't open exclude file '/usr/local/lib/amanda/exclude.gtar': No such file or directory]
WARNING: paulororke.net: selfcheck request timed out. Host down?
Client check: 3 hosts checked in 30.578 seconds, 2 problems found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$
On ororkep.itas.ca the following was done:
[root@ororkep root]# touch /usr/local/lib/amanda/exclude.gtar
touch: cannot touch `/usr/local/lib/amanda/exclude.gtar': No such file or directory
[root@ororkep root]# ls /usr/local/lib
lib libexec
[root@ororkep root]# ls /usr/local/lib
[root@ororkep root]# ls /usr/local/lib/
[root@ororkep root]# su amanda
bash-2.05b$ mkdir /usr/local/lib/amanda
mkdir: cannot create directory `/usr/local/lib/amanda': Permission denied
bash-2.05b$ exit
[root@ororkep root]# mkdir /usr/local/lib/amanda
[root@ororkep root]# chown -R amanda:disk /usr/local/lib/amanda/
[root@ororkep root]# su amanda
bash-2.05b$ touch /usr/local/lib/amanda/exclude.gtar
bash-2.05b$
There seems to be a problem accessing a client outside the ITAS network. PLNET could be filtering the ports. Ethereal reports a DNS lookup attempt but gets network unreachable for paulororke.net so further investigation of the PLNET firewall or a change of port for AMANDA may be required. The short term fix is to remove paulororke.net form the disklist until this issue is resolved.
amcheck now produces:
bash-2.05b$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/tmp: 4638912 KB disk space available, that's plenty
NOTE: skipping tape-writable test
Tape DailySet100 label ok
Server check took 0.801 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 2 hosts checked in 0.908 seconds, 0 problems found
(brought to you by Amanda 2.4.4p1)
You have new mail in /var/spool/mail/root
bash-2.05b$
And finnally amdump DailySet1 is successfull sending the following mail message:
Create the files and directory:
# mkdir /myflies
# dd if=/dev/hdg2 of=50kbfile.avi bs=1024 count=50
To get the file creation and modification dates and md5checksums
# ls -lc >> filesToBackup.txt
# md5sum * >> filesToBackup.txt
Run amdump DailySet1 again. This should now produce a set of files in /fake_tape like the following:
[root@linux-snort fake_tape]# ls -l data/
total 24752
-rw------- 1 amanda disk 10 Jan 24 15:29 00000-DailySet100
-rw------- 1 amanda disk 32768 Jan 24 15:29 00000.DailySet100
-rw------- 1 amanda disk 12 Jan 24 15:30 00001-ororkep.itas.ca._myfiles.0
-rw------- 1 amanda disk 12615680 Jan 24 15:30 00001.ororkep.itas.ca._myfiles.0
-rw------- 1 amanda disk 12 Jan 24 15:30 00002-linux-snort.itas.ca._myfiles.0
-rw------- 1 amanda disk 12615680 Jan 24 15:30 00002.linux-snort.itas.ca._myfiles.0
-rw------- 1 amanda disk 10 Jan 24 15:30 00003-TAPEEND
-rw------- 1 amanda disk 32768 Jan 24 15:30 00003.TAPEEND
tapetype hard-disk
define tapettype hard-disk {
comment "Dump onto hard disk"
length 2048 mbytes #specify 2GB
}
tapedev "file:/fake_tape" # the no-rewind tape device to be used
# exclude - specify files and directories to be excluded from the dump.
# Useful with gnutar only; silently ignored by dump and samba.
# Valid values are:
# "pattern" - a shell glob pattern defining which files
# to exclude.
# gnutar gets --exclude="pattern"
# list "filename" - a file (on the client!) containing patterns
# re's (1 per line) defining which files to
# exclude.
# gnutar gets --exclude-from="filename"
# Note that the `full pathname' of a file within its
# filesystem starts with `./', because of the way amanda runs
# gnutar: `tar -C $mountpoint -cf - --lots-of-options .' (note
# the final dot!) Thus, if you're backing up `/usr' with a
# diskfile entry like ``host /usr gnutar-root', but you don't
# want to backup /usr/tmp, your exclude list should contain
# the pattern `./tmp', as this is relative to the `/usr' above.
# Please refer to the man-page of gnutar for more information.
# Default: include all files
./*.log
./*.bak
holdingdisk holdingdisk1 {
comment "main holding disk"
directory "/var/amanda" # where the holding disk is
use 700 Mb # how much space can we use on it
}
0 16 * * 1-5 /usr/sbin/amcheck -m DailySet1
45 0 * * 2-6 /usr/sbin/amdump DailySet1
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
05 19 * * 1-5 amanda /usr/sbin/amcheck -m DailySet1
07 19 * * 2-6 amanda /usr/sbin/amdump DailySet1