Network backups with Amanda

Auntie Amanda

Performing a Recovery

You trigger the recovery on the client with amrecover. The amrecover tool retrieves the latest backup from the server. amrecover also requires a small configuration file that mainly tells it the name of the backup server. On the client, working as the amanda user, create the file /etc/amanda/ADMINExample/amanda-client.conf with the contents from Listing 3. If necessary, you should create the required directory /etc/amanda and assign the amanda user.

Listing 3

amanda-client.conf

01 index_server "server.example.com"
02 tape_server "server.example.com"
03 tapedev "changer"
04 auth "bsdtcp"

The amrecover program always restores the backup to the current working directory. To restore the user rights correctly, you need to launch the tool as the root user. As a parameter, amrecover expects the name of the configuration:

amrecover ADMINExample

The tool connects to the backup server and then switches to a separate command line (Figure 3). First select the computer with the backup you want to restore with the following command:

sethost client.example.com
Figure 3: The amrecover tool restores a backup or parts of it. In this case, the restore uses the /tmp subdirectory as a precaution.

Now you can use setdisk to switch to the last backup, where /etc is the name defined in the disklist file:

setdisk /etc

The ls command lets you view the contents of the backup. You first need to select all the files and directories you want to retrieve. Define the files and directories using the add command,

add hostname
which tells Amanda to restore the <C>hostname<C> file.

After you select all the files and directories with add, the extract command restores them. Typing exit quits the tool. Even if amrecover is actually a client tool, you will typically use it to restore files on the backup server in production use, and then use scp or rsync to transfer the files to the clients.

Conclusions

Setting up Amanda can take several hours, especially in large heterogeneous environments. Other than articles like this one, the only sources of information for administrators are the official Amanda wiki and the countless man pages. When you read the documentation, you should always bear in mind that Amanda was originally designed for tape drives.

Once you have Amanda running, you can expect a reliable and proven partner for your backup and restore needs. Development work on Amanda has slowed recently, with new releases appearing only once a year. On the other hand, Amanda is very stable, and it offers very stable interfaces.

The Author

Tim Schürmann is a freelance computer scientist and author. In addition to books, Tim has published various articles in magazines and on websites.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus