Elixir Backup System

The backup system is based on a set of scripts in /data/elixir2/datdir/backup. There is a perl script 'backup' which does the actual backup management, and there is a table 'backup.tab' which defines the relationships between the disk partitions. The script is run by a cronjob, which should be run as user 'ptolemy2' so there will not be ownership conflicts (or root?).

The backup.tab has entries of the form:

 # /data/elixir
 TARGET  elixir
         SOURCE  uhane:/local/data/elixir
         MIRROR  mamane:/local/data/mamane/elixir.mirror
         DIR     detrend
         DIR     tests

This defines the abstract target name (arbitrary), the source and mirror machines and partitions, and the directories in that partition to backup (this allows us to exclude certain directories). Here is a summary of the backup command:

 naio: backup 
 USAGE: backup.exe (command) [target]
   backup -targets          : list available targets
   backup -status  (target) : list settings for target
   backup -backup  (target) : copy data from disk to mirror
   backup -restore (target) : restore mirror to disk
   backup -check   (target) : restore mirror to disk
 To get a listing of available targets:
 naio: backup -targets
 available targets:
To check the backup configuration for a given target:
 naio: backup -status elixir
 target:  elixir
 source:  uhane:/local/data/elixir
 mirror:  mamane:/local/data/mamane/elixir.mirror
 dir:     detrend
 dir:     tests
the crontab file shows the backup command in action doing a backup, for example:
 backup -backup elixir2

The elixir partitions are defined in pairs with names like:

One of these (the SOURCE entry above) gets mapped to /data/elixir2 in the automount system. The theory is that a partition goes down, you restore it, then run backup -restore (target) to recover the data. In practice, we almost never use the -restore command. We've instead switched the automount points to point at the MIRROR and switched the entries in the backup.tab between MIRROR and SOURCE. Be very careful! Note that the backup -backup command explicitly requests for deletion of data from the MIRROR that is not on the SOURCE! It has to do this, because it has to keep up with valid deletions. This means if you get these confused, you can lose data.