oreilly.comSafari Books Online.Conferences.


Top Five Open Source Packages for System Administrators
Pages: 1, 2

During each run (at night), Amanda performs a full backup of part of the data. Specifically, the fraction that is required in order to back-up the entire data set in the course of a complete backup cycle. For example, if the cycle is seven days long, then one-seventh of the data is fully backed up each day. We could call this a "partial" full backup: a full backup of a specific part of the total data. In addition to this, Amanda also performs an incremental backup for all data that has changed since its own partial full backup.

The following figure will make this clearer:

This figure illustrates an example Amanda backup cycle lasting four days in which 15 percent of the data changes from day to day. The box at the top of the figure stands for the complete set of data for which Amanda is responsible; we have divided it into four segments to represent the part of the data that gets a full backup at the same time.

The contents of each nightly backup are shown at the bottom of the figure. The first three days represent a startup period. On the first night, the first quarter of the data is fully backed up (the purple block). On the second night, the second quarter (blue) is fully backed up, and the 15 percent of the data from the previous night that has changed during day two is also saved (purple).

On the third night, the third quarter of the total data is fully backed up (red), as well as:

  • The changed 15 percent of the day two's backup (blue)

  • All changed data in the portion backed up on the first night (purple). This will range from 15 percent to 30 percent of that data, depending on how much overlap there is between the changes made on day two and day three.

By day four, the normal schedule is in force. Each night, one quarter of the total data is backed up in full, and incrementals are performed for each of the other quarters as appropriate to the time that has passed since their last full backup.

Brain Teaser:
What is the average percentage of the yellow section that is backed up in each day of the four-day cycle, assuming the 15 percent change is uniformly distributed?

Brain Teaser Answer

This example is still a simplification in that it uses first-level incremental backups. In actual practice, Amanda uses multiple levels of incremental backups to minimize backup storage requirements.

In order to restore files from an Amanda backup, you may need one complete cycle of media.

Configuring and Using Amanda

Configuring and using Amanda is not difficult. Client configuration is particularly simple:

  1. Create an Amanda user and group. Ensure that the data to be backed up is readable by this user and group. If you're using dump as the backup software, make sure that /etc/dumpdates is writeable by them as well.

  2. Install the client software.

  3. Add Amanda-related entries to /etc/services and /etc/inetd.conf. These defined the Amanda service (UDP port 10080), whose requests are handled by the amandad daemon.

  4. Select and configure an authentication scheme. The default is to use an .amandahosts file; it works similarly to an .rhosts file, but applies only to Amanda and so it carries significantly less associated risk.

There's a bit more involved in setting up the Amanda server system:

  1. Install the software, and create the Amanda user and group.

  2. Add Amanda-related entries to /etc/services and /etc/inetd.conf. The Amanda service is again defined, as well as the amandaidx and amidxtape services (corresponding to the admindexd and amidxtaped daemons, respectively).

  3. Set up the configuration files.

    The main file is amanda.conf. It specifies the following:

    • Global settings
    • Device locations
    • Incremental backup parameters
    • Network bandwidth consumption parameters
    • Media type definitions
    • Holding disk locations
    • Dump type definitions: which program to use, whether to index the data, its relative priority, allowed execution times, authentication scheme, and so on.

    Here is an example dump type definition:

    define dumptype    normal { 
       comment "Ordinary backup" 
       holdingdisk yes
       index yes
       program "DUMP"
       priority medium
       starttime 2000

    This dump type uses a holding disk, creates an index for the backup set, contents for interactive restoration, and uses the dump program to perform the actual backup. It runs at medium priority compared to other backups. Amanda provides several pre-defined dump types in the example amanda.conf file, which can be used or customized as desired.

    The actual data to be backed up is defined in the disklist configuration file, using the generic dump types defined in amanda.conf. Here are two sample entries:

    # host file system dumptype spindle
    hamlet /chem stable -1
    ophelia /home normal -1

    The columns in this file hold the hostname, file system (specified by file within /dev, full special filename or mount point), the dump type, and a spindle parameter. The latter serves to control which backups can be done at the same time on a host. A value of -1 says to ignore this parameter. Other values define backup groups within a host; Amanda will only run backups from the same group in parallel.

  4. Prepare media for use with Amanda using the amlabel utility.

  5. Set up a cron job to run the amdump command on whatever schedule is appropriate for your site.

Amanda also provides many other utilities for validating its configuration files, for periodic clean up activities, and for performance tuning. It also provides a variety of useful activity logs and reports as well as the amrecover utility for restoring files from its backup sets.

More Information About Amanda

That's all for now. I'll be posting the next item in the list every week or so.

Number Four: LDAP
The countdown continues with LDAP, a protocol that supports a directory service.

Number Three: GRUB
The countdown continues with GRUB, the GRand Unified Bootloader.

Number Two: Nagios
The countdown continues with Nagios, a feature-rich network monitoring package.

Æleen Frisch has been a system administrator for over 20 years, tending a plethora of VMS, Unix, Macintosh, and Windows systems. If you liked this article and would like to receive the free ESA3 newsletter, you can sign up at

O'Reilly & Associates recently released (August 2002) Essential System Administration, 3rd Edition.

Return to the O'Reilly Network.

Sponsored by: