amcheck - run Amanda self-checks


SYNOPSIS

       amcheck [ -Maddress ] [ -mwsc ] config


DESCRIPTION

       Amcheck  runs  a  number of self-checks on both the Amanda
       tape server host and the Amanda backup client hosts.

       On the tape server host, amcheck  goes  through  the  same
       tape checking used at the start of the nightly amdump run.
       This verifies the correct tape for the next run is in  the
       correct  drive.   Holding disks are checked to insure they
       have enough free space.

       Amcheck also causes a self-check to be run on  all  backup
       client hosts.  This makes sure each host is up and running
       and that permissions on filesystems to be  backed  up  are
       correct.

       See  the amanda(8) man page for more details about Amanda.


OPTIONS

       -Maddress
              When -m is also set, mail  the  report  to  address
              instead of the mailto value from amanda.conf.

       -s     Only the tape server host checks are run.

       -c     Only the backup client host checks are run.

       -w     Enables a destructive check for write-protection on
              the tape (which would cause the  subsequent  amdump
              to  fail).   If  the  tape  is writable, this check
              causes all data after the tape label to  be  erased
              (actually depends on the device driver: there is no
              portable   non-destructive   way   to   check   for
              write-protection).   The  check is only made if the
              tape is otherwise correct.

       -m     Nothing is printed, but mail is sent if any  errors
              are  detected.  The mail goes to the mailto address
              as specified in the amanda.conf file or the address
              value if -M is set.


EXAMPLES

       In  this  example,  both the tape server and backup client
       tests are run.  The results are displayed on standard out-
       put.

              % amcheck DailySet1
              Amanda Tape Server Host Check
              NOTE: skipping tape-writable test.
              Tape VOL10 label ok.
              Server check took 34.966 seconds.

              Amanda Backup Client Hosts Check
              --------------------------------
              WARNING: northstar: selfcheck request timed out.  Host down?
              WARNING: drinkme: selfcheck request timed out.  Host down?
              WARNING: scruffy: selfcheck request timed out.  Host down?
              Client check: 136 hosts checked in 51.945 seconds, 3 problems found.

              (brought to you by Amanda 2.4.0)

       In  this  example,  if  the  line  mailto csd-amanda is in
       amanda.conf, mail will be sent to csd-amanda if  the  tape
       check returns an error.

              % amcheck -s -m DailySet1


MESSAGES

       fatal slot slot: error message
              (error)  The  tape  changer  detected  some kind of
              fatal error while trying to load slot slot.

       slot slot: error message
              (warning) The tape changer detected  some  kind  of
              non-fatal  error  (e.g. an empty slot was detected)
              while trying to load slot slot,  or  an  error  was
              detected trying to read the tape label.

       slot slot: date YYYYMMDD label label (result)
              (info) Tape label in slot slot was loaded and found
              to have been last written on YYYYMMDD.  If the tape
              is  new,  the  date field will be an X.  The result
              may be one of:

              exact label match
                     This is the expected tape.

              no match
                     This label does not match the labelstr  pat-
                     tern  in  amanda.conf.   Tape  scanning will
                     continue.

              active tape
                     This tape is  still  active  and  cannot  be
                     overwritten.  Tape scanning will continue.

              first labelstr match
                     This  tape is the first one that matches the
                     labelstr pattern in amanda.conf.  Tape scan-
                     ning will continue if necessary.
                     This  tape  is the next one that matches the
                     labelstr pattern in amanda.conf.  Tape scan-
                     ning will continue.

       ERROR: statfs disk: error message
              (error)  An error was returned from the statfs sys-
              tem call on holding disk  disk  (maybe  because  it
              does not exist).

       ERROR: disk is unwritable: error message
              (error)  An error was returned from the access sys-
              tem call on holding disk disk, probably because the
              caller does not have write permission.

       WARNING: avail disk space unknown for disk. N KB
       requested.
              (warning) Amcheck could not determine the amount of
              available  space  on  holding  disk  disk to see if
              there were at least N KBytes available.

       WARNING: disk: only F KB free (R KB requested).
              (warning) Amanda.conf requested R  KBytes  of  free
              space  on holding disk disk, but only F KBytes were
              available.  10 MBytes is subtracted for each backup
              process  (see the inparallel amanda.conf option) to
              allow for unexpected overruns.

              Note: even though this message is listed as a warn-
              ing, it causes amcheck to exit with a non-zero sta-
              tus.

       disk: N KB disk space available, that's plenty.
              (info) There was sufficient free space  on  holding
              disk disk.

       WARNING: if a tape changer is not available, runtapes must
       be set to 1.
              (warning)  The  runtapes amanda.conf option must be
              set to 1 if the tpchanger amanda.conf option is not
              set.

       ERROR: error message.
              (error)  An  error  was detected while initializing
              the tape changer.

       ERROR: tape device: error message.
              (error) An error was detected while processing  the
              tape label.

       ERROR: cannot overwrite active tape label.
              (error)  Tape  label  is still active and cannot be
              used.
              (error) The label on tape label does not match  the
              labelstr amanda.conf option.

       (expecting a new tape)
              (info)  The  tape  is  not  OK  and  a new tape was
              expected.

       (expecting tape label or a new tape)
              (info) The tape is not OK and either tape label  or
              a new tape was expected.

       ERROR: tape label label ok, but is not writable.
              (error) Tape label is OK, but the write enable test
              failed.

       Tape label is writable.
              (info) Tape label is OK and the write  enable  test
              succeeded.

       NOTE: skipping tape-writable test.
              (info)  The tape write test (see the -w option) was
              not enabled.

       Tape label label ok.
              (info) Tape label is OK for the next run.

       Index dir "directory" doesn't exist or is not writable.
              (warning) The  directory  used  to  collect  backup
              index  files (from the indexdir amanda.conf option)
              is not accessible.

       Server check took S seconds.
              (info) Reports how long the tape server host checks
              took.

       ERROR: host: couldn't resolve hostname
              (error)  Could  not  look up backup client hostname
              host.

       Client check: H hosts checked in S seconds, N problems
       found.
              (info)  Reports  the  number of backup client hosts
              checked, how long it took and the number of  errors
              detected.

       WARNING: host: selfcheck request timed out.  Host down?
              (warning) There was no response from host when try-
              ing to do the client checks.

       ERROR: host NAK: message
              (error) Host  reported  a  negative  acknowledgment
              error of message to the status check request.
              (error)   Amcheck  could  not  parse  the  negative
              acknowledgment error from host.  There might be  an
              Amanda  version  mismatch  between the host running
              amcheck and host.

       ERROR: host [mutual-authentication failed]
              (error) Kerberos authentication failed  while  con-
              tacting host.

       ERROR: host: message
              (error)  Error  message  was reported by the status
              check on host.


AUTHOR

       James da Silva <jds@cs.umd.edu>
       University of Maryland, College Park


SEE ALSO

       amanda(8), amdump(8)