Install and configure Amanda Backup Server

Amanda is one of the complex installation as it has got many features and one can be easily be confused when
installing it for first time. So i have thought of  sharing minimal installation steps to jump start your backup

First download Server and Client packages of  amanda depending on operating system you use from below

I have taken 2 ubuntu machines 9.04

Server --  - amanda-backup-server_3.1.0-1Ubuntu904_i386.deb
Client  -- - amanda-backup-client_3.1.0-1Ubuntu904_i386.deb

after installation just update your repository
On Server do this 

#apt-get update

then install all build essentials required for a package to install

#apt-get install build-essential

afther that install debian package

#dpkg -i  amanda-backup-server_3.1.0-1Ubuntu904_i386.deb

I've noticed that if I try to install this package it doesn't seem to work because of missing dependent librararies typing

#apt-get -f install

will solve dependency problem

After installation of that package

User amandabackup
group disk
 will be created.

add password for the user amandabackup

# passwd amandabackup

after adding user we need to create directory where our backup has to be stored.

# mkdir -p /data/amanda/vtape/DailySet1
# chown amandabackup:disk /data/amanda/vtape/DailySet1
# chmod -R 750 /data/amanda/vtape/DailySet1

On Client do this 
 Install client package same as you installed on server

here also user amandabackup will get created

change password for user amandabackup

#passwd amandabackup

The client configuration file of amanda is


Change this line:

tapedev    "tape:/dev/YOUR-TAPE-DEVICE-HERE" # your tape device
to this:

tapedev    "file://data/amanda/vtape/DailySet1" # your tape device

this is the location where we are taking backup.

after configuring  go to server again.

On Server do this 

We have created a backup directory and created user amandabackup and set its password on Server
now switch user to amandabackup

# su – amandabackup

then enter this command to configure server configuration file for DailySet1

# amserverconfig DailySet1 --template harddisk --tapedev /data/amanda/vtape/DailySet1 --mailto root@localhost --dumpcycle 1week --runspercycle 5 --tapecycle 12 --runtapes 1

the output will be:

Now adding Client on server give second command

amserverconfig : command that creates the initial Amanda configuration
daily : the name of this backup set
template disk : this backup is written to disk (or “virtual” tape -vtape-)
tapedev /var/lib/amanda/vtapes/daily : this is the path of the vtapes
mailto : Amanda emails the backup report to this address
dumpcycle 5 : This backup cycle has 5 days (lets say ... Mon to Fri)
runspercycle 1 : This backup runs only once per day
tapecycle 20 : 20 vtapes (4 weeks) on the cycle
runtapes 1 : The maximum number of tapes (in this case “vtapes”) used in a single run

# amaddclient --config DailySet1 --client --diskdev /data/backupme --dumptype  comp-user-tar

/data/backupme  is the directory on the client you want to take backup

output will be :

after adding client now everything is ready we should test its working or not
we can test it using amcheck command

# amcheck DailySet1

the output will be:

Now checking is successful if you see 0 problems found in the output as shown above.
now we are ready to take first backup with the command amdump

# amdump DailySet1

This command will take backup and the status is emailed to root@localhost of server as we have configured above.

the mail will be like this :

From amandabackup@amandaserver  Tue Jul 20 15:19:10 2010
X-Original-To: root@localhost
Delivered-To: root@localhost
Received: by amandaserver (Postfix, from userid 1001)
    id 98122602ED; Tue, 20 Jul 2010 15:19:10 -0400 (EDT)
To: root@localhost
Subject: DailySet1 AMANDA MAIL REPORT FOR July 20, 2010
Message-Id: <20100720191910.98122602ED@amandaserver>
Date: Tue, 20 Jul 2010 15:19:10 -0400 (EDT)
From: amandabackup@amandaserver (Amanda)

Hostname: amandaserver
Org     : DailySet1
Config  : DailySet1
Date    : July 20, 2010

These dumps were to tape DailySet1-1.
The next tape Amanda expects to use is: 1 new tape.
The next new tape already labelled is: DailySet1-2.

                          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)            1.6        1.6        0.0
Original Size (meg)          1.6        1.6        0.0
Avg Compressed Size (%)     98.8       98.8        --
Filesystems Dumped             1          1          0
Avg Dump Rate (k/s)        163.1      163.1        --

Tape Time (hrs:min)         0:00       0:00       0:00
Tape Size (meg)              1.6        1.6        0.0
Tape Used (%)                0.0        0.0        0.0
Filesystems Taped              1          1          0
Parts Taped                    1          1          0
Avg Tp Write Rate (k/s)    160.1      160.1        --

  Label               Time         Size      %    Nb    Nc
  DailySet1-1         0:00           0G    0.0     1     1

  planner: Adding new disk
  taper: tape DailySet1-1 kb 1601 fm 1 [OK]

                                       DUMPER STATS               TAPER STATS
-------------------------- ------------------------------------- -------------
192.168.155. -me/vxadmin 0       0       0   98.8    0:10  163.2   0:10  160.1

(brought to you by Amanda version 3.1.0)

So you have succesfully taken backup of your first client

How to Restore data from Amanda Backup Server

Protected by Zmanda


trisna jaya said...

good morning.
sorry I do not speak English fluently..
i have some problem to install amanda when install the all build essentials required.
i am cannot install it.
when i install appear instruction " You might want to run 'apt-get -f install' to correct these"
I try use the command but not succes to install build essential required.
Can help I for this problem..

Anonymous said...

#apt-get install build-essential use this command first

trisna jaya said...

thanks for reply.
I try with the command but can not run, appear instruction " You might want to run 'apt-get -f install' to correct these ......."
can tell me about the problem??
thank you...

Anonymous said...

execute commands as SUDO user

Mudassir said...

I have following error on Ubuntu 10.4

"/etc/amanda/DailySet1/advanced.conf", line 1: duplicate parameter; previous definition /etc/amanda/DailySet1/amanda.conf:2

Mudassir said...

disklist file created
Creating custom configuration using templates
custom amanda.conf created
creating vtape directory
amlabel vtapes
WARNING: amlabel vtapes failed at slot 1:
/var/lib/amanda/example/xinetd.amandaserver contains the latest Amanda server daemon configuration.
Please merge it to /etc/xinetd.d/amandaserver.
/var/lib/amanda/.ssh/client_authorized_keys created. Please append to /var/lib/amanda/.ssh/authorized_keys file on Amanda clients
Error in creating virtual tape, please check log and create virtual tape manually.

Anonymous said...

Register learnadmin first to get reply............

Mudassir said...

I have already registered and still searching for results

Mudassir said...

Today I have tried version with 3.1.3 for server and client on ubuntu 10.4 , it is work now. perfect .Thanks for this great document. cam some one plz add me further things like restoring , path to backups , cron etc.

Anonymous said...

Check it here

Anonymous said...

i m just trying to install amanda on ubuntu 10.04 but i having some problems those are i only want that amanda store all backup on the harddisk not on v tapes so what command i have to use

Naresh Surampudi said...

even though you want to save data on hard disk , you should use virtual tape's , Please register for more suggestions

soumya Teja said...

I really like your blog with respective content, Thanks for sharing for your information about Devops Online Course