Centralized Backup Server With Amanda On CentOS - Page 2

Set Up Client

1. Install amanda client with yum:

yum -y install amanda-client

2. Edit file .amandahosts to allow communications from server:

vi /var/lib/amanda/.amandahosts

gamma amanda 

3. Edit xinetd.d:

vi /etc/xinetd.d/amanda

Disable = no 

4. Start xinetd:

service xinetd start

5. Check Amanda service:

lsof | grep amanda


Backup Data

1. Check tapes and clients on server:

su - amanda
/usr/sbin/amcheck intra

2. Dump manually:

/usr/sbin/amdump intra

3. Add amdump to cron:

crontab –e

0 16 * * 1-5    /usr/sbin/amcheck -m intra
45 0 * * 2-6    /usr/sbin/amdump intra   

The first line checks the tape/clients and sends an email if it found something wrong (no email if everything is okay) at 4pm.

The second line dumps at 12.45am on weekdays.


Restore Data

1. Prepare tapes:

cd /tmp
/usr/sbin/amtape intra slot 1 # select slot1 (tape1)
/usr/sbin/ammt -t file:/backup/intra/slots rewind # rewind

2.1. Restore everything from every server:

/usr/sbin/amrestore file:/backup/intra/slots

2.2. Restore only a server and a directory:

/usr/sbin/amrestore file:/backup/intra/slots beta /var

3. Extract:

tar xvf <Restored files>

Share this page:

3 Comment(s)

Add comment


From: James at: 2008-10-01 14:20:27

Some of the config you used appears to be outdated, or incorrect. Since I have seen other sites with the same blocks of config, I must assume outdated.

Great tutorial, but you might want to specify versions that it will [not] work with.


Just in case it might help someone, here is my dumptype, and tapetype definitions.


[root@wt26 intra]# rpm -q amanda
[root@wt26 intra]#

 define dumptype custom-tar {
 program "GNUTAR"
 comment "root partitions dumped with custom compression"
 compress server custom
 server_custom_compress "/bin/gzip"
 priority low

define tapetype HARDDISK {
 length 100000 mbytes

But as far as setting it up, awsome tutorial, much appreciated!


From: Mike at: 2009-11-06 15:48:56

Thanks for clearing that up James, and thanks author for this nice how to.

From: Anonymous at: 2010-11-30 03:18:23

Please help me, I always receive email report from amanda server like this:

*** A TAPE ERROR OCCURRED: [No writable valid tape found].
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: intra-15.

                          Total       Full      Incr.
                        --------   --------   --------
Estimate Time (hrs:min)    0:00
Run Time (hrs:min)         0:00
Dump Time (hrs:min)        0:00       0:00       0:00
Output Size (meg)           4.3        0.0        4.3
Original Size (meg)         5.3        0.0        5.3
Avg Compressed Size (%)    82.1        --        82.1   (level:#disks ...)
Filesystems Dumped            1          0          1   (2:1)
Avg Dump Rate (k/s)      8794.5        --      8794.5

Tape Time (hrs:min)        0:00       0:00       0:00
Tape Size (meg)             0.0        0.0        0.0
Tape Used (%)               0.0        0.0        0.0
Filesystems Taped             0          0          0

Chunks Taped                  0          0          0
Avg Tp Write Rate (k/s)     --         --         --

                                       DUMPER STATS               TAPER STATS
-------------------------- ------------------------------------- -------------
alpha        -r/www/html 2    5420    4450   82.1    0:01 8781.8   N/A    N/A

(brought to you by Amanda version 2.5.0p2)