Amanda Backup Services
Andrew specific Howto

Document revision: 0.1 - 07/15/2003
http://asg.web.cmu.edu/isam/howto/amanda.html

1.0 Introduction

Amanda, http://www.amanda.org, is a backup system developed by the University of Maryland. When we were looking for a system to back up Andrew/Unix systems, we chose amanda as the base and added Kerberos 4 authentication and encryption to it. We have continued to make modifications and enhancements with Amanda and we have not been as successful as we would like in getting the changes integrated in the main line.

Amanda backups do not go to tape. There is a large RAID unit attached to each server. There are multiple /raid/spool partitions. Each /raid/spool partition appears to be a tape to Amanda.

The AFS root of the configuration files is at

/afs/andrew.cmu.edu/data/db/amanda

We run three amanda configurations:

Name Server Config name Description
Cyrus Email air.fs.andrew.cmu.edu cyrus-raid For email and email servers
Cost Recovery water.fs.andrew.cmu.edu internal-raid For Computing Services servers and desktops
Internal air.fs.andrew.cmu.edu normal-raid A for fee service For non-Computing servers in A100

2.0 Howto Enable Backups

  1. On the client machine, create an amanda key.
    % shkbob
    shkbob> create amanda
    Creating amanda/portal-fe1.andrew.cmu.edu@ANDREW.CMU.EDU... Done
    
  2. Make sure %define usesamanda is in the package.proto.
  3. Decide which configuration it should go to.
  4. Edit the amanda.disklist file with the host and the partitions to be backed up.
  5. You can use amcheck <config name> to see if things were added correctly and all the configuration files and such have been updated (i.e. you may need to do stuff by hand if you want to check it immediately).

3.0 Howto Do A Restoral

  1. Determine the hostname and the disk partition to be restored.
    Example: okapi.andrew.cmu.edu, /dev/dsk/c0t4d0s2
  2. Determine which server did the backup and the configuration name. You may need to grep the disklist file for the hostname of the client. This file is located under the amanda configuration directory, specified above.
    Example: water.fs.andrew.cmu.edu, internal-raid
  3. Login to the correct server and become root.
  4. Use amadmin search to find the backups.
    % amadmin internal-raid find okapi.andrew.cmu.edu c0t4d0s2
    [...]
    
    date       host                 disk     lv tape or file file status
    2003-07-01 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00006       9 OK
    2003-07-02 okapi.andrew.cmu.edu c0t4d0s2  0 ACS.00007      42 OK
    2003-07-03 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00008      22 OK
    2003-07-04 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00009       6 OK
    2003-07-05 okapi.andrew.cmu.edu c0t4d0s2  0 ACS.00010      41 OK
    2003-07-06 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00011       4 OK
    2003-07-07 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00012       8 OK
    2003-07-08 okapi.andrew.cmu.edu c0t4d0s2  0 ACS.00013      38 OK
    2003-07-09 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00000      13 OK
    2003-07-10 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00001      10 OK
    2003-07-11 okapi.andrew.cmu.edu c0t4d0s2  0 ACS.00002      38 OK
    2003-07-12 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00003       9 OK
    2003-07-13 okapi.andrew.cmu.edu c0t4d0s2  1 ACS.00004       7 OK
    2003-07-14 okapi.andrew.cmu.edu c0t4d0s2  0 ACS.00005      37 OK
    
  5. Use the date specified above to find the right backup. Note the date of the backup is the night when it happened.
    Example: 7/5/2003
  6. /amanda/spool<N> is where the nightly dumps go and so there should space there. Look for a 'restores' and cd there. (We currently don't clean up but if we did, we'd clean up there.)
  7. Find the backup dump you want. /raid/<config name>/<tape name> is a symlink to the partition with the dump files. The name of the file is file number.
    Example: /raid/internal/ACS.00010/41
  8. You can more this file for restore instructions. You can copy this file to the source machine if you need to restore an entire partition.
    % more /raid/internal/ACS.00010/41
    AMANDA: FILE 20030705 okapi.andrew.cmu.edu c0t4d0s2 lev 0 comp .gz program /usr/sbin/ufsdump
    To restore, position tape at start of file and run:
            dd if=<tape> bs=32k skip=1 | /usr/local/bin/gzip -dc | usr/sbin/ufsrestore -f... -
    ^L
    
    You can also restore an individual file by adding 'i' to the argument list to ufsrestore.
    %  dd if=/raid/internal/ACS.00010/41 bs=32k skip=1 | gzip -dc | ufsrestore if -
    ufsrestore > cd games/lib/nethackdir/save
    ufsrestore > ls
    ./games/lib/nethackdir/save:
     16480Atill.Z   51360TheMa.Z   6743Bjob.e.Z   7641Moose.Z
     22526Yerin.Z   6743Bjob.Z     6743Bob.Z
    ufsrestore > add 6743Bjob.Z
    ufsrestore > extract
    set owner/mode for '.'? [yn] y
    ufsrestore > q
    
  9. Delete the files you restored since we don't have an automated cleanup process.

4.0 Related Information/References

ChangeLog

0.1   - 07/15/2003 - Initial revision