x
Loading
 Loading
Hello, Guest | Login | Register

Easy Backups with AMANDA

Using Amanda allows you quickly and easily implement a robust Open Source backup solution to almost any device, or even multiple devices simultaneously.

Community Tools
RSS
Recommend This [?]
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.5 out of 5)
Loading ... Loading ...
Users Who Liked This [?]


Tag This!
 7 Comments (view all)

Moderation is good in almost all things, but there are a few things you just can’t overdo: Case in point, backups. It’s virtually impossible for your data to be too well backed-up or to have too many copies of your important files. It’s also a good thing to have a lot of options when it comes to backup software, which is why I’m talking about AMANDA this month.

Previously, I showed you how to create local and remote filesystem snapshots using rsnapshot. In that article, I promised to cover a more traditional Open Source backup application in the future. In this column I will be covering AMANDA, the Advanced Maryland Automatic Network Disk Archiver.

With development dating back to 1991, Amanda is one of the oldest and most popular Open Source backup utilities. Amanda allows you to set up a single server to back up multiple networked clients to a tape or disk-based storage system easily. It even allows you to write backups to tape and disk simultaneously, allowing for on-line quick restores from disk and off-site storage for disaster recovery and long-term retention.

Unlike many backup applications, Amanda does not use any proprietary device drivers, meaning any device supported by your operating system should work. From a client perspective, Amanda supports all major UNIX variants as well as Max OS X and Microsoft Windows. Backups are stored in a format that allows for easy recovery with native Linux tools, which can come in quite handy in a pinch. From a security perspective, encryption on a client can ensure security of data in transit and encryption on a backup server can ensure security of data during storage.

Since backup procedures and policies are very specific to individual environments, I’ll cover a basic scenario in this column. The Amanda documentation is extremely thorough and should be able to accommodate any setup you are considering. As binary packages are provided for most major distributions, we will not cover installation from source. I’ll leave items such as encryption as an exercise for the reader.

First, we’ll need to install the Amanda server package on the system we’ll be using as a backup server. Remember you can backup to tape, disk, or both. An intermediate holding area for caching data is not absolutely necessary, but will improve performance significantly and is a best practice. The installation process will create an amandabackup user and should add amandad to your xinetd configuration.

It’s now time to install the Amanda client on any machines you’d like to backup. The installation process will once again create an amandabackup user and should add amandad in a client configuration to your xinetd. Next, create a file named /var/lib/amanda/.amandahosts with the permissions 0700. The file should contain the following:

backuphost.yourdomain.com amandabackup amdump

To backup a Windows client you can either use Samba to mount the Windows machine on the backup server or use the Windows MSI available from the Zmanda site. With Amanda now installed and running on both the client and server it’s time to configure the server.

First, copy the example configuration script to the Amanda configuration directory. Like many example configuration files shipped with Open Source applications, the file is very heavily commented. Once you are more familiar with Amanda you can skip this step and simply create your configuration from scratch, but if this is your first Amanda install the example is the best place to start.

# cp /var/lib/amanda/example/amanda.conf /etc/amanda/DailySet1

The Amanda wiki is a great place to get additional information on the configuration directives. Here are a few of the basic directives you’ll need for a disk based backup.

org "YourCompanyName"
mailto "backup-admin@yourdomain.com"
tapetype HARDDISK
tpchanger "chg-disk"
tapedev "file://path/to/backups/DailySet1/slots"

define tapetype HARDDISK {
 length 10000 mbytes
}

Next, create /etc/amanda/DailySet1/disklist with a list of clients you’d like to backup:

machine.yourdomain.com /path/to backup dumptype

As with the client, you’ll also need to create /var/lib/amanda/.amandahosts.

machine.yourdomain.com root amindexd amidxtaped

You are now ready to create your virtual tape. Next, verify you can successfully perform a backup.

$ amcheck DailySet1

You can now use to perform a backup. You'll want to add this to cron once your setup is complete. As with any backup installation procedure, you should fully test a restore before you consider your setup complete.

Using Amanda allows you quickly and easily implement a robust Open Source backup solution. You can back up to almost any device, or even multiple devices simultaneously. You even have multiple options, including Zmanda, if you’d like commercial support or professional services.

Jeremy Garcia is the founder and administrator of LinuxQuestions.org, a free, friendly, and active Linux community that filters its email with SpamAssassin. Please send questions and feedback to jeremy@linuxquestions.org.

Read More
  1. Top 10 Sys Admin Articles of 2008
  2. Filenames by Design, Part Three
  3. Filenames by Design, Part Two
  4. Shades of Greylisting
  5. What's the diff?

7 Comments on Easy Backups with AMANDA »

 avatar
clowenstein said: +0  Add karma Subtract karma

Minor quibble: I think there is a word missing in the next-to-last paragraph, which begins “You can now use to perform a backup.”

Comment on the whole series: It would be nice to have a “printer-friendly” option.

September 29th, 2008 11:31 AM (permalink)
 
 avatar
maltamir said: +1  Add karma Subtract karma

I complement you on a well-written article, and I like to see more of these HOW-TO type articles. Unfortunately, all I ever hear about is Amanda, and “easy” here obviously doesn’t mean user-friendly. If I want a command-line, open-source, file-level backup, I’ll just write a tar archive to an NFS mount. I’d like see more on other solutions that do Adaptable System Recovery for Linux, rather than just file-level backup and restore.

September 29th, 2008 12:07 PM (permalink)
 
 avatar
dragin33 said: +0  Add karma Subtract karma

I tried to setup Amanada to backup a windows server from a linux server and it was a disaster. Gave it up..

October 8th, 2008 8:05 AM (permalink)
 
 avatar
mahaavedha said: +0  Add karma Subtract karma

Much as i would appreciate Amanda, I am forced to stick with Veritas Netbackup because NDMP support is not available with any of the open source backup programs.. Strange given the fact that NDMP is an open standard.

October 12th, 2008 7:50 PM (permalink)
 avatar
kern said: +0  Add karma Subtract karma

NDMP may be an “open standard”, but it is not Open Source. The sample code is proprietary code licensed by NetApp and Legato. Some time ago, a few very knowledgeable people looked at the NDMP API and informed us (Bacula) that it would be very difficult, if not impossible, for an Open Source program to interface to it.

If you can get the FSF to agree that NDMP is compatible with the GPL license, then you may have a point, otherwise, please realize “open” standard does not necessarily mean Open Source compatible.

October 23rd, 2008 11:45 AM (permalink)
 
 
 avatar
johngalt said: +0  Add karma Subtract karma

Zamanda has windows clients I believe…

I generally always go for a handwritten script but amanda can be useful if set up right…

December 2nd, 2008 5:25 AM (permalink)
 
 avatar
nanite said: +0  Add karma Subtract karma

I had a look at Amanda and Zamanda, I also tied to configure an alpha Amanda webmin plugin, but could not get it to work. Command line Amanda worked ok but was kind of prehistoric.

I then looked at backuppc with its web based console, once set-up it was brilliant. If you want a web based backup system that can backup Linux, Windows and Mac have a look at backuppc.

December 24th, 2008 4:31 AM (permalink)
 
Please log in to post a comment.
Don't have an account? Register now for free access to all of LinuxMagazine.com
ActivSupport
Linux Magazine has chosen ActivSupport as IT consultants.
Sponsored Links