amanda

2024-03-23

Installation and Configuration

Before diving into backups, you need to install Amanda on both the client (the machine you’re backing up) and the server (where backups are stored). The installation process varies slightly depending on your distribution, but generally involves using your distribution’s package manager.

For Debian/Ubuntu:

sudo apt update
sudo apt install amanda amanda-client

For Red Hat/CentOS/Fedora:

sudo yum update
sudo yum install amanda amanda-client

Server Configuration

After installation, you’ll need to configure the Amanda server. This involves creating many configuration files, located primarily in /etc/amanda. The most important file is amanda.conf, which dictates the overall backup strategy.

A basic amanda.conf might look like this:

org "MyBackupSet"
mailto "admin@example.com"
dumpcycle 7 days
tapecycle 12 tapes

This configuration outlines the backup set name, the administrator’s email for backup reports, and the backup cycle settings.

Client Configuration

On the client machine, you’ll also need to configure amanda.conf with client-specific settings. The file is usually located in /etc/amanda/amanda.conf. The configuration mirrors a portion of the server’s amanda.conf but focuses on the client:

inparallel 4
holdingdisk no
auth bsdtcp

This config defines how Amanda communicates with the server, disk usage policies, and authentication method.

Running Backups

Once both server and client configurations are complete and verified, you can initiate backups using the amanda command on the server:

amanda -v client1

The -v flag provides verbose output, showing the progress of the backup.

Restoring Backups

Restoring data is equally important. To restore a specific file or directory from a client backup, use the amrestore command:

amrestore -v client1 /path/to/file  # Replace client1 and /path/to/file accordingly

For a full client restore, you can specify the client name without a specific path. Restores can be time-consuming depending on the size of the data.

Advanced Features

Amanda offers many advanced features like encryption, compression level adjustments, and scheduling backups using cron. Exploring these will improve the security and automation of your backup strategy.

For example, you can customize compression methods within the amanda.conf file:

compress "gzip -9"

This enables maximum compression, though at the cost of slower processing speed.


By mastering the fundamental concepts and commands detailed above, you can build a reliable backup and recovery system using Amanda on your Linux infrastructure. This system will ensure your data’s safety and quick recovery in case of data loss.