Earthworm Group Amanda Backup System Restore Procedure
by Lucky Vidmar (October 29, 2002)

 



Background on Amanda Backup System

Amanda system works by backup levels. Level 0 backs up everything, Level 1 backs up all files that have changed since the last Level 0, Level 2 backs up files changed since the last Level 1, etc.

Amanda also allows for multiple configurations on one backup host. On gldylan, we run two configurations:


Tapes in each configuration are rotated in a cycle.  There are 40 tapes in the zero2 configuration and 6 tapes in incr2 configuration.  This means that weekly backups will be kept for 40 weeks while incremental backups will be recycled every week or so (depending on the frequency of incremental backups).

Log in to dylan with
   username:   operator
   password:   dump,master
 

How to restore a file or a directory?
 

Zero Level Restore

Find the zero2 tape (labelled ZERO2_<vol num>) done near the date of interest. Make sure that the filesystem on which the lost file resided was backed up  on that tape (see the list of filesystems on the tape sleeve).

Insert the tape into the tape drive.

Assuming that the file to be restored was on gldrocky in directory /home/earthworm/EW6_utils, run the following command:

    amrestore -p /dev/rmt/0n gldrocky /home | restore ivbf 2 -

Tape will fast forward looking for the /home backup.. be patient...

When tape is fast forwarded, the following will be the prompt:

Dump   date: Sat Jun 29 14:31:01 2002
Dumped from: the epoch
Level 0 dump of /home on gldrocky:/dev/dsk/c0t0d0s5
Label: none
Extract directories from tape
Initialize symbol table.
restore >
 

On the prompt (restore>) you can use most of the usual UNIX commands (ls, cd), for example:

restore > ls
.:
      2 *./           1458711  davidk/         5504  lucky/
      2 *../          1172545  dec/         1381697  luetgert/
1502826  Golden_OPS/   176486  dhanych/     1557764  markw/
 357767  TT_DB/        126784  dietz/       1563371  mcnamara/
1491790  admin/         33308  dkinchen/     440534  moran/
  22016  alex/         363271  earthworm/    594666  operator/
1519318  ali/          462517  friberg/      330437  patton/
 611151  baldwin/      682709  jnmarso/      451535  ptwc/
 688220  benz/        1436717  ketchum/      534124  small/
 495363  bogaert/     1062465  kohler/       115791  steve/
 600143  brian/       1689971  llastowka/    847850  tlmurray/
1266154  buland/      1442234  lomax/       1453209  websrv1/
 385473  carl/        1502785  lombard/     1645903  whitmore/
 699208  cjbryan/           3  lost+found/  1458763  withers/
 
 

Now, using cd, go to the directory where the lost file is:

restore > cd earthworm/EW6_utils

restore > ls
./earthworm/EW6_utils:
1331994  ./         363271  ../       1579901  nt/       1530140  solaris/

To restore the entire directory:

restore > add .
Make node ./earthworm
Make node ./earthworm/EW6_utils
Make node ./earthworm/EW6_utils/solaris
Make node ./earthworm/EW6_utils/nt
 

To restore a specific file:

restore > add solaris
 

Use the add command to add all the files or directories to be restored.  When done:

restore > extract
extract file ./earthworm/EW6_utils/solaris/README
extract file ./earthworm/EW6_utils/solaris/apache.tar.Z
extract file ./earthworm/EW6_utils/solaris/gmt.tar.Z
extract file ./earthworm/EW6_utils/solaris/ImageMagick.tar.Z
[ ...... ]
 

Now, the restore procedure will begin.  The subdirectory EW6_utils will
be created in your current directory, and all the files will be restored
into it.  When restore is complete, the following prompt will be shown:

[ ..... ]
extract file ./earthworm/EW6_utils/nt/TNSNAMES.ORA
extract file ./earthworm/EW6_utils/nt/achron4.exe
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn]

Type:    n

Then, at the next prompt:

restore >  quit
 

To eject the tape:

mt -f /dev/rmt/0n offline
 

Now, you can copy the restored files to the desired host (gldrocky).
 

Incremental Level Restore

Follow procedure equivalent to zero level, except do it in steps. Start with the last (most recent) Level 0, then Level 1, Level 2, etc...