

Configuration of AF's backup system
===================================

The parameters for the client side can be found in a 
file named 
@clientconf@ 
and for the server side in 
@serverconf@, 
that resides in the
directory @clientlibdir@ 
or @serverlibdir@,
respectively. Comments in those files are lines starting
with the pound symbol # as the first non-blank character.

These two files need not be edited by hand with an editor,
instead the programs @serverbindir@/afserverconfig 
and @clientbindir@/afclientconfig
can be used. If you are 
running X, the programs are the same, but start with an 'x';
(Tcl/Tk must be installed): 
@serverbindir@/xafserverconfig
and @clientbindir@/xafclientconfig.
The parameters described below are the same for both versions.


Server configuration parameters
-------------------------------

 Backup-Device

  This is the device the backup is written to. It can be any
  tape device with the capability to distinguish between several
  files on the media. It is mandatory to supply the no-rewind 
  device here, otherwise this package won't work properly. 

  Suitable device names for some OS-es:
  AIX:          /dev/rmt0.1
  Solaris:      /dev/rmt/0bn
  IRIX:         /dev/rmt/tps0d4nr
  HP-UX:        /dev/rmt/0hn
  Linux:        /dev/nst0
  Digital UNIX: /dev/nrmt0h


 Tape-Blocksize

  The blocksize of the tape device. This value specifies how many
  bytes are written to tape or read from it with one system call.
  Usually this value is at least 512 or a multiple of it.
  It is not very important if the blocksize is set to 2048
  or 1024. The main thing to keep in mind is that if there is a
  minimum, it should be respected (e.g. 1024 on AIX), otherwise
  media space is wasted.


 Cartridge-Handler

  This value must be 1 or 0, which means, that you either have a
  cartridge handling system (i.e. some kind of robot) (1) or
  not (0). If you don't have a robot, you may nonetheless maintain
  a set of cartridges, that you will have to manually number. 
  The backup server side will inform you via email or console output,
  whenever another cartridge has to be inserted into the drive and what
  number it requires it is.


 Number Of Cartridges

  This number specifies, how many cartridges you are maintaining.
  If you have a cartridge handling system (some kind of robot),
  this must be the number of cartridges, your system is juggling.


 Last Cartridges

  Several cartridge sets can be used. Here they may be specified
  supplying the last cartridge of each set separated by whitespace.
  If this parameter is not given, there is only the default set
  number 1 with all available cartridges. Not all cartridges need
  to be used by the sets, but only the last ones can be omitted.
  E. g. if 3 cartridge sets are needed (1-3, 4-8, 9-10), you may
  supply here: 3 8 10.


 Max Bytes Per File

  The stream of data, that represents your backup, is divided into
  pieces (files on tape). This is done to find the files faster
  during a restore. This value determines, how large the pieces on
  tape may be in bytes. Some good values for a few tape technologies:

    QIC:              20000000
    DAT:              30000000
    Exabyte:          50000000
    DLT:             100000000


 Cart-Insert-Gracetime

  This is the time in seconds, the program waits after another
  cartridge has been put into the drive. Normal devices need a
  certain time span to mount the tape to get it ready for use.
  Normally this value is not critical. If you estimate it too
  low, the ioctl-system-call will wait until the device becomes 
  available. This time is sometimes longer than two minutes,
  so if you want to proceed quickly after a cartridge
  change, you may measure the maximum time your system needs.
  Some tried values for a few tape technologies:

    QIC:         20
    DAT:         30
    Exabyte:     70
    DLT:         70


 Device-Unavailable-Send-Mail-After-Min

  If the streaming device is not accessible (i.e. an open or a
  tape handling command fails) or another backup server process
  is still running, the server process re-tries his attempts
  regularly. If it fails longer than the time in minutes
  supplied here, an e-mail is sent to the configured user in
  charge (see: User To Inform). Supplying 0 means: never send mail.


 Device-Unavailable-Give-Up-After-Min

  Same as Device-Unavailable-Send-Mail-After-Min, but this time
  not an e-mail is sent, but the server process exits silently
  leaving a warning in the log file. Supplying 0 means: try
  forever, never exit.


 Device-Probe Interval

  This is the interval in seconds, after that regularly the device
  is probed to be ready for reading. Thus after having ejected a
  cartridge it is automatically recognized, if a new cartridge has
  been inserted. For other media (e.g. exchangeable disks) this may
  not be suitable. Supply a 0 in these cases for no probing.


 SetFile-Command

  This is the (shell-) command to run to position the tape to a
  certain file. Usually this is something like a combination
  of:  mt -f <device> rewind  and  mt -f <device> fsf <number>.
  If the command you are supplying here starts to count with
  1 for the first file on tape, you should insert %n for the
  <number>. If it starts with 0, replace <number> with %m. If
  you don't want to type the devicename again here, you may
  write %d instead.


 SkipFile-Command

  This is the (shell-) command to run to skip over to a file
  later on tape. Usually this is something like
   mt -f <device> fsf <number>
  Insert %n, where the number of files to skip over must be
  supplied in the command, in the example instead of <number>,
  and %d, where the device should appear (here: <device>).


 Setcart-Command

  This is the (shell-) command to run to put a certain
  cartridge into the device. If the command you are supplying
  here starts to count with 1 for the first cartridge, you
  should insert %n in the place, where the cartridge number
  must appear. If it starts with 0, replace it with %m. If
  you don't want to type the devicename again here, you may
  write %d instead. If you don't have a command to perform
  this task, don't supply anything here. In this case you must
  set your cartridge handling system to sequential mode
  (automatically putting the next cartridge in, when the
  actual one is ejected).
  

 Changecart-Command

  This is the (shell-) command to run to eject a cartridge
  actually placed inside the streamer device. This is normally
  something like  mt -f <device> rewoffl  (but better consult
  your man-pages). You have to supply this either if you have
  no cartridge handling system (robot) or if you have no
  command to set the cartridge directly by number. In the latter
  case this package tries to maintain the number of the actual
  cartridge in a file and to (hopefully) keep it consistent
  with the reality. In this case the cartridge handling system
  must be configured to sequential mode (automatically putting
  the next cartridge in, when the actual one is ejected).


 Erasetape-Command

  The (shell-) command to run, if the tape must be erased.
  (actually not needed).


 User To Inform

  If you don't have a cartridge handling system (robot), a
  human maintainer must put the appropriate cartridge into the
  tape device. If you supply a mail program, an e-mail is sent
  to the user given here, which informs him, that and which
  cartridge (by number) must be put into the tape device.
  If a timespan is configured, after that an automatic e-mail
  should be sent due to an unaccessible tape device, it is
  directed to this user (see Device-unavail-send-mail-after-min)


 Mail-Program

  The mail program used to send messages to a human maintainer.
  This is done, whenever another cartridge must be put into the
  tape device and it can't be done automatically (by a robot or
  whatever). If you don't want to type the username again here,
  you can instead write %u . If you don't want mails to be sent,
  you may instead supply any other command, that reads the standard
  input and does something reasonable with it, e.g. redirects it
  to the console:  cat > /dev/console


 Tape-Pos-File

  In this file some values are stored, e.g. the number of the
  cartridge actually placed inside the streamer device.


 Logging-file

  Logging information concerning errors or other notable events
  is redirected to this file.


 Lock-file

  To prevent the server program from being started several times
  a lock file is created and this is it's name.


 Encryption-Key-File

  The file containing the encryption key for authenticating
  the backup client to the server. This file must contain
  at least 5 characers and must not have read permission for
  group or world.


 Program-Directory

  If you are using the remote start option for backing up
  clients, this is the directory, where programs must reside,
  that can be started remotely. No other programs can be
  started remotely (for security reasons).


 Init-Command

  Here you may supply a (shell-) command to be run, when the
  backup server side wakes up, i.e. the server process starts.
  A %p appearing in this command is replaced with the name
  of the client, that connected the backup service.


 Exit-Command

  Here you may supply a (shell-) command to be run, when the
  backup server side goes to sleep, i.e. the server process ends.
  A %p appearing in this command is replaced with the name
  of the client, that connected the backup service.


Client configuration parameters
-------------------------------

 BackupHosts

  These are the hostnames of the machines where a server side
  of the backup service resides. Some kind of streamer device
  must be connected to these machines. The files and directories,
  that should be saved, are packed, eventually compressed,
  and then sent to the named machines, who writes them to the
  connected device. The named machines are tested for service
  availability. If a server is busy, the next one is tried.
  BackupPorts can be configured in the same order as the host
  entries supplied here. The servers in this list may be
  separated by whitespace and/or commas. If a backup server
  is the same host as the client, the use of the name localhost
  is encouraged.


 BackupPorts

  These are the port numbers on the backup server machines, where
  the backup server processes listen. The default is 2988 or the
  number found in the file /etc/services (or in NIS if it is
  configured). Several ports can be supplied, positionally according
  to the backup server hosts supplied in the BackupHosts parameter.
  The numbers can be separated by whitespace and/or commas. If
  fewer numbers are supplied than backup servers, the default port
  2988 applies for the rest. If more port numbers are given, the
  superfluous ones are ignored.


 CartridgeSets

  The cartridge sets on the server side to use for backups.
  They must bes legal number between 1 and the number of cartridge
  sets configured on the appropriate server side. Several sets can
  be supplied, positionally according to the backup server hosts
  supplied in the BackupHosts parameter. The numbers can be separated
  by whitespace and/or commas. If fewer numbers are supplied than
  backup servers, the default set # 1 applies for the rest. If more
  cartridge set numbers are given, the superfluous ones are ignored.


 RootDirectory

  This is the directory, the backup client changes to before
  packing the files and directories. Their names should be
  supplied relative to this directory, e.g. ./home .


 DirsToBackup

  These are the names of files and directories, that should be
  saved. Wildcards in the usual manner are allowed (shell-
  style or glob-style). They should be supplied relative to
  the working directory, the client changes to when starting.
  Descending into directories can be limited to the actual
  filesystem by preceding the filename with the four characters
  .//. or the option -m (and a space). The prefix .//. is
  stripped off the name before saving. Supplying a filename
  preceded with the four characters /../ (what makes no sense
  normally) or the option -r (and a space) forces the file
  contents to be saved regardless of the file type. This way
  raw partitions or similar things can be saved. The prefix
  /../ is stripped off the name before saving. These file
  contents are by default never compressed for safety reasons.
  If you want to force compression nonetheless, use //../ as
  prefix or precede the name with the option -R (and a space).


 DirsToBackupX

  These are the names of files and directories, that should
  be saved as part X. Wildcards in the usual manner are
  allowed (shell-style or glob-style). They should be
  supplied relative to the working directory the client
  changes to when starting (See: RootDirectory). Descending
  into directories can be limited to the actual filesystem by
  preceding the filename with the four characters .//. or
  the option -m (and a space). The prefix .//. is stripped
  off the name before saving. Supplying a filename preceded
  with the four characters /../ (what makes no sense normally)
  or the option -r (and a space) forces the file contents to
  be saved regardless of the file type. This way raw
  partitions or similar things can be saved. The prefix /../
  is stripped off the name before saving. These file contents
  are by default never compressed for safety reasons. If you
  want to force compression nonetheless, use //../ as prefix
  or precede the name with the option -R (and a space). These
  parameters may only be supplied if the parameter
  NumBackupParts is set greater than 1 (!). Otherwise they
  must be commented out to prevent a mismatch.


 FilesToSkip

  These are the names of files, that should not be saved.
  Wildcards in the usual manner are allowed (shell-style or
  glob-style, furthermore path-patterns in the style of GNU's
  find program with option -path. Note, that e.g. a*d matches
  ab/cd). E.g. it does not usually make much sense to back up
  object files, as they can be easily reproduced from existing
  program sources.


 DirsToSkip

  These are the names of directories, that should not be saved.
  Wildcards in the usual manner are allowed (shell-style or
  glob-style, furthermore path-patterns in the style of GNU's
  find program with option -path. Note, that e.g. a*d matches
  ab/cd). E.g. it does not usually make much sense to back up
  the lost+found directory or such only containing object files,
  as they can be easily reproduced from existing program sources.


 ExcludeListFile

  A file with the name supplied here can be present in any
  directory. It should contain a list of file-/directory-names
  (or glob-style patterns), that should be skipped during backup.
  Each entry must be in an own line. The given names/patterns are
  valid only in the same directory, where the file resides. Thus
  each directory can have it's individual exclusion list."


 NumBackupParts

  If you have to backup a large amount of files and the
  full backup can't be done during one run (e.g. over a
  weekend), you can divide the full backup into pieces.
  This number determines, how many pieces you need. If
  this number is not equal to 1, you have to supply which
  files and directories you want to save in which piece.
  You do so by setting the parameters DirsToBackupX with X
  equal to the number of the backup part the files belong
  to.


 CompressCmd

  If you want your files to be compressed, you can supply the
  name of the program that should perform the compression here.
  If you do so, you MUST also supply the appropriate decompress-
  program. Note that this program may be specified with options
  but no shell-like constructions such as pipes, variables or
  wildcards. This program must read standard input and write to
  standard output.


 UncompressCmd

  The counterpart to the compression program. You must either
  supply both compress- and uncompress-program or neither of
  them. Like the compress program, the uncompress-program must
  read standard input and write to standard output.


 IndexFilePart

  The name of the file where the names of the saved files
  are stored. The current number is appended to this filename.
  The number is incremented each time a full backup starts.


 CompressBackupedFiles

  This flag specifies, whether the files, that are saved,
  should be compressed with the given compression program.


 CompressLogfiles

  This flag specifies, whether the filename logging files
  should be compressed with the given compression program.


 DoNotCompress

  These patterns or filenames specify files, that no
  compression is attempted on. Normally compression is
  attempted on all files, and if a file cannot be compressed
  any further, it is saved uncompressed. This procedure is
  unefficient for already compressed files, so their value
  compression can be suppressed with this parameter. The
  value of this parameter must be a list separated by
  whitespace. Double quotes may enclose list elements.


 NumIndexesToStore

  This number determines how many log files of previous full
  backups are saved. These files may serve for the restore
  of older files than those present in the actual backup.
  Of course there must be sufficient space to
  hold all the backups. It doesn't help to save all the
  saved filenames but not to have them available on tape.


 LoggingFile

  The name of a file error messages or other notable events
  are written to.


 VarDirectory

  The directory, where varying files should be put in.
  These files must not be deleted. The information they
  contain is necessary for restore.


 EncryptionKeyFile

  The file containing the encryption key for authenticating
  the backup client to the server. This file must contain
  at least 5 characters and must not have read permission
  for group or world.


 StartupInfoProgram

  This is the (shell-) command to run to save the startup
  information of an incremental or full backup, sometimes
  called bootstrap information. This program should read the
  standard input and do something reasonable with it, e.g.
  append it to some file. The produced information can be
  used to recover from a hard crash, when the files are
  lost, that are containing the names of the saved files.
  Therefore this information should not be saved locally on
  the client host, but e.g. on an NFS-mounted filesystem, a
  floppy disc or in a mail-file (then this command should
  be sth. like: mail someuser).


 InitProgram

  A (shell-) command to be run before a backup is attempted.
  If this program returns an exit status unequal to 0, no
  backup is performed. This parameter makes only sense when
  backup is started remotely, cause in that case no shell-
  command can be supplied. If backup is started locally, there
  is no problem to run whatever is necessery before the backup
  explicitely.


 ExitProgram

  This parameter may specify a (shell-) command to run at
  exit time of a full or incremental backup. The following
  patterns are replaced as explained:
   %l  by the name of the file containing the filelists
   %r  by the name of the file containing statistics (this
       file is automatically removed after execution of this
       program)
   %e  by the overall exit status.
