Home General Topics AMANDA Network Backup

AMANDA Network Backup

by Bella

The Advanced Maryland Automatic Network Disk Archiver (AMANDA), is a backup solution that allows the IT administrator to set up a single master backup server to back up multiple hosts over network to tape drives/changers or disks or optical media.

Amanda can back up a large number of servers and workstations running multiple versions of Linux or Unix and Windows servers and desktops by using a native windows client.

Features

  • Client-server architecture:
  • Automatic backup level selection:
  • A consistent backup window and resource utilization
  • An intelligent backup scheduler:
  • Data encryption and compression:
  • Reporting and verification:


Installation

As far as installation is concerned, it turns out to be pretty easy. For most Linux systems, Amanda is available in repositories as the packages amanda-common and amanda server, which, as the names suggest, need to be installed at their respective places. Some of the main dependency requirements for Amanda, which must be installed on the system before trying to install Amanda, are:

  • GNU Tar 1.15 or later
  • Samba for communication with Windows clients
  • Perl 5.6 or later
  • Glib version 2.2 or later
  • Awk and Gnuplot for the amplot utility

1. Install Amanda with yum:

yum -y install amanda*

2. Edit Amanda conf in xinetd.d:

vi /etc/xinetd.d/amanda
vi /etc/xinetd.d/amandaidx
vi /etc/xinetd.d/amidxtape

Change Disable = yes to Disable = no.

Configuring Amanda

The first thing that you need to do is to determine the configuration of the tape drive that Amanda will be using. Amanda provides a little utility called “amtapetype” that writes data to your tape drive to determine that capacity and speed of your drive.
To run the utility type:

# amtapetype –f /dev/nst0

Where /dev/nst0 is the device driver used by your tape drive.

The installation creates a new user, ‘amanda’ (or something similar), to run the Amanda backup and other tools. Configuration files are created in /etc/amanda, to create a new configuration, we need to create a folder under /etc/amanda, the name of which will represent a particular configuration for Amanda.

In this directory will be the amanda.conf file which includes:

  • org: The email subject, to differentiate between various backups.
  • mailto: Administrator email address(es) to which to send reports (multiple addresses to be separated with spaces).
  • tapecycle: The number of tapes that are available, and to be circulated.
  • dumpcycle: The number of days in the total dump cycle.
  • runspercycle: The number of daily full backups to be taken.
  • tapedev /dev/null: This should be changed to tapedev /dev/nst0, which is the non-rewinding device for Linux.
  • tapetype: The configuration of the tape drive that Amanda will be using. There is a utility called amtapetype, which performs writes to the tape to determine the capacity and speed. The values for tapecyle, dumpcycle and runspercycle depend on the backup plan you choose, and the strategy you plan to undertake. There are a couple of other parameters in the file, which should be self-explanatory.

Creating File and Directories

Before Amanda can successful backup your system it needs some file and directories to be created with the appropriate permissions set.The following commands assume that your configuration is called “backup” and that the destination directories for logs and databases are as described in the “amanda.conf” file

# chmod 770 /etc/amanda/backup
# touch /etc/amanda/backup/tapelist
# chown amanda.disk /etc/amanda/backup/*
# chmod 700 /etc/amanda/backup/*
# touch /var/lib/amanda/amandates
# chown amanda.disk /var/lib/amanda/amandates
# mkdir /var/lib/amanda/backup
# mkdir /var/lib/amanda/backup/index
# chown -R amanda.disk /var/lib/amanda/backup
# chmod -R 770 /var/lib/amanda/backup
# mkdir /var/log/amanda/backup
# chown amanda.disk /var/log/amanda/backup
# chmod 770 /var/log/amanda/backup

Now, we need to label the tapes. This is very important, because tapes are rejected if they are found to be improperly labelled during a backup run. This should be done with the amlabel utility, as the ‘amanda’ user, and to create labels that match the regular expression specified in the particular amanda.conf file.
Before committing your data to the backup run the “amcheck” program to see make sure that there are no errors in your configuration file as ‘amanda’ user

Performing the Backup

If amcheck ran without errors then it is time to run the first backup. Put the first tape in the drive and type:

# su amanda
> amdump backup

After a period of time, Amanda will email you with the results of the backup operation.

Once you set up everything well, it’s time for cron to take over and automate the process every night.

Eg:
# crontab –e
01 00 * * 1-5 /root/backup.sh
where backup.sh is a script that runs the backup.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment

CONTACT US

Sales and Support

Phone: 1-(847) 607-6123
Fax: 1-(847)-620-0626
Sales: sales@supportpro.com
Support: clients@supportpro.com
Skype ID: sales_supportpro

Postal Address

1020 Milwaukee Ave, #245,
Deerfield, IL-60015
USA

©2022  SupportPRO.com. All Rights Reserved