Imported Upstream version 2.4.5 upstream/2.4.5
authorBdale Garbee <bdale@gag.com>
Tue, 20 May 2008 04:46:39 +0000 (22:46 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 20 May 2008 04:46:39 +0000 (22:46 -0600)
210 files changed:
AUTHORS
ChangeLog
Makefile.in
NEWS
acinclude.m4
amplot/amplot.awk
changer-src/chg-multi.sh.in
changer-src/chg-zd-mtx.sh.in
changer-src/scsi-cam.c
client-src/amandad.c
client-src/amqde.c
client-src/calcsize.c
client-src/selfcheck.c
client-src/sendbackup-gnutar.c
client-src/sendsize.c
common-src/alloc.c
common-src/amanda.h
common-src/amfeatures.c
common-src/amfeatures.h
common-src/match.c
common-src/protocol.c
common-src/protocol.h
common-src/security.c
common-src/sl.c
common-src/sl.h
common-src/version.c
common-src/versuff.c
config/acinclude.m4i
config/config.h.in
config/install-sh
configure
configure.in
docs/DUMPER-API [deleted file]
docs/EXCLUDE [deleted file]
docs/FAQ [deleted file]
docs/HOWTO-AFS [deleted file]
docs/HOWTO-CYGWIN.html [deleted file]
docs/HOWTO-FILE-DRIVER [deleted file]
docs/INDEXING [deleted file]
docs/INSTALL [deleted file]
docs/INTERNALS [deleted file]
docs/KERBEROS [deleted file]
docs/LABEL.PRINTING [deleted file]
docs/MULTITAPE [deleted file]
docs/Makefile.am
docs/Makefile.in
docs/PORT.USAGE [deleted file]
docs/RAIT [deleted file]
docs/RESTORE [deleted file]
docs/SAMBA [deleted file]
docs/SECURITY [deleted file]
docs/SYSTEM.NOTES [deleted file]
docs/TAPE.CHANGERS [deleted file]
docs/TAPETYPES [deleted file]
docs/UPGRADE [deleted file]
docs/VTAPE-API [deleted file]
docs/WHATS.NEW [deleted file]
docs/WISHLIST [deleted file]
docs/YEAR2000 [deleted file]
docs/ZFTAPE [deleted file]
docs/amadmin.8.txt [new file with mode: 0644]
docs/amanda.8.txt [new file with mode: 0644]
docs/amcheck.8.txt [new file with mode: 0644]
docs/amcheckdb.8.txt [new file with mode: 0644]
docs/amcleanup.8.txt [new file with mode: 0644]
docs/amdd.8.txt [new file with mode: 0644]
docs/amdump.8.txt [new file with mode: 0644]
docs/amflush.8.txt [new file with mode: 0644]
docs/amgetconf.8.txt [new file with mode: 0644]
docs/amlabel.8.txt [new file with mode: 0644]
docs/ammt.8.txt [new file with mode: 0644]
docs/amoverview.8.txt [new file with mode: 0644]
docs/amplot.8.txt [new file with mode: 0644]
docs/amrecover.8.txt [new file with mode: 0644]
docs/amreport.8.txt [new file with mode: 0644]
docs/amrestore.8.txt [new file with mode: 0644]
docs/amrmtape.8.txt [new file with mode: 0644]
docs/amstatus.8.txt [new file with mode: 0644]
docs/amtape.8.txt [new file with mode: 0644]
docs/amtapetype.8.txt [new file with mode: 0644]
docs/amtoc.8.txt [new file with mode: 0644]
docs/amverify.8.txt [new file with mode: 0644]
docs/amverifyrun.8.txt [new file with mode: 0644]
docs/chg-scsi.notes [deleted file]
docs/chgscsi.txt [new file with mode: 0644]
docs/dumperapi.txt [new file with mode: 0644]
docs/eventapi.txt [new file with mode: 0644]
docs/exclude.txt [new file with mode: 0644]
docs/faq.txt [new file with mode: 0644]
docs/historical.txt [new file with mode: 0644]
docs/howto-afs.txt [new file with mode: 0644]
docs/howto-cygwin.txt [new file with mode: 0644]
docs/howto-filedriver.txt [new file with mode: 0644]
docs/howtos.txt [new file with mode: 0644]
docs/index.txt [new file with mode: 0644]
docs/indexing.txt [new file with mode: 0644]
docs/install.txt [new file with mode: 0644]
docs/internals.txt [new file with mode: 0644]
docs/introduction.txt [new file with mode: 0644]
docs/ix01.txt [new file with mode: 0644]
docs/kerberos.txt [new file with mode: 0644]
docs/labelprinting.txt [new file with mode: 0644]
docs/links.txt [new file with mode: 0644]
docs/manpages.txt [new file with mode: 0644]
docs/multitape.txt [new file with mode: 0644]
docs/portusage.txt [new file with mode: 0644]
docs/pr01.txt [new file with mode: 0644]
docs/pr02.txt [new file with mode: 0644]
docs/pr03.txt [new file with mode: 0644]
docs/pr04.txt [new file with mode: 0644]
docs/rait.txt [new file with mode: 0644]
docs/references.txt [new file with mode: 0644]
docs/restore.txt [new file with mode: 0644]
docs/samba.txt [new file with mode: 0644]
docs/security-api.txt [new file with mode: 0644]
docs/security.txt [new file with mode: 0644]
docs/strategy-api.txt [new file with mode: 0644]
docs/survey.txt [new file with mode: 0644]
docs/systemnotes.txt [new file with mode: 0644]
docs/tapechangers.txt [new file with mode: 0644]
docs/tapesnchangers.txt [new file with mode: 0644]
docs/tapetypes.txt [new file with mode: 0644]
docs/technical.txt [new file with mode: 0644]
docs/topten.txt [new file with mode: 0644]
docs/upgrade.txt [new file with mode: 0644]
docs/using.txt [new file with mode: 0644]
docs/various.txt [new file with mode: 0644]
docs/vtape-api.txt [new file with mode: 0644]
docs/whatwasnew.txt [new file with mode: 0644]
docs/wishlist.txt [new file with mode: 0644]
docs/y2k.txt [new file with mode: 0644]
docs/zftape.txt [new file with mode: 0644]
example/3hole.ps
example/amanda.conf.in
man/Makefile.am
man/Makefile.in
man/amadmin.8 [new file with mode: 0644]
man/amadmin.8.in [deleted file]
man/amanda.8 [new file with mode: 0644]
man/amanda.8.in [deleted file]
man/amcheck.8 [new file with mode: 0644]
man/amcheck.8.in [deleted file]
man/amcheckdb.8 [new file with mode: 0644]
man/amcheckdb.8.in [deleted file]
man/amcleanup.8 [new file with mode: 0644]
man/amcleanup.8.in [deleted file]
man/amdd.8
man/amdump.8 [new file with mode: 0644]
man/amdump.8.in [deleted file]
man/amflush.8 [new file with mode: 0644]
man/amflush.8.in [deleted file]
man/amgetconf.8 [new file with mode: 0644]
man/amgetconf.8.in [deleted file]
man/amlabel.8 [new file with mode: 0644]
man/amlabel.8.in [deleted file]
man/ammt.8
man/amoverview.8 [new file with mode: 0644]
man/amoverview.8.in [deleted file]
man/amplot.8
man/amrecover.8 [new file with mode: 0644]
man/amrecover.8.in [deleted file]
man/amreport.8 [new file with mode: 0644]
man/amreport.8.in [deleted file]
man/amrestore.8
man/amrmtape.8 [new file with mode: 0644]
man/amrmtape.8.in [deleted file]
man/amstatus.8 [new file with mode: 0644]
man/amstatus.8.in [deleted file]
man/amtape.8
man/amtapetype.8 [new file with mode: 0644]
man/amtapetype.8.in [deleted file]
man/amtoc.8 [new file with mode: 0644]
man/amtoc.8.in [deleted file]
man/amverify.8 [new file with mode: 0644]
man/amverify.8.in [deleted file]
man/amverifyrun.8 [new file with mode: 0644]
man/amverifyrun.8.in [deleted file]
recover-src/set_commands.c
recover-src/uparse.c
recover-src/uparse.h
recover-src/uscan.c
recover-src/uscan.l
restore-src/amrestore.c
server-src/amadmin.c
server-src/amcheck.c
server-src/amdump.sh.in
server-src/amflush.c
server-src/amindexd.c
server-src/amoverview.pl.in
server-src/amrmtape.sh.in
server-src/amstatus.pl.in
server-src/amtrmidx.c
server-src/amverify.sh.in
server-src/amverifyrun.sh.in
server-src/conffile.c
server-src/conffile.h
server-src/diskfile.c
server-src/diskfile.h
server-src/driver.c
server-src/driverio.c
server-src/dumper.c
server-src/find.c
server-src/find.h
server-src/holding.c
server-src/infofile.c
server-src/infofile.h
server-src/planner.c
server-src/reporter.c
server-src/taper.c
tape-src/tapetype.c

diff --git a/AUTHORS b/AUTHORS
index 8c8dd4bd8fe35e2f9f28f244ce8bbf0e7c321977..503d58a07ae8b0961960a70c646a32e0640d7079 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -40,9 +40,7 @@ and supporter
 
 - Jon LaBadie <jon@jgcomp.com>: active supporter
 
-- Stefan G. Weichinger <monitor@oops.co.at>: documentation, author of
-        file:driver
-
+- Stefan G. Weichinger <monitor@oops.co.at>: documentation, active supporter
 
 Many other people have contributed to the development of Amanda; check
 the ChangeLog for their names and e-mail addresses.
index 95f93e7ad7089407e3bc2fc4c1dca389ac394fe5..3e4b05f43e868b94ceea11f496fb255d9f1161b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-2004-06-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+2005-04-20  Jean-Louis Martineau <martineau@iro.umontreal.ca>
 
-       * Amanda 2.4.4p3 released.
-       * configure.in: AM_INIT_AUTOMAKE(amanda, 2.4.4p3).
-       * News: Changes in release 2.4.4p3.
+       * Amanda 2.4.5 released.
+       * configure.in: AM_INIT_AUTOMAKE(amanda, 2.4.5).
+       * NEWS: Update for 2.4.5.
+
+2005-04-20  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * docs/*: Update from latest xml-docs.
+
+2005-04-15  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * docs/*: Update from latest xml-docs.
+
+2005-04-14  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * changer-src/chg-zd-mtx.sh.in: Improve handling of
+         "Unknown Storage Element Loaded".
+
+2005-04-14  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * man/amcheckdb.8: Update from latest xml-docs.
+
+2005-04-14  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * docs/*: New documentation from xml-docs.
+       * docs/Makefile.am (pkgdata_DATA): Update for new files.
+
+2005-04-06  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=144052
+
+       * server-src/amverifyrun.sh.in: Filter changer log file.
+
+2005-04-06  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amcheck.c: Improve messages.
+
+2005-04-06  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/sendsize.c (generic_calc_estimates): Use amname instead
+         of dirname in message.
+
+2005-04-01  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * man/amanda.8, man/amdd.8, man/ammt.8: Updated.
+
+2005-03-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * man/Makefile.am (EXTRA_DIST): Add amadmin.8 amanda.8 amcheck.8
+         amcheckdb.8 amcleanup.8 amdump.8 amflush.8 amgetconf.8 amlabel.8
+         amoverview.8 amreport.8 amrecover.8 amrmtape.8 amstatus.8
+         amtapetype.8 amtoc.8 amverify.8 amverifyrun.8
+
+2005-03-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * man/*: use man pages form xml-docs.
+       * configure.in (AC_CONFIG_FILES): Remove all man pages.
+
+2005-03-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/dumper.c (update_dataptr): Open a new chunk file even if
+         size==0, the test must be (dataout < datain), which means we have
+         something to write.
+
+2005-03-29  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * NEWS: new amoverview -skipmissed option.
+
+2005-03-29  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/conffile.h: Rename getcont_unit_divisor to
+         getconf_unit_divisor.
+       * server-src/amadmin.c: Use getconf_unit_divisor.
+       * server-src/amcheck.c: Use getconf_unit_divisor.
+       * server-src/conffile.c: Use getconf_unit_divisor.
+       * server-src/conffile.c (unit_divisor): Init to 1.
+       * server-src/reporter.c: Use getconf_unit_divisor. The mb macro always
+         divide by 1024. Add the du macro. Use mb or du where appropriate.
+
+2005-03-16  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/infofile.h (history_t): Add secs field.
+       * server-src/infofile.c (read_txinfofile): Parse info file with secs
+         in history.
+       * server-src/infofile.c (write_txinfofile): Write secs in history.
+       * server-src/driverio.c (update_info_dumper): Update secs in history.
+
+2005-03-16  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c: Improve server estimate.
+       * server-src/planner.c: Write server estimate like others estimate.
+
+2005-02-14  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: last_level is negative, on new disk.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: Use '-?' to match negative values
+         instead of '-*'.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Orion Poplawski <orion@cora.nwra.com>
+
+       * server-src/amoverview.pl.in: Print the total number of level 0
+         dumps for each disk and the number of runs until the last level 0
+         dump will be overwritten.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Phil Homewood <pdh@snapgear.com>
+
+       * server-src/amoverview.pl.in: Add -skipmissed option.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c: Print the chunksize to the log.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/calcsize.c: Print estimate to STDERR.
+       * client-src/sendsize.c (generic_calc_estimates): Read calcsize result,
+         and send it to amandad. Write debuging message.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+        Patch by Franz G. Fischer
+
+       * server-src/conffile.c: Adds a value type LONG and a val_t.l long
+         union member and changes get_number() to return long and
+         get_simple() to fill val_t.l if called for a long value.  The
+         get_simple() calls have been changed to LONG for typetype_t.blocksize
+         typetype_t.length, typetype_t.filemark, holdingdisk_t.disksize and
+         holdingdisk_t.chunksize.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amdump.sh.in: Redirect in append mode.
+       * server-src/driver.c: Set stdout and stderr to not buffered.
+       * server-src/planner.c: Set stderr to not buffered.
+         Print 'setup_estimate:' on one line.
+       * server-src/amstatus.pl.in: Parse new 'setup_estimate:' line.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/calcsize.c: Improve estimate for sparse file and count
+         space for filenames.
+
+2005-02-09  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c: Improve message if no incremental estimate.
+
+2005-01-23  Stefan G. Weichinger <monitor@oops.co.at> 
+       Patch by Jon LaBadie <jon@jgcomp.com>
+
+       * changer-src/chg-multi.sh.in: New header to explain the meaning of
+         the "multi" in "chg-multi".
+
+2004-12-21  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Christopher Pascoe <c.pascoe@itee.uq.edu.au>
+
+       * common-src/match.c (match_glob, match_tar): Don't amfree(regex)
+         before calling error().
+
+2004-11-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c (startaflush): Use ALGO_SMALLEST if nothing fit.
+
+2004-11-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c: Typo.
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * restore-src/amrestore.c: Should now work correctly with empty file.
+       * server-src/amverify.sh.in: Parse "End-of-Information detected."
+         message from amrestore.
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c: tape_left should not become negative.
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Orion Poplawski <orion@cora.nwra.com>
+
+       * server-src/diskfile.c: Parse negative spindle (-1).
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amadmin.c: Balance subcommand use displayunit.
+       * server-src/amcheck.c: Small cleanup.
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * restore-src/amrestore.c: Undo patch from 2004-11-11, it break
+         the file: dirver.
+
+2004-11-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: Remove trace.
+
+2004-11-16  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * NEWS: new displayunit global option to select the unit use to
+         display number: k=kilo, m=mega, g=giga, t=tera
+       * server-src/conffile.c: Parse displayunit,
+         new fonction getcont_unit_divisor().
+       * server-src/conffile.h: Prototype of getcont_unit_divisor().
+       * server-src/amcheck.c: Use displayunit to display holding disk size.
+       * server-src/amstatus.pl.in: Use displayunit to display dump size.
+       * server-src/reporter.c: use displayunit to display dump size.
+       * man/amanda.8.in: Document displayunit.
+
+2004-11-16  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/reporter.c: Change 'Daily' for 'Incr.'.
+
+2004-11-15  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in Fix for level -1.
+
+2004-11-15  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Daniel Widyono <widyono@seas.upenn.edu>
+
+       * changer-src/chg-zd-mtx.sh.in: Fix for library with barcode.
+
+
+2004-11-11  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c: Print the time in the FINISH line.
+       * server-src/reporter.c: The estimate time is based on the planner
+         FINISH line.
+
+2004-11-11  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * restore-src/amrestore.c: Read empty file.
+
+2004-11-10  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c (selectset): Make only one declaration in main.
+
+2004-11-10  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * tape-src/tapetype.c: Use new tape.
+
+2004-11-08  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: Display partial estimate.
+
+2004-11-08  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Orion Poplawski <orion@cora.nwra.com>
+
+       * server-src/amstatus.pl.in: a FLUSH command can't be in an estimate
+         phase.
+       * server-src/driver.c: Start autoflush while waiting for estimate.
+       * server-src/planner.c: Write FLUSH line before estimate.
+
+2004-11-08  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/diskfile.c (read_diskline): A spindle must be numerical.
+
+2004-10-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+        * Amanda 2.4.5b1 released.
+
+2004-10-21  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/holding.c (rename_tmp_holding): Always rename files.
+
+2004-10-21  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c: Print message when too many retry.
+       * server-src/amstatus.pl.in: Detect a failed dump after too many retry.
+       * amplot/amplot.awk: Parse these message.
+
+2004-10-21  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c (dump_to_tape): Don't retry a dump indefinitely
+         if dumper returns DONE and taper returns TRYAGAIN.
+
+2004-10-21  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c (dump_to_tape): Don't retry a dump indefinitely
+         if dumper returns TRYAGAIN and taper returns DONE.
+
+2004-10-20  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amflush.c: Don't start a driver if nothing to flush.
+
+2004-10-14  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Eric Siegerman <erics@telepres.com>
+
+       * example/3hole.ps: Fix for multiple tape.
+
+2004-10-04  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amverify.sh.in: Terminate if no tape online.
+
+2004-09-17  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amadmin.c (main): Call check_dumpuser() as soon as posible.
+
+2004-09-17  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/conffile.c (getconf_byname): Special case for typ == BOOL.
+
+2004-09-17  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c (promote_hills): Use dumpcycle instead of
+         tapecycle.
+       * example/amanda.conf.in: Remove warning for tapecyle set to inf.
+
+2004-09-17  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amadmin.c (balance): Don't core dump if DUMPCYLE is too
+         big.
+
+2004-09-15  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * tape-src/tapetype.c: New -o option, doesn't overwrite amanda
+         tape without -o.
+       * man/amtapetype.8.in: Document new -o option.
+
+2004-09-15  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: Works with failed dump to tape.
+
+2004-08-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/sendbackup-gnutar.c (end_backup): Write warning message
+         in not fatal error.
+       * server-src/dumper.c (process_dumpline): Parse warning message.
+       * server-src/reporter.c (handle_strange): Print warning message in
+         the STRANGE summary.
+
+2004-08-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driverio.c (free_serial): Set stable[s].dp to NULL.
+       * server-src/driverio.c (disk2serial): Check that stable[s].dp == NULL.
+
+2004-08-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Joe Rhett <jrhett@isite.net>
+
+       * common-src/alloc.c (safe_env): Keep SYSTEMROOT if __CYGWIN__.
+
+2004-08-31  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Patch by Orion Poplawski <orion@cora.nwra.com>
+
+       * server-src/conffile.c (copy_dumptype): Copy maxpromoteday.
+
+2004-08-12  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/selfcheck.c (check_disk): More check for CALCSIZE.
+
+2004-08-11  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * common-src/amfeatures.h (fe_selfcheck_calcsize): New feature.
+       * common-src/amfeatures.c (am_init_feature_set): Set
+         fe_selfcheck_calcsize.
+       * client-src/selfcheck.c: Check if calcsize binary is available if
+         it is needed.
+       * server-src/amcheck.c (start_host): Call selfcheck with CALCSIZE
+         if it support fe_selfcheck_calcsize.
+
+2004-08-05  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * man/amanda.8.in: Document 'estimate' dumptype option.
+
+2004-08-05  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/amqde.c: Change snprintf for ap_snprintf.
+
+2004-08-04  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amrmtape.sh.in: Understand history info.
+
+2004-08-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amstatus.pl.in: Parse CONTINUE and RQ-MORE-DISK line,
+         print if a dump is waiting for holding disk space (roomq).
+
+2004-08-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driverio.c (dumper_cmd): Print serial number for CONTINUE
+         command.
+       * server-src/driverio.c (disk2serial): Try to find a 'dp' before
+         allocating a new serial.
+       * server-src/dumper.c (update_dataptr): Read serial number for CONTINUE
+         command.
+
+2004-08-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c (getsize): Do SERVER estimate, call sendsize with
+         CALCSIZE estimate.
+
+2004-08-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * client-src/calcsize.c: Support exclude and include like gnutar,
+         change in program argument.
+       * client-src/sendsize.c: Execute calcsize as requested.
+       * common-src/amfeatures.h (fe_calcsize_estimate): New feature.
+       * common-src/amfeatures.c (am_init_feature_set): set
+         fe_calcsize_estimate.
+       * server-src/amcheck.c (start_host): Check if client support CALCSIZE
+         estimate.
+
+2004-08-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/conffile.h (ES_CLIENT, ES_SERVER, ES_CALCSIZE): New define
+         for estimate type.
+       * server-src/conffile.h (dumptype_t): Add 'estimate' and 's_estimate'
+       * server-src/conffile.c (get_estimate): New function to parse estimate
+         type, ....
+       * server-src/diskfile.c (read_diskline): Copy 'estimate'.
+       * server-src/diskfile.h (disk_t): Add 'estimate'.
+       * server-src/amadmin.c (disklist_one): Print estimate type.
+
+2004-08-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * common-src/match.c (match_tar, tar_to_regex): New fonction similar
+         to the exclude option of tar.
+       * common-src/amanda.h (match_tar, tar_to_regex): Prototype.
+
+2004-08-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+        * server-src/infofile.h (history_t): new struct.
+        * server-src/infofile.h (info_t): Add a history_t.
+        * server-src/infofile.c (read_txinfofile): Parse history data.
+        * server-src/infofile.c (write_txinfofile): Print history data.
+        * server-src/amadmin.c (export_one): export history data.
+        * server-src/amadmin.c (import_one): import history data.
+        * server-src/driverio.c (update_info_dumper): update history data.
 
 2004-05-10  Jean-Louis Martineau <martineau@iro.umontreal.ca>
        Patch by Paul Bijnens <paul.bijnens@xplanation.com>
 
        * server-src/planner.c: Log L_DISK for autoflush disk.
 
+2004-05-03  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/planner.c (handle_result): Add dp to pestq at the
+         correct place.
+
 2004-04-30  Jean-Louis Martineau <martineau@iro.umontreal.ca>
 
        * common-src/amanda.h: #include "amanda-int.h" only if !CONFIGURE_TEST.
 
        * server-src/planner.c (setup_estimate): Typo.
 
+2004-04-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       Allow bumpsize, bumppercent, bumpdays and bumpmult to be in a dumptype.
+       * server-src/conffile.c: Parse.
+       * server-src/conffile.h: Define.
+       * server-src/amadmin.c (disklist_one): Use.
+       * server-src/diskfile.c (read_diskline): Initialize.
+       * server-src/diskfile.h: Define.
+       * server-src/planner.c: Use.
+       * man/amanda.8.in: Document.
+       * NEWS: bumpsize, bumppercent, bumpdays and bumpmult can be in a
+         dumptype.
+
 2004-04-22  Jean-Louis Martineau <martineau@iro.umontreal.ca>
        Fix by Paul Bijnens <paul.bijnens@xplanation.com>
 
 
        * common-src/protocol.c: Fix EAGAIN on Linux.
 
+2004-04-06  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       New bumppercent global option.
+       * example/amanda.conf.in: Document it.
+       * man/amanda.8.in: Document it.
+       * server-src/amadmin.c (bumpsize): Write it.
+       * server-src/conffile.c: Parse it.
+       * server-src/conffile.h: Define It.
+       * server-src/planner.c (bump_thresh): New size_level_0 parameter,
+         use the new bumppercent option.
+       * NEWS: Document it.
+
+2004-04-05  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amadmin.c: Rename host_t to amhost_t.
+       * server-src/amcheck.c: Ditto.
+       * server-src/amindexd.c: Ditto.
+       * server-src/diskfile.c: Ditto.
+       * server-src/diskfile.h: Ditto.
+       * server-src/driver.c: Ditto.
+       * server-src/planner.c: Ditto.
+
+2004-03-26  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * amplot/amplot.awk: Parse "driver: tape size" line.
+
+2004-03-22  Stefan G. Weichinger <monitor@oops.co.at>
+
+        * server-src/amcheck.c (start_host): Added warning for hostname
+         localhost.
+       * docs/TOP-TEN-QUESTIONS: added note about localhost-warning.
+
+2004-03-19  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * docs/Makefile.am (pkgdata_DATA): Add TOP-TEN-QUESTIONS.
+
+2004-03-18  Stefan G. Weichinger <monitor@oops.co.at>
+
+       * docs/TOP-TEN-QUESTIONS: New file.
+
 2004-03-16  Jean-Louis Martineau <martineau@iro.umontreal.ca>
 
        * server-src/amcheck.c: Do labelstr check in correct order.
        * server-src/amcheck.c: Verify the tape is listed in the tapelist file.
        * server-src/taper.c: Ditto
        * NEWS: * amanda will not use a tape if it's label is not in the
-                 tapelist file (eg. after an amrmtape).
+                 tapelist file (eg. after an amrmtape).
+
+2004-02-13  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c (dump_schedule): Print complete name.
+
+2004-02-13  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       The estimate send a PREP (partial REP) packet after each estimate.
+       * client-src/amandad.c: Send PREP packet if sendsize.
+       * common-src/amfeatures.c (am_init_feature_set): Add
+         fe_partial_estimate.
+       * common-src/amfeatures.h (am_feature_e): Add fe_partial_estimate.
+       * common-src/protocol.c: Handle PREP packet.
+       * common-src/protocol.h (pktype_t):  Add P_PREP.
+       * server-src/amstatus.pl.in: Parse "got partial result" line.
+       * server-src/planner.c: Handle PREP packet.
+
+2004-02-13  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+       Reported by Jason Brooks <jason.brooks@windriver.com>
+
+       * server-src/reporter.c: Remove duplicate setting of cd to
+         &ColumnData[Level].
 
 2004-02-12  Jean-Louis Martineau <martineau@iro.umontreal.ca>
        Patch by Philippe Charnier <charnier@xp11.frmug.org>
        * recover-src/set_commands.c (cd_dir, set_directory): Fix memory leak.
        * recover-src/uscan.l: Fix double amfree.
 
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/driver.c: Build holding disk name with timestamp.
+       * server-src/holding.c (is_datestr): Check also for timestamp.
+       * server-src/planner.c: Flush today's dump with autoflush.
+       * server-src/find.c: Find holding disk with timestamp.
+       * server-src/find.h (find_result_t): Add timestamp field.
+       * NEWS: holding disk disk use timestamped directory.
+       * NEWS: autoflush flush today's dump.
+
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * changer-src/chg-zd-mtx.sh.in: Works if all slot and tape are full.
+
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amverifyrun.sh.in: Do not execute amverify if no tape
+         to verify.
+
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * server-src/amdump.sh.in: Do not redirect to /dev/null.
+
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * config/acinclude.m4i: Define CF_WAIT_INT.
+       * configure.in: Call CF_WAIT_INT.
+       * common-src/amanda.h: Try to make waitpid doesn't warn.
+
+2004-02-02  Jean-Louis Martineau <martineau@iro.umontreal.ca>
+
+       * configure.in: AM_INIT_AUTOMAKE(amanda, 2.4.5b1).
+
 2004-01-29  Jean-Louis Martineau <martineau@iro.umontreal.ca>
 
        * Makefile.am (EXTRA_DIST): Add contrib/mkamandisk.
index d6be98a1ef5ffef71a7712535c6b927cbdd4c4c6..5234061b3afedd0fedaeee617f0417e191cb2f26 100644 (file)
@@ -522,7 +522,7 @@ distclean-tags:
 distdir: $(DISTFILES)
        $(am__remove_distdir)
        mkdir $(distdir)
-       $(mkdir_p) $(distdir)/amplot $(distdir)/changer-src $(distdir)/client-src $(distdir)/common-src $(distdir)/contrib $(distdir)/contrib/sst $(distdir)/example $(distdir)/man $(distdir)/patches $(distdir)/regex-src $(distdir)/regex-src/fake $(distdir)/server-src
+       $(mkdir_p) $(distdir)/amplot $(distdir)/changer-src $(distdir)/client-src $(distdir)/common-src $(distdir)/contrib $(distdir)/contrib/sst $(distdir)/example $(distdir)/patches $(distdir)/regex-src $(distdir)/regex-src/fake $(distdir)/server-src
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
        list='$(DISTFILES)'; for file in $$list; do \
diff --git a/NEWS b/NEWS
index d2e98efc91eb3f1dc08278c845c934b0a98a3997..1634f9c954ac0972638b93ec41526d6afe822d42 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,24 @@
+Change in release 2.4.5
+
+* new displayunit global option to select the unit use to display number
+  k=kilo, m=mega, g=giga, t=tera.
+* new amoverview -skipmissed option.
+
+Change in release 2.4.5b1
+
+* holding disk disk use timestamped directory.
+* autoflush flush today's dump.
+* new bumppercent global option, this should improve bumping criteria,
+  the bumpsize is set to a fixed value which can be adequate for small
+  and large disk.
+* bumpsize, bumppercent, bumpdays and bumpmult can be in a dumptype.
+* calcsize support include and exclude like gnutar.
+* new 'estimate' dumptype option to select estimate type:
+    CLIENT: estimate by the dumping program.
+    CALCSIZE: estimate by the calcsize program, a lot faster but less acurate.
+    SERVER: estimate based on statistic from previous run, take second but
+            can be wrong on the estimate size.
+
 Changes in release 2.4.4p3
 
 * new chg-iomega changer script.
index 60b9aec691902383da50a25f44be3128d475a97b..8d31a3f7b3e64b48917480b9bfe1a60a203bb29c 100644 (file)
@@ -439,7 +439,33 @@ if test $cf_cv_arg_union_wait = yes; then
        AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ])
 fi
 ])dnl
+AC_DEFUN([CF_WAIT_INT],
+[
+AC_REQUIRE([AC_TYPE_PID_T])
+AC_HAVE_HEADERS(sys/wait.h wait.h)
+AC_CACHE_CHECK([whether wait uses int], [cf_cv_arg_int],
+        [AC_TRY_COMPILE([
+#include <sys/types.h>
 
+#if HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#else
+# if HAVE_WAIT_H
+#  include <wait.h>
+# endif
+#endif
+
+#ifdef __STDC__
+pid_t wait(int *);
+#endif
+], [
+  int x; int i;
+  wait(&x); i = WIFEXITED(x)
+], [cf_cv_arg_int=yes], [cf_cv_arg_int=no])])
+if test $cf_cv_arg_int = yes; then
+        AC_DEFINE(WAIT_USES_INT,1,[Defined if wait() puts the status in a int instead of a union wait. ])
+fi
+])dnl
 
 dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
 dnl
@@ -473,7 +499,7 @@ dnl Remember, if the system already had a valid <stdint.h>, the generated
 dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
 dnl
 dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/)
-dnl @version $Id: acinclude.m4i,v 1.1.2.5.6.2 2004/04/29 20:47:40 martinea Exp $
+dnl @version $Id: acinclude.m4i,v 1.1.2.5.8.3 2004/04/29 20:47:22 martinea Exp $
 dnl @author  Guido Draheim <guidod@gmx.de> 
 
 AC_DEFUN([AX_CREATE_STDINT_H],
index 97f2dd5bac0de3c8602a944e28b029b54217cf39..962c080b29d237b211ac71add22d25971e089568 100644 (file)
@@ -105,8 +105,11 @@ BEGIN{
                        else if( $7 == "START-TAPER") fil = $8;
                }
                else if( $2=="finished-cmd") cmd_fin++;
-               else if ($2=="started")      forked++;
+               else if$2=="started")      forked++;
                else if( $2=="QUITTING")     do_quit();
+               else if( $2=="tape" && $3=="size") ; #eat this line
+               else if( $2=="dump" && $3=="failed") ; #eat this line
+               else if( $2=="taper" && $3=="failed") ; #eat this line
                else if( $2=="dumping" || $2 == "adding" || $2 == "holding-disks:") 
                  dumping++; # eat this line
                else if( $2!="FINISHED" && $2 != "pid" && $2 != "taper-tryagain"&& $2!="startaflush:")
index 0103c815b36a22bdfa97cd178423827bbc7596a1..d6703183e2361b75aad1d2813fcf5217cd088c6f 100644 (file)
 #
 # chg-multi.sh - generic tape changer script
 #
+# chg-multi is 'not' intended for use with tape changers or
+# libraries.  It is primarily used to make several, individual
+# tape drives appear to amanda as a single changer or library.
+# The "multi" in the script name refers to multiple drives.
+#
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
index 6cf5b18bbdbc87eb6ae4afb4a2ecae7d9667997c..1064eb0b66dd2495741eec7edc69076d8f433f10 100644 (file)
@@ -447,39 +447,82 @@ get_loaded_info() {
        get_mtx_status
 
        set x `sed -n '
-/^Data Transfer Element:Empty/                         {
+/^Data Transfer Element:Empty/                          {
     s/.*/-1/p
     q
 }
-/^Data Transfer Element '$driveslot':Empty/            {
+/^Data Transfer Element '$driveslot':Empty/             {
     s/.*/-1/p
     q
 }
-/^Data Transfer Element:Full.*:VolumeTag/              {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^    ]*\)/\1 \2/p
+/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^     ]*\)/               {
+    s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^     ]*\)/\1 \2/p
     q
 }
-/^Data Transfer Element '$driveslot':Full.*:VolumeTag/ {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^    ]*\)/\1 \2/p
+/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^     ]*\)/  {
+    s/.*(Storage Element \([0-9][0-9]*\) Loaded):VolumeTag *= *\([^     ]*\)/\1 \2/p
     q
 }
-/^Data Transfer Element:Full/                          {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded)\(.*\)/\1/p
+/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded):VolumeTag *= *\([^     ]*\)/        {
+    s/.*:VolumeTag *= *\([^     ]*\)/-2 \1/p
     q
 }
-/^Data Transfer Element '$driveslot':Full/             {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded)\(.*\)/\1/p
+/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded)/                           {
+    s/.*(Storage Element \([0-9][0-9]*\) Loaded).*/\1/p
+    q
+}
+/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded)/              {
+    s/.*Storage Element \([0-9][0-9]*\) Loaded.*/\1/p
+    q
+}
+/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded)/    {
+    s/.*/-2/p
     q
 }
 ' < $mtx_status 2>&1`
        shift                                   # get rid of the "x"
        loadedslot=$1
        loadedbarcode=$2
-
        if [ -z "$loadedslot" ]; then
                Exit 2 "<none>" "could not determine current slot, are you sure your drive slot is $driveslot"
                return $?                       # in case we are internal
        fi
+
+       #Use the current slot if it's empty and we don't know which slot is loaded'
+       if [ $loadedslot -eq -2 ]; then
+               set x `sed -n '
+{
+    /^.*Storage Element '$currentslot':Empty/ {
+       s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p
+        q
+    }
+    /^.*Storage Element '$currentslot':Full/ {
+       s/.*Storage Element \([0-9][0-9]*\):Full/-2/p
+        q
+    }
+}
+' < $mtx_status 2>& 1`
+               shift                           # get rid of the "x"
+               loadedslotx=$1
+               if [ ! -z $loadedslotx ]; then
+                       loadedslot=$loadedslotx
+               fi
+       fi
+
+       #Use the first empty slot if we don't know which slot is loaded'
+       if [ $loadedslot -eq -2 ]; then
+               set x `sed -n '
+{
+    /^.*Storage Element \([0-9][0-9]*\):Empty/ {
+       s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p
+        q
+    }
+}
+' < $mtx_status 2>& 1`
+               shift                           # get rid of the "x"
+               loadedslot=$1
+       fi
+
        if IsNumeric "$loadedslot" ; then
                :
        else
@@ -506,14 +549,25 @@ get_slot_list() {
        fi
        get_mtx_status
        slot_list=`sed -n '
-/^Data Transfer Element:Full/                          {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded)\(.*\)/\1/p
+/^Data Transfer Element:Full (Storage Element \([0-9][0-9]*\) Loaded)/ {
+    s/.*(Storage Element \([0-9][0-9]*\) Loaded).*/\1/p
 }
-/^Data Transfer Element '$driveslot':Full/             {
-    s/.*(Storage Element \([0-9][0-9]*\) Loaded)\(.*\)/\1/p
+/^Data Transfer Element '$driveslot':Full (Storage Element \([0-9][0-9]*\) Loaded)/ {
+    s/.*Storage Element \([0-9][0-9]*\) Loaded.*/\1/p
 }
-/^[    ]*Storage Element \([0-9][0-9]*\):Full/         {
-    s/.*Storage Element \([0-9][0-9]*\):.*/\1/p
+/^Data Transfer Element '$driveslot':Full (Unknown Storage Element Loaded)/ {
+    : loop
+    n
+    /^.*Storage Element \([0-9][0-9]*\):Full/ {
+        s/.*Storage Element \([0-9][0-9]*\):Full.*/\1/p
+        b loop
+    }
+    /^.*Storage Element \([0-9][0-9]*\):Empty/ {
+       s/.*Storage Element \([0-9][0-9]*\):Empty/\1/p
+    }
+}
+/^.*Storage Element \([0-9][0-9]*\):Full/ {
+    s/.*Storage Element \([0-9][0-9]*\):Full.*/\1/p
 }
 ' < $mtx_status 2>&1 | grep -v "^${cleanslot}\$" | sort -n`
        slot_list=`echo $slot_list`             # remove the newlines
@@ -946,6 +1000,10 @@ loadslot() {
                Exit 0 "$loadedslot" "$tape"
                return $?                       # in case we are internal
        fi
+       if [ $loadedslot -eq -2 ]; then
+               Exit 0 "$loadedslot" "$tape"
+               return $?                       # in case we are internal
+        fi
 
        # If we are loading the cleaning tape, bump the cleaning count
        # and reset the access count.  Otherwise, bump the access count
index d4a2eb00c05a22acd753cf8e765599b76fb01086..df966bd537e16e5661b57258f15ebd39c47466d1 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: scsi-cam.c,v 1.10.4.1.2.4 2004/04/29 20:47:40 martinea Exp $
+ * $Id: scsi-cam.c,v 1.10.4.1.2.3.2.1 2004/04/29 20:47:21 martinea Exp $
  *
  * Interface to execute SCSI commands on an system with cam support
  * Current support is for FreeBSD 4.x
@@ -75,7 +75,7 @@ extern FILE *debug_file;
 void SCSI_OS_Version()
 {
 #ifndef lint
-   static char rcsid[] = "$Id: scsi-cam.c,v 1.10.4.1.2.4 2004/04/29 20:47:40 martinea Exp $";
+   static char rcsid[] = "$Id: scsi-cam.c,v 1.10.4.1.2.3.2.1 2004/04/29 20:47:21 martinea Exp $";
    DebugPrint(DEBUG_INFO, SECTION_INFO, "scsi-os-layer: %s\n",rcsid);
 #endif
 }
index dd69e939a7c21402a68a50c7b6a637b5dce0172e..d0e48fb60d84831018c8b58c349703c1fccb68b7 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: amandad.c,v 1.32.2.4.4.1.2.6 2003/12/16 22:36:45 martinea Exp $
+ * $Id: amandad.c,v 1.32.2.4.4.1.2.6.2.1 2004/02/13 14:01:07 martinea Exp $
  *
  * handle client-host side of Amanda network communications, including
  * security checks, execution of the proper service, and acking the
@@ -39,6 +39,7 @@
 #include "version.h"
 #include "protocol.h"
 #include "util.h"
+#include "client_util.h"
 
 #define RECV_TIMEOUT 30
 #define ACK_TIMEOUT  10                /* XXX should be configurable */
@@ -75,7 +76,7 @@ int ack_timeout     = ACK_TIMEOUT;
 int main P((int argc, char **argv));
 void sendack P((pkt_t *hdr, pkt_t *msg));
 void sendnak P((pkt_t *hdr, pkt_t *msg, char *str));
-void setup_rep P((pkt_t *hdr, pkt_t *msg));
+void setup_rep P((pkt_t *hdr, pkt_t *msg, int partial_rep));
 char *strlower P((char *str));
 
 int main(argc, argv)
@@ -94,7 +95,7 @@ char **argv;
        out_msg: Standard, i.e. non-repeated, ACK and REP.
        rej_msg: Any other outgoing message.
      */
-    pkt_t in_msg, out_msg, rej_msg, dup_msg;
+    pkt_t in_msg, out_msg, out_pmsg, rej_msg, dup_msg;
     char *cmd = NULL, *base = NULL;
     char *noop_file = NULL;
     char **vp;
@@ -106,6 +107,7 @@ char **argv;
     char number[NUM_STR_SIZE];
     am_feature_t *our_features = NULL;
     char *our_feature_string = NULL;
+    int send_partial_reply = 0;
 
     struct service_s *servp;
     fd_set insock;
@@ -200,6 +202,9 @@ char **argv;
     dgram_zero(&out_msg.dgram);
     dgram_socket(&out_msg.dgram, 0);
 
+    dgram_zero(&out_pmsg.dgram);
+    dgram_socket(&out_pmsg.dgram, 0);
+
     dgram_zero(&rej_msg.dgram);
     dgram_socket(&rej_msg.dgram, 0);
 
@@ -312,7 +317,7 @@ char **argv;
     if(!(servp->flags & NO_AUTH)
        && !security_ok(&in_msg.peer, in_msg.security, in_msg.cksum, &errstr)) {
        /* XXX log on authlog? */
-       setup_rep(&in_msg, &out_msg);
+       setup_rep(&in_msg, &out_msg, 0);
        ap_snprintf(out_msg.dgram.cur,
                    sizeof(out_msg.dgram.data)-out_msg.dgram.len,
                    "ERROR %s\n", errstr);
@@ -362,6 +367,22 @@ char **argv;
        amfree(s);
        (void)lseek(rep_pipe[0], (off_t)0, SEEK_SET);
     } else {
+       if(strcmp(servp->name, "sendsize") == 0) {
+           if(strncmp(in_msg.dgram.cur,"OPTIONS ",8) == 0) {
+               g_option_t *g_options;
+               char *option_str, *p;
+
+               option_str = stralloc(in_msg.dgram.cur+8);
+               p = strchr(option_str,'\n');
+               if(p) *p = '\0';
+
+               g_options = parse_g_options(option_str, 0);
+               if(am_has_feature(g_options->features, fe_partial_estimate)) {
+                   send_partial_reply = 1;
+               }
+               amfree(option_str);
+           }
+       }
        if(pipe(req_pipe) == -1 || pipe(rep_pipe) == -1)
            error("pipe: %s", strerror(errno));
 
@@ -433,9 +454,13 @@ char **argv;
         aclose(req_pipe[1]);
     }
 
-    setup_rep(&in_msg, &out_msg);
+    setup_rep(&in_msg, &out_msg, 0);
+    if(send_partial_reply) {
+       setup_rep(&in_msg, &out_pmsg, 1);
+    }
 #ifdef KRB4_SECURITY
     add_mutual_authenticator(&out_msg.dgram);
+    add_mutual_authenticator(&out_pmsg.dgram);
 #endif
 
     while(1) {
@@ -468,7 +493,17 @@ char **argv;
                }
                break;
            }
-           dglen += rc;
+           else {
+               if(send_partial_reply) {
+                   strncpy(out_pmsg.dgram.cur+dglen, out_msg.dgram.cur+dglen, rc);
+                   out_pmsg.dgram.len += rc;
+                   out_pmsg.dgram.data[out_pmsg.dgram.len] = '\0';
+                   dbprintf(("%s: sending PREP packet:\n----\n%s----\n\n",
+                             debug_prefix_time(NULL), out_pmsg.dgram.data));
+                   dgram_send_addr(in_msg.peer, &out_pmsg.dgram);
+               }
+               dglen += rc;
+           }
        }
        if(!FD_ISSET(0,&insock))
            continue;
@@ -637,14 +672,16 @@ char *str;
     dgram_send_addr(hdr->peer, &msg->dgram);
 }
 
-void setup_rep(hdr, msg)
+void setup_rep(hdr, msg, partial_rep)
 pkt_t *hdr;
 pkt_t *msg;
+int partial_rep;
 {
     /* XXX this isn't very safe either: handle could be bogus */
     ap_snprintf(msg->dgram.data, sizeof(msg->dgram.data),
-               "Amanda %d.%d REP HANDLE %s SEQ %d\n",
+               "Amanda %d.%d %s HANDLE %s SEQ %d\n",
                VERSION_MAJOR, VERSION_MINOR,
+               partial_rep == 0 ? "REP" : "PREP", 
                hdr->handle ? hdr->handle : "",
                hdr->sequence);
 
index 731ad09efbc8bd31ab9924b9f3bc5cd9538a7104..a0ec139fe168825cc88448332347515dcfe9694d 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amqde.c,v 1.1.2.1 2003/10/24 20:38:23 kovert Exp $
+ * $Id: amqde.c,v 1.1.2.1.2.1 2004/08/05 11:35:35 martinea Exp $
  *
  * the central header file included by all amanda sources
  */
@@ -147,7 +147,7 @@ main(argc, argv)
                        if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0)
                                continue;
 
-                       snprintf(buf, sizeof(buf) - 1, "%s/%s", new->dirname, de->d_name);
+                       ap_snprintf(buf, sizeof(buf) - 1, "%s/%s", new->dirname, de->d_name);
 
 #ifdef USE_STRHASH
                        if (should_exclude(hash, buf))
index 97a032adc3125d6a5ccb643957742fe0e314e539..aa95bb2371911591daa5937f9cd880ebf97f4fec 100644 (file)
  * file named AUTHORS, in the root directory of this distribution.
  */
 /* 
- * $Id: calcsize.c,v 1.24.2.3.6.1 2002/03/31 21:01:32 jrjackson Exp $
+ * $Id: calcsize.c,v 1.24.2.3.6.1.2.3 2005/02/09 17:56:52 martinea Exp $
  *
  * traverse directory tree to get backup size estimates
  */
 #include "amanda.h"
 #include "statfs.h"
+#include "sl.h"
 
 #define ROUND(n,x)     ((x) + (n) - 1 - (((x) + (n) - 1) % (n)))
 
@@ -44,7 +45,7 @@ unsigned long n, x;
 }
 */
 
-# define ST_BLOCKS(s)  ((s).st_size / 512 + (((s).st_size % 512) ? 1 : 0))
+#define ST_BLOCKS(s)   ((((s).st_blocks * 512) <= (s).st_size) ? (s).st_blocks+1 : ((s).st_size / 512 + (((s).st_size % 512) ? 1 : 0)))
 
 #define        FILETYPES       (S_IFREG|S_IFLNK|S_IFDIR)
 
@@ -62,34 +63,39 @@ struct {
     int total_dirs;
     int total_files;
     long total_size;
+    long total_size_name;
 } dumpstats[MAXDUMPS];
 
 time_t dumpdate[MAXDUMPS];
 int  dumplevel[MAXDUMPS];
 int ndumps;
 
+void (*add_file_name) P((int, char *));
 void (*add_file) P((int, struct stat *));
 long (*final_size) P((int, char *));
 
 
 int main P((int, char **));
-void traverse_dirs P((char *));
+void traverse_dirs P((char *, char *));
 
 
+void add_file_name_dump P((int, char *));
 void add_file_dump P((int, struct stat *));
 long final_size_dump P((int, char *));
 
+void add_file_name_gnutar P((int, char *));
 void add_file_gnutar P((int, struct stat *));
 long final_size_gnutar P((int, char *));
 
+void add_file_name_unknown P((int, char *));
 void add_file_unknown P((int, struct stat *));
 long final_size_unknown P((int, char *));
 
-#ifdef BUILTIN_EXCLUDE_SUPPORT
+sl_t *calc_load_file P((char *filename));
+int calc_check_exclude P((char *filename));
+
 int use_gtar_excl = 0;
-char exclude_string[] = "--exclude=";
-char exclude_list_string[] = "--exclude-list=";
-#endif
+sl_t *include_sl=NULL, *exclude_sl=NULL;
 
 int main(argc, argv)
 int argc;
@@ -135,7 +141,7 @@ char **argv;
     return 0;
 #else
     int i;
-    char *dirname=NULL, *amname=NULL;
+    char *dirname=NULL, *amname=NULL, *filename=NULL;
     int fd;
     unsigned long malloc_hist_1, malloc_size_1;
     unsigned long malloc_hist_2, malloc_size_2;
@@ -165,17 +171,8 @@ char **argv;
     /* need at least program, amname, and directory name */
 
     if(argc < 3) {
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-      usage:
-#endif
-       error("Usage: %s [DUMP|GNUTAR%s] name dir [level date] ...",
-             get_pname(),
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-             " [-X --exclude[-list]=regexp]"
-#else
-             ""
-#endif
-             );
+       error("Usage: %s [DUMP|GNUTAR%s] name dir [-X exclude-file] [-I include-file] [level date]*",
+             get_pname());
        return 1;
     }
 
@@ -186,6 +183,7 @@ char **argv;
        error("dump not available on this system");
        return 1;
 #else
+       add_file_name = add_file_name_dump;
        add_file = add_file_dump;
        final_size = final_size_dump;
 #endif
@@ -195,53 +193,18 @@ char **argv;
        error("gnutar not available on this system");
        return 1;
 #else
+       add_file_name = add_file_name_gnutar;
        add_file = add_file_gnutar;
        final_size = final_size_gnutar;
-#ifdef BUILTIN_EXCLUDE_SUPPORT
        use_gtar_excl++;
-#endif
 #endif
     }
     else {
+       add_file_name = add_file_name_unknown;
        add_file = add_file_unknown;
        final_size = final_size_unknown;
     }
     argc--, argv++;
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-    if ((argc > 1) && strcmp(*argv,"-X") == 0) {
-       char *result = NULL;
-       char *cp = NULL;
-       argv++;
-
-       if (!use_gtar_excl) {
-         error("exclusion specification not supported");
-         return 1;
-       }
-
-       result = stralloc(*argv);
-       if (*result && (cp = strrchr(result,';')))
-           /* delete trailing ; */
-           *cp = 0;
-       if (strncmp(result, exclude_string, sizeof(exclude_string)-1) == 0)
-         add_exclude(result+sizeof(exclude_string)-1);
-       else if (strncmp(result, exclude_list_string,
-                        sizeof(exclude_list_string)-1) == 0) {
-         if (access(result + sizeof(exclude_list_string)-1, R_OK) != 0) {
-           fprintf(stderr,"Cannot open exclude file %s\n",cp+1);
-           use_gtar_excl = 0;
-         } else {
-           add_exclude_file(result + sizeof(exclude_list_string)-1);
-         }
-       } else {
-         amfree(result);
-         goto usage;
-       }
-       amfree(result);
-       argc -= 2;
-       argv++;
-    } else
-       use_gtar_excl = 0;
-#endif
 
     /* the amanda name can be different from the directory name */
 
@@ -258,6 +221,42 @@ char **argv;
     } else
        error("missing <dir>");
 
+    if ((argc > 1) && strcmp(*argv,"-X") == 0) {
+       argv++;
+
+       if (!use_gtar_excl) {
+         error("exclusion specification not supported");
+         return 1;
+       }
+       
+       filename = stralloc(*argv);
+       if (access(filename, R_OK) != 0) {
+           fprintf(stderr,"Cannot open exclude file %s\n",filename);
+           use_gtar_excl = 0;
+       } else {
+         exclude_sl = calc_load_file(filename);
+       }
+       amfree(filename);
+       argc -= 2;
+       argv++;
+    } else
+       use_gtar_excl = 0;
+
+    if ((argc > 1) && strcmp(*argv,"-I") == 0) {
+       argv++;
+       
+       filename = stralloc(*argv);
+       if (access(filename, R_OK) != 0) {
+           fprintf(stderr,"Cannot open include file %s\n",filename);
+           use_gtar_excl = 0;
+       } else {
+         include_sl = calc_load_file(filename);
+       }
+       amfree(filename);
+       argc -= 2;
+       argv++;
+    }
+
     /* the dump levels to calculate sizes for */
 
     ndumps = 0;
@@ -273,14 +272,28 @@ char **argv;
     if(argc)
        error("leftover arg \"%s\", expected <level> and <date>", *argv);
 
-    traverse_dirs(dirname);
+    if(is_empty_sl(include_sl)) {
+       traverse_dirs(dirname,".");
+    }
+    else {
+       sle_t *an_include = include_sl->first;
+       while(an_include != NULL) {
+/*
+           char *adirname = stralloc2(dirname, an_include->name+1);
+           traverse_dirs(adirname);
+           amfree(adirname);
+*/
+           traverse_dirs(dirname, an_include->name);
+           an_include = an_include->next;
+       }
+    }
     for(i = 0; i < ndumps; i++) {
 
        amflock(1, "size");
 
        lseek(1, (off_t)0, SEEK_END);
 
-       printf("%s %d SIZE %ld\n",
+       fprintf(stderr, "%s %d SIZE %ld\n",
               amname, dumplevel[i], final_size(i, dirname));
        fflush(stdout);
 
@@ -316,8 +329,9 @@ char *file;
 void push_name P((char *str));
 char *pop_name P((void));
 
-void traverse_dirs(parent_dir)
+void traverse_dirs(parent_dir, include)
 char *parent_dir;
+char *include;
 {
     DIR *d;
     struct dirent *f;
@@ -327,22 +341,22 @@ char *parent_dir;
     dev_t parent_dev = 0;
     int i;
     int l;
+    int parent_len;
+    int has_exclude = !is_empty_sl(exclude_sl) && use_gtar_excl;
+
+    char *aparent = vstralloc(parent_dir, "/", include, NULL);
 
     if(parent_dir && stat(parent_dir, &finfo) != -1)
        parent_dev = finfo.st_dev;
 
-    push_name(parent_dir);
+    parent_len = strlen(parent_dir);
 
-    for(dirname = pop_name(); dirname; free(dirname), dirname = pop_name()) {
+    push_name(aparent);
 
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-       if(use_gtar_excl &&
-          (check_exclude(basename(dirname)) ||
-           check_exclude(dirname)))
-           /* will not be added by gnutar */
+    for(dirname = pop_name(); dirname; free(dirname), dirname = pop_name()) {
+       if(has_exclude && calc_check_exclude(dirname+parent_len+1)) {
            continue;
-#endif
-
+       }
        if((d = opendir(dirname)) == NULL) {
            perror(dirname);
            continue;
@@ -356,6 +370,9 @@ char *parent_dir;
        }
 
        while((f = readdir(d)) != NULL) {
+           int is_symlink = 0;
+           int is_dir;
+           int is_file;
            if(is_dot_or_dotdot(f->d_name)) {
                continue;
            }
@@ -371,31 +388,39 @@ char *parent_dir;
                continue;
            }
 
-           if((finfo.st_mode & S_IFMT) == S_IFDIR) {
-               push_name(newname);
-           }
-
-           for(i = 0; i < ndumps; i++) {
-               if(finfo.st_ctime >= dumpdate[i]) {
-                   int exclude = 0;
-                   int is_symlink = 0;
-
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-                   exclude = check_exclude(f->d_name);
-#endif
 #ifdef S_IFLNK
-                   is_symlink = ((finfo.st_mode & S_IFMT) == S_IFLNK);
+           is_symlink = ((finfo.st_mode & S_IFMT) == S_IFLNK);
 #endif
-                   if (! exclude &&
-                         /* regular files */
-                       ((finfo.st_mode & S_IFMT) == S_IFREG
-                         /* directories */
-                         || (finfo.st_mode & S_IFMT) == S_IFDIR
-                         /* symbolic links */
-                         || is_symlink)) {
+           is_dir = ((finfo.st_mode & S_IFMT) == S_IFDIR);
+           is_file = ((finfo.st_mode & S_IFMT) == S_IFREG);
+
+           if (!(is_file || is_dir || is_symlink)) {
+               continue;
+           }
+
+           {
+               int is_excluded = -1;
+               for(i = 0; i < ndumps; i++) {
+                   add_file_name(i, newname);
+                   if(is_file && finfo.st_ctime >= dumpdate[i]) {
+
+                       if(has_exclude) {
+                           if(is_excluded == -1)
+                               is_excluded =
+                                      calc_check_exclude(newname+parent_len+1);
+                           if(is_excluded == 1) {
+                               i = ndumps;
+                               continue;
+                           }
+                       }
                        add_file(i, &finfo);
                    }
                }
+               if(is_dir) {
+                   if(has_exclude && calc_check_exclude(newname+parent_len+1))
+                       continue;
+                   push_name(newname);
+               }
            }
        }
 
@@ -408,6 +433,7 @@ char *parent_dir;
     }
     amfree(newbase);
     amfree(newname);
+    amfree(aparent);
 }
 
 void push_name(str)
@@ -452,6 +478,13 @@ char *pop_name()
  * requirements for files with holes, nor the dumping of directories that
  * are not themselves modified.
  */
+void add_file_name_dump(level, name)
+int level;
+char *name;
+{
+    return;
+}
+
 void add_file_dump(level, sp)
 int level;
 struct stat *sp;
@@ -496,12 +529,20 @@ char *topdir;
  *
  * As with DUMP, we only need a reasonable estimate, not an exact figure.
  */
+void add_file_name_gnutar(level, name)
+int level;
+char *name;
+{
+/*    dumpstats[level].total_size_name += strlen(name) + 64;*/
+      dumpstats[level].total_size += 1;
+}
+
 void add_file_gnutar(level, sp)
 int level;
 struct stat *sp;
 {
     /* the header takes one additional block */
-    dumpstats[level].total_size += ROUND(4,(ST_BLOCKS(*sp) + 1));
+    dumpstats[level].total_size += ST_BLOCKS(*sp);
 }
 
 long final_size_gnutar(level, topdir)
@@ -510,7 +551,7 @@ char *topdir;
 {
     /* divide by two to get kbytes, rounded up */
     /* + 4 blocks for security */
-    return (dumpstats[level].total_size + 5) / 2;
+    return (dumpstats[level].total_size + 5 + (dumpstats[level].total_size_name/512)) / 2;
 }
 
 /*
@@ -520,6 +561,13 @@ char *topdir;
  * Here we'll just add up the file sizes and output that.
  */
 
+void add_file_name_unknown(level, name)
+int level;
+char *name;
+{
+    return;
+}
+
 void add_file_unknown(level, sp)
 int level;
 struct stat *sp;
@@ -536,3 +584,41 @@ char *topdir;
     /* divide by two to get kbytes, rounded up */
     return (dumpstats[level].total_size + 1) / 2;
 }
+
+/*
+ * =========================================================================
+ */
+sl_t *calc_load_file(filename)
+char *filename;
+{
+    char pattern[1025];
+
+    sl_t *sl_list = new_sl();
+
+    FILE *file = fopen(filename, "r");
+
+    while(fgets(pattern, 1025, file)) {
+       if(strlen(pattern)>0 && pattern[strlen(pattern)-1] == '\n')
+           pattern[strlen(pattern)-1] = '\0';
+       sl_list = append_sl(sl_list, pattern);
+    }  
+    fclose(file);
+
+    return sl_list;
+}
+
+int calc_check_exclude(filename)
+char *filename;
+{
+    sle_t *an_exclude;
+    if(is_empty_sl(exclude_sl)) return 0;
+
+    an_exclude=exclude_sl->first;
+    while(an_exclude != NULL) {
+       if(match_tar(an_exclude->name, filename)) {
+           return 1;
+       }
+       an_exclude=an_exclude->next;
+    }
+    return 0;
+}
index 0cfade85051f7b59c193d1f6e8e5e00ffa5d2d84..a82af7c4c9c4d5c71698884776e8b446eb09ee32 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /* 
- * $Id: selfcheck.c,v 1.40.2.3.4.4.2.22 2003/11/18 18:04:26 martinea Exp $
+ * $Id: selfcheck.c,v 1.40.2.3.4.4.2.22.2.2 2004/08/12 12:30:53 martinea Exp $
  *
  * do self-check and send back any error messages
  */
@@ -58,6 +58,7 @@ int need_vxrestore=0;
 int need_runtar=0;
 int need_gnutar=0;
 int need_compress_path=0;
+int need_calcsize=0;
 
 static am_feature_t *our_features = NULL;
 static char *our_feature_string = NULL;
@@ -66,8 +67,8 @@ static g_option_t *g_options = NULL;
 /* local functions */
 int main P((int argc, char **argv));
 
-static void check_options P((char *program, char *disk, char *device, option_t *options));
-static void check_disk P((char *program, char *disk, char *amdevice, int level));
+static void check_options P((char *program, char *calcprog, char *disk, char *device, option_t *options));
+static void check_disk P((char *program, char *calcprog, char *disk, char *amdevice, int level));
 static void check_overall P((void));
 static void check_access P((char *filename, int mode));
 static void check_file P((char *filename, int mode));
@@ -82,6 +83,7 @@ char **argv;
     int level;
     char *line = NULL;
     char *program = NULL;
+    char *calcprog = NULL;
     char *disk = NULL;
     char *device = NULL;
     char *optstr = NULL;
@@ -155,6 +157,19 @@ char **argv;
        skip_non_whitespace(s, ch);
        s[-1] = '\0';                           /* terminate the program name */
 
+       if(strncmp(program, "CALCSIZE", 8) == 0) {
+           skip_whitespace(s, ch);             /* find program name */
+           if (ch == '\0') {
+               goto err;                       /* no program */
+           }
+           calcprog = s - 1;
+           skip_non_whitespace(s, ch);
+           s[-1] = '\0';
+       }
+       else {
+           calcprog = NULL;
+       }
+
        skip_whitespace(s, ch);                 /* find disk name */
        if (ch == '\0') {
            goto err;                           /* no disk */
@@ -198,8 +213,8 @@ char **argv;
            skip_non_whitespace(s, ch);
            s[-1] = '\0';                       /* terminate the options */
            options = parse_options(optstr, disk, device, g_options->features, 1);
-           check_options(program, disk, device, options);
-           check_disk(program, disk, device, level);
+           check_options(program, calcprog, disk, device, options);
+           check_disk(program, calcprog, disk, device, level);
            free_sl(options->exclude_file);
            free_sl(options->exclude_list);
            free_sl(options->include_file);
@@ -221,7 +236,8 @@ char **argv;
            need_runtar=1;
            need_gnutar=1;
            need_compress_path=1;
-           check_disk(program, disk, device, level);
+           need_calcsize=1;
+           check_disk(program, calcprog, disk, device, level);
        } else {
            goto err;                           /* bad syntax */
        }
@@ -265,11 +281,34 @@ char **argv;
 
 
 static void
-check_options(program, disk, device, options)
-    char *program, *disk, *device;
+check_options(program, calcprog, disk, device, options)
+    char *program, *calcprog, *disk, *device;
     option_t *options;
 {
-    if(strcmp(program,"GNUTAR") == 0) {
+    char *myprogram = program;
+
+    if(strcmp(myprogram,"CALCSIZE") == 0) {
+       int nb_exclude = 0;
+       int nb_include = 0;
+       char *file_exclude = NULL;
+       char *file_include = NULL;
+
+       if(options->exclude_file) nb_exclude += options->exclude_file->nb_element;
+       if(options->exclude_list) nb_exclude += options->exclude_list->nb_element;
+       if(options->include_file) nb_include += options->include_file->nb_element;
+       if(options->include_list) nb_include += options->include_list->nb_element;
+
+       if(nb_exclude > 0) file_exclude = build_exclude(disk, device, options, 1);
+       if(nb_include > 0) file_include = build_include(disk, device, options, 1);
+
+       amfree(file_exclude);
+       amfree(file_include);
+
+       need_calcsize=1;
+       myprogram = calcprog;
+    }
+
+    if(strcmp(myprogram,"GNUTAR") == 0) {
        need_gnutar=1;
         if(disk[0] == '/' && disk[1] == '/') {
            if(options->exclude_file && options->exclude_file->nb_element > 1) {
@@ -308,7 +347,8 @@ check_options(program, disk, device, options)
            need_runtar=1;
        }
     }
-    if(strcmp(program,"DUMP") == 0) {
+
+    if(strcmp(myprogram,"DUMP") == 0) {
        if(options->exclude_file && options->exclude_file->nb_element > 0) {
            printf("ERROR [DUMP does not support exclude file]\n");
        }
@@ -382,8 +422,8 @@ check_options(program, disk, device, options)
        need_compress_path=1;
 }
 
-static void check_disk(program, disk, amdevice, level)
-char *program, *disk, *amdevice;
+static void check_disk(program, calcprog, disk, amdevice, level)
+char *program, *calcprog, *disk, *amdevice;
 int level;
 {
     char *device = NULL;
@@ -395,10 +435,22 @@ int level;
     int access_result;
     char *access_type;
     char *extra_info = NULL;
+    char *myprogram = program;
+
+    if(strcmp(myprogram,"CALCSIZE") == 0) {
+       if(amdevice[0] == '/' && amdevice[1] == '/') {
+           err = vstralloc("Can't use CALCSIZE for samba estimate,",
+                           " use CLIENT: ",
+                           amdevice,
+                           NULL);
+           goto common_exit;
+       }
+       myprogram = calcprog;
+    }
 
     dbprintf(("%s: checking disk %s\n", debug_prefix_time(NULL), disk));
 
-    if (strcmp(program, "GNUTAR") == 0) {
+    if (strcmp(myprogram, "GNUTAR") == 0) {
         if(amdevice[0] == '/' && amdevice[1] == '/') {
 #ifdef SAMBA_CLIENT
            int nullfd, checkerr;
@@ -718,6 +770,16 @@ static void check_overall()
 #endif
     }
 
+    if( need_calcsize ) {
+       char *cmd;
+
+       cmd = vstralloc(libexecdir, "/", "calcsize", versionsuffix(), NULL);
+
+       check_file(cmd, X_OK);
+
+       amfree(cmd);
+    }
+
     if( need_samba ) {
 #ifdef SAMBA_CLIENT
        check_file(SAMBA_CLIENT, X_OK);
index 2fdac32f0662bab53ea6170a1d3c418d58c8787f..077dca421c2ba6ab29163cb524d55be0c8ed8e45 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /* 
- * $Id: sendbackup-gnutar.c,v 1.56.2.15.4.4.2.11 2003/10/30 18:04:45 martinea Exp $
+ * $Id: sendbackup-gnutar.c,v 1.56.2.15.4.4.2.11.2.1 2004/08/31 13:39:08 martinea Exp $
  *
  * send backup data using GNU tar
  */
@@ -552,25 +552,29 @@ int goterror;
 {
     if(!options->no_record && !goterror) {
 #ifdef GNUTAR_LISTED_INCREMENTAL_DIR
-      if (incrname != NULL && strlen(incrname) > 4) {
-        char *nodotnew;
+       if (incrname != NULL && strlen(incrname) > 4) {
+           char *nodotnew;
        
-       nodotnew = stralloc(incrname);
-        nodotnew[strlen(nodotnew)-4] = '\0';
-        if (rename(incrname, nodotnew) != 0) {
-            error("error [renaming %s to %s: %s]", 
-                 incrname, nodotnew, strerror(errno));
+           nodotnew = stralloc(incrname);
+           nodotnew[strlen(nodotnew)-4] = '\0';
+           if (rename(incrname, nodotnew) != 0) {
+               fprintf(stderr, "%s: warning [renaming %s to %s: %s]\n",
+                       get_pname(), incrname, nodotnew, strerror(errno));
+           }
+           amfree(nodotnew);
+           amfree(incrname);
        }
-       amfree(nodotnew);
-       amfree(incrname);
-      }
 #endif
 
-        if(!start_amandates(1))
-           error("error [opening %s: %s]", AMANDATES_FILE, strerror(errno));
-       amandates_updateone(cur_disk, cur_level, cur_dumptime);
-       finish_amandates();
-       free_amandates();
+        if(!start_amandates(1)) {
+           fprintf(stderr, "%s: warning [opening %s: %s]\n", get_pname(),
+                   AMANDATES_FILE, strerror(errno));
+       }
+       else {
+           amandates_updateone(cur_disk, cur_level, cur_dumptime);
+           finish_amandates();
+           free_amandates();
+       }
     }
 }
 
index c13f8754d28ceaa0f248953bea4fa77f08aa92b0..b7bf68815c8a3298806f372738a169d05eacd1ad 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /* 
- * $Id: sendsize.c,v 1.97.2.13.4.6.2.23 2003/10/24 20:38:23 kovert Exp $
+ * $Id: sendsize.c,v 1.97.2.13.4.6.2.23.2.3 2005/04/06 12:31:04 martinea Exp $
  *
  * send estimated backup sizes using dump
  */
@@ -79,6 +79,7 @@ typedef struct disk_estimates_s {
     char *amdevice;
     char *dirname;
     char *program;
+    char *calcprog;
     int spindle;
     pid_t child;
     int done;
@@ -95,7 +96,7 @@ static g_option_t *g_options = NULL;
 /* local functions */
 int main P((int argc, char **argv));
 void add_diskest P((char *disk, char *amdevice, int level, int spindle,
-                   char *prog, option_t *options));
+                   char *prog, char *calcprog, option_t *options));
 void calc_estimates P((disk_estimates_t *est));
 void free_estimates P((disk_estimates_t *est));
 void dump_calc_estimates P((disk_estimates_t *));
@@ -109,7 +110,7 @@ int argc;
 char **argv;
 {
     int level, spindle;
-    char *prog, *disk, *amdevice, *dumpdate;
+    char *prog, *calcprog, *disk, *amdevice, *dumpdate;
     option_t *options = NULL;
     disk_estimates_t *est;
     disk_estimates_t *est1;
@@ -196,6 +197,20 @@ char **argv;
        skip_non_whitespace(s, ch);
        s[-1] = '\0';
 
+       if(strncmp(prog, "CALCSIZE", 8) == 0) {
+           skip_whitespace(s, ch);             /* find the program name */
+           if(ch == '\0') {
+               err_extra = "no program name";
+               goto err;
+           }
+           calcprog = s - 1;
+           skip_non_whitespace(s, ch);
+           s[-1] = '\0';
+       }
+       else {
+           calcprog = NULL;
+       }
+
        skip_whitespace(s, ch);                 /* find the disk name */
        if(ch == '\0') {
            err_extra = "no disk name";
@@ -281,7 +296,7 @@ char **argv;
            }
        }
 
-       add_diskest(disk, amdevice, level, spindle, prog, options);
+       add_diskest(disk, amdevice, level, spindle, prog, calcprog, options);
        amfree(amdevice);
     }
     amfree(line);
@@ -437,8 +452,8 @@ char **argv;
 }
 
 
-void add_diskest(disk, amdevice, level, spindle, prog, options)
-char *disk, *amdevice, *prog;
+void add_diskest(disk, amdevice, level, spindle, prog, calcprog, options)
+char *disk, *amdevice, *prog, *calcprog;
 int level, spindle;
 option_t *options;
 {
@@ -471,6 +486,10 @@ option_t *options;
     newp->amdevice = stralloc(amdevice);
     newp->dirname = amname_to_dirname(newp->amdevice);
     newp->program = stralloc(prog);
+    if(calcprog != NULL)
+       newp->calcprog = stralloc(calcprog);
+    else
+       newp->calcprog = NULL;
     newp->spindle = spindle;
     newp->est[level].needestimate = 1;
     newp->options = options;
@@ -535,7 +554,13 @@ disk_estimates_t *est;
          gnutar_calc_estimates(est);
        else
 #endif
-         generic_calc_estimates(est);
+#ifdef SAMBA_CLIENT
+         if (est->amdevice[0] == '/' && est->amdevice[1] == '/')
+           dbprintf(("%s: Can't use CALCSIZE for samba estimate: %s %s\n",
+                     est->amname, est->dirname));
+         else
+#endif
+           generic_calc_estimates(est);
 
     dbprintf(("%s: done with amname '%s', dirname '%s', spindle %d\n",
              debug_prefix_time(NULL),
@@ -545,65 +570,111 @@ disk_estimates_t *est;
 void generic_calc_estimates(est)
 disk_estimates_t *est;
 {
+    int pipefd = -1, nullfd = -1;
     char *cmd;
-    char *argv[DUMP_LEVELS*2+10];
+    char *my_argv[DUMP_LEVELS*2+20];
     char number[NUM_STR_SIZE];
-    int i, level, argc, calcpid;
+    int i, level, my_argc, calcpid;
+    int nb_exclude = 0;
+    int nb_include = 0;
+    char *file_exclude = NULL;
+    char *file_include = NULL;
+    times_t start_time;
+    FILE *dumpout = NULL;
+    long size = 1;
+    char *line = NULL;
+    char *match_expr;
 
     cmd = vstralloc(libexecdir, "/", "calcsize", versionsuffix(), NULL);
 
-    argc = 0;
-    argv[argc++] = stralloc("calcsize");
-    argv[argc++] = stralloc(est->program);
-#ifdef BUILTIN_EXCLUDE_SUPPORT
-    if(est->exclude && *est->exclude) {
-       argv[argc++] = stralloc("-X");
-       argv[argc++] = stralloc(est->exclude);
+    my_argc = 0;
+    my_argv[my_argc++] = stralloc("calcsize");
+    my_argv[my_argc++] = stralloc(est->calcprog);
+
+    my_argv[my_argc++] = stralloc(est->amname);
+    my_argv[my_argc++] = stralloc(est->dirname);
+
+
+    if(est->options->exclude_file)
+       nb_exclude += est->options->exclude_file->nb_element;
+    if(est->options->exclude_list)
+       nb_exclude += est->options->exclude_list->nb_element;
+    if(est->options->include_file)
+       nb_include += est->options->include_file->nb_element;
+    if(est->options->include_list)
+       nb_include += est->options->include_list->nb_element;
+
+    if(nb_exclude > 0)
+       file_exclude = build_exclude(est->amname, est->amdevice,est->options,0);
+    if(nb_include > 0)
+       file_include = build_include(est->amname, est->amdevice,est->options,0);
+
+    if(file_exclude) {
+       my_argv[my_argc++] = stralloc("-X");
+       my_argv[my_argc++] = file_exclude;
+    }
+
+    if(file_include) {
+       my_argv[my_argc++] = stralloc("-I");
+       my_argv[my_argc++] = file_include;
     }
-#endif
-    argv[argc++] = stralloc(est->amdevice);
-    argv[argc++] = stralloc(est->dirname);
 
-    dbprintf(("%s: running cmd: %s", debug_prefix_time(NULL), argv[0]));
-    for(i=0; i<argc; ++i)
-       dbprintf((" %s", argv[i]));
+    start_time = curclock();
+
+    dbprintf(("%s: running cmd: %s", debug_prefix_time(NULL), my_argv[0]));
+    for(i=0; i<my_argc; ++i)
+       dbprintf((" %s", my_argv[i]));
 
     for(level = 0; level < DUMP_LEVELS; level++) {
        if(est->est[level].needestimate) {
            ap_snprintf(number, sizeof(number), "%d", level);
-           argv[argc++] = stralloc(number); 
+           my_argv[my_argc++] = stralloc(number); 
            dbprintf((" %s", number));
            ap_snprintf(number, sizeof(number),
                        "%ld", (long)est->est[level].dumpsince);
-           argv[argc++] = stralloc(number); 
+           my_argv[my_argc++] = stralloc(number); 
            dbprintf((" %s", number));
        }
     }
-    argv[argc] = NULL;
+    my_argv[my_argc] = NULL;
     dbprintf(("\n"));
 
     fflush(stderr); fflush(stdout);
 
-    switch(calcpid = fork()) {
-    case -1:
-        error("%s: fork returned: %s", cmd, strerror(errno));
-    default:
-        break;
-    case 0:
-       execve(cmd, argv, safe_env());
-       error("%s: execve returned: %s", cmd, strerror(errno));
-       exit(1);
-    }
-    for(i = 0; i < argc; i++) {
-       amfree(argv[i]);
-    }
+    nullfd = open("/dev/null", O_RDWR);
+    calcpid = pipespawnv(cmd, STDERR_PIPE, &nullfd, &nullfd, &pipefd, my_argv);
     amfree(cmd);
 
+    dumpout = fdopen(pipefd,"r");
+    match_expr = vstralloc(est->amname," %d SIZE %ld", NULL);
+    for(size = -1; (line = agets(dumpout)) != NULL; free(line)) {
+       if(sscanf(line, match_expr, &level, &size) == 2) {
+           printf("%s\n", line); /* write to amandad */
+           dbprintf(("%s: estimate size for %s level %d: %ld KB\n",
+                     debug_prefix(NULL),
+                     est->amname,
+                     level,
+                     size));
+       }
+    }
+    amfree(match_expr);
+
     dbprintf(("%s: waiting for %s \"%s\" child\n",
-             debug_prefix_time(NULL), argv[0], est->amdevice));
+             debug_prefix_time(NULL), my_argv[0], est->amdevice));
     wait(NULL);
     dbprintf(("%s: after %s \"%s\" wait\n",
-             debug_prefix_time(NULL), argv[0], est->amdevice));
+             debug_prefix_time(NULL), my_argv[0], est->amdevice));
+
+    dbprintf(("%s: .....\n", debug_prefix_time(NULL)));
+    dbprintf(("%s: estimate time for %s: %s\n",
+             debug_prefix(NULL),
+             est->amname,
+             walltime_str(timessub(curclock(), start_time))));
+
+    for(i = 0; i < my_argc; i++) {
+       amfree(my_argv[i]);
+    }
+    amfree(cmd);
 }
 
 
index 07bab02fc09b86ecadf390c4cc27479ecc0136f5..ce5d1b3ec5a684aca078da0d89d40f6df47c76d8 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: alloc.c,v 1.17.2.1.4.3.2.3 2002/10/27 14:31:18 martinea Exp $
+ * $Id: alloc.c,v 1.17.2.1.4.3.2.3.2.1 2004/08/31 12:46:06 martinea Exp $
  *
  * Memory allocators with error handling.  If the allocation fails,
  * errordump() is called, relieving the caller from checking the return
@@ -439,6 +439,9 @@ safe_env()
 {
     static char *safe_env_list[] = {
        "TZ",
+#ifdef __CYGWIN__
+       "SYSTEMROOT",
+#endif
 #ifdef NEED_PATH_ENV
        "PATH",
 #endif
index 74be276264a66dfc6b73c30b8d534704a985abf5..3d27dbcbc8f8913c71b040d8f65974e367da5470 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amanda.h,v 1.66.2.7.4.5.2.14 2004/04/30 12:13:20 martinea Exp $
+ * $Id: amanda.h,v 1.66.2.7.4.5.2.12.2.4 2004/08/02 18:56:32 martinea Exp $
  *
  * the central header file included by all amanda sources
  */
 #  include <sys/wait.h>
 #endif
 
-#ifdef WAIT_USES_UNION
-  typedef union wait amwait_t;
-# ifndef WEXITSTATUS
-#  define WEXITSTATUS(stat_val) (((amwait_t*)&(stat_val))->w_retcode)
-# endif
-# ifndef WTERMSIG
-#  define WTERMSIG(stat_val) (((amwait_t*)&(stat_val))->w_termsig)
-# endif
-# ifndef WIFEXITED
-#  define WIFEXITED(stat_val) (WTERMSIG(stat_val) == 0)
-# endif
-#else
+#ifdef WAIT_USES_INT
   typedef int amwait_t;
 # ifndef WEXITSTATUS
 #  define WEXITSTATUS(stat_val) (*(unsigned*)&(stat_val) >> 8)
 # ifndef WIFEXITED
 #  define WIFEXITED(stat_val) ((*(unsigned*)&(stat_val) & 255) == 0)
 # endif
+#else
+# ifdef WAIT_USES_UNION
+   typedef union wait amwait_t;
+#  ifndef WEXITSTATUS
+#  define WEXITSTATUS(stat_val) (((amwait_t*)&(stat_val))->w_retcode)
+#  endif
+#  ifndef WTERMSIG
+#   define WTERMSIG(stat_val) (((amwait_t*)&(stat_val))->w_termsig)
+#  endif
+#  ifndef WIFEXITED
+#   define WIFEXITED(stat_val) (WTERMSIG(stat_val) == 0)
+#  endif
+# else
+   typedef int amwait_t;
+#  ifndef WEXITSTATUS
+#   define WEXITSTATUS(stat_val) (*(unsigned*)&(stat_val) >> 8)
+#  endif
+#  ifndef WTERMSIG
+#   define WTERMSIG(stat_val) (*(unsigned*)&(stat_val) & 0x7F)
+#  endif
+#  ifndef WIFEXITED
+#   define WIFEXITED(stat_val) ((*(unsigned*)&(stat_val) & 255) == 0)
+#  endif
+# endif
 #endif
 
 #ifdef HAVE_UNISTD_H
 #include <stdio.h>
 #include <sys/resource.h>
 #include <sys/socket.h>
+
 #if !defined(CONFIGURE_TEST)
 #  include "amanda-int.h"
 #endif
@@ -534,6 +548,8 @@ extern char  *clean_regex     P((char *regex));
 extern int    match           P((char *regex, char *str));
 extern int    match_glob      P((char *glob, char *str));
 extern char  *glob_to_regex   P((char *glob));
+extern int    match_tar       P((char *glob, char *str));
+extern char  *tar_to_regex    P((char *glob));
 extern int    match_host      P((char *glob, char *host));
 extern int    match_disk      P((char *glob, char *disk));
 extern int    match_datestamp P((char *dateexp, char *datestamp));
index 7305793e660ca1a2aa988eb3a6d948eaa7da3b07..63dcea385df4426022b27b5dee7a425205db8dae 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 /*
- * $Id: amfeatures.c,v 1.1.2.9 2003/01/01 23:28:52 martinea Exp $
+ * $Id: amfeatures.c,v 1.1.2.9.2.3 2004/08/11 19:16:28 martinea Exp $
  *
  * Feature test related code.
  */
@@ -108,6 +108,10 @@ am_init_feature_set()
        am_add_feature(f, fe_amidxtaped_header);
        am_add_feature(f, fe_amidxtaped_nargs);
        am_add_feature(f, fe_amidxtaped_config);
+
+       am_add_feature(f, fe_partial_estimate);
+       am_add_feature(f, fe_calcsize_estimate);
+       am_add_feature(f, fe_selfcheck_calcsize);
     }
     return f;
 }
index b665f2bcebec841688ce54804cbf50373bb519f7..645f283d462bc89c29aaa90b465e5e01e4a1c80b 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 /*
- * $Id: amfeatures.h,v 1.1.2.6 2002/11/07 02:12:58 martinea Exp $
+ * $Id: amfeatures.h,v 1.1.2.6.2.3 2004/08/11 19:16:28 martinea Exp $
  *
  * Define feature test related items.
  */
@@ -134,6 +134,10 @@ typedef enum {
     fe_amidxtaped_nargs,
     fe_amidxtaped_config,
 
+    fe_partial_estimate,
+    fe_calcsize_estimate,
+    fe_selfcheck_calcsize,
+
     /*
      * All new features must be inserted immediately *before* this entry.
      */
index 6f94ab4d967a452fabb3d1b8685723126a3b323b..f26fce234f1607dc02ea48cad47712640f26b9f6 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: match.c,v 1.10.4.1.4.1.2.4 2002/11/12 18:01:19 martinea Exp $
+ * $Id: match.c,v 1.10.4.1.4.1.2.4.2.2 2004/12/21 14:20:20 martinea Exp $
  *
  * functions for checking and matching regular expressions
  */
@@ -125,14 +125,12 @@ char *glob, *str;
     if((result = regcomp(&regc, regex,
                         REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) != 0) {
         regerror(result, &regc, errmsg, sizeof(errmsg));
-       amfree(regex);
        error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg);
     }
 
     if((result = regexec(&regc, str, 0, 0, 0)) != 0
        && result != REG_NOMATCH) {
         regerror(result, &regc, errmsg, sizeof(errmsg));
-       amfree(regex);
        error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg);
     }
 
@@ -218,6 +216,109 @@ char *glob;
 }
 
 
+int match_tar(glob, str)
+char *glob, *str;
+{
+    char *regex = NULL;
+    regex_t regc;
+    int result;
+    char errmsg[STR_SIZE];
+
+    regex = tar_to_regex(glob);
+    if((result = regcomp(&regc, regex,
+                        REG_EXTENDED|REG_NOSUB|REG_NEWLINE)) != 0) {
+        regerror(result, &regc, errmsg, sizeof(errmsg));
+       error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg);
+    }
+
+    if((result = regexec(&regc, str, 0, 0, 0)) != 0
+       && result != REG_NOMATCH) {
+        regerror(result, &regc, errmsg, sizeof(errmsg));
+       error("glob \"%s\" -> regex \"%s\": %s", glob, regex, errmsg);
+    }
+
+    regfree(&regc);
+    amfree(regex);
+
+    return result == 0;
+}
+
+char *tar_to_regex(glob)
+char *glob;
+{
+    char *regex;
+    char *r;
+    size_t len;
+    int ch;
+    int last_ch;
+
+    /*
+     * Allocate an area to convert into.  The worst case is a five to
+     * one expansion.
+     */
+    len = strlen(glob);
+    regex = alloc(1 + len * 5 + 1 + 1);
+
+    /*
+     * Do the conversion:
+     *
+     *  ?      -> [^/]
+     *  *      -> .*
+     *  [!...] -> [^...]
+     *
+     * The following are given a leading backslash to protect them
+     * unless they already have a backslash:
+     *
+     *   ( ) { } + . ^ $ |
+     *
+     * Put a leading ^ and trailing $ around the result.  If the last
+     * non-escaped character is \ leave the $ off to cause a syntax
+     * error when the regex is compiled.
+     */
+
+    r = regex;
+    *r++ = '^';
+    last_ch = '\0';
+    for (ch = *glob++; ch != '\0'; last_ch = ch, ch = *glob++) {
+       if (last_ch == '\\') {
+           *r++ = ch;
+           ch = '\0';                  /* so last_ch != '\\' next time */
+       } else if (last_ch == '[' && ch == '!') {
+           *r++ = '^';
+       } else if (ch == '\\') {
+           *r++ = ch;
+       } else if (ch == '*') {
+           *r++ = '.';
+           *r++ = '*';
+       } else if (ch == '?') {
+           *r++ = '[';
+           *r++ = '^';
+           *r++ = '/';
+           *r++ = ']';
+       } else if (ch == '('
+                  || ch == ')'
+                  || ch == '{'
+                  || ch == '}'
+                  || ch == '+'
+                  || ch == '.'
+                  || ch == '^'
+                  || ch == '$'
+                  || ch == '|') {
+           *r++ = '\\';
+           *r++ = ch;
+       } else {
+           *r++ = ch;
+       }
+    }
+    if (last_ch != '\\') {
+       *r++ = '$';
+    }
+    *r = '\0';
+
+    return regex;
+}
+
+
 int match_word(glob, word, separator)
 char *glob, *word;
 char separator;
index 0e464efb9219d61bd5a7ac052be17cab6203cb8b..e7fe14224f699695c926614fdb5e4d8a3d7666e4 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: protocol.c,v 1.27.2.1.6.3 2004/04/14 13:24:35 martinea Exp $
+ * $Id: protocol.c,v 1.27.2.1.6.2.2.2 2004/04/14 13:24:17 martinea Exp $
  *
  * implements amanda protocol
  */
@@ -140,6 +140,7 @@ pktype_t s;
     case P_BOGUS: return "P_BOGUS";
     case P_REQ: return "P_REQ";
     case P_REP: return "P_REP";
+    case P_PREP: return "P_PREP";
     case P_ACK: return "P_ACK";
     case P_NAK: return "P_NAK";
     default:
@@ -510,6 +511,7 @@ pkt_t *pkt;
 
     if(strcmp(typestr, "REQ") == 0) pkt->type = P_REQ;
     else if(strcmp(typestr, "REP") == 0) pkt->type = P_REP;
+    else if(strcmp(typestr, "PREP") == 0) pkt->type = P_PREP;
     else if(strcmp(typestr, "ACK") == 0) pkt->type = P_ACK;
     else if(strcmp(typestr, "NAK") == 0) pkt->type = P_NAK;
     else pkt->type = P_BOGUS;
@@ -738,6 +740,11 @@ pkt_t *pkt;
                p->state = S_REPWAIT;
                break;
            }
+           else if(pkt->type == P_PREP) {
+               /* no ack, just rep */
+               p->state = S_REPWAIT;
+               break;
+           }
            /* else unexpected packet, put back on queue */
            pending_enqueue(p);
            return;
@@ -764,18 +771,26 @@ pkt_t *pkt;
            else if(action != A_RCVDATA)
                goto badaction;
            /* got the packet with the right handle, now check it */
-           if(pkt->type != P_REP) {
+           if(pkt->type != P_REP && pkt->type != P_PREP) {
+               pending_enqueue(p);
+               return;
+           }
+           if(pkt->type == P_REP) {
+               send_ack(p);
+               p->state = S_SUCCEEDED;
+               free_handle(p);
+               p->continuation(p, pkt);
+               amfree(p->req);
+               amfree(p->security);
+               amfree(p);
+               return;
+           }
+           else if(pkt->type == P_PREP) {
+               p->state = S_REPWAIT;
+               p->continuation(p, pkt);
                pending_enqueue(p);
                return;
            }
-           send_ack(p);
-           p->state = S_SUCCEEDED;
-           free_handle(p);
-           p->continuation(p, pkt);
-           amfree(p->req);
-           amfree(p->security);
-           amfree(p);
-           return;
 
        default:
        badaction:
@@ -936,7 +951,6 @@ static void handle_incoming_packet()
        if(errno == EAGAIN)
            return;
 #endif
-
        fprintf(stderr,"protocol packet receive: %s\n", strerror(errno));
     }
 
index 2900ec48032870f5d7a1a1b3fb30409f05526ec2..6fd886bcd0c6496414830ca84f17ca4ce2752307 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: protocol.h,v 1.8.10.3 2004/04/29 20:47:40 martinea Exp $
+ * $Id: protocol.h,v 1.8.10.2.2.2 2004/04/29 20:47:22 martinea Exp $
  *
  * interfaces for amanda protocol
  */
@@ -41,7 +41,7 @@ typedef enum {
 
 typedef enum { A_BOGUS, A_START, A_TIMEOUT, A_RCVDATA } action_t;
 
-typedef enum { P_BOGUS, P_REQ, P_REP, P_ACK, P_NAK } pktype_t;
+typedef enum { P_BOGUS, P_REQ, P_REP, P_PREP, P_ACK, P_NAK } pktype_t;
 
 typedef struct {                       /* a predigested datagram */
     pktype_t type;
index 018e7a26a79a623bae042978f5082ee94eb8c07e..a651b4b3c6c7b816f6f1e55a5ab756f72873322c 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: security.c,v 1.17.2.6.4.1.2.6 2004/04/29 20:47:40 martinea Exp $
+ * $Id: security.c,v 1.17.2.6.4.1.2.5.2.1 2004/04/29 20:47:22 martinea Exp $
  *
  * wrapper file for kerberos security
  */
index a9f37ad02c74e8508318665cee1d76eded7ce6cc..e023cdb728a2df691409e7edb972cc5f16ac298b 100644 (file)
@@ -25,7 +25,7 @@
  *                         University of Maryland at College Park
  */
 /*
- * $Id: sl.c,v 1.1.2.3 2004/04/23 11:44:57 martinea Exp $
+ * $Id: sl.c,v 1.1.2.2.2.1 2004/04/23 11:44:51 martinea Exp $
  *
  * A doubly linked list of string (char *)
  */
index f5e75fb73a7ace757f3bb62a67370913a805d962..5ab0e6e34911c165e1b755702573ad4f4ed7f2f8 100644 (file)
@@ -25,7 +25,7 @@
  *                         University of Maryland at College Park
  */
 /*
- * $Id: sl.h,v 1.1.2.2 2004/04/23 11:44:57 martinea Exp $
+ * $Id: sl.h,v 1.1.2.1.2.1 2004/04/23 11:44:51 martinea Exp $
  *
  * A doubly linked list of string (char *)
  */
index 442d4384270ee32efa4fb4f460aaff6b87c4f2d7..7a56416e0d3d7cb5c7388893042f9a59f107d69e 100644 (file)
@@ -1,8 +1,8 @@
 /* version.c - generated by genversion.c - DO NOT EDIT! */
 char *version_info[] = {
-  "build: VERSION=\"Amanda-2.4.4p3\"\n",
-  "       BUILT_DATE=\"Tue Jun 22 08:43:12 EDT 2004\"\n",
-  "       BUILT_MACH=\"Linux minifee.iro.umontreal.ca 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux\"\n",
+  "build: VERSION=\"Amanda-2.4.5\"\n",
+  "       BUILT_DATE=\"Wed Apr 20 13:40:34 EDT 2005\"\n",
+  "       BUILT_MACH=\"Linux minifee.iro.umontreal.ca 2.6.10-1.771_FC2 #1 Mon Mar 28 00:50:14 EST 2005 i686 i686 i386 GNU/Linux\"\n",
   "       CC=\"gcc\"\n",
   "       CONFIGURE_COMMAND=\"'./configure' '--prefix=/u/martinea/linux' '--with-configdir=/u/martinea/etc/amanda' '--with-gnutar-listdir=/var/gnutar-lists' '--with-gnutar=/usr/local/amanda/bin/tar' '--with-bsd-security' '--with-user=amanda' '--with-group=amandag' '--disable-shared' '--mandir=/u/martinea/man'\"\n",
   "paths: bindir=\"/u/martinea/linux/bin\"\n",
@@ -16,9 +16,9 @@ char *version_info[] = {
   "       XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF\n",
   "       SAMBA_CLIENT=\"/usr/bin/smbclient\"\n",
   "       GNUTAR=\"/usr/local/amanda/bin/tar\"\n",
-  "       COMPRESS_PATH=\"/bin/gzip\" UNCOMPRESS_PATH=\"/bin/gzip\"\n",
-  "       LPRCMD=\"/usr/bin/lpr\" MAILER=\"/usr/bin/Mail\"\n",
-  "       listed_incr_dir=\"/var/gnutar-lists\"\n",
+  "       COMPRESS_PATH=\"/usr/bin/gzip\"\n",
+  "       UNCOMPRESS_PATH=\"/usr/bin/gzip\" LPRCMD=\"/usr/bin/lpr\"\n",
+  "       MAILER=\"/usr/bin/Mail\" listed_incr_dir=\"/var/gnutar-lists\"\n",
   "defs:  DEFAULT_SERVER=\"minifee.iro.umontreal.ca\"\n",
   "       DEFAULT_CONFIG=\"DailySet1\"\n",
   "       DEFAULT_TAPE_SERVER=\"minifee.iro.umontreal.ca\"\n",
index ff229612b3d7476ac14c0ecfff2c3cfc05cb9319..c4d081344c67214b708d8526710fec4c4990cf8a 100644 (file)
@@ -33,8 +33,8 @@
 
 const int   VERSION_MAJOR   = 2;
 const int   VERSION_MINOR   = 4;
-const int   VERSION_PATCH   = 4;
-const char *const VERSION_COMMENT = "p3";
+const int   VERSION_PATCH   = 5;
+const char *const VERSION_COMMENT = "";
 
 char *
 versionsuffix()
index bcc27129d7fbe091d831cadbab11be3e3f9197e6..bbb5fcd2d3f332dbbaa0dedc3e6cb0095adc43a8 100644 (file)
@@ -439,7 +439,33 @@ if test $cf_cv_arg_union_wait = yes; then
        AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ])
 fi
 ])dnl
+AC_DEFUN([CF_WAIT_INT],
+[
+AC_REQUIRE([AC_TYPE_PID_T])
+AC_HAVE_HEADERS(sys/wait.h wait.h)
+AC_CACHE_CHECK([whether wait uses int], [cf_cv_arg_int],
+        [AC_TRY_COMPILE([
+#include <sys/types.h>
 
+#if HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#else
+# if HAVE_WAIT_H
+#  include <wait.h>
+# endif
+#endif
+
+#ifdef __STDC__
+pid_t wait(int *);
+#endif
+], [
+  int x; int i;
+  wait(&x); i = WIFEXITED(x)
+], [cf_cv_arg_int=yes], [cf_cv_arg_int=no])])
+if test $cf_cv_arg_int = yes; then
+        AC_DEFINE(WAIT_USES_INT,1,[Defined if wait() puts the status in a int instead of a union wait. ])
+fi
+])dnl
 
 dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
 dnl
@@ -473,7 +499,7 @@ dnl Remember, if the system already had a valid <stdint.h>, the generated
 dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
 dnl
 dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/)
-dnl @version $Id: acinclude.m4i,v 1.1.2.5.6.2 2004/04/29 20:47:40 martinea Exp $
+dnl @version $Id: acinclude.m4i,v 1.1.2.5.8.3 2004/04/29 20:47:22 martinea Exp $
 dnl @author  Guido Draheim <guidod@gmx.de> 
 
 AC_DEFUN([AX_CREATE_STDINT_H],
index b8a365c4664b9f1186e2887ea8461ed04ebb54a8..3959454620fa1bb92444cf2ac81f4e5bfa8c7c35 100644 (file)
    * other hosts where the Veritas filesystem (vxfs) has been installed. */
 #undef VXRESTORE
 
+/* Defined if wait() puts the status in a int instead of a union wait. */
+#undef WAIT_USES_INT
+
 /* Defined if wait() puts the status in a union wait instead of int. */
 #undef WAIT_USES_UNION
 
index e9de23842dcd44d2953129c866b1ad25f7e1f1d9..e4160c991dc958a11b89654e365c72a13639f6b2 100755 (executable)
@@ -1,19 +1,38 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2004-04-01.17
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit="${DOITPROG-}"
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog="${MVPROG-mv}"
@@ -41,211 +58,268 @@ stripprog="${STRIPPROG-strip}"
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-transformbasename=""
-transform_arg=""
+transformbasename=
+transform_arg=
 instcmd="$mvprog"
 chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
+src=
+dst=
+dir_arg=
+
+usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 -d DIRECTORIES...
+
+In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
+In the second, create the directory path DIR.
+
+Options:
+-b=TRANSFORMBASENAME
+-c         copy source (using $cpprog) instead of moving (using $mvprog).
+-d         create directories instead of installing files.
+-g GROUP   $chgrp installed files to GROUP.
+-m MODE    $chmod installed files to MODE.
+-o USER    $chown installed files to USER.
+-s         strip installed files (using $stripprog).
+-t=TRANSFORM
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+        shift
+        continue;;
+
+    -c) instcmd=$cpprog
+        shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit 0;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+        shift
+        continue;;
+
+    --version) echo "$0 $scriptversion"; exit 0;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+       test -n "$dir_arg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+       for arg
+       do
+          if test -n "$dstarg"; then
+           # $@ is not empty: it contains at least $arg.
+           set fnord "$@" "$dstarg"
+           shift # fnord
+         fi
+         shift # arg
+         dstarg=$arg
+       done
+       break;;
+  esac
 done
 
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       true
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=mkdir
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
 fi
 
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      instcmd=:
+      chmodcmd=
+    else
+      instcmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
-       pathcomp="${pathcomp}/"
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+        '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp" || lasterr=$?
+       # mkdir can fail with a `File exist' error in case several
+       # install-sh are creating the directory concurrently.  This
+       # is OK.
+       test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $instcmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    # If we're going to rename the final executable, determine the name now.
+    if test -z "$transformarg"; then
+      dstfile=`basename "$dst"`
+    else
+      dstfile=`basename "$dst" $transformbasename \
+               | sed $transformarg`$transformbasename
+    fi
+
+    # don't allow the sed command to completely eliminate the filename.
+    test -z "$dstfile" && dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Move or copy the file name to the temp name
+    $doit $instcmd "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $instcmd $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dstdir/$dstfile"; then
+              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+              || {
+                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+                (exit 1); exit
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+        }
+    }
+  fi || { (exit 1); exit; }
 done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
 
-exit 0
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index a35cca4fb46996fbdd952a0246d1888377ca2869..f49a1df2f4598ca927ba5b4e7923fb5be686968c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1947,7 +1947,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=amanda
- VERSION=2.4.4p3
+ VERSION=2.4.5
 
 
 cat >>confdefs.h <<_ACEOF
@@ -27418,6 +27418,237 @@ _ACEOF
 
 fi
 
+
+
+
+
+for ac_header in sys/wait.h wait.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking whether wait uses int" >&5
+echo $ECHO_N "checking whether wait uses int... $ECHO_C" >&6
+if test "${cf_cv_arg_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+
+#if HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#else
+# if HAVE_WAIT_H
+#  include <wait.h>
+# endif
+#endif
+
+#ifdef __STDC__
+pid_t wait(int *);
+#endif
+
+int
+main ()
+{
+
+  int x; int i;
+  wait(&x); i = WIFEXITED(x)
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cf_cv_arg_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cf_cv_arg_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5
+echo "${ECHO_T}$cf_cv_arg_int" >&6
+if test $cf_cv_arg_int = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WAIT_USES_INT 1
+_ACEOF
+
+fi
+
 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
 if test "${ac_cv_header_time+set}" = set; then
@@ -49070,7 +49301,7 @@ LTLIBOBJS=`echo "$LIBOBJS" |
 LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ac_config_files="$ac_config_files amplot/amcat.awk amplot/amplot.sh amplot/Makefile changer-src/chg-manual.sh changer-src/chg-multi.sh changer-src/chg-mtx.sh changer-src/chg-chs.sh changer-src/chg-rth.pl changer-src/chg-chio.pl changer-src/chg-zd-mtx.sh changer-src/Makefile changer-src/chg-juke.sh changer-src/chg-rait.sh changer-src/chg-null.sh changer-src/chg-mcutil.sh changer-src/chg-disk.sh changer-src/chg-iomega.pl client-src/patch-system.sh client-src/Makefile common-src/versuff.c common-src/Makefile example/amanda.conf example/Makefile example/amanda.conf.chg-scsi example/chg-scsi-linux.conf example/chg-scsi-solaris.conf example/chg-scsi-hpux.conf example/chg-mcutil.conf man/amadmin.8 man/amanda.8 man/amcheck.8 man/amcheckdb.8 man/amcleanup.8 man/amdump.8 man/amflush.8 man/amlabel.8 man/amoverview.8 man/amrecover.8 man/amrmtape.8 man/amtoc.8 man/amverify.8 man/Makefile man/amstatus.8 man/amreport.8 man/amgetconf.8 man/amverifyrun.8 man/amtapetype.8 docs/Makefile recover-src/Makefile restore-src/Makefile server-src/amcheckdb.sh server-src/amcleanup.sh server-src/amdump.sh server-src/amfreetapes.sh server-src/amoverview.pl server-src/amrmtape.sh server-src/amtoc.pl server-src/amverify.sh server-src/Makefile server-src/amstatus.pl server-src/amverifyrun.sh tape-src/Makefile config/Makefile Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ac_config_files="$ac_config_files amplot/amcat.awk amplot/amplot.sh amplot/Makefile changer-src/chg-manual.sh changer-src/chg-multi.sh changer-src/chg-mtx.sh changer-src/chg-chs.sh changer-src/chg-rth.pl changer-src/chg-chio.pl changer-src/chg-zd-mtx.sh changer-src/Makefile changer-src/chg-juke.sh changer-src/chg-rait.sh changer-src/chg-null.sh changer-src/chg-mcutil.sh changer-src/chg-disk.sh changer-src/chg-iomega.pl client-src/patch-system.sh client-src/Makefile common-src/versuff.c common-src/Makefile example/amanda.conf example/Makefile example/amanda.conf.chg-scsi example/chg-scsi-linux.conf example/chg-scsi-solaris.conf example/chg-scsi-hpux.conf example/chg-mcutil.conf man/Makefile docs/Makefile recover-src/Makefile restore-src/Makefile server-src/amcheckdb.sh server-src/amcleanup.sh server-src/amdump.sh server-src/amfreetapes.sh server-src/amoverview.pl server-src/amrmtape.sh server-src/amtoc.pl server-src/amverify.sh server-src/Makefile server-src/amstatus.pl server-src/amverifyrun.sh tape-src/Makefile config/Makefile Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
   "example/chg-scsi-solaris.conf" ) CONFIG_FILES="$CONFIG_FILES example/chg-scsi-solaris.conf" ;;
   "example/chg-scsi-hpux.conf" ) CONFIG_FILES="$CONFIG_FILES example/chg-scsi-hpux.conf" ;;
   "example/chg-mcutil.conf" ) CONFIG_FILES="$CONFIG_FILES example/chg-mcutil.conf" ;;
-  "man/amadmin.8" ) CONFIG_FILES="$CONFIG_FILES man/amadmin.8" ;;
-  "man/amanda.8" ) CONFIG_FILES="$CONFIG_FILES man/amanda.8" ;;
-  "man/amcheck.8" ) CONFIG_FILES="$CONFIG_FILES man/amcheck.8" ;;
-  "man/amcheckdb.8" ) CONFIG_FILES="$CONFIG_FILES man/amcheckdb.8" ;;
-  "man/amcleanup.8" ) CONFIG_FILES="$CONFIG_FILES man/amcleanup.8" ;;
-  "man/amdump.8" ) CONFIG_FILES="$CONFIG_FILES man/amdump.8" ;;
-  "man/amflush.8" ) CONFIG_FILES="$CONFIG_FILES man/amflush.8" ;;
-  "man/amlabel.8" ) CONFIG_FILES="$CONFIG_FILES man/amlabel.8" ;;
-  "man/amoverview.8" ) CONFIG_FILES="$CONFIG_FILES man/amoverview.8" ;;
-  "man/amrecover.8" ) CONFIG_FILES="$CONFIG_FILES man/amrecover.8" ;;
-  "man/amrmtape.8" ) CONFIG_FILES="$CONFIG_FILES man/amrmtape.8" ;;
-  "man/amtoc.8" ) CONFIG_FILES="$CONFIG_FILES man/amtoc.8" ;;
-  "man/amverify.8" ) CONFIG_FILES="$CONFIG_FILES man/amverify.8" ;;
   "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-  "man/amstatus.8" ) CONFIG_FILES="$CONFIG_FILES man/amstatus.8" ;;
-  "man/amreport.8" ) CONFIG_FILES="$CONFIG_FILES man/amreport.8" ;;
-  "man/amgetconf.8" ) CONFIG_FILES="$CONFIG_FILES man/amgetconf.8" ;;
-  "man/amverifyrun.8" ) CONFIG_FILES="$CONFIG_FILES man/amverifyrun.8" ;;
-  "man/amtapetype.8" ) CONFIG_FILES="$CONFIG_FILES man/amtapetype.8" ;;
   "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
   "recover-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES recover-src/Makefile" ;;
   "restore-src/Makefile" ) CONFIG_FILES="$CONFIG_FILES restore-src/Makefile" ;;
index 850c2ef104768f4d9758c5b1b5ee2b3b3076c642..e3ee866bd74e93183ddf54d30e1b8bad1e1c2514 100644 (file)
@@ -14,10 +14,10 @@ AC_DEFINE_UNQUOTED(CONFIGURE_COMMAND,"$CONFIGURE_COMMAND",
          [Saves the original ./configure command line arguments])
 AC_SUBST(CONFIGURE_COMMAND)
 
-AM_INIT_AUTOMAKE(amanda, 2.4.4p3)
+AM_INIT_AUTOMAKE(amanda, 2.4.5)
 AM_CONFIG_HEADER(config/config.h)
 
-AC_PREREQ(2.57)                dnl Minimum Autoconf version required.
+AC_PREREQ(2.59)                dnl Minimum Autoconf version required.
 
 if test -f "$srcdir/SNAPSHOT"; then
   cat < "$srcdir/SNAPSHOT"
@@ -1654,6 +1654,7 @@ dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_DIRENT
 CF_WAIT
+CF_WAIT_INT
 AC_HEADER_TIME
 AC_CHECK_HEADERS(\
        arpa/inet.h \
@@ -2795,16 +2796,7 @@ AC_CONFIG_FILES([\
        example/chg-scsi-solaris.conf   example/chg-scsi-hpux.conf      \
        example/chg-mcutil.conf                                         \
                                                                        \
-       man/amadmin.8                   man/amanda.8                    \
-       man/amcheck.8                   man/amcheckdb.8                 \
-       man/amcleanup.8                 man/amdump.8                    \
-       man/amflush.8                   man/amlabel.8                   \
-       man/amoverview.8                man/amrecover.8                 \
-       man/amrmtape.8                  man/amtoc.8                     \
-       man/amverify.8                  man/Makefile                    \
-       man/amstatus.8                  man/amreport.8                  \
-       man/amgetconf.8                 man/amverifyrun.8               \
-       man/amtapetype.8                                                \
+       man/Makefile                                                    \
                                                                        \
        docs/Makefile                                                   \
                                                                        \
diff --git a/docs/DUMPER-API b/docs/DUMPER-API
deleted file mode 100644 (file)
index 2438a51..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-AMANDA DUMPER API
-
-Last modified $Date: 1998/10/06 17:17:00 $
-
-by Alexandre Oliva <oliva@dcc.unicamp.br>
-
-1. INTRODUCTION
-
-This is a proposal of a mechanism for Amanda to support arbitrary
-backup programs, that relies on a generic backup driver and scripts or
-programs that interface with backup programs such as dump, tar,
-smbclient, and others.  It can also be used to introduce pre- and
-post-backup commands.
-
-The interface is simple, but supports everything that is currently
-supported by Amanda, and it can be consistently extended to support
-new abstractions that may be introduced in the backup driver in the
-future.
-
-This proposal does not imply any modification in the Amanda protocol
-or in Amanda servers; only Amanda clients have to be modified.  By
-Amanda clients, we refer to hosts whose disks are to be backed up;
-an Amanda server is a host connected to a tape unit.
-
-Currently (as of release 2.4.1 of Amanda), Amanda clients support
-three operations: selfcheck, estimate and backup.
-
-Selfcheck is used by the server program amcheck, to check whether a
-client is responding or if there are configuration or permission
-problems in the client that might prevent the backup from taking
-place.
-
-Estimates are requested by the Amanda planner, that runs on the server
-and collects information about the expected sizes of backups of each
-disk at several levels.  Given this information and the amount of
-available tape space, the planner can select which disks and which
-levels it should tell dumper to run.
-
-Dumper is yet another server-side program; it requests clients to
-perform dumps, as determined by planner, and stores these dumps in
-holding disks or sends them directly to the taper program.  The
-interaction between dumper and taper is beyond the scope of this text.
-
-We are going to focus on the interaction between the Amanda client
-program and wrappers of dump programs.  These wrappers must implement
-the DUMPER API.  The dumptype option `program' should name the wrapper
-that will be used to back up filesystems of that dumptype.  One
-wrapper may call another, so as to extend its functionality.
-
-2. THE PROBLEM
-
-Different backup programs present distinct requirements; some must be
-run as super-user, whereas others can be run under other user-ids.
-Some require a directory name, the root of the tree to be backed up;
-others prefer a raw device name; some don't even refer to local disks
-(SAMBA).  Some wrappers may need to know a filesystem type in order to
-decide which particular backup program to use (dump, vdump, vxdump,
-xfsdump, backup).
-
-Some provide special options for estimates, whereas others must be
-started as if a complete dump were to be performed, and must be killed
-as soon as they print an estimate.
-
-Furthermore, the output formats of these backup programs vary wildly.
-Some will print estimates and total sizes in bytes, in 512-byte tape
-blocks units, in Kbytes, Mbytes, Gbytes, and possibly Tbytes in the
-near future.  Some will print a timestamp for the backup; some won't.
-
-There are also restrictions related with possible scheduling policies.
-For example, some backup programs only support full backups or
-incrementals based on the last full backup (0-1).  Some support full
-backups or incrementals based on the last backup, be it a full or an
-incremental backup (0-inf++).  Some support incrementals based on a
-timestamp (incr/date); whereas others are based on a limited number of
-incremental levels, but incrementals of the same level can be
-repeated, such as dump (0-9).
-
-Amanda was originally built upon DUMP incremental levels, so this is
-the only model it currently supports.  Backup programs that use other
-incremental management mechanisms had to be adapted to this policy.
-Wrapper scripts are responsible for this adaptation.
-
-Another important issue has to do with index generation.  Some backup
-programs can generate indexes, but each one lists files in its own
-particular format, but they must be stored in a common format, so that 
-the Amanda server can manipulate them.
-
-The DUMPER API must accomodate for all these variations.
-
-3. OVERVIEW OF THE API
-
-We are going to define a standard format of argument lists that the
-backup driver will provide to wrapper programs, and the expected
-result of the execution of these wrappers.
-
-The first argument to a wrapper should always be a command name.  If
-no arguments are given, or an unsupported command is requested, an
-error message should be printed to stderr, and the program should
-terminate with exit status 1.
-
-3.1.  The `support' command
-
-As a general mechanism for Amanda to probe for features provided by a
-backup program, a wrapper script must support at least the `support'
-command.  Some features must be supported, and Amanda won't ever ask
-about them.  Others will be considered as extensions, and Amanda will
-ask the wrapper whether they are supported before issuing the
-corresponding commands.
-
-3.1.1. The `level-incrementals' subcommand
-
-For example, before requesting for an incremental backup of a given
-level, Amanda should ask the wrapper whether the backup program
-supports level-based incrementals.  We don't currently support backup
-programs that don't, but we may in the future, so it would be nice if
-wrappers already implemented the command `support level-incrementals',
-by returning a 0 exit status, printing, say, the maximum incremental
-level it supports, i.e., 9.  A sample session would be:
-
-% /usr/local/amanda/libexec/wrappers/DUMP support level-incrementals hda0
-9
-
-Note that the result of this support command may depend on filesystem
-information, so the disklist filesystem entry should be specified as a
-command line argument.  In the next examples, we are not going to use
-full pathnames to wrapper scripts any more.
-
-We could have defined a `support' command for full backups, but I
-can't think of a backup program that does not support full backups...
-
-3.1.2. The `index' subcommand
-
-The ability to produce index files is also subject to an invocation of
-`support' command.  When the support sub-command is `index', like in
-the invocation below, the wrapper must print a list of valid indexing
-mechanisms, one per line, most preferred first.  If indexing is not
-supported, nothing should be printed, and the exit status should be 1.
-
-       DUMP support index hda0
-
-The currently known indexing mechanisms are:
-
-output: implies that the command `index-from-output' generates an
-index file from the output produced by the backup program (for
-example, from `tar -cv').
-
-image: implies that the command `index-from-image' generates an index
-file from a backup image (for example, `tar -t').
-
-direct: implies that the `backup' command can produce an index file as
-it generates the backup image.
-
-parse: implies that the `backup-parse' command can produce an index
-file as it generates the backup formatted output .
-
-The indexing mechanisms will be explicitly requested with the additionnal
-option `index-<mode>' in the `backup' and `backup-parse' command invocation.
-
-`index-from-image' should be supported, if possible, even if other
-index commands are not, since it can be used in the future to create
-index files from previously backed up filesystems.  
-
-3.1.3. The `parse-estimate' subcommand
-
-The `parse-estimate' support subcommand print a list of valid mechanisms to
-parse the estimate output and write the estimate size to its output, the
-two mechanisms are:
-
-direct: implies that the `estimate' command can produce the estimate output.
-
-parse: implies that the `estimate-parse' command can produce the estimate
-output when fed with the `estimate' output.
-
-The estimate parsing mechanisms will be explicitly requested with the 
-additionnal option `estimate-<mode>' in the `estimate' and 
-`estimate-parse' command invocation.
-
-3.1.4. The `parse-backup' subcommand
-
-The `parse-backup' support subcommand print a list of valid mechanisms to
-parse the backup stderr, the two mechanisms are:
-
-direct: implies that the `backup' command can produce the
-backup-formatted-ouput.
-
-parse: implies that the `backup-parse' command can produce the 
-backup-formatted-ouput when fed with the `backup' stderr.
-
-The backup parsing mechanisms will be explicitly requested with the 
-additionnal option `backup-<mode>' in the `backup' and `backup-parse'
-command invocation.
-
-3.1.5. Others subcommands
-
-Some other standard `support' sub-commands are `exclude' and
-`exclude-list'.
-
-3.1.6.
-
-One may think (and several people did :-) that there should be only
-one support command, that would print information about all supported
-commands.  The main arguments against this proposal have to do with
-extensibility:
-
-1) the availability of commands might vary from filesystem to
-filesystem.  No, I don't have an example, I just want to keep it as
-open as possible :-)
-
-2) one support subcommand may require command line arguments that
-others don't, and we can't know in advance what these command line
-arguments are going to be
-
-3) the output format and exit status conventions of a support command
-may vary from command to command; the only pre-defined convention is
-that, if a wrapper does not know about a support subcommand, it should
-return exit status 1, implying that the inquired feature is not
-supported.
-
-3.2. The `selfcheck' command
-
-We should support commands to perform self-checks, run estimates,
-backups and restores (for future extensions of the Amanda protocol
-so as to support restores)
-
-A selfcheck request would go like this:
-
-       DUMP selfcheck hda0 option option=value ...
-
-The options specified as command-line arguments are dumptype options
-enabled for that disk, such as `index', `norecord', etc.  Unknown
-options should be ignored.  For each successful check, a message such
-as:
-
-OK [/dev/hda0 is readable]
-OK [/usr/sbin/dump is executable]
-
-Errors should be printed as:
-
-ERROR [/etc/dumpdates is not writable]
-
-If selfcheck needs super-user (or some other user, for that matter)
-access to perform some tests, it should print to the standard output
-either:
-
-USER root
-GROUP operator
-
-The backup driver should then arrange to re-run the script as the
-specified user/group.  Security concerns may impose restrictions on
-privileges that can be given to wrapper scripts.  For example, we may
-require that, in order to run a wrapper script as any other user or
-group, the wrapper script must be in a separate directory, say
-/usr/local/amanda/libexec/wrappers-protected, and that the script, its
-containing directory and all its parents must only be writable by
-root.
-
-The need for starting programs as other users requires amandad (that
-will incorporate all the functionality from selfcheck, sendsize and
-sendbackup) to be setuid-root.  However, it will fork a child process
-and drop to the amanda user privileges as soon as possible.  This
-child process will be driven through a pipe, and it will be able to
-start services as other users, in a way that no other user, not even
-the backup operator, will be able to run arbitrary commands.
-
-
-A wrapper script will certainly have to figure out either the disk
-device name or its mount point, given a filesystem name such as
-`hda0', as specified in the disklist.  In order to help these scripts,
-Amanda provides a helper program that can guess device names, mount
-points and filesystem types, when given disklist entries.
-
-The filesystem type can be useful on some operation systems, in which
-more than one dump program is available; this information can help
-automatically selecting the appropriate dump program.
-
-
-The exit status of selfcheck and of this alternate script are probably
-going to be disregarded.  Anyway, for consistency, selfcheck should
-return exit status 0 for complete success, 1 if any failures have
-occurred and 2 if it needs additional permissions (USER/GROUP).  Note
-that, if the wrapper needs a special permission to perform a test, it
-should not report a failure for that test.
-
-3.3. The `estimate' and `estimate-parse' commands
-
-Estimate requests can be on several different forms.  An estimate of a
-full backup may be requested, or estimates for level- or
-timestamp-based incrementals:
-
-  DUMP estimate full hda0 option ...
-  DUMP estimate level 1 hda0 option ...
-  DUMP estimate diff 1998:09:24:01:02:03 hda0 option ...
-
-
-If the backup program needs privileged access to obtain estimates, it
-should just print:
-
-USER root
-GROUP operator
-
-and exit, with exit status 2.  If requested estimate type is not
-supported, exit status 3 should be returned.
-
-If the option `estimate-direct' is set, then the `estimate' command
-should write to stdout the estimated size, in bytes, a pair of numbers
-that, multiplied by one another, yield the estimated size in bytes.
-
-If the option `estimate-parse' is set, then the `estimate' command 
-should write to stdout the informations needed by the 
-`estimate-parse' command, that should extract from its input the 
-estimated size.
-
-The syntax of `estimate-parse' is identical to that of `estimate'.
-
-Both `estimate' and `estimate-parse' can output the word `KILL', after
-printing the estimate.  In this case, Amanda will send a SIGTERM
-signal to the process group of the `estimate' process.  If it does not
-die within a few seconds, a SIGKILL will be issued.
-
-If `estimate' or `estimate-parse' succeed, they should exit 0,
-otherwise exit 1, except for the already listed cases of exit status 2
-and 3.
-
-3.4. The `backup' and `backup-parse' commands
-
-The syntax of `backup' is the same as that of `estimate'.  The backup
-image should be written to standard output, whereas stderr should be
-used for the user-oriented output of the backup program and other
-messages.
-
-If the option `backup-direct' is set, then the `backup' command should 
-write to stderr a formatted-output-backup.
-
-If the option `backup-parse' is set, then the `backup' command 
-should write to stderr the informations needed by the `backup-parse'
-command, that should edit its input so that it prints to standard
-output a formatted-output-backup.
-
-If the option `no-record' is set, then the `backup' command should
-not modify its state file (ex. dump should not modify /etc/dumpdates).
-
-The syntax of `backup-parse' is identical to that of `backup'.
-
-The syntax of the formatted-output-backup is as follow:
-All lines should start with either `| ' for normal output, `? ' for
-strange output or `& ' for error output.  If the wrapper can determine
-the total backup size from the output of the backup program, it should
-print a line starting with `# ', followed by the total backup size in
-bytes or by a pair of numbers that, multiplied, yield the total backup
-size; this number will be used for consistency check.
-
-The option `index-direct' should cause commands `backup' to output 
-the index directly to file descriptor 3.  The option `index-parse' 
-should cause commands `backup-parse' to output the index directly to
-file descriptor 3.  The syntax of the index file is described in the 
-next section.
-
-3.5. The `index-from-output' and `index-from-image' commands
-
-The syntax of the `index-from-output' and `index-from-image' commands
-is identical to the one of `backup'.  They are fed the backup output
-or image, and they must produce a list of files and directories, one
-per line, to the standard output.  Directories must be identified by
-the `/' termination.
-
-After the file name and a blank space, any additional information
-about the file or directory, such as permission data, size, etc, can
-be added.  For this reason, blanks and backslashes within filenames
-should be quoted with backslashes.  Linefeeds should be represented as
-`\n', although it is not always possible to distinguish linefeeds in
-the middle of filenames from ones that separate one file from another,
-in the output of, say `restore -t'.  It is not clear whether we should
-also support quoting mechanisms such as `\xHH', `\OOO' or `\uXXXX'.
-
-3.6. The `restore' command
-
-Yet to be specified.
-
-3.7. The `print-command' command
-
-This command must be followed by a valid backup or restore command,
-and it should print a shell-command that would produce an equivalent
-result, i.e., that would perform the backup to standard output, or
-that would restore the whole filesystem reading from standard input.
-This command is to be included in the header of backup images, to ease
-crash-recovery.
-
-4. Conclusion
-
-Well, that's all.  Drop us a note at the amanda-hackers mailing list
-if you have suggestions to improve this document and/or the API.  Some
-help on its implementation would be welcome too.
diff --git a/docs/EXCLUDE b/docs/EXCLUDE
deleted file mode 100644 (file)
index 0e6d81d..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-============
-Introduction
-============
-
-There are times when data needs to be excluded from a backup.  When
-these times arise be confident that Amanda has this capability.
-(Actually it's not Amanda, it's tar.) There are three ways of
-excluding data in an Amanda backup:
-
-       * Exclude an individual item explicitly in the dumptype
-       * Utilize an Exclude List
-       * Do not include the data in the disklist
-
-This document is based on Amanda 2.4.2 and some of this might not
-work with older versions.  This was compiled from my personal
-experience and with help from the members of the amanda-users
-mailing list when I was originally setting this up, to whom I wish
-to thank for all of their support.
-
-============
-Please Read
-============
-
-As far as I am able to tell the only way to exclude files or
-directories with Amanda is to use gnutar as the dump program
-(others?).  The file system dump programs provided with unix systems
-(e.g. dump, ufsdump) get data at a raw drive level and generally
-do not allow exclusion of specific files or directories.
-
-The GNU version of tar, (gnutar or gtar), reads its data at a
-file system, (or higher), level and does include the option to
-exclude specific files and/or directories.  It should be mentioned
-here that tar will change the access times on files.   Tar has the
-ability to preserve the access times however, doing so effectively
-disables incremental backups since resetting the access time alters
-the inode change time, which in turn causes the file to look like
-it needs to be archived again.
-
-The only exception that I am aware of is to just not include the
-data in question in the disklist.  This option may not be suitable
-for everyone's needs and can confuse the issue some, so I have
-elected to include this mechanism in its own section named "Do not
-include the data in the disklist".
-
-For the purpose of this document an Amanda backup configuration
-named "exclude-test" will be used.  The machine that contains the
-tape drive which receives data to be archived will be referred to
-as "SERVER".  The machine that data is being archived from will be
-referred to as "CLIENT".  These two systems are usually different
-machines but are not required to be, and may be the same machine.
-Parts of this setup are on the server and some are on the client.
-
-***************
-** IMPORTANT **
-***************
-
-When Amanda attempts to exclude a file or directory it does so
-relative to the area being archived.  For example if "/var" is in
-your disklist and want to exclude "/var/log/somefile", then your
-exclude file would contain "./log/somefile".  You may use one
-exclude file in multiple dump types without any restriction.
-
-===============
-Before We Begin
-===============
-
-The first step that should be taken is to verify that backups are
-currently working.  Connect to SERVER and run amcheck as your Amanda
-user, to verify that there are no errors in the current setup.
-
-       $ amcheck -cl CLIENT
-
-Output should look something like below for success:
-
-       Amanda Tape Server Host Check
-       -----------------------------
-
-       /path/to/holding-disk: 4771300 KB disk space available, that's plenty.  
-       Amanda Backup Client Hosts Check
-       -------------------------------- 
-       Client check: 1 host checked in 0.084 seconds, 0 problems found.
-
-Next make sure that gnutar is the dump program currently in use.
-The easiest way to tell if your dumptype is using gnutar is to run
-the following:
-
-       $ amadmin exclude-test disklist CLIENT
-
-Among all the output is the "program" value currently in use. This
-value is also specified with the "program" option in the dumptype.
-If the dumptype has the line "program GNUTAR" your setup should ready
-to exclude data.
-
-If gnutar is not in use add the line "program GNUTAR" to the
-dumptype, and then run amcheck again to verify that backups should
-work. The capitalization of GNUTAR is required in the current
-version of amanda.
-
-The dumptype should look something like: 
-
-define dumptype exclude-test {
-        comment "test dumptype for documentation"
-        priority high
-        program "GNUTAR"
-}
-
-=============================
-Choosing an exclude mechanism
-=============================
-
-If the need is to exclude only one file or directory then the
-easiest way to accomplish this is to exclude an individual item
-explicitly in the dumptype.  If the need is to exclude multiple
-files or directories then use an Exclude List.
-
-==================
-Exclude Mechanisms
-==================
-
-** Exclude an individual item explicitly in the dumptype **
-
-The easiest way to exclude a file or directory is to specify it
-with the "exclude" option in the dumptype.  This option accepts an
-argument of the file or directory to be excluded.  Amanda allows
-only one exclude option in any dumptype at a time.  Any path
-specified to be excluded must be encapsulated with quotes.  Continuing
-with our example from above "/var/log/somefile" and using the same
-dumptype as above, the dumptype would now look like:
-
-define dumptype exclude-test {
-        comment "test dumptype for documentation"
-        priority high
-        program "GNUTAR"
-        exclude "./log/somefile"
-}
-
-Next run amcheck again to verify that there are no problems with
-the revised Amanda configuration.  If the data is not being excluded
-as expected please see the Troubleshooting section below.  This
-completes the setup of excluding an individual item in the dumptype.
-
-
-** Utilize an Exclude List **
-
-An exclude list is a file that resides on the CLIENT machine and
-contains paths to be excluded, one per line.   This file can be in
-any location on the CLIENT so long as the same path is specified
-in the dumptype.  Some find /usr/local/etc/amanda an appropriate
-location, but it is up to you.  I personally like to have a
-subdirectory for exclude files but it is up to you where you place
-this file.  
-
-The exclude file may also be placed in the area being archived.
-This is an easy way to have a different exclusion file for each
-disklist entry without needing separate dumptype definitions.  To
-use this technique, enter a path relative to the area being archived
-as the exclude file below instead of an absolute path.
-
-Connect to CLIENT and create the exclude directory as root.  For
-example:
-
-       $ mkdir -p /usr/local/etc/amanda/exclude
-       $ cd /usr/local/etc/amanda/exclude
-
-Next create the exclude list for Amanda to use.  You can name the
-exclude file anything you wish it to be.  Create a file, and in
-this file place all paths to files and directories that are to be
-excluded.  Keeping with the /var example, assume that
-/var/log/XFree86.0.log, and /var/log/maillog need to be excluded.
-Remember that all paths are relative. The exclude list would look
-like:
-
-               ./log/XFree86.0.log
-               ./log/maillog
-
-Make sure that permissions are restricted on this file.  Run the
-following as root, where exclude-filename is the name of the file
-you just created.  For example:
-
-       $ chmod 644 /usr/local/etc/amanda/exclude/exclude-filename
-
-This concludes the necessary configuration on the client. 
-
-Connect to SERVER and cd to the exclude-test Amanda configuration
-directory.  Edit the Amanda configuration file e.g. amanda.conf.
-Add an entry similar to the following line, to the dumptype for
-the client in question, where the exclude-filename is the file that
-was created on CLIENT in the step above including the quotes.
-For example:
-
-       exclude list "/usr/local/etc/amanda/exclude/exclude-filename"
-
-The new dumptype should look something like: 
-
-       define dumptype exclude-test{
-               comment "test dumptype for documentation"
-               priority high
-               program "GNUTAR"
-               exclude list "/usr/local/etc/amanda/exclude/exclude-filename"
-       }
-
-Save the file. Run amcheck again to verify that there are no problems
-with the revised Amanda configuration.   If amcheck succeeds then
-run amdump to verify the data is being excluded correctly.  If the
-data is not being excluded as expected please see the Troubleshooting
-section below.  This completes the setup of an exclude list.
-
-** Do not include the data in the disklist **
-
-Amanda uses disklist entries to define which directories or partitions
-should be archived.  This allows us to exclude data by just not
-placing the data in question in the disklist.  Assume that there
-is a disk mounted on /example.  The directory /example has five
-subdirectories "a", "b", "c", "d", and "e".  The directories "a",
-"b", and "c" need to be archived, while "d" and "e" should not.
-This can be accomplished by not specifying "d" and "e" in the
-disklist.  Using the same dumptype and host in the above examples
-the disklist would contain:
-
-       CLIENT /examples/a      exclude-test
-       CLIENT /examples/b      exclude-test
-       CLIENT /examples/c      exclude-test
-
-Run amcheck to verify that Amanda is working correctly.   If the
-data is not being excluded as expected please see the Troubleshooting
-section below.  This completes the setup of using a disklist to
-exclude data.
-
-=========
-Expresion
-=========
-
-Quiz: what is the difference between the following entries in
-an exclude list?
-
-1 ./foo
-2 ./foo/
-3 ./foo/*
-
-case 1 directory ./foo won't be in the backup image (that's what you want)
-case 2 matches nothing (don't use it)
-case 3 directory ./foo will be in the backup image but nothing below it.
-
-==================
-Wildcard Expansion
-==================
-
-Amanda has the ability to use wildcard expansion while excluding
-data as implemented by tar(1).  The only places that wildcard 
-expansion is allowed is in the "exclude" option in the dumptype,
-or in the exclude list.  Some simple examples:
-
-Exclude any  file or directory that ends in ".log" e.g. ppp.log,
-XFree86.0.log
-
-       ./*.log 
-
-Exclude any file or directory with the string "log"  e.g. logfile,
-maillog, syslog, ppp.log, XFree86.0.log
-
-       */*log*
-
-Exclude any file or directory that starts with string "cron" and ends in
-".gz" e.g. cron.1.gz, cron.2.gz, log/cron.1.gz
-
-       ./*cron*.gz
-
-The question mark can be used to specify a single character.  e.g.
-log.1, log.2, etc
-
-       ./log.?
-
-===============
-Troubleshooting 
-===============
-
-1. If you find that you are having trouble getting the exclude
-patterns to match correctly, check out this really cool script
-written by John R. Jackson.
-
-       ftp://gandalf.cc.purdue.edu/pub/amanda/gtartest-exclude  
-
-This script allows you to test your patterns before placing them
-in an exclude list or in the dumptype.  Instructions on how to run
-the script are included in the script.
-
-2. Broken gnutar?  There are versions of gnutar that do not correctly
-exclude data.  Version 1.12 (plus the Amanda patches from
-www.amanda.org) are known to work correctly, as does version 1.13.19
-(and later).  Anything else is questionable.
-
-3. The ps command is your friend.  Connect to CLIENT and run a "ps
-ax | grep tar", (ps -ef | grep tar) on Solaris, to see exactly how
-the tar command is running.  Look in the output for the --exclude
-or --exclude-from options in the running tar process.  For example:
-
-       $ ps ax | grep tar 
-   11078 ?        R      0:37 /bin/tar --create --directory /var
-   --listed-incremental /var/lib/amanda/gnutar-lists/CLIENTvar_0.new
-   --sparse --one-file-system --ignore-failed-read --totals --file
-   /dev/null --exclude-from=/usr/local/etc/amanda/exclude-test/exclude.var
-   .
-
-In the above output notice the string "--exclude-from=".  The string
-following the "=" is the exclude file currently in use.  If the
-string was "--exclude" then the string following the "=" is the
-file or directory that is currently set to be excluded.
-
-4. Check out the book "Unix Backup & Recovery", written by W. Cutris
-Preston.  It contains a chapter on Amanda written by John R. Jackson.
-It can be read online at www.amanda.org.
-
-5. Contact the amanda-users mailing list.  Subscription information
-is available at www.amanda.org.
-
-
-Written by Andrew Hall <ahall@secureworks.net> August 6, 2001. 
diff --git a/docs/FAQ b/docs/FAQ
deleted file mode 100644 (file)
index 148a872..0000000
--- a/docs/FAQ
+++ /dev/null
@@ -1,525 +0,0 @@
-This file contains answers to some questions that are frequently asked
-in the Amanda mailing lists, specially by new users.  Please take a
-look at this file before posting, this can save us time that could be
-spent improving Amanda and its documentation.
-
-New entries and modifications are welcome; send them to
-amanda-users@amanda.org or amanda-hackers@amanda.org.
-
-You may also want to take a look at the Amanda FAQ-O-Matic
-http://www.amanda.org/fom-serve/cache/1.html
-
-
-Q: Why does Amanda fail to build on my system?
-
-A: One of the most common reasons for compile-time errors is stale
-information in `config.cache', after a build on a different platform
-using the same build tree.  In order to avoid this problem, make sure
-you don't ever reuse build trees across platforms, or at least run
-`make distclean' before running `configure' on another platform.
-
-   Another common reason for failure, that causes link-time errors, is
-a problem in libtool that causes it to search for symbols in
-already-installed amanda libraries, instead of in the just-built ones.
-This problem is known to affect SunOS 4.1.3 and FreeBSD.  You can
-usually work around it by specifying a different prefix when you
-configure the new version of Amanda.  However, it may not work if the
-previous version of Amanda was installed in /usr/local and gcc
-searches this directory by default; in this case, you must either
-remove the old libraries (which you don't want to do, right? :-) or
-call configure with the flag --disable-libtool.  In this case, Amanda
-won't create shared libraries, so binaries will be larger, but you may
-worry about that later.
-
-   You may also want to take a look at docs/SYSTEM.NOTES, as well as
-to the Amanda Patches Page (check www.amanda.org) for other known
-problems.  If everything fails, you should read the manual, but since
-we don't have one yet, just post a help request to the amanda-users
-mailing list, showing the last few lines of the failed build.
-
-
-Q: Why does `amdump' report that all disks failed?
-
-A: Probably because the Amanda clients are not properly configured.
-Before you ever run `amdump', make sure `amcheck' succeeds.  When it
-does, so should `amdump'.
-
-   Make sure you run `amcheck' as the same user that is supposed to
-start `amdump', otherwise you may get incorrect results.
-
-
-Q: Why does `amcheck' say `port NNN is not secure'?
-
-A: Because `amcheck', as some other Amanda programs, must be installed
-as setuid-root.  Run `make install' as `root', or `chown' all Amanda
-setuid programs to `root', then `chmod u+s' them again, if `chown'
-drops the setuid bit.
-
-
-Q: Why does `amcheck' claim that the tape is `not an amanda tape'?
-
-A: Because Amanda requires you to label tapes before it uses them.
-Run `amlabel' in order to label a tape.
-
-   If, even after labeling a tape, `amcheck' still complains about it,
-make sure the regular expression specified in amanda.conf matches the
-label you have specified, and check whether you have configured
-non-rewinding tape devices for Amanda to use.  For example, use
-/dev/nrst0 instead of /dev/rst0, /dev/rmt/0bn instead of /dev/rmt/0b,
-or some other system-dependent device name that contains an `n',
-instead of one that does not.  The `n' stands for non-rewinding.
-
-   If you have labeled any tapes using the rewiding device
-configuration, you'll have to label them again.
-
-
-Q: Why does `amcheck' report `selfcheck request timed out'?
-
-A: This can occur under several different situations.  First, make
-sure this problem is repeatable; if Amanda programs are
-NFS-auto-mounted, some clients may fail to mount the Amanda binaries
-in time.
-
-   If the error is repeatable, log into the client, and check whether
-the directory /tmp/amanda exists, and a file named amandad.debug
-exists in there: amandad will create this file whenever it starts.  If
-this file does not exist, amandad is not starting properly, or it
-lacks permission to create /tmp/amanda/amandad.debug.
-
-   In the latter case, wipe out /tmp/amanda, and amandad should create
-it next time it runs.  In the former case, check your inetd
-configuration.  Make sure you have added the Amanda services to
-/etc/services (or the NIS services map), that /etc/inetd.conf was
-properly configured, and that you have signalled inetd to reread this
-file (some systems may need rebooting).  Check section 2.2 from the
-INSTALL file for details.  Check the inetd man-page for possible
-differences between the standard inetd.conf format and the one in your
-system.
-
-   Pay special attention to typos in inetd.conf; error messages will
-probably appear in /var/adm/messages or /var/log/messages if you have
-typed the amandad program name incorrectly.  Make sure the same user
-that you have specified at configure-time (--with-user=<USERNAME>) is
-listed in inetd.conf.  Check whether this user has permission to run
-amandad, as well as any shared libraries amandad depends upon, by
-running the specified amandad command by hand, as the Amanda user.  It
-should just time-out after 30 seconds waiting for a UDP packet.  If
-you type anything, it will abort immediately, because it can't read a
-UDP packet from the keyboard.
-
-   As soon as you have properly configured inetd.conf so as to run
-amandad, you should no longer get the `selfcheck request timed out'
-message.  A nice tool to help make sure inetd is really listening on
-the amandad port is lsof, available at
-ftp://vic.cc.purdue.edu/pub/tools/unix/lsof.
-
-
-Q: Why does `amandad.debug' contain `error receiving message'?
-
-A: One possibility is that you have run `amandad' from the command
-line prompt and typed anything instead of waiting for it to time-out:
-in this case, it will try to read a UDP packet from the keyboard, and
-this was reported not to work on most keyboards :-).  However, if you
-have run `amandad' as any user other than the one listed in
-`inetd.conf', it may have created a /tmp/amanda directory that the
-Amanda user cannot write to, so you should wipe it out.
-
-   Another possibility is that the Amanda service was not properly
-configured as a UDP service; check /etc/services and /etc/inetd.conf.
-
-
-Q: Why does `amcheck' say `access as <username> not allowed...'
-
-A: There must be something wrong with .amandahosts configuration (or
-.rhosts, if you have configured --without-amandahosts).
-
-   First, if the <username> is not what you expect (i.e., not what you
-have specified in the --with-user flag, at configure time), check the
-inetd configuration file: you must have specified the wrong username
-there.
-
-   Make sure you specify the names exactly as they appear in the error
-message after the `@' sign in .amandahosts/.rhosts.  You'll need a
-fully-qualified domain name or not, depending on how your client
-resolves IP addresses to host names.
-
-
-Q: Why does `amcheck' report `ip address #.#.#.# is not in the ip list 
-list for <hostname>'?
-
-A: Check your DNS configuration tables.  In order to avoid
-DNS-spoofing, Amanda double-checks hostname<->IP address mapping.  If
-the IP address the request comes from maps to a hostname, but this
-hostname does not map back to the incoming IP address, the request is
-denied.
-
-
-Q: Why does `amcheck' say `cannot overwrite active tape'?
-
-A: Because, if you configure Amanda to use N tapes, by setting
-tapecycle to N in `amanda.conf', before Amanda overwrites a tape, it
-must write to at least other N-1 tapes.  Of course, Amanda will always
-refuse to overwrite a tape marked for `noreuse' with `amadmin'.
-Furthermore, such tapes are not counted when Amanda computes `N-1'
-tapes.
-
-   If, for some reason, you want to tell Amanda to overwrite a
-particular tape, regardless of its position in the cycle, use
-`amrmtape'.  This command will remove this tape from the `tapelist'
-file, that is used to manage the tape cycle, and will delete
-information about backups stored in that tape from the Amanda
-database.
-
-
-Q: Why does `amcheck' tell me `DUMP program not available'?
-
-A: Because the `configure' could not find DUMP when it was first run.
-This is a common problem on Linux hosts, because most Linux
-distributions do not install DUMP by default.
-
-   If you don't have a DUMP program installed, install it, remove
-`config.cache', run `configure' again and rebuild Amanda.  While
-`configure' is running, make sure it can find the installed DUMP
-program.  If it cannot, you may have to set the environment variables
-DUMP and RESTORE by hand, before running configure.
-
-   If you can't or don't want to install DUMP, you may use GNU tar,
-but make sure it as release 1.12 or newer; release 1.11.8 may work,
-but estimates will be slow as hell.
-
-
-Q: Which tape changer configuration should I use in amanda.conf?
-
-A: If you only have one tape unit, you have two choices: (i) don't use
-a tape changer at all, i.e., set runtapes to 1, set tapedev to the
-non-rewinding device corresponding to the tape unit, and comment out
-tpchanger, changerfile and changerdev; or (ii) set up chg-manual, so
-that you can change tapes manually.  If you select chg-manual, you
-will not be able to start `amdump' as a cron job, and you should
-always run `amflush -f', because chg-manual will ask you to press
-return in the terminal where you started the controlling program.
-
-   If you have several tape units, which you want to use to emulate a
-tape changer, you want chg-multi.  Even if you do own a real tape
-changer, that operates based on ejecting a tape or such, chg-multi may
-be useful.
-
-   Actual tape changers usually require specialized changer programs,
-such as `mtx', `chio' or specific system calls.  The availability of
-these programs is much more dependent on the operating system you're
-running than on the particular tape changer hardware you have.
-
-   `mtx', for example, is available for several platforms.  However,
-even if you find it for your platform, beware that there exist several
-different programs named `mtx', that require different command line
-arguments, and print different output, and Amanda's chg-mtx does not
-support them all.  You may have to edit the script, which shouldn't be
-hard to do.
-
-   In section BUILT-IN TAPE CHANGERS of docs/TAPE.CHANGERS, you will
-find details about the tape changer interfacing programs provided with
-Amanda, that can interact with common tape changer programs and with
-tape changer-related system calls provided by some operating system.
-If none of them matches your needs, you may have to develop your own
-tape changer interface script.
-
-   Before posting a question to the Amanda mailing lists, *please*
-search the archives, and try to obtain as much information about
-driving your tape changer hardware from the vendor of the changer
-hardware and of the operating system, rather than from the Amanda
-mailing lists.  We usually don't have much to say about tape changer
-units, and several questions about them remain unanswered.  :-(
-
-   Anyway, if you decide to post a question, make sure you specify
-both the tape changer hardware *and* the OS/platform that is going to
-interface with it.  Good luck! :-)
-
-
-Q: Should I use software or hardware compression?
-
-A: When you enable software compression, you drastically reduce the
-compression that might be achieved by hardware.  In fact, tape drives
-will usually use *more* tape if you tell them to try to further
-compress already compressed data.
-
-   Thus, you must choose whether you're going to use software or
-hardware compression; don't ever enable both unless you want to waste
-tape space.
-
-   Since Amanda prefers to have complete information about tape sizes
-and compression rates, it can do a better job if you use software
-compression.  However, if you can't afford the extra CPU usage, Amanda
-can live with the unpredictability of hardware compression, but you'll
-have to be very conservative about the specified tape size, specially
-if there are filesystems that contain mostly uncompressible data.
-
-
-Q: How can I configure Amanda so that it performs full backups on the
-week-end and incrementals on weekdays?
-
-A: You can't.  Amanda doesn't work this way.  You just have to tell
-Amanda how many tapes you have (tapecycle), and how often you want it
-to perform full backups of each filesystem (dumpcycle).  If you don't
-run it once a daily (including Saturdays and Sundays :-), you'll also
-want to tell Amanda how many times you'll run it per dumpcycle
-(runspercycle).  It will spread full backups along the dumpcycle, so
-you won't have any full-only or incremental-only runs.
-
-
-Q: What if my tape unit uses expensive tapes, and I don't want to use
-one tape per day?  Can't Amanda append to tapes?
-
-A: It can't, and this is good.  Tape drives and OS drivers are
-(in)famous for rewinding tapes at unexpected times, without telling
-the program that's writing to them.  If you have a month's worth of
-backups in that tape, you really don't want them to be overwritten, so
-Amanda has taken the safe approach of requiring tapes to be written
-from the beginning on every run.
-
-   This can be wasteful, specially if you have a small amount of data
-to back up, but expensive large-capacity tapes.  One possible approach
-is to run amdump with tapes only, say once a week, to perform full
-backups, and run it without tape on the other days, so that it
-performs incremental backups and stores them in the holding disk.
-Once or twice a week, you flush all backups in the holding disk to a
-single tape.
-
-   If you don't trust your holding disk, and you'd rather have all
-your data on tapes daily, you can create an alternate configuration,
-with two tapes, that backs up the holding disk only, always as a full
-backup.  You'd run this configuration always after your regular
-backup, so you always have a complete image of the holding disk on
-tape, just in case it fails.
-
-
-Q: How can I configure Amanda for long-term archiving?
-
-A: The best approach is to create a separate configuration for your
-archive backups.  It should use a separate set of tapes, and have all
-dumptypes configured with `record no', so it doesn't interfere with
-regular backups.
-
-
-Q: Can I backup separate disks of the same host in different
-configurations?
-
-A: Yes, but you have to be careful.  Amanda uses UDP to issue estimate
-and backup requests and, although replies to backup requests are
-immediate (so that TCP connections for the actual backup can be
-established), replies to estimate requests are not and, while one
-request is being processed, any other request is ignored.  The effect
-is two-fold: (i) if another configuration requests for estimates, the
-request will be ignored, and the requester will end up timing out;
-(ii) if another configuration has already finished the estimates, and
-is now requesting for backups, the backup requests will time-out.
-
-  So, there are two easy ways out: (i) ensure that the configurations
-never run concurrently, or (ii) set up two different installations of
-the Amanda server, using different services names to contact the
-clients, i.e., different port numbers.  This can be attained with the
-configure flag --with-testing=<service-suffix>.  Yes, the flag name is
-not appropriate, but so what?
-
-   If you don't want to set up two installations of Amanda (I agree,
-it's overkill), but you still want to back up disks of the same host
-in separate configurations, you can set up Amanda so that one
-configuration only starts after the first one has already finished its 
-One possible way to work-around this limitation is to start one
-configuration only after you know the estimates for the first one have 
-already finished (modifying the crontab entries, according to history
-data).  You'll also have to delay the starttime (a dumptype option) of 
-the disks in the first configuration, so that they don't start backing 
-up before the estimates of the second configuration finish.
-
-
-Q: Can Amanda span large filesystems across multiple tapes?
-
-A: Not yet :-(
-
-   This is an open project, looking for developers.  If you'd like to
-help, please take a look at the Amanda Ongoing Projects Page, where
-more up-to-date information is likely to be found about this project.
-
-   The current work-around is to use GNU tar to back up subdirectories
-of the huge filesystem separately.  But be aware of the problems
-listed in the question about `results missing'.
-
-
-Q: What's the difference between option `skip-full' and `strategy nofull'?
-
-A: `strategy nofull' is supposed to handle the following situation:
-you run a full dump off-line once a millenium :-), because that disk
-isn't supposed to change at all and, if it does, changes are minimal.
-Amanda will run only level 1 backups of that filesystem, to avoid the
-risk of overwriting a level 1 backup needed to do a restore.
-Remember, you run full dumps once a millenium, and your tape cycle
-probably won't last that long :-)
-
-   `skip-full', OTOH, is supposed to let the user run full dumps
-off-line regularly (i.e., as often as specified in the dumpcycle),
-while Amanda takes care of the incrementals.  Currently, Amanda will
-tell you when you're supposed to run the level 0 backups but, if you
-fail to do so, Amanda will not only skip a full day's worth of
-valuable backups of the filesystem, on the day it told you to the full
-backup manually, but it will also run a level 1 backup on the next
-day, even if you have not performed the full backup yet.  Worse yet:
-it might perform a level 2 on the next day, just after you have run
-the level 0, so, if the disk should crash, you'd have to restore a
-level 0 then a level 2, but not the level 1!  Not a real problem, but
-definitely strange, eh?
-
-
-Q: Why does `amdump' report `results missing'?
-
-A: One of the possible reasons is that you have requested too many
-backups of the host.  In this case, the estimate request or the reply
-may not fit in a UDP packet.  This will cause Amanda not to perform
-some of the backups.  Fixing this problem involves modifying the way
-estimate requests are issued, so that no packet exceeds the maximum
-packet size, and issuing additional requests that did not fit in a UDP
-packet after a reply for the previous set is obtained.  The
-probability of getting this problem has been considerably reduced
-since we increased the maximum UDP packet size from 1Kb to 64Kb, but
-some operating systems may not support such large packets.
-
-   One possible work-around is to try to shorten the pathnames of the
-directories and the exclude file names, so that more requests fit in
-the UDP packet.  You may create short-named links in some directory
-closer to the root (/) so as to reduce the length of names.  I.e.,
-instead of backing up /usr/home/foo and /usr/home/bar, create the
-following links:
-       /.foo -> /usr/home/foo
-       /.bar -> /usr/home/bar
-then list /.foo and /.bar in the disklist.
-
-   Another approach is to group sub-directories in backup sets,
-instead of backing up them all separately.  For example, create
-/usr/home/.bkp1 and move `foo' and `bar' into it, then create links so
-that the original pathnames remain functional.  Then, list
-/usr/home/.bkp1 in the disklist.  You may create as many `.bkp<N>'
-directories as you need.
-
-   A simpler approach, that may work for you, is to backup only a
-subset of the subdirectories of a filesystem separately.  The others
-can be backed up together with the root of the filesystem, using an
-exclude list that prevents duplicate backups.
-
-
-Q: Why does `amdump' report `disk offline'?
-
-A: Well, assuming the disk is not really off line :-), it may be a
-permission problem, but then, `amcheck' would have reported it.
-
-   Another possible reason for this failure is a filesystem error,
-that causes DUMP to crash before it estimates the backup size; a
-`fsck' may help.
-
-   Yet another possibility is that the filesystem is so large that the
-backup program is incorrectly reporting the estimated size, for
-example, by printing a negative value that Amanda will not accept as a
-valid estimate.  If you are using DUMP, contact your vendor and
-request a patch for dump that fixes this bug.  If you are using GNU
-tar, make sure it is release 1.12 or newer; 1.11.8 won't do!  Even
-release 1.12 may require a patch to correctly report estimates and
-dump sizes, as well as to handle sparse files correctly and quickly
-instead of printing error messages like `Read error at byte 0, reading
-512 bytes, in file ./var/log/lastlog: Bad file number' in
-sendsize.debug and being very slow.  Check the patches directory of
-the Amanda distribution.
-
-
-Q: What if `amdump' reports `dumps way too big, must skip incremental
-dumps'?
-
-A: It means Amanda couldn't back up some disk because it wouldn't fit
-in the tape(s) you have configured Amanda to use.  It considered
-performing some incrementals instead of full dumps, so that all disks
-would fit, but this wouldn't be enough, so the disk really had to be
-dropped in this run.
-
-   In general, you can just ignore this message if it happens only
-once in a while.  Low-priority disks are discarded first, so you'll
-hardly miss really important data.
-
-   One real work-around is to configure Amanda to use more tapes:
-increase `runtapes' in `amanda.conf'.  Even if you don't have a real
-tape changer, you can act yourself as a changer (`chg-manual'; more
-details in the question about tape changer configuration), or use
-`chg-multi' with a single tape unit, and lie to Amanda that it will
-have two tapes to use.  If you have a holding disk as large as a tape,
-and configure Amanda (2.4.1b1 or newer) not to reserve any space for
-degraded dumps, dumps that would be stored in the second tape of a run
-will be performed to the holding disk, so you can flush them to tape
-in the morning.
-
-
-Q: `amdump' reported `infofile update failed'.  What should I do?
-
-A: Make sure all directories and files are readable and writable by
-the Amanda user, within the directory you specified as `infofile' in
-`amanda.conf'.  From then on, only run amanda server commands
-(amadmin, amdump, amflush, amcleanup) as the Amanda user, not as root.
-
-
-Q: Why does Amanda sometimes promote full dumps?
-
-A: To spread the full dumps along the dumpcycle, so that daily runs
-take roughtly the same amount of tape and time.  As soon as you start
-using Amanda, it will run full dumps of all filesystems.  Then, on the
-following runs, it will promote some backups, so as to adjust the
-balance.  After one or two dumpcycles, it should stop promoting dumps.
-You can see how well it is doing with `amadmin <conf> balance'.  If
-you find the results surprising, you may want to adjust dumpcycle or
-runspercycle.
-
-
-Q: Why does `amrecover' report `no index records' or `disk not found'?
-
-A: The most common cause of this problem is not having enabled index
-generation in amanda.conf.  The `index yes' option must be present in
-every dumptype for whose disks indexes should be generated.
-
-   Another possibility is that `amrecover' is not selecting the
-configuration name that contains the backups for the selected disk.
-You may specify a configuration name with the `-c' switch, when you
-invoke `amrecover'.  The default configuration name can only be
-specified at Amanda configure time (--with-config=<name>).
-
-   Indexes are currently generated at backup-time only, so, if a
-backup was performed without creating an index, you won't be able to
-use `amrecover' to restore it, you'll have to use `amrestore'.
-
-
-Q: Ok, I'm done with testing Amanda, now I want to put it in
-production.  How can I reset its databases so as to start from
-scratch?
-
-A: First, remove the `curinfo' database.  By default, it is a
-directory, but, if you have selected any other database format (don't,
-they're deprecated), they may be files with extensions such as .dir
-and .pag.
-
-   Then, remove any log files from the log directory:
-log.<TIMESTAMP>.<count> and amdump.<count>.  Finally, remove the
-tapelist file, stored in the directory that contains amanda.conf,
-unless amanda.conf specifies otherwise.  Depending on the tape changer
-you have selected, you may also want to reset its state file.
-
-
-Q: The man-page of DUMP says that active filesystems may be backed up
-inconsistently.  What does Amanda do to prevent inconsistent backups?
-
-A: Nothing.  When you back up an active filesystem, there are two
-possibilities:
-
-1) dump may print strange error messages about invalid blocks, then
-fail; in this case, Amanda will retry the backup on the next run
-
-2) files that are modified while dump runs may be backed up
-inconsistently.  But then, they will be included in the next
-incremental backup, which should usually be enough
-
-   Large, critical files such as databases should be locked somehow,
-to avoid inconsistent backups, but there's no direct support for that
-in Amanda.  The best bet is to configure Amanda to use a wrapper to
-DUMP, that locks and unlocks the database when appropriate.
diff --git a/docs/HOWTO-AFS b/docs/HOWTO-AFS
deleted file mode 100644 (file)
index 6255810..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-You need to download the following package if you want to backup AFS volume
-with amanda:
-  ftp://ftp.ccmr.cornell.edu/pub/amanda-afs/amanda-afs.tar.gz
-or 
-  anonymous cvs from :pserver:anonymous@cvs.ccmr.cornell.edu:/usr/common/cvs
-  and checkout project 'amanda-afs'
-
-The patch to amanda is already included in this distribution.
diff --git a/docs/HOWTO-CYGWIN.html b/docs/HOWTO-CYGWIN.html
deleted file mode 100644 (file)
index 033c879..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-  <meta name="GENERATOR" content="SGML-Tools 1.0.9">
-  <title>Amanda on Cygwin HOWTO</title>
-  <link href="amanda-cyg-howto-4.html" rel="next">
-  <link href="amanda-cyg-howto-2.html" rel="previous">
-  <link href="amanda-cyg-howto.html#toc3" rel="contents">
-  <meta name="author" content="Doug Kingston">
-</head>
-<body>
-<h1 style="text-align: center;"><a name="s3">Amanda on Cygwin HOWTO</a></h1>
-<p>by Doug Kingston, 30 January 2003.&nbsp; Based on Cygwin 1.3.18, and
-Amanda 2.4.3-20021027 and some fixes which will be in the official
-release by the time you see this.<br>
-</p>
-<p>With thanks to Enrico Bernardini from whom I have borrowed some
-material from an earlier attempt at documenting the installation of
-Amanda on Cygwin in 2001.&nbsp; Please send annotations and corrections
-to amanda-hackers@amanda.org. I can be reached as dpk (at)
-randomnotes.org (do the obvious).<br>
-</p>
-<h2><a name="Install">1. Install Cygwin</a></h2>
-<h2> </h2>
-<p> The following Cygwin packages are required for binary installation
-(may be incomplete): </p>
-<ul>
-  <li> Category BASE: standard</li>
-  <li>Category MISC: gzip<br>
-  </li>
-  <li>Category MISC: tar<br>
-  </li>
-  <li> Category NET: inetutils</li>
-</ul>
-<p> You need also these packages to build from source (may be
-incomplete): </p>
-<ul>
-  <li> Category DEVELOP: ALL</li>
-  <li> Category INTERPRETERS: m4, gawk ?</li>
-  <li> Category LIBS:<span style="font-style: italic;">default
-selection? (libc, libiconv, others?)<br>
-    </span></li>
-</ul>
-I have most or the basic utilities and libraries installed so I cannot
-give you a more specific list of what is required.&nbsp; If someone has
-a more definitive list, I would appreciate and email to amanda-hackers.<br>
-<br>
-One user reported some problems with access rights when running under
-Cygwin, which he solved by setting the CYGWIN environment variable to
-nontsec.&nbsp; I do not believe this is necessary if you run the amanda
-daemon as System (see below).<br>
-<p> </p>
-<h2><a name="Compile"></a>2. Other Preparation</h2>
-When doing backups on a NT, Windows 2000 or Windows XP system, the
-choice of user and group will be important if you are to properly
-interact with the security mechanisms of these more modern Microsoft
-product.&nbsp; For Windows 95/98/ME this is probably a non-issue.&nbsp;
-The most privileged account on the Windows systems is 'System', and I
-have chosen to use this account for Amanda backups to ensure that I can
-access the widest set of files.&nbsp; On Unix we would run as root, with
-equivalent access permissions.&nbsp; I have also chose to run under the
-'Administrators' group, another standard Windows group.&nbsp; Ensure
-these exist before you continue - or identify another account to
-use.&nbsp; The Cygwin installation postinstall script should have
-already populated /etc/passwd and /etc/group with these entries.<br>
-<ul>
-  <li>Make sure that System (or SYSTEM) has a home directory specified
-in /etc/passwd.</li>
-</ul>
-I used <span style="font-family: monospace;">/home/root</span>.&nbsp;
-You'll need to put the .amandahosts file here later.&nbsp; The relevant
-lines from my /etc/passwd file are:<br>
-<div style="margin-left: 40px;"><span style="font-family: monospace;">SYSTEM:*:18:18:,S-1-5-18:/home/root:</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">root:*:18:18:,S-1-5-18:/home/root:</span></div>
-<h2><a name="Compile">3. Compile Amanda</a></h2>
-After installing Cygwin, unpack the Amanda sources, typically in
-/usr/src/amanda or something similar.&nbsp; In the Amanda directory, you
-will need to execute:<br>
-<div style="margin-left: 40px;"><span style="font-family: monospace;">automake&nbsp;
-# this may not be necessary in the official release</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">autoconf&nbsp; # this may not be
-necessary in the official release</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">./configure --without-server \</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp; --without-force-uid \</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp; --with-user=<span
- style="font-style: italic;">yourlogin</span> \</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp; --with-group=Administrators</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">make</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">make&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-# yes, I needed to run it a second time</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">make install</span><br>
-</div>
-<br>
-The use of&nbsp; your own login instead of SYSTEM requires some
-explanation.&nbsp; If you were to call runconfigure with SYSTEM instead
-of your own login id as part of the -with-user parameter, the
-installation process will fail due to the way Cygwin and the NT/W2K/XP
-security system interact.&nbsp; Once you chown a file to another user
-(like SYSTEM) you are no longer able to chgrp or chmod the file.&nbsp;
-The installations process will abort at this point.&nbsp; By installing
-the files owned by yourself, you will be able to chgrp and chmod them
-as expected.&nbsp; Note that you still RUN as SYSTEM from inetd.conf
-(see below).<br>
-<h2><a name="Configure">4. Configure Cygwin files</a> </h2>
-<p>You have to modify some config files: </p>
-<ul>
-  <li>/etc/inetd.conf: cleanup un-needed entries:</li>
-</ul>
-<p style="margin-left: 40px;">Comment out any entries you do not need
-by placing a '#' at the start of the lines.&nbsp; This is just good
-practice, and if any of the entries reference non-existent users (e.g.
-uucp) inetd may not start up.</p>
-<ul>
-  <li> /etc/inetd.conf: add
-    <blockquote><code> amanda  dgram   udp     wait    System
-/usr/local/libexec/amandad amandad </code></blockquote>
-ATTENTION: Use tabs, don't use spaces.<br>
-  </li>
-</ul>
-<ul>
-  <li> create <span style="font-family: monospace;">/home/root/.amandahosts</span>
-(or whereever System's home directory is):
-    <pre> &lt;amanda server&gt; &lt;amanda user&gt; <br></pre>
-  </li>
-</ul>
-Then create the following AMANDA directories and the amandates file:
-<blockquote><code> mkdir -p /usr/local/var/amanda/gnutar-lists<br>
-  <br>
-mkdir /tmp/amanda<br>
-  <br>
-touch /etc/amandates<br>
-  </code></blockquote>
-<h2><a name="Configure">5. Configure Windows system files</a> </h2>
-Update the Windows services list<br>
-<ul>
-  <li> &lt;WINDIR&gt;\Services: add
-    <blockquote><code> amanda              10080/udp                   #
-amanda backup services<br>
-amandaidx           10082/tcp                   # amanda backup services<br>
-amidxtape           10083/tcp                   # amanda backup services<br>
-      </code></blockquote>
-  </li>
-</ul>
-where WINDIR is C:\WINNT\system32\drivers\etc or something
-similar.&nbsp; The last two lines are needed if you want to use
-amrecover.<br>
-<br>
-Ensure that the default Windows PATH environment variable include your
-Cygwin /bin directory.&nbsp; This is necessary since inetd and hence the
-amandad that it spawns will not have the advantage of being started by
-the standard bash shell startup script and won't find the needed dynamic
-libraries (e.g. cygwin1.dll). My PATH is:<br>
-<span style="font-family: monospace;"><br>
-&nbsp;
-%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin</span><br>
-<br>
-This is on XP; My Computer, right click - Properties, click on
-Environment Variables (at the bottom).&nbsp; Yours may vary, but make
-sure the Cygwin bin directory is represented somewhere in the PATH.<br>
-<p> </p>
-<h2><a name="Inetd">6. Configure Inetd to run automatically as a service</a> </h2>
-<p>If you want to test your installation, you can call inetd from bash
-prompt: </p>
-<blockquote><code> /usr/sbin/inetd -d </code></blockquote>
-<p> </p>
-<h3>Windows 98/ME<br>
-</h3>
-<p> </p>
-<ul>
-  <li> To start after the user logs in: Create a shortcut to
-    <pre>c:\cygwin\usr\sbin\inetd.exe<br></pre>
-in
-    <pre>&lt;WINDIR&gt;\start menu\programs\startup<br></pre>
-  </li>
-  <li> To start before the user logs in: Add the string key
-    <pre>CygwinInetd=C:\cygwin\usr\sbin\inetd.exe<br></pre>
-under
-    <pre>HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices<br></pre>
-in the registry. You'll see a dos-like window on the startup: I not
-found a solution to iconize or to make invisible (suggestions are
-welcome).</li>
-</ul>
-<h3>Windows NT/2000/XP</h3>
-<p>From bash prompt, type: </p>
-<pre> /usr/sbin/inetd --install-as-service<br></pre>
-Then, to start/stop inetd service use the Services control panel or the
-following Windows command:
-<pre> net start/stop inetd<br></pre>
-<h2><a name="Notes"></a>7. Notes on Amanda backup options</h2>
-<p><span style="font-weight: bold; text-decoration: underline;">Compression</span><br>
-Currently, client side compression does not work, probably due to
-problems in pipe emulation in Cygwin.&nbsp; I have not tried to debug
-this yet.&nbsp; This may be addressed in a subsequent release, or it
-could be fixed in later releases of Cygwin.&nbsp; Due to this issue, we
-recommend that if you want compressed dumps from Windows clients, you
-configure Amanda for server compression in amanda.conf on your Amanda
-server:</p>
-<div style="margin-left: 40px;"><span style="font-family: monospace;">define
-dumptype srv-comp-tar {</span><br style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; global</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; comment
-"partitions dumped via tar with server compression"</span><br
- style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; program
-"GNUTAR"</span><br style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; compress
-server fast</span><br style="font-family: monospace;">
-<span style="font-family: monospace;">&nbsp;&nbsp;&nbsp; exclude list
-".amanda.exclude"</span><br style="font-family: monospace;">
-<span style="font-family: monospace;">}</span></div>
-<p><span style="font-weight: bold; text-decoration: underline;">Exclude
-Lists</span><br>
-A note on exclude lists is also in order.&nbsp; If you specify a
-relative path, it will be expect ed that the file is in or relative to
-the root of the directory you are planning to dump.&nbsp; Typically this
-will not be '/' but '/cygdrive/c' or something similar if you want to
-get the Windows files and the Cygwin files.&nbsp; '/' is taken to be the
-root of the Cygwin tree, normally something like C:\cygwin or possibly
-C:\Program Files\cygwin.</p>
-<p><span style="font-weight: bold; text-decoration: underline;">Debugging
-Files</span><br>
-Amanda will leave debugging files in /tmp/amanda if it exists.&nbsp; I
-have recommended creating the directory above.&nbsp; <br>
-</p>
-<p><br>
-</p>
-</body>
-</html>
diff --git a/docs/HOWTO-FILE-DRIVER b/docs/HOWTO-FILE-DRIVER
deleted file mode 100644 (file)
index 8c8f655..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
----
-
-       AMANDA FILE-DRIVER-USAGE HOWTO.
-
----
-
-       This document covers the use of the file-driver in AMANDA
-       2.4.3 and higher. Examples given here have been taken from a 
-       SuSe-Linux-8.2-Pro-environment, using AMANDA 2.4.4p1 and the
-       snapshot 2.4.4p1-20031202.
-
-       Please adjust paths, configuration names and other parameters 
-       to your system.
-
-       Stefan G. Weichinger, November - December, 2003
-
----
-
-       Since release 2.4.3 AMANDA supports the usage of a output
-       driver called "file".  See the AMANDA-man page, section
-       OUTPUT DRIVERS, for more information on its implementation. 
-       As the name suggests, this driver uses files as virtual (or file)
-       tapes.  Once created and labeled, these file tapes can be selected
-       and changed with the standard tape-changer-interface of the AMANDA
-       server.
-
----
-
-POSSIBLE USES
-       
----
-
-       - test installations.
-       You can easily explore the rich features of AMANDA on
-       systems without tape drives.
-       
-       - cheap installations.
-       Without buying a tape drive you can enjoy the benefits
-       of AMANDA and backup to a bunch of harddisks. You can
-       create CD/DVD-sized backups which you can burn onto optical 
-       disks later.
-       
-       - raid installations.
-       You can use the file-driver to backup onto a set of
-       file tapes hosted on a raid-system. Combined with
-       another AMANDA-configuration that dumps the file tapes to
-       real tapes, you can provide reliable backup with faster
-       tapeless recovery.
-       
----
-
-SETUP
-
----
-
-BASICS
-
-       This guide assumes you have setup the basic AMANDA-services
-       as described in the "INSTALL"-file.
-
-       The configuration in this HOWTO is called "daily".
-       The file tapes are also called "vtapes" in this document, which 
-       stands for "virtual tapes".
-
-       Please be sure to understand the differences between holding disks and
-       file tapes. The two serve different purposes; holding disks allow for
-       parallelism of multiple DLE's being backed up while file tapes are a 
-       replacement for physical tapes.
-
-       Before beginning you will need to decide on (a) dedicated part(s)
-       of your hard disk(s) for your file tape storage.  While this space
-       could be spread among several file systems and hard disks, I
-       recommend to dedicate at least a specific partition, better a specific 
-       physical harddisk to the task of keeping your vtapes.
-       The use of a dedicated disk will speed things up definitely.
-
-       The disk space you dedicate for your vtapes should NOT
-       be backed up by AMANDA.  Also, for performance reasons there
-       should be NO holding disks on the same partition as the
-       vtapes, preferably not even on the same physical drive.
-
-       If you only have one harddisk, it will work out, too, but
-       you will suffer low performance due to massive head-moving
-       in your harddisk, resulting from copying data between the
-       filesystems.
-
----
-
-STEPS
-
-Step 0.  Prepare the filesystem(s) used for the tapes.
-
-       Decide on where to put your files, create the
-       appropriate partition(s) and filesystem(s) and mount them.
-
-       In our example we have the dedicated partition "hdc1", 
-       mounted on /amandatapes for vtape storage.
-
-       $ mount
-       ...
-       /dev/hdc1 on /amandatapes type reiserfs (rw)
-       ...
-
-       Make sure there is space left.
-       Determine the amount of space you will use.
-
-       $ df -h /amandatapes
-       Filesystem      Size  Used  Avail  Use%   Mounted on
-       /dev/hdc1        20G    0G    20G    0%   /amandatapes
-
-       In our example we have 20GB diskspace left on /amandatapes.
-
-Step 1.  Determine length and number of tapes
-
-       After deciding on the number of vtapes you want to create,
-       evenly allocate the available space among them.
-
-       Look at the following rule of thumb:
-
-       As many types file systems exhibit dramatically reduced performance
-       when they are nearly full I have chosen to allocate
-       only 90% of the available space. So we have:
-
-       (Available Space * 0.9) >= tapelength * tapecycle
-
-
-       This is a very conservative approach to make sure you don´t suffer
-       any performance drop due to a nearly-full-filesystem.
-
-       As it is uncommon for AMANDA to fill, or almost fill an entire tape 
-       you may also wish to use more space than that.
-
-       So you could determine possible combinations of tapelength/tapecycle
-       with the more general formula:
-
-       Available Space >= tapelength * tapecycle
-
-
-       In our example we take the conservative approach:
-
-       20 GB * 0.9 = 18 GB to use and so we could create the
-       following combinations:
-
-       18 GB = 18 GB * 1
-       18 GB =  9 GB * 2
-       18 GB =  6 GB * 3
-       18 GB =  3 GB * 6
-       18 GB = .........   you get the picture. 
-
-       Using only one tape is generally considered a bad idea
-       when it comes to backup, so we should use at least 3
-       tapes (for testing purposes), better 6 or more tapes.
-
-       18 GB =  3 GB * 6   so we get the value 3GB for the
-       tapelength if we want to use 6 tapes.
-
-Step 2.  Create a tapetype definition.
-
-       Add a new tapetype definition similar to the following to your amanda.conf.
-       I named my definition "HARD-DISK".  Choose whatever name you
-       consider appropriate.
-
-       define tapetype HARD-DISK {
-               comment "Dump onto hard disk"
-               length 3072 mbytes      # specified in mbytes to get the exact size of 3GB
-       }
-
-       You don´t have to specify the "speed"-parameter (as it is
-       commonly listed in tapetype definitions and reported by 
-       the program "amtapetype"). AMANDA does not use this parameter.
-
-       There is also an optional "filemark"-parameter, which indicates
-       the amount of space wasted after each tape-section. Leave it
-       blank and AMANDA uses the default of 1KB.
-
-Step 3. Think about tapechangers. 
-
-       As you will use a set of vtapes, you have to also use a kind of vtape-changer.
-       There are several tape-changer-scripts included in the AMANDA-tarball.
-       Read more about tape-changer-scripts in TAPE.CHANGERS.
-
-       Right now there are two scripts that can be used with vtapes.
-       These scripts take different approaches to the handling of tapes.
-
-       The script chg-multi handles many drives with a tape in each drive.
-       The script chg-disk handles a library with one drive and multiple tapes.
-
-       So with vtapes you could look at it this way:
-
-       chg-multi simulates multiple tape drives with one tape in each drive.
-       chg-disk simulates one tape-library with multiple tapes in.
-
-       As chg-multi exists for a much longer time than chg-disk, it is still
-       used in many AMANDA-vtape-installations.
-
-       chg-disk was introduced with the snapshot 20031202.
-       Contrary to chg-multi, which is a generic changer-script that must
-       be somewhat adjusted to the use of the file-driver, chg-disk offers
-       exactly the behavior needed for handling vtapes
-
-       IMHO the approach is much more logical, so I recommend to use chg-disk
-       in new AMANDA-vtape-installations.
-
-       To use chg-disk you need to have at least amanda-2.4.4p1-20031202.
-
-       Choose the one that fits your way of vtape-handling and -maintenance.
-
-       In this HOWTO I only cover the use of chg-disk.
-       Usage of chg-multi is pretty similar and will maybe covered in a later
-       version of this document.
-
-Step 4. Set up your tape-config.
-
-       In the general section you have to set the parameters tapecycle,
-        tapetype, tpchanger, changerfile, tapedev, rawtapedev and changerdev.
-
-        Example:
-
-        $ vi /usr/local/etc/amanda/daily/amanda.conf
-        ...
-
-        tapecycle 6
-        tapetype HARD-DISK
-        tpchanger "chg-disk"
-        changerfile "/usr/local/etc/amanda/daily/changer"
-       tapedev  "file:/amandatapes/daily"
-
-        This reflects the use of your defined tapetype.
-
-        The "tapecycle"-parameter tells AMANDA how much tapes can be used.
-        Set this value according to the number of tapes you want to use.
-
-        The "tapetype"-parameter points to the tapetype definition you have
-        created in Step 2.
-
-        The "tpchanger"-parameter tells AMANDA to use the generic
-        tape-changer-script to handle the virtual tapes. You
-        can think of it as a virtual tape-changer-device.
-
-        The "changerfile"-parameter is used to give chg-disk the "prefix"
-       for the "%s-changer, %s-clean, %s-slot" files it needs.
-       Use something like "changer" in your config-dir.
-       Please note that this file does NOT have to exist, but it won't
-       hurt anyway.
-
-       The "tapedev"-parameter tells the chg-disk-script where the 
-       root-dir for your vtapes is. 
-       In our example the vtape-files go to
-       /amandatapes, and to separate multiple configurations we decided
-       to use subdirectories according to the configuration name "daily".
-
-Step 5. Create the virtual tapes.
-
-       Now you have to create the tape-directories. 
-       chg-disk needs a directory structure like:
-
-       slot_root_dir -|
-                      |- info
-                      |- data -> slot1/
-                      |- slot1/
-                      |- slot2/
-                      |- ...
-                      |- slotn/
-
-       where 'slot_root_dir' is the tapedev 'file:xxx' parameter 
-       and 'n' is the tapecycle parameter.
-
-       So in our example we do:
-
-       $ mkdir /amandatapes/daily
-
-       for the 'slot_root_dir' and
-
-       $ mkdir /amandatapes/daily/slot1
-       $ mkdir /amandatapes/daily/slot2
-       ....
-
-       for the virtual slots that will later contain the vtapes.
-
-        If you have many vtapes to create and their names follow a pattern
-        you may be able to do them all with a single loop such as:
-
-        $ for n in 1 2 3 4 5 6 7 8 9 10 11 12
-        > do
-        >    mkdir /amandatapes/daily/slot${n}
-        > done
-
-       Create the info-file:
-
-       $ touch /amandatapes/daily/info
-       
-       and link the first slot to the data-file (to "load" the vtape
-       in the first slot):
-
-       $ ln -s /amandatapes/daily/slot1 /amandatapes/daily/data
-
-       Make sure the AMANDA-user has write-permissions on these directories:
-
-       $ chown -R <amanda_user> /amandatapes
-       $ chgrp -R <amanda_group> /amandatapes
-       $ chmod -R 750 /amandatapes
-
-Step 8. Label the virtual tapes.
-
-       As the virtual tapes are handled just like physical
-       tapes by the AMANDA-Server they have to be labeled
-       before use.
-
-       Usage: amlabel [-f] <conf> <label> [slot <slot-number>]
-
-       Example:
-
-       $ amlabel daily daily1 slot 1
-       ....
-       $ amlabel daily daily2 slot 2
-       ....
-
-       If you have many vtapes to label and their names follow a pattern
-       you may be able to do them all with a single loop such as:
-
-       $ for n in 01 02 03 04 05 06 07 08 09 10 11 12
-       > do
-       >    amlabel daily daily${n} slot ${n}
-       > done
-
-       Label all your created tapes according to the
-       "labelstr"-parameter in your amanda.conf.  Consult the
-       amlabel-man-page for details.
-
-Step 9. Test your setup with amcheck.
-
-       Run amcheck daily (or, more general, amcheck <config>)
-       and look for anything AMANDA complains about.
-
-       A proper output looks like:
-
-       $ amcheck daily
-       Amanda Tape Server Host Check
-       -----------------------------
-       Holding disk /amhold: 6924940 KB disk space available,
-       that's plenty
-       amcheck-server: slot 2: date 20031115 label daily02
-       (exact label match)
-       NOTE: skipping tape-writable test
-       Tape daily02 label ok
-       Server check took 0.377 seconds
-
-       Recheck your files if errors occur.
-
-----
-
-
-THAT'S IT!  YOU ARE READY TO RUN, UNLESS WE FORGOT
-SOMETHING.  PLEASE send mail to amanda-users@amanda.org if
-you have any comments or questions.  We're not afraid of
-negative reviews, so let us have it!
diff --git a/docs/INDEXING b/docs/INDEXING
deleted file mode 100644 (file)
index 417bbff..0000000
+++ /dev/null
@@ -1,383 +0,0 @@
-This file describes how the index files are generated and how amrecover
-is used.
-
-
-Database Format
----------------
-
-The database consists of a directory tree of the format:
-  $host/$disk/$date_$level.gz
-
-The host and disk are those listed in the disklist file, the "$host/$disk/"
-is like the curinfo database, '/' are changed for '_'.
-There is an index file for each dump, the name of the file is made
-of the date and the level, they will have the .gz suffix if they are
-compressed with gzip.
-
-ex. The file foo/_usr/19991231_0.gz is the index of the level 0 made on
-    19991231 of the disk /usr of the host foo.
-
-The files are ASCII text files containing a list of the directory
-and files of the dump, one per line.  Each entry is the filename
-relative to the mount point, starting with a /, e.g., /home/user1/data
-from the disk mounted on /home would generate the entry /user1/data.
-The index files are stored in compressed format (eg gzip or compress).
-
-
-Database Browsing
------------------
-
-The client is called amrecover and is loosely based on the
-functionality of the program "recover" from Backup Copilot.  A user
-starts up amrecover.  This requires specifying the index server and the
-amanda config name (defaults for both are compiled in as part of the
-installation).  Then the user has to specify the name of the host
-information is wanted about, the disk name, and (optionally) the disk
-mount point.  Finally a date needs to be specified.  Given all this,
-the user can then roam around a virtual file system using "ls" and "cd"
-much like in a FTP client.  The file system contains all files backed
-up on the specified date, or before that date, back to the last level 0
-backup.  Only the most recent version of any file is shown.
-
-As the file system is traversed, the user can add and delete files to a
-"shopping list", and print the list out.
-
-
-File Extraction
----------------
-
-When a user has built up a list of files to extract, they can be
-extracted by issuing the command "extract" within amrecover.
-
-Files are extracted by the following, for each different tape needed.
-
-As part of the installation, a "tape server" daemon amidxtaped is
-installed on one or more designated hosts, which have an attached tape
-drive.  This is used to read the tapes.  See the config files for the
-options for specifying a default.
-
-Amrecover contacts amidxtaped on the tape server host specifying which
-tape device to use, which host and disk files are needed for.  On the
-tape server host, amidxtaped exec's amrestore to get the dump image
-file off the tape, and returns the data to amrecover.
-
-If dumps are stored compressed for the client, then amrecover pipes the
-data through the appropriate uncompression routine to uncompress it
-before piping it into restore, which then extracts the required files
-from the dump image.
-
-Note that a user can only extract files from a host running the same
-operating system as he/she is executing amrecover on, since the native
-dump/restore tools are used - unless gnutar is used.
-
-
-Protocol Between amindexd and amrecover
----------------------------------------
-
-The protocol talked between amindexd and amrecover is a simple ASCII
-chat protocol based on that used in FTP.  Amrecover sends a 1 line
-command, and amindexd replies with a 1 line or multi-line reply.  Each
-line of the reply starts with a three digit code, starting with a '5'
-if an error occurred.  For 1 line replies, and the last line of a
-multi-line reply, the 4th character is a space.  For all but the last
-line of a multi-line reply, the 4th character is a '-'.
-
-The commands and replies other than acknowledgments are:
-
-QUIT - finish up and close connection
-
-HOST <host> - set host to host
-
-DISK <disk> - set disk to disk
-
-LISTDISK [<device>] - list the disks for the current host
-
-SCNF <config> - set amanda configuration to config
-
-DATE <date> - set date to date
-
-DHST - return dump history of current disk
-
-OISD <dir> - Opaque is directory? query.  Is the directory <dir>
-            present in the backups of the current disk back to and
-            including the last level 0 dump.
-
-OLSD <dir> - Opaque list directory.  Give all filenames present in
-            <dir> in the backups of the current disk back to and
-            including the last level 0 dump.
-
-ORLD <dir> - Opaque recursive list directory.  Give all filenames 
-            present in <dir> and subdir in the backups of the current
-            disk back to and including the last level 0 dump.
-
-TAPE - return value of tapedev from amanda.conf if set.
-
-DCMP - returns "YES" if dumps for disk are compressed, "NO" if dumps
-            aren't.
-
-
-
-INSTALLATION NOTES
-------------------
-
-
-1) Whether or not an index is created for a disk is controlled by a
-disk configuration option "index".  So, in amanda.conf you need to
-define a disktype with this option, e.g.,
-
-define dumptype comp-user-index {
-    comment "Non-root partitions on reasonably fast machines"
-    compress client fast
-    index yes
-    priority medium
-}
-
-2) You need to define disks that you want to generate an index for to
-be of one of the disktypes you defined which contain the index option.
-This cause sendbackup-dump on the client machine to generate an index
-file which is stored local to the client, for later recovery by
-amgetidx (which is called by amdump).
-
-3) Amanda saves all the index files under a directory specified by
-"indexdir" in amanda.conf.  You need to create this directory by hand.
-It needs to have read/write permissions set for the user you defined
-to run Amanda.
-
-If you are using the "text database" option you may set indexdir and
-infofile to be the same directory.
-
-4) The index browser, amrecover, currently gets installed as part of
-the client software.  Its location may not be appropriate for your
-system and you may need to move it to a more accessible place such as
-/usr/local/bin.  See its man page for how to use it.
-
-
-Note that amindexd, amgetidx, amidxtaped, and amtrmidx all write debug
-files on the server in /tmp (unless this feature is disabled in the
-source code), which are useful for diagnosing problems.  Amrecover
-writes a debug file in /tmp on the machine it is invoked.
-
-
-PERMISSIONS
------------
-
-The userid chosen to run the amanda client code must have permission to
-run restore since this is used by createindex-dump to generate the
-index files.
-
-For a user to be able to restore files from within amrecover, that user
-must have permission to run restore.
-
-
-CHANGES FROM AMINDEX-1.0
-------------------------
-
-Get index directory from amanda.conf
-
-Integration into amanda-2.3.0.4.
-
-Rewriting of amgetidx to use amandad instead of using rsh/rcp.
-
-
-
-CHANGES FROM AMINDEX-0.3
-------------------------
-
-Support for index generation using gnutar
-
-Support for restoring files from within amrecover.
-
-Bug fixes:
-
-       * index/client/amrecover.c (guess_disk): 
-       Removed inclusion of mntent.h and use of MAXMNTSTR since this
-       was non-portable, as pointed out by Izzy Ergas
-       <erga00@nbhd.org>.
-
-       * index/client/display_commands.c (list_directory): 
-       Removed point where list_directory() could sleep for ever
-       waiting for input that wasn't going to come.
-
-       * index/server/amindexd.c
-         index/client/uscan.l
-       Installed patches from Les Gondor <les@trigraph.on.ca> to make
-       amrecover handle spaces in file names.
-
-       * server-src/amcontrol.sh: 
-       As pointed out by Neal Becker <neal@ctd.comsat.com> there were
-       still a few sh-style comments that needed conversion to
-       c-style.
-
-
-
-
-CHANGES FROM AMINDEX-0.2
-------------------------
-
-       * index/client/Makefile.in
-       * index/client/help.c
-       * index/client/amrecover.h
-       * index/client/uparse.y
-       * index/client/uscan.l
-       Added a help command.
-
-       * index/client/set_commands.c:
-       set_disk() and set_host() now check for empty extract list.
-       
-       * index/client/extract_list.c:
-       * index/client/amrecover.h:
-       * index/client/uparse.y:
-       * index/client/uscan.l:
-       Added clear extract list command.
-       
-       * index/client/set_commands.c (set_disk): 
-       Added code so working directory set to mount point.
-
-       * index/client/extract_list.c:
-       If the last item on a tape list is deleted, the tape list
-       itself is now deleted from the extract list.
-
-       * index/client/amrecover.c: 
-       * index/server/amindex.c:
-       If the server started up and found that the index dir doesn't
-       exist, then it exited immediately and the client got
-       informative message.  Corrected this so it is obvious what is
-       wrong to the user, since this is most likely to occur when
-       somebody is setting up for the first time and needs all the
-       help they can get.
-
-       * server-src/amgetidx.c
-       Added patch from Pete Geenhuizen
-       (pete@gasbuggy.rockledge.fl.us) so that it works even when
-       remote shell is csh.
-
-       * server-src/amcontrol.sh
-       * server-src/Makefile.in
-       Amcontrol is now parameterized like other scripts and run
-       through munge to generate installable version.
-
-       * index/server/amindexd.c (main): 
-       Added code to set userid if FORCE_USERID set.
-
-       * index/server/amindexd.c
-       Removed #define for full path of grep.  Assumed now to be on
-       path.
-
-       * client-src/createindex-dump.c
-       * client-src/sendbackup-dump.c
-       * man/Makefile.in
-       Added patch from Philippe Charnier (charnier@lirmm.fr) so they
-       work when things are installed with version numbers.  This was
-       also reported by Neal Becker (neal@ctd.comsat.com).  Also patch
-       to set installed man page modes and create directory if
-       needed.
-
-       * config/options.h-sunos4
-       Corrected definition for flex library.
-
-       * server-src/amtrmidx.c
-       Added some pclose() commands, used remove() instead of
-       system("rm ..").  Problems reported by Pete Geenhuizen
-       (pete@gasbuggy.rockledge.fl.us) on a system with small ulimits
-       set.
-
-       * index/server/amindexd.[ch]
-       * index/server/list_dir.c
-       * index/client/amrecover.c
-       * index/client/set_commands.c
-       * index/client/uparse.y
-       Changes developed with the help of Pete Geenhuizen
-       (pete@gasbuggy.rockledge.fl.us) to support disks specified by
-       logical names.  Also, now debug files generated by amrecover
-       include PID so multiple users can use amrecover simultaneously
-       and without file deletion permission problems.
-
-       * config/config.h-hpux: 
-       * config/config-common.h:
-       * server-src/amgetidx.c:
-       Changes from Neal Becker re remote shell, making it a
-       configuration parameter.
-
-       * config/options.h-sunos4
-       Had -Lfl instead of -lfl
-       
-
-
-CHANGES FROM AMINDEX-0.1
-------------------------
-
-       * index/client/uscan.l: 
-       added support for abbreviated date specs
-
-       * index/client/amrecover.c (guess_disk): 
-       guess_disk got disk_path wrong if mount point other than / (as
-       subsequently pointed out by Eir Doutreleau <ed@cti.ecp.fr>)
-       
-       * server-src/amtrmidx:
-       Added amtrmidx which removes old index files.
-
-       * index/client:
-       Added a pwd command
-
-       * server-src/amgetidx.c (main): 
-       Added use of CLIENT_LOGIN username on r commands.  (as pointed
-       out by Eric Payan <Eric.Payan@ufrima.imag.fr>)
-
-       * server-src/amgetidx.c:
-       Bug: It was copying from all clients irrespective of whether
-       the client was configured for indices.  A '}' in the wrong
-       place.
-
-       * server-src/amgetidx.c: 
-       Removed user configuration section.  Instead include amindexd.h
-       to get information.
-
-
-
-CHANGES/ADDITIONS TO 2.3.0
---------------------------
-
-common-src/conffile.[ch]
-
-- added "index" as a valid option
-
-
-server-src/driverio.c
-
-- added code to optionstr() to write "index" into option string
-
-
-client-src/sendback-dump.c
-
-- added code to generate index if requested.
-
-client-src/indexfilename.[ch]
-client-src/createindex-dump.c
-
-- code to generate index.
-
-client-src/Makefile.in
-
-- a new target.  Another file for sendbackup-dump
-
-config/config-common.h
-
-- added def of restore.
-
-
-
-
-KNOWN BUGS
-----------
-
-- Empty directories don't get into the listing for a dump (at all dump
-levels).
-
-- When amrecover starts up, it tries to guess the disk and mount point
-from the current directory of the working system.  This doesn't work
-for disks specified by logical names, nor when an automounter is being
-used, or a link is in the path.
-
-
-Alan M. McIvor
-11 March 1997
diff --git a/docs/INSTALL b/docs/INSTALL
deleted file mode 100644 (file)
index f2ce817..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-Amanda INSTALLATION NOTES
-
-This document covers the compilation, installation, and runtime setup
-of Amanda 2.4.2 and higher.
-
-0. BEFORE DOING ANYTHING
-
-    A.  Read this document all the way through.
-
-    B.  Consult the docs/SYSTEM.NOTES file for installation notes
-       specific to particular operating systems.  There is often
-       important information there, so don't forget this step.
-
-    C.  Read docs/UPGRADE if you are upgrading from a previous Amanda
-       version.  There are some issues that you will need to be aware
-       of.
-
-    D.  If you are using KERBEROS authentication, read docs/KERBEROS
-       for details on installing and running the kerberized version of
-       Amanda.
-
-    E.  Check the Amanda Patches Page, www.amanda.org/patches.html.
-
-1. COMPILING THE AMANDA SOURCES
-
-If you have multiple architectures, you only need to install the whole
-Amanda package on the tape server host (the one with tape drive).  On
-the backup client hosts (the ones you are going to dump), you only need
-to compile some of the Amanda programs (see section 1.2.H below).
-
-1.1. SOURCE CONFIGURATION:
-
-    A.  Amanda can optionally make use of the following packages to
-       back up different types of clients or clients with different
-       filesystem dumping programs.  If you wish to use GNU tar to
-       back up filesystems, we can install version 1.12 or 1.13.25.
-       gnutar 1.12 can be found at:
-
-               ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
-       Apply the patch from patches/tar-1.12.patch.  The first hunk
-       may be enough, unless it's a SunOS4 host.  Read more about the
-       patches in the patch file itself.
-
-       gnutar 1.13.25 can be found at:
-
-               ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz
-
-       Samba allows Unix systems to talk to PC clients.  Amanda can
-       back up Microsoft Windows clients using Samba:
-
-               http://www.samba.org
-
-       Read docs/SAMBA for configuration tips and known limitations.
-
-       Look at http://www.amanda.org/patches.html for up to date
-       information on patches.
-
-    B.  If you wish to make use of some of the scripts that come with
-       Amanda, you will need to install Perl.  You can get Perl from
-       any CPAN site.  
-           ftp://ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
-
-
-    C.  One of the programs included in this package is amplot,
-       which reads a data file that Amanda generates for each dump
-       and translates that information in it into a nice picture that
-       can be used to determine how your installation is doing and if
-       any parameters need to be changed.  To use amplot, you need a
-       version of awk that understands command line variable
-       substitutions, such as nawk or gawk, which is available from
-
-           ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
-
-       Amplot also required that gnuplot be installed on your system.
-       Gnuplot is available at
-
-           http://www.gnuplot.org/
-           ftp://ftp.gnuplot.org/pub/gnuplot
-
-    D. The process of building Amanda requires that some other
-       packages be installed on your system.  The following packages
-       are used:
-
-           ftp://ftp.gnu.org/pub/gnu/readline/readline-4.2.tar.gz
-               amrecover optionally uses the readline library for its
-               command-line edition mechanisms.  This library itself
-               requires either termcap, curses or ncurses.  termcap
-               is preferred, and it may be obtained from:
-           ftp://ftp.gnu.org/pub/gnu/termcap/termcap-1.3.tar.gz
-
-       If you wish to edit and enhance Amanda, you may need to install
-       the following tools.  Autoconf and automake are required if you
-       are going to rebuild the Makefiles and auto configuration scripts.
-       Bison is only needed if you are going to work on the index server
-       and client code.
-
-           ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz
-           ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.3.tar.gz
-           ftp://ftp.gnu.org/pub/gnu/bison/bison-1.27.tar.gz
-           ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz
-
-    E.  Read about the different configuration options available for
-       building and running Amanda.  To see the options, do both:
-
-           a.  Run `./configure --help' to see the available options
-               that configure takes.
-           b.  Read the example/config.site file which gives longer
-               descriptions to the same options as in step a).
-
-    F.  Choose which user and group you will run the dumps under.
-       Common choices for user are `bin' or another user specifically
-       created for Amanda, such as `amanda'; common choices for group
-       are `operator' or `disk'.  If you do not specify
-       --with-user=<username> and --with-group=<groupname>, configure
-       will abort.  Also choose the default name for your
-       configuration, such as `csd' or `DailySet1').  This name is
-       used by the Amanda commands to choose one of multiple possible
-       configurations.  You may specify it using the
-       --with-config=<confgname>.
-
-    G.  Decide where Amanda will live.  You need to choose a root
-       directory for Amanda.  Let this root directory be called
-       $prefix.  Unless you change the default behavior with the
-       appropriate command line options, Amanda will install itself
-       as.  Listed below each directory is the appropriate
-       configure option to change the location of this part of
-       Amanda.
-
-           $prefix/sbin                Amanda server side programs
-                                       --sbindir=
-           $prefix/libexec             Amanda backup client programs
-                                       --libexecdir=
-           $prefix/lib                 Amanda dynamic libraries
-                                       --libdir=
-           $prefix/etc/amanda          Runtime configuration files
-                                       --with-configdir=
-           $prefix/var/amanda/gnutar-lists
-                                       Directory for GNUtar lists (client)
-                                       --with-gnutar-listdir=
-           $prefix/man                 Directory for manual pages
-                                       --mandir=
-
-       Note that the GNU tar listdir should be a local filesystem on
-       each client that is going to be backed up with GNU tar.  If it 
-       really must be NFS-mounted, make sure the filesystem is
-       exported so that the client has root access to it.
-
-    H.  Decide if you are compiling Amanda on a server only or a
-       client only platform.  If you have a particular operating system
-       that will only be a Amanda client and will never run as the
-       master tape host, then add the --without-server option to
-       configure.  In the unlikely case that you have a particular
-       operating system that will serve as the tape host and you do
-       not wish to back up any machines that run this operating system,
-       add the --without-client option to the configure options.
-       There are many other configuration switches for amanda.  You
-       may learn more about them by running `configure --help' and by
-       reading examples/config.site.
-
-    I.  Now configure Amanda.  There are two ways of doing this.  If
-       you are running Amanda on a single OS, then probably the first
-       method works better for you.  If you need to support multiple
-       platforms, then the second method will work better.
-
-           a.  Run `configure' with the appropriate command line
-               options.  You will probably want to remember the
-               command line options for future builds of Amanda.
-
-           b.  Edit example/config.site and install it in the directory
-               $prefix/etc or $prefix/share.  When `configure' runs
-               the next time it will look for this file and use it to
-               configure Amanda.
-
-1.2. BUILDING AND INSTALLING THE BINARIES
-
-    A.  Back at the top-level source directory, build the sources:
-               1. make
-               2. su root; make install
-       If you want to change the compiler flags, you can do so like
-       this:
-               make CFLAGS="-O3 -Wall"
-
-    B.  If you have built with USE_VERSION_SUFFIXES, you will want to
-       create symlinks to the version you wish to use, eg:
-               ln -s amdump-x.y.z amdump
-       This is not done automatically by the install process, so that
-       you can have multiple Amanda versions co-existing, and choose
-       yourself which to make the default version.  The script
-       contrib/set_prod_link.pl may save you some keystrokes.
-
-2. SETTING UP YOUR AMANDA CONFIGURATION
-
-2.1. SETTING UP THE TAPE SERVER HOST
-
-    B.  Create the config directory (eg /usr/local/etc/amanda/confname)
-       and copy the example/ files into that directory.  Edit these
-       files to be correct for your site, consulting the amanda(8) man
-       page if necessary.  You can also send mail to
-       amanda-users@amanda.org if you are having trouble deciding how
-       to set things up.  You will also need to create the directory
-       for the log and database files for the configuration to use (eg
-       /usr/local/var/amanda/confname), and the work directory on the
-       holding disk.  These directories need to agree with the
-       parameters in amanda.conf.  Don't forget to make all these
-       directories writable by the dump user!
-
-       Make sure that you specify the *no-rewind* version of the tape
-       device in your amanda.conf file.  This is a frequently
-       encountered problem for new sites.
-
-       Note that you might want to temporarily set the "no-record"
-       option in all your dumptypes when first installing amanda if
-       you'd like to run tests of Amanda in parallel with your
-       existing dump scheme.  Amanda will then run but will not
-       interfere with your current dumpdates.  However, you don't want
-       to run with "no-record" under normal operations.
-
-    C.  Put amanda into your crontab.  Here's a sample:
-               0 16 * * 1-5 /usr/local/bin/amcheck -m confname
-               45 0 * * 2-6 /usr/local/bin/amdump confname
-       This is for SunOS 4.x, which has a per-user crontab; most other
-       systems also require a userid on each cron line.  See your
-       cron(8) for details.  With these cron lines, Amanda will check
-       that the correct tape is in the drive every weekday afternoon
-       at 4pm (if it isn't, all the operators will get mail).  At
-       12:45am that night the dumps will be run.
-
-    D.  Put the Amanda services into your /etc/services file.  Add
-       entries like:
-               amanda          10080/udp
-               amandaidx       10082/tcp
-               amidxtape       10083/tcp
-       You may choose a different port number if you like, but it must
-       match that in the services file on the client hosts too.
-
-       If you are running NIS (aka YP), you have to enter the amanda
-       service into your NIS services database.  Consult your NIS
-       documentation for details.
-
-       You may use the `patch-system' script, from client-src, in
-        order to modify this file.  Run it with a `-h' argument for
-        usage.
-
-    E.  If you are going to use the indexing capabilities of Amanda,
-       and your server uses inetd, then add these to your inetd.conf
-       on the tape server host:
-
-           amandaidx stream tcp nowait USER AMINDEXD_PATH amindexd
-           amidxtape stream tcp nowait USER AMIDXTAPED_PATH amidxtaped
-
-       where AMINDEXD_PATH and AMIDXTAPED_PATH are the complete paths
-       to where the amindexd and amidxtaped executables (usually
-       libexec_dir/amindexd and libexec_dir/amidxtaped), and USER is
-       the Amanda user.
-
-       You may use the `patch-system' script, from client-src, in
-        order to modify this file.  Run it with a `-h' argument for
-        usage.
-
-       If your tape server uses xinetd instead of inetd, then you have
-       to add the following two files to your xinetd-configuration
-       (usually /etc/xinetd.d):
-
-       #/etc/xinetd.d/amandaidx
-
-       service amandaidx
-       {
-               socket_type             = stream
-               protocol                = tcp
-               wait                    = no
-               user                    = USER
-               group                   = GROUP
-               groups                  = yes
-               server                  = AMINDEXD_PATH/amindexd 
-       }
-
-       #/etc/xinetd.d/amidxtaped
-
-       service amidxtape
-       {
-               socket_type             = stream
-               protocol                = tcp
-               wait                    = no
-               user                    = USER
-               group                   = GROUP
-               groups                  = yes
-               server                  = AMIDXTAPED_PATH/amidxtaped
-       }
-
-    F.  If the tape server host is itself going to be backed up (as is
-       usually the case), you must also follow the client-side install
-       instructions below on the server host, INCLUDING setting up the
-       .amandahosts file so that the server host lets itself in.
-       This is a frequently encountered problem for new sites.
-
-
-2.2. SET UP THE BACKUP CLIENT HOSTS
-
-    A.  When using BSD-style security (enabled by default), set up
-       your ~dumpuser/.amandahosts (or ~dumpuser/.rhosts and/or
-       /etc/hosts.equiv, if you have configured
-       --without-amandahosts) so that the dumpuser is allowed in from
-       the server host.  Only canonical host names will be accepted
-       in .amandahosts, and usernames must be present in every line,
-       because this is safer.
-
-    B.  Set up your raw disk devices so that the dumpuser can read
-       them, and /etc/dumpdates so that the dumpuser can write to it.
-       Normally this is done by making the disk devices readable by
-       (and dumpdates read/writable by) group `operator', and putting
-       the dumpuser into that group.
-
-    C.  Put the Amanda service into your /etc/services file.  Add
-       entry like:
-               amanda          10080/udp
-               amandaidx       10082/tcp
-               amidxtape       10083/tcp
-       You may choose a different port number if you like, but it must
-       match that in the services file on the client hosts too.
-
-       If you are running NIS (aka YP), you have to enter the amanda
-       service into your NIS services database.  Consult your NIS
-       documentation for details.
-
-       You may use the `patch-system' script, from client-src, in
-        order to modify this file.  Run it with a `-h' argument for
-        usage.
-
-    D.  If your Amanda client uses inetd, put the Amanda client service 
-       into inetd's config file.  
-       This file is usually found in /etc/inetd.conf, but on older systems
-       it is /etc/servers.  The format is different on different OSes,
-       so you must consult the inetd man page for your site.  Here is
-       an example from our site, again from SunOS 4.x:
-
-           amanda dgram udp wait USER AMANDAD_PATH amandad
-
-       You may use the `patch-system' script, from client-src, in
-        order to modify this file.  Run it with a `-h' argument for
-        usage.
-
-       If your Amanda client uses xinetd, you have to add the following
-       file to your xinetd-configuration
-        (usually /etc/xinetd.d):
-
-       #/etc/xinetd.d/amanda
-
-       service amanda
-       {
-               socket_type             = dgram
-               protocol                = udp
-               wait                    = yes
-               user                    = USER
-               group                   = GROUP
-               groups                  = yes
-               server                  = AMANDAD_PATH/amandad 
-       }
-
-    E.  Kick inetd/xinetd to make it read its config file.  On most systems
-       you can just kill -HUP inetd (or xinetd). On older systems you may have to
-       kill it completely and restart it.  Note that
-       killing/restarting (x)inetd is not safe to do unless you are sure
-       that no (x)inetd services (like rlogin) are currently in use,
-       otherwise (x)inetd will not be able to bind that port and that
-       service will be unavailable.
-
-    F.  If you intend to back up xfs filesystems on hosts running IRIX,
-       you must create the directory /var/xfsdump/inventory, otherwise
-       xfsdump will not work.
-
-THAT'S IT!  YOU ARE READY TO RUN, UNLESS WE FORGOT SOMETHING.  PLEASE
-send mail to amanda-users@amanda.org if you have any comments or
-questions.  We're not afraid of negative reviews, so let us have it!
-
-Before writing questions, you may prefer to take a look at the FAQ (in
-docs/FAQ) and at the Amanda home page, at http://www.amanda.org.
-Browsable archives of amanda mailing-lists are available there.
-
-By James da Silva <jds@cs.umd.edu> and others.
diff --git a/docs/INTERNALS b/docs/INTERNALS
deleted file mode 100644 (file)
index 91fb27f..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-This is an attempt to document Amanda's internals.  Please feel free to make
-comments and suggest changes.  Text for new sections gratefully accepted!
-
-George.
-(George.Scott@cc.monash.edu.au)
-
-===============
-== PROTOCOLS ==
-===============
-
-
-      Client I Server         +-planner-+
-             I                |         |
-             I                |         |
-             I                |         |                     ______
-+-amandad-+  I                |         |                    (______)
-|         |  I                |         |                    |amdump|
-|         |  I                |         |           all ::::>|      |
-|         |  I                |         |           stderr   |      |
-|         |  I                |         |                    |      |
-|         |  I                |   so    |                    +------+
-|         |  I                +---------+
-|         |  I                    ::                          ______
-|         |  I                    \/                         (______)
-|         |  I                +-driver--+                    | log  |
-+---------+  I                |   si    |           all ::::>|      |
-             I                |         |           log      |      |
-             I                |         |                    |      |
-+-sendback+  I                |         |                    +------+
-|         |  I                |         |
-|         |  I        ::::::::|         |<::::::
-|         |  I       ::       |         |      ::
-|         |  I      ::   ::::>|         |::::   ::
-|         |  I      ::  ::    |         |   ::  ::
-|         |  I      :: ::     +---------+    :: ::
-|         |  I      :: ::                    :: ::
-|         |  I      :: ::                    :: ::
-|         |  I      :: ::       ______       :: ::
-+---------+  I      :: ::      (______)      :: ::
-             I      :: ::      | /tmp |      :: ::
-             I      \/ ::    :>|      |      \/ ::
-+-dump----+  I  +-dumper--+ :: +------+    +-taper/r-+    +-taper/w-+
-|         |  I  |   si so | ::             | si so   |    |         |
-|         |  I  |         | ::  ______     |         |    |         |
-|         |  I  |mesgfd   | :: (______)    |         |    |         |
-|       se|::::>|::::::::>|::  | hold |    |         |    |         |
-|         |  I  |     errf|    | disk |    |      p2c|:::>|p2c      |
-|         |  I  |         |    |      |    |      c2p|<:::|c2p      |     ____
-|         |  I  |datafd   | ::>|      |::: |fd       |    |         |   /   \
-|       so|::::>|::::::::>|::  +------+  :>|::::::::>SHDMEM::::::::>|::>|tape|
-|         |  I  |    outfd| ::          :: |         |    |   tapefd|   \ _ /
-+---------+  I  +---------+  ::::::::::::  +---------+    +---------+      
-             I
-
-
-server and amandad on client
-============================
-
-XXX - still to be done
-
-
-planner and driver
-==================
-
-Planner interrogates all clients and generates a plan of which disks to
-backup and what dump level to do them at.  The plan is plain text with one
-line per disk to be dumped.  It is piped from planners stdout to drivers
-stdin.  Plan lines come in two flavours:
-
-For total dumps:
-   <host> <disk> <pri> <lev> <size> <time> <deg lev> <deg size> <deg time>
-
-For incremental dumps:
-   <host> <disk> <pri> <lev> <size> <time>
-
-Where:
-   <host>      Host name of client (from disklist file)
-   <disk>      Name of disk (from disklist file)
-   <pri>       Priority of backup (pri from disklist and amanda.conf + days
-                 overdue for total)
-   <lev>       Dump level for dump (0 for total, 1-9 for incremental)
-   <size>      Estimated size (in Kb after compression if requested)
-   <time>      Estimated time for backup (in seconds)
-   <deg lev>   <lev> to use if in degraded mode
-   <deg size>  <size> to use if in degraded mode
-   <deg time>  <time> to use if in degraded mode
-
-
-driver and dumper
-=================
-
-Driver talks via two pipes connected to each dumper's stdin and stdout.  The
-commands and responses are plain text.
-
-Driver can ask dumper to do a dump to a file on the holding disk:
-   FILE-DUMP <handle> <filename> <host> <disk> <level> <dumpdate> <chunksize> <prog> <use> <options>
-or directly to taper:
-   PORT-DUMP <handle> <port> <host> <disk> <level> <dumpdate> <prog> <options>
-or exit at the end of the run:
-   QUIT
-
-If the dump finishes correctly dumper replies with:
-   DONE <handle> [<message>]
-
-If something goes wrong with the dump, dumper can request that the dump be
-retried at a later time with:
-   TRY-AGAIN <handle> [<message>]
-or, for fatal errors, be abandoned with:
-   FAILED <handle> [<message>]
-
-If the holding disk runs out of space (i. e. 'disk full'), dumper will give:
-   NO-ROOM <handle> <missing_size>
-After that, it will issue RQ_MORE_DISK (see below). The driver will correct
-its notion of free diskspace by subtracting <missing_size> from the
-holding disk's alleged size.
-
-If the dumper has used up all of its allocated holding disk space, it will 
-request more with
-   RQ-MORE-DISK <handle>
-and wait for driver to either allocate more diskspace for the dumper and say
-   CONTINUE <filename> <chunksize> <use>
-or just say
-   ABORT
-(see above).
-
-If driver says something that dumper doesn't recognise it responds with:
-   BAD-COMMAND <message>
-
-Where:
-   <handle>    Request ID
-   <filename>  Name of file on holding disk to write dump (see the section
-               'Multiple Holding Disks' below)
-   <port>      Port (of taper) to send dump directly
-   <host>      Hostname of client
-   <disk>      Disk to backup
-   <level>     Dump level to do backup at
-   <prog>      Dump program to use
-   <options>   Options to pass to sendbackup
-   <message>   Error or status message
-   <use>       Amount of diskspace to use on the holding disk given by
-              <filename>
-   <chunksize> Maximum size of a file on the given holding disk
-   <missing_size> Difference between the allocated space and the space
-                 actually used by a dumper when a DISK FULL occurs
-
-
-driver and taper
-================
-
-Driver talks via two pipes connected to taper's stdin and stdout.  The
-commands and responses are plain text.
-
-Driver initialises taper with:
-   START-TAPER <datestamp>
-to which taper replies with:
-   TAPER-OK
-or, for fatal errors, with:
-   TAPER-ERROR [<message>]
-
-Driver can ask taper to to copy a file from the holding disk to tape:
-   FILE-WRITE <handle> <filename> <host> <disk> <level>
-or directly from a dumper:
-   PORT-WRITE <handle> <host> <disk> <level>
-or exit at the end of the run:
-   QUIT
-
-Taper responds to the PORT-WRITE command with:
-   PORT <port>
-which driver should then hand on to dumper in a PORT-DUMP command.
-
-Taper responds to the QUIT command with:
-   QUITING
-
-If the copy to tape finishes correctly taper replies with:
-   DONE <handle> [<message>]
-
-If something goes wrong with the tape, taper can request that the dump be
-retried at a later time with:
-   TRY-AGAIN <handle> [<message>]
-or, for fatal errors, be abandoned with:
-   TAPE-ERROR <handle> [<message>]
-
-If driver says something that taper doesn't recognise it responds with:
-   BAD-COMMAND <message>
-
-Where:
-   <datestamp> Todays date as "yymmdd"
-   <handle>    Request ID
-   <filename>  Name of file (on holding disk) to write dump
-   <port>      Port (of taper) to send dump directly
-   <host>      Hostname of client
-   <disk>      Disk to backup
-   <level>     Dump level to do backup at
-   <message>   Error or status message
-
-
-taper(read) and taper(write)
-============================
-
-There are two parts to taper: the file reader and the tape writer.
-Communication between the two sides is via a bit of shared memory for data
-transfer and two pipes (one in each direction) for synchronisation.
-
-The shared memory area is made up of NBUFS (=20) buffers each of which
-contains a status word and a BUFFER_SIZE (=32*1024) byte data buffer.
-
-The sync pipes are used to transfer a simplistic command sequence:
-
-reader                              writer
-------                              ------
-
-Startup           S<datestamp> --->
-                               <--- S             Start OK
-                               <--- E<messge>     Error
-
-Open tape         O<datestamp><hostname><diskname><level>
-                              --->
-                               <--- O             Opening
-
-Write buffer      W<bufnum>    --->
-                               <--- R<bufnum>     Buffer empty
-                               <--- E<message>    Error
-                               <--- T<message>    Error, try again
-E ack             e            --->
-Protocol error    X            --->
-                               <--- x             X ack
-
-Close tape        C            --->
-                               <--- C<label><filenum><stats>  Closing
-
-Quit              Q            --->
-
-
-Multiple Holding Disks
-======================
-
-(This section was written by Peter Conrad <conrad@opus5.de>)
-
-Since amanda version x.x.x a single dump file may be spread across multiple
-holding disks. Some changes in the driver-dumper protocol have been introduced
-for this, as well as in the allocation of holding diskspace.
-
-1. Before the dump starts, an initial amount of holding diskspace is
-   allocated for the dump. The amount is based on the estimate for the
-   disk.
-2. If there is enough space available on the holding disks a list of holding
-   disks is created. For each holding disk to be used by the dumper, the
-   space to be used by this dumper and the chunksize of that holding disk
-   are noted (and, of course, the name of the holding disk).
-3. This list is turned into an array? of structures containing the values
-   found in step 2. The first set of values is sent to the dumper.
-4. A dumper is responsible for sticking to the given values:
-    - no file created by the dumper may be larger than the corresponding
-      chunksize
-    - on any given holding disk, no more than 'use' KBytes of diskspace may
-      be used.
-5. a) When all allocated diskspace has been used and the dump still hasn't
-      finished, the dumper may request more space from the driver. The driver
-      can either send a filename and additional size to be used, possibly on
-      a different hodling disk, or tell the dumper to abort the dump.
-   b) When the disk currently in use by the dumper runs full the dumper
-      will tell the driver about this situation. The driver will react like
-      in step a), but it will correct its notion of free diskspace.
-6. If the driver supplies another list of holding disks (not necessarily as
-   much as the dumper requested), the dumper interprets the given 'use' values
-   as *additional* diskspace it may use.
-   Continue at 4.
-
-The protocol between driver and taper didn't need to be modified, because
-each chunk of a dump contains the full pathname of the succeeding chunk.
-
diff --git a/docs/KERBEROS b/docs/KERBEROS
deleted file mode 100644 (file)
index b2c5204..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Amanda 2.4.0 - KERBEROS v4 SUPPORT NOTES
-
-Note that kerberos 5 isn't supported.  [yet]
-
-NOTE:  encrypted dumps are rumored not to work in the 2.4.0b4 beta 
-       release of amanda.  Hopefully they'll be fixed by the 2.4.0 
-       full release.
-
-0. GETTING THE SOURCE FILES
-
-The Kerberos-related Amanda source code is available in a separate,
-export restricted, package.  US sites can follow the instructions in
-KERBEROS.HOW-TO-GET on ftp.amanda.org in the /pub/amanda directory.
-
-1. CONFIGURATION
-
-The configure script defaults to:
-
-#  define SERVER_HOST_PRINCIPLE "amanda"
-#  define SERVER_HOST_INSTANCE  ""
-#  define SERVER_HOST_KEY_FILE  "/.amanda"
-
-#  define CLIENT_HOST_PRINCIPLE "rcmd"
-#  define CLIENT_HOST_INSTANCE  HOSTNAME_INSTANCE
-#  define CLIENT_HOST_KEY_FILE  KEYFILE
-
-#  define TICKET_LIFETIME       128
-
-you can override these with configure options if you so desire, with:
-
-    --with-server-principal=ARG    server host principal  [amanda]
-     --with-server-instance=ARG     server host instance   []
-     --with-server-keyfile=ARG      server host key file   [/.amanda]
-     --with-client-principal=ARG    client host principal  [rcmd]
-     --with-client-instance=ARG     client host instance   [HOSTNAME_INSTANCE]
-     --with-client-keyfile=ARG      client host key file   [KEYFILE]
-     --with-ticket-lifetime=ARG     ticket lifetime        [128]
-
-The configure script will automatically include kerberos if you
-followed the directions in step 0.  It'll search under /usr/kerberos/lib,
-/usr/cygnus/lib, /usr/lib, and /opt/kerberos/lib for libkrb.a.
-(in that order) for the kerberos bits.  If it finds them, kerberos
-support will be added in, if it doesn't, it won't.  If the kerberos
-bits are found under some other hierarchy, you can specify this
-via the --with-krb4=DIR, where DIR is where the kerberos bits live.
-It'll look under the 'lib' directory under this hierarchy for
-libkrb.a.
-
-2. INSTALLATION
-
-The kerberized Amanda service uses a different port on the client hosts.
-The /etc/services line is:
-
-    kamanda      10081/udp
-
-And the /etc/inetd.conf line is:
-
-    kamanda dgram udp wait root /usr/local/libexec/amanda/amandad amandad -krb4
-
-Note that you're running this as root, rather than as your dump user.
-Amanda will set it's uid down to the dump user at times it doesn't need
-to read the srvtab file, and give up root permissions entirely before
-it goes off and runs dump.  Alternately you can change your srvtab files
-to be readable by user amanda.
-
-3. CONF FILE
-
-With KRB4_SECURITY defined, there are two new dumptype options:
-
-       krb4-auth       use krb4 auth for this host 
-                       (you can mingle krb hosts & bsd .rhosts in one conf)
-       kencrypt        encrypt this filesystem over the net using the krb4
-                       session key.  About 2x slower.  Good for those root
-                       partitions containing your keyfiles.  Don't want to
-                       give away the keys to an ethernet sniffer!
diff --git a/docs/LABEL.PRINTING b/docs/LABEL.PRINTING
deleted file mode 100644 (file)
index 3d91fdb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-New Feature
------------
-Amanda now has the ability to print postscript paper tape labels.  The
-labels have what machines, partitions, and the level of the dump the
-tape has on it.  This is achieved by adding the lbl-templ field to the
-tapetype definition. Since the labels are specific to the type of tape
-you have, that seemed to most logical place to add it.
-
-You can also specify an alternate "printer" definition to print the
-label to other than the system default printer.
-
-If you don't add this line to your tapetype definition, amanda works
-as it always has.
-
-Labels provided
----------------
-The author has provided label templates for the following tape types.
-These are pretty generic labels, and should be easy to customize for
-other tape types. Others are encouraged to do so.
-
-exabyte 8mm tapes
-dat 4mm tapes
-DLT tapes (in progress).
-
-
-History
--------
-At the University of Colorado at Boulder, we used to use some dump scripts
-that printed out paper tape labels that went with the tape. When we started
-using amanda for our dumps, my boss insisted we still generate them, in
-case we weren't able to access the amanda database. The thought was that
-as long as we had an amrestore binary on a machine, we could just look at
-the label, grab the tapes, and do the restore.
-
-As a result of this we have had to hack this feature into every
-version of amanda from 2.1.1 through 2.4.0-prerelease.
-
-Our hope in adding this feature is that others find it as useful as
-we have.
-
-How it works
-------------
-The majority of the changes are in reporter.c. Just as you might run
-the reporter by itself to see what the report will (or did) look like
-with a logfile. When the reporter prints out the report, the postscript
-label template is copied, and the successful machines, partitions, and
-dump levels are appended to this. The output either goes to
-/tmp/reporter.out.ps (when running in testing mode) or through a pipe
-to the printer (default printer, if an alternate "printer" is not
-specified).
-
diff --git a/docs/MULTITAPE b/docs/MULTITAPE
deleted file mode 100644 (file)
index 5475968..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-
-MULTITAPE SUPPORT IN AMANDA 2.2
-
-Draft 1 - jds 3/29/94
-
-1. INTRODUCTION
-
-The goal of this enhancement is to make Amanda independent of the number of
-tapes used per run or even per dump cycle.  Specifically, I would like
-amanda to handle the following:
-
-       - output of amdump run goes to more than one tape
-       - a single dump file can straddle two tapes
-       - more than one amdump run can be done in a single day
-       - planner should not care how many runs per cycle occur
-
-And later:
-
-       - multiple runs of amdump can go onto one tape (eg an append mode)
-       - any dump files from a previous run that are on the holding disk
-         are written to tape in this run (eg eliminate amflush)
-       - taper write to multiple tape drives simultaneously
-
-
-2. NEW PLANNER ALGORITHM
-
-2.1 TIME
-
-Previously, planner marked time by the number of amdump runs, which it
-equated with number of tapes, and number of days.  In Amanda 2.2, amanda
-keeps track of the real passage of time, and doesn't generally care about
-the number of runs or tapes between any two events.
-
-While Amanda 2.2 doesn't care about spacing between runs, dump cycles are
-still in terms of days, to make things easy to understand for the user.
-So, time differences are rounded to the nearest 24 hours:
-
-       days_diff(A,B) = (<B> - <A> + 86400/2) / 86400
-
-Where the times A and B are in seconds since the Unix epoch, and 86400 is
-the number of seconds per day.  This rounds a 2.49 day difference down to 2
-days, and a 2.5 day difference up to 3 days.  No, Olafur, Unix time does
-not handle leap seconds.  Give me a break. :-)
-
-2.2 FULL BACKUPS
-
-The first thing planner does is calculate when each filesystem is due for a
-full backup.  This is trivial for normal backups:
-
-       full_is_due = days_diff(<time of last full>, <curtime>) >= dumpcycle
-
-There is a complication for "skip-full" filesystems.  Under 2.2, these will
-be skipped on any runs that occur on the day the full is due, but we have
-to do the right thing if multiple runs are done that day, and if no runs
-are done that day (in which case we should be doing an incremental).  Also,
-the time of last full dump is a fiction maintained by the planner -- Amanda
-has no way to tell whether the full backup was actually done or when it was
-done:
-
-       if(skip-full) {
-               if(full_is_due)
-                       <time of last full> += dumpcycle;
-               if(days_diff(<time of last full>, <curtime>) == 0)
-                       skip the filesystem on this run;
-               else
-                       do an incremental dump of this filesystem;
-       }
-
-
-2.3 SCHEDULE BALANCING
-
-The "runtapes" parameter tells planner how many tapes it should plan to use
-each run.  It multiplies this by the tape length to get the size available
-for the run.  (NOTE: later amend this size if appending to tapes, or if
-there are dumps on the holding disk waiting to be flushed).  Other than the
-size calculation, planner doesn't really care how many tapes will be
-written to.
-
-The fundamental problem with attempting to balance the schedule is that we
-no longer know how many amdump runs will be done in a full cycle.  The
-number may change from cycle to cycle if there are extenuating
-circumstances.
-
-So, planner must guess at how many runs will be done in one cycle, by
-looking at the information for the last cycle, or, if this is the first
-cycle, assuming one run for each day in the dump cycle.
-
-2.4 OVERWRITE DETECTION
-
-When can a tape be overwritten, considering that it might have old dumps on
-it?  We want to be able to warn when full dumps are going to be
-overwritten, but given the possibility of old files on the tape, how can we
-know when the tape is no longer needed?  I think we can get this when going
-through the info file, considering each full dump and what tape it is on.
-Make sure we correctly handle stale information.
-
-
-3. TAPER ALGORITHM
-
-3.1 CHOOSING A TAPE
-
-Taper must now handle writing to multiple tapes in one night, but choosing
-the tapes from the tape rack is done one at a time as needed, re-applying
-the same algorithm each time (see TAPE.CHANGERS).
-
-3.2 END OF TAPE HANDLING
-
-As in earlier versions of Amanda, Taper itself does not try to restrict
-writing to the tape size given in the config file.  It relied on planner
-having correctly estimated backup sizes and limiting itself to what would
-fit on one tape.
-
-Now, Taper needs to switch to a new tape when the current tape has filled
-up.  The tape is considered full when taper gets a write error.  This will
-most likely occur in the middle of writing a (potentially large) backup
-file, perhaps even from a direct-to-tape socket, so there is no possibility
-of starting the backup file over again on the next tape, it must start from
-where it left off, rewriting the block that got the error on the next tape.
-
-To insure correct operation, the file header of the continued file should
-contain an indication that it is a continuation, and at what offset.
-amrestore of course needs to be aware of this scheme and handle it
-correctly, perhaps by double-buffering internally.  XXX provide more alg
-details here, or just leave it with the general idea?
-
-3.3 TAPE FORMAT CHANGES
-
-We need to specify the sequence number of the tape in the run,  in the tape
-header file.  The file header block specifies whether it is a continuation
-file or not.
-
-3.4 TAPELIST FILE CHANGES
-
-The lines in the tapelist file should contain the sequence number of the
-tape in its run, as well as the amount of data written on the tape, and
-perhaps whether or not the end of tape was reached.
index 8a18ed314c2873b73e5a8271102eba9fd11f1f23..f0ebcdff2be027ec5351210ffb45744580a49687 100644 (file)
@@ -1,31 +1,75 @@
 ## Process this file with automake to produce Makefile.in
 pkgdata_DATA = \
-       DUMPER-API              \
-       EXCLUDE                 \
-       FAQ                     \
-       HOWTO-AFS               \
-       HOWTO-CYGWIN.html       \
-       HOWTO-FILE-DRIVER       \
-       INDEXING                \
-       INSTALL                 \
-       INTERNALS               \
-       KERBEROS                \
-       LABEL.PRINTING          \
-       MULTITAPE               \
-       PORT.USAGE              \
-       RAIT                    \
-       RESTORE                 \
-       SAMBA                   \
-       SECURITY                \
-       SYSTEM.NOTES            \
-       TAPE.CHANGERS           \
-       TAPETYPES               \
-       UPGRADE                 \
-       VTAPE-API               \
-       WHATS.NEW               \
-       WISHLIST                \
-       YEAR2000                \
-       ZFTAPE                  \
-       chg-scsi.notes
+       amadmin.8.txt \
+       amanda.8.txt \
+       amcheck.8.txt \
+       amcheckdb.8.txt \
+       amcleanup.8.txt \
+       amdd.8.txt \
+       amdump.8.txt \
+       amflush.8.txt \
+       amgetconf.8.txt \
+       amlabel.8.txt \
+       ammt.8.txt \
+       amoverview.8.txt \
+       amplot.8.txt \
+       amrecover.8.txt \
+       amreport.8.txt \
+       amrestore.8.txt \
+       amrmtape.8.txt \
+       amstatus.8.txt \
+       amtape.8.txt \
+       amtapetype.8.txt \
+       amtoc.8.txt \
+       amverify.8.txt \
+       amverifyrun.8.txt \
+       chgscsi.txt \
+       dumperapi.txt \
+       eventapi.txt \
+       exclude.txt \
+       faq.txt \
+       historical.txt \
+       howto-afs.txt \
+       howto-cygwin.txt \
+       howto-filedriver.txt \
+       howtos.txt \
+       index.txt \
+       indexing.txt \
+       install.txt \
+       internals.txt \
+       introduction.txt \
+       ix01.txt \
+       kerberos.txt \
+       labelprinting.txt \
+       links.txt \
+       manpages.txt \
+       multitape.txt \
+       portusage.txt \
+       pr01.txt \
+       pr02.txt \
+       pr03.txt \
+       pr04.txt \
+       rait.txt \
+       references.txt \
+       restore.txt \
+       samba.txt \
+       security-api.txt \
+       security.txt \
+       strategy-api.txt \
+       survey.txt \
+       systemnotes.txt \
+       tapechangers.txt \
+       tapesnchangers.txt \
+       tapetypes.txt \
+       technical.txt \
+       topten.txt \
+       upgrade.txt \
+       using.txt \
+       various.txt \
+       vtape-api.txt \
+       whatwasnew.txt \
+       wishlist.txt \
+       y2k.txt \
+       zftape.txt
 
 EXTRA_DIST = $(pkgdata_DATA)
index 9590c7080f75819d5b19084912964ad6cfb36036..b7a9185f083db3cbaf33a91aa76077237a7aabda 100644 (file)
@@ -36,7 +36,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 host_triplet = @host@
 subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
        $(top_srcdir)/configure.in
@@ -240,33 +240,77 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 pkgdata_DATA = \
-       DUMPER-API              \
-       EXCLUDE                 \
-       FAQ                     \
-       HOWTO-AFS               \
-       HOWTO-CYGWIN.html       \
-       HOWTO-FILE-DRIVER       \
-       INDEXING                \
-       INSTALL                 \
-       INTERNALS               \
-       KERBEROS                \
-       LABEL.PRINTING          \
-       MULTITAPE               \
-       PORT.USAGE              \
-       RAIT                    \
-       RESTORE                 \
-       SAMBA                   \
-       SECURITY                \
-       SYSTEM.NOTES            \
-       TAPE.CHANGERS           \
-       TAPETYPES               \
-       UPGRADE                 \
-       VTAPE-API               \
-       WHATS.NEW               \
-       WISHLIST                \
-       YEAR2000                \
-       ZFTAPE                  \
-       chg-scsi.notes
+       amadmin.8.txt \
+       amanda.8.txt \
+       amcheck.8.txt \
+       amcheckdb.8.txt \
+       amcleanup.8.txt \
+       amdd.8.txt \
+       amdump.8.txt \
+       amflush.8.txt \
+       amgetconf.8.txt \
+       amlabel.8.txt \
+       ammt.8.txt \
+       amoverview.8.txt \
+       amplot.8.txt \
+       amrecover.8.txt \
+       amreport.8.txt \
+       amrestore.8.txt \
+       amrmtape.8.txt \
+       amstatus.8.txt \
+       amtape.8.txt \
+       amtapetype.8.txt \
+       amtoc.8.txt \
+       amverify.8.txt \
+       amverifyrun.8.txt \
+       chgscsi.txt \
+       dumperapi.txt \
+       eventapi.txt \
+       exclude.txt \
+       faq.txt \
+       historical.txt \
+       howto-afs.txt \
+       howto-cygwin.txt \
+       howto-filedriver.txt \
+       howtos.txt \
+       index.txt \
+       indexing.txt \
+       install.txt \
+       internals.txt \
+       introduction.txt \
+       ix01.txt \
+       kerberos.txt \
+       labelprinting.txt \
+       links.txt \
+       manpages.txt \
+       multitape.txt \
+       portusage.txt \
+       pr01.txt \
+       pr02.txt \
+       pr03.txt \
+       pr04.txt \
+       rait.txt \
+       references.txt \
+       restore.txt \
+       samba.txt \
+       security-api.txt \
+       security.txt \
+       strategy-api.txt \
+       survey.txt \
+       systemnotes.txt \
+       tapechangers.txt \
+       tapesnchangers.txt \
+       tapetypes.txt \
+       technical.txt \
+       topten.txt \
+       upgrade.txt \
+       using.txt \
+       various.txt \
+       vtape-api.txt \
+       whatwasnew.txt \
+       wishlist.txt \
+       y2k.txt \
+       zftape.txt
 
 EXTRA_DIST = $(pkgdata_DATA)
 all: all-am
diff --git a/docs/PORT.USAGE b/docs/PORT.USAGE
deleted file mode 100644 (file)
index 70ae277..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-=================================
-How Amanda uses UDP and TCP ports
-
-John R. Jackson (jrj@purdue.edu)
-8-Aug-2001
-=================================
-
-Amanda uses both UDP and TCP ports during its operation.  The amandad
-service is listening (via inetd/xinetd) at a well known (fixed) port on
-each client for UDP connections.  The amindexd and amidxtaped services
-are listening (also via inetd/xinetd) at well known ports on the tape
-server for TCP connections.
-
-When a process on the tape server wants to talk to a client, it creates
-a UDP socket and binds it to a port on its side, then sends the packet
-to the well known amandad service port on the client.  Because security
-information is passed, the port bound on the connecting (tape server)
-side must be privileged (less than 1024).  This "proves" to amandad
-whoever is connecting is running as root, and therefor is trustworthy
-(there are all sorts of issues with the validity of this "trust" that
-are beyond the scope of this document).
-
-A similar sequence of events happens when amrecover on a client wants
-to contact amindexd or amidxtaped on the tape server.  The port that
-amrecover binds to its TCP socket must be privileged, which is one of
-the reasons it must be run as root.
-
-Amanda also uses TCP connections for transmitting the backup image,
-messages and (optionally) the index list from a client back to the dumper
-process on the tape server.  A process called sendbackup is started by
-amandad on the client.  It creates two (or three, if indexing is enabled)
-TCP sockets and sends their port numbers back to dumper in a UDP message.
-Then dumper creates and binds TCP sockets on its side and connects to
-the waiting sendbackup.
-
-Because sendbackup does not run as root on the client, it cannot allocate
-privileged TCP ports to listen on.  The dumper process is setuid root
-and could bind privileged ports on its side (it currently does not),
-but because sendbackup does not care what port connects back to it (it
-assumes the only process that could have knowledge of the port numbers
-to use is dumper), it does not check the peer (connecting) port number.
-
-===================
-TCP port allocation
-===================
-
-When Amanda creates a TCP server socket to listen for incoming connections
-(sendbackup), it goes through the following bind steps:
-
-  * try for the user TCP port range (--with-tcpportrange), if defined.
-    If that fails ...
-
-  * try for a privileged port (512 .. 1023).  If that fails ...
-
-  * get any available port.
-
-This sequence is implemented in stream_server().
-
-When Amanda (dumper) creates an unprivileged TCP client socket to connect
-to a server, it goes through the following bind steps:
-
-  * try for the user TCP port range (--with-tcpportrange), if defined.
-    If that fails ...
-
-  * get any available port.
-
-This sequence is implemented in stream_client().
-
-When Amanda (amrecover) creates a privileged TCP client socket to connect
-to a server, it goes through the following bind step:
-
-  * try for a privileged port (512 .. 1023).  If that fails, the whole
-    request is aborted.
-
-This sequence is implemented in stream_client_privileged().
-
-The stream_server() routine is used in two ways:
-
-  * taper to set up direct to tape communication with dumper on localhost.
-
-    If a user TCP port range is defined, it needs to be unprivileged
-    because taper is not running as root.
-
-  * sendbackup to set up a transfer with its dumper.
-
-    If a user TCP port range (--with-tcpportrange) is defined, it needs
-    to be unprivileged because sendbackup is not running as root.
-
-    A user TCP port range needs to be large enough for three ports
-    (data, message and index) times the number of simultaneous backups
-    the client may be asked to perform ("maxdumps" in amanda.conf).
-
-The stream_client() routine is used in two ways:
-
-  * dumper to connect to taper for a direct to tape operation.  Except
-    for making sure what is connecting is not (ftp) port 20 (a common
-    attack entry point), taper does not pay any attention to the source
-    (dumper) port number.
-
-  * dumper to connect to sendbackup on a client.  Again, except for
-    port 20, sendbackup does not care what port the request comes from.
-
-    If a user TCP port range (--with-tcpportrange) is defined, it needs to
-    be unprivileged because dumper is not running as root (at this point).
-
-    A user TCP port range needs to be large enough for two ports (one
-    to sendbackup on the client, and possibly one to taper) times the
-    number of dumpers ("inparallel" in amanda.conf).
-
-The stream_client_privileged() routine is used in one way:
-
-  * amrecover to connect to amindexd and amidxtaped.
-
-    Because security information is passed, amindexd/amidxtaped (via
-    security_ok() in security.c) insist the other end (amrecover) be
-    bound to a privileged port.
-
-=================================================
-User TCP port range (--with-tcpportrange) summary
-=================================================
-
-Pick the max of (2 * inparallel) and (3 * largest maxdumps).  Allocate
-at least that many ports in the unprivileged (1024 or larger) range.
-Stay away from other well known ports (e.g. in your /etc/services file)
-or account for their potential use by making the portrange larger.
-
-===================
-UDP port allocation
-===================
-
-When Amanda creates a UDP socket, the same order of assignment as above
-is used by dgram_bind():
-
-  * try for the user UDP port range (--with-udpportrange), if defined.
-    If that fails ...
-
-  * try for a privileged port (512 .. 1023).  If that fails ...
-
-  * get any available port.
-
-The dgram_bind() routine is called from three places, amcheck, planner
-and dumper.  In each case, a connection to amandad on a client is being
-set up.  Amandad, in turn, calls security_ok(), which insists the other
-end of the connection be a privileged port, so a user UDP port range
-(--with-udpportrange) must specify privileged port numbers.
-
-A user UDP port range must allow for one port for each client that
-might be contacted at a time.  Planner and amcheck use a single socket
-to contact all their clients, but there may be multiple dumpers (based
-on "inparallel" in amanda.conf) and each needs its own port.
-
-=================================================
-User UDP port range (--with-udpportrange) summary
-=================================================
-
-Allocate at least "inparallel" many ports in the privileged (1023 or
-smaller) range.  Stay away from other well known ports (e.g. in your
-/etc/services file) or account for their potential use by making the
-portrange larger.
-
-=================
-Firewalls and NAT
-=================
-
-I'm not familiar with firewalls or NAT -- one of the benefits of working
-in a University environment :-).  So the following is likely to be
-completely wrong, but I have tried to get the advice of folks who do
-really understand this stuff.
-
-Firewalls and Amanda should be pretty easy to set up.  Just pick user
-UDP and TCP port ranges, build Amanda with them (--with-udpportrange and
---with-tcpportrange) and let them through the firewall.  You also need to
-let the well known Amanda ports through, just as you would ftp or telnet.
-
-NAT has other issues.  If the Amanda client is "outside" NAT, there
-should not be a problem for backups.  Sendbackup will set up the ports
-and tell dumper what they are.  Then dumper will connect to them from
-"inside" and NAT should leave that alone, although it doesn't really
-matter since sendbackup does not care who connects to it (other than it
-not be ftp port 20).
-
-If the Amanda tape server is outside, NAT will have to be told how to
-translate the incoming connections from dumper to the client.  To do
-that, the UDP and TCP port ranges will have to be known and only one
-client can be inside.
-
-The reverse is true for amrecover.  If amrecover is run from inside NAT,
-there should not be a problem -- it's just like running ftp or telnet.
-But from the outside, NAT will have to know where the amindexd/amidxtaped
-services are and allow them through (much like ftp or telnet daemons).
-Since they are on known port numbers, the user TCP port range is not
-an issue.
-
-A user TCP port range is probably not important in the case of dumper
-and taper talking to each other since only the one machine (localhost)
-is involved and so it does not go through a firewall.  But I could be
-wrong, especially if NAT is involved.
-
-The details of how you configure a specific firewall or NAT are beyond the
-scope of this document (although examples would be welcome).  You need
-to read up on the documentation that comes with them.
diff --git a/docs/RAIT b/docs/RAIT
deleted file mode 100644 (file)
index f9a3869..0000000
--- a/docs/RAIT
+++ /dev/null
@@ -1,109 +0,0 @@
-RAIT (Redundant Array of Inexpensive Tape) Support
-
-Author: Marc Mengel<mengel@fnal.gov>.  
-
-Currently it is only integrated with the chg-manual changer script; 
-collaboration on integrating it with the other tape changers is needed. 
-
-What is a RAIT?
-
-RAIT is an acronym for Redundant Array of Inexpensive Tapes, where
-data is striped over several tape drives, with one drive writing 
-an exclusive-or-sum of the others which can be used for error
-recovery.  Any one of the data streams can be lost, and the data
-can still be recovered.  
-
-This means that a 3-drive RAIT set will
-write 2 "data" streams and one "parity" stream, and give you
-twice the capacity, twice the throughput, and the square of the 
-failure rate (i.e. a 1/100 failure rate becomes 1/10,000, since
-a double-tape failure is required to lose data).
-
-Similarly, a 5-drive RAIT set will give you 4 times the capacity,
-4 times the throughput (with sufficient bus bandwidth), and 
-the square of the failure rate.
-
-This means you can back up partitions as large as four times your tape 
-size with amanda, with higher reliability and speed.
-
-Using a RAIT:
-
-If you have several tape devices on your system you tell amanda to use 
-them as a RAIT by listing them as a single tape device using /bin/csh 
-curly-brace-and-comma notation, as in:
-       +------------------------------------
-       | tapedev = "rait:/dev/rmt/tps0d{4,5,6}n"
-       +------------------------------------
-which means that /dev/rmt/tps0d4n, /dev/rmt/tps0d5n, and /dev/rmt/tps0d6n
-are to be treated as a RAIT set.  You can now mount three tapes, and
-label them with amlabel, etc.
-
-
-Also, you want to create a new tape-type entry, which lists an n-drive
-RAIT set, for this RAIT-set.  So if you were using an entry like:
-       +------------------------------------
-       | define tapetype EXB-8500 {
-       |     comment "Exabyte EXB-8500 drive on decent machine"
-       |     length 4200 mbytes
-       |     filemark 48 kbytes
-       |     speed 474 kbytes
-       | }
-       +------------------------------------
-You would want to make a new one like:
-       +------------------------------------
-       | define tapetype EXB-8500x3 {
-       |     comment "Exabyte EXB-8500 3 drive stripe on decent machine"
-       |     length 8400 mbytes
-       |     filemark 200 kbytes
-       |     speed 948 kbytes
-       | }
-       +------------------------------------
-and change your tapetype entry to:
-       +------------------------------------
-       | tapetype EXB-8500x3
-       +------------------------------------
-To tell amanda about the multiple drive set.
-
-To use other than 3 or 5 tape RAIT sets, you need to change the blocksize
-in the tapetype to be divisble by the number of data stripes in your
-RAIT set (i.e. the number of devices minus one).
-
-Blocksizes and Performance:
-
-For better performance, and to get more flexibility with tape stripes,
-you want to build amanda with a very large maxtapeblocksize, something
-like:
-    ./configure --with-maxtapeblocksize=640
-Then you can do something like:
-       +------------------------------------
-       | tapedev = "rait:/dev/rmt/tps0d{4,5,6,7}n"
-       ...
-       | tapetype DLT7000x4
-       ...
-       | define tapetype DLT700x4 {
-       |     comment "Exabyte DLT 4 drive stripe on decent machine"
-       |     length 115167 mbytes
-       |     filemark 120 kbytes
-       |     speed 4482 kbytes
-       |     blocksize 384 kbytes
-       | }
-       +------------------------------------
-which will give you 128k physical blocks on the tape; more generally for
-an n-tape stripe, you want (n-1)*32 kbytes for a tape that likes
-32k physical blocks, or (n-1)*128 kbytes for a tape that likes
-bigger blocks.
-
-Hardware Compression:
-the last stripe is the xor stripe, it is likely to compress poorly
-relative to the other data stripes if you use hardware compression.
-
-Disaster Recovery:
-
-To assist in disaster recovery (as well as changer scripts) the 
-amanda package now also includes "amdd", which is a simple dd(1)
-replacement which supports (only) the "if=xxx", "of=xxx", "bs=nnn[kMb]"
-"skip=nnn" and "count=nnn" options, but which can read and write RAIT 
-tapesets.
-
-Using amdd and your usual amanda unpack instructions will suffice
-for disaster recovery from RAIT tape-sets.
diff --git a/docs/RESTORE b/docs/RESTORE
deleted file mode 100644 (file)
index 12c2464..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-This document was originally written by Daniel Moore
-<dmoore@jeffco.k12.co.us>, on Jan 12, 1998.  Substantially rewritten by
-Alexandre Oliva <oliva@dcc.unicamp.br>.  Additional corrections and
-additions from Murf <jam@philabs.research.philips.com> and Ralf Fassel
-<ralf@atg.venture.de>.  It describes how to restore files backed up with
-amanda either with or without amanda tools. 
-
-All these cases assume you're trying to restore a complete disk, that
-is, you've replaced the lost disk with a new one, or created a new
-filesystem on it.  Tweaking with the arguments to restore (not
-amrestore), you will be able to restore individual files.
-
-Also, this text does not cover amrecover, a program that provides a
-text user interface similar to interactive restore (restore -i), but
-it allows you to select individual files to recover and automatically
-determines the tapes where they were stored.  The backups must be
-performed with the `index' option enabled for this to work.
-
-I considered 6 cases.
-1)  Client machine fails, non-system critical.
-2)  Client machine fails, system critical disk.
-3)  Server machine fails, non-system critical, non-amanda disk.
-4)  Server machine fails, system critical, non-amanda disk.
-5)  Server machine fails, non-system critical, amanda disk, with db.
-6)  Server machine fails, non-system critical, amanda disk, with binaries.
-
-The server machine (machine Aaron) is solaris, the client machine 
-(machine Barney) is sunos.
-
-Cases:
-
-1)  Client machine fails, non-system critical. 
-Example: /home fails on Barney.
-
-First, use amadmin to find the tapes most recently used to backup the 
-partition.
-
-amadmin <config> info Barney '/home$'
-
-Current info for Barney /home:
-  Stats: dump rates (kps), Full:   41.1,  33.1,  38.8
-                    Incremental:    9.5,   2.1,  24.7
-          compressed size, Full:  63.1%, 54.0%, 52.9%
-                    Incremental:  43.7%, 15.5%, 47.8%
-  Dumps: lev datestmp  tape             file   origK   compK secs
-          0  19971223  Barney01           16  329947  208032 5060
-          1  19980108  Barney16            8    1977     864   91
-          2  19971222  Barney06            7    1874     672   83
-          3  19970926  Barney03           11   12273    3040  211
-
-This tells us that we will need two tapes to do a full restore
-(Barney01, Barney16).  Note that, even if Barney06 and Barney03 are
-listed, they are actually older than the full backup, so they should
-not be used to restore any data.
-
-Log into Barney.  Cd to the /home directory.  Insert the tape with the 
-level 0 dump on it into the tape drive of Aaron.
-
-Become super-user in the client host and run (replace <amanda> with
-the username under which amanda runs):
-
-rsh -n -l <amanda> Aaron amrestore -p /dev/rmt/0cn Barney '/home\$' |
-restore -ivbf 2 -
-
-This requires client root to have login access to <amanda>@Aaron, with
-a .rhosts entry (.amandahosts won't do).  If you use ssh, you may be
-able to type a password in order to be authenticated.  Another
-alternative is to start the operation in the server, and rsh to the
-client.  You should be the amanda user or root in the tape server and run:
-
-amrestore -p /dev/rmt/0cn Barney '/home$' |
-rsh Barney -l root /usr/etc/restore -ivbf 2 -
-
-If you don't want to use rsh at all, you may run:
-
-amrestore /dev/rmt/0cn Barney '/home$'
-
-This should create a file whose name contains the hostname, directory
-name, dump level and dump date of the backup.  Now you have to move
-this file to the client somehow: you may use NFS, rcp, ftp, floppy
-disks :-), whatever.  Suppose you rename that file to `home.0'.  Then,
-on the client, you should become root and run:
-
-restore -ivbf 2 home.0
-
-Repeat one of these steps, incrementing the level of the dump, until
-there are no more available backups.
-
-
-2)  Client machine fails, system critical disk.
-Example: / fails on Barney.
-
-First of all, boot off the CD, and reinstall the system critical
-partition, restoring it to vendor supplied state.  Then, go through all of
-Scenario 1. 
-
-
-3)  Server machine fails, non-system critical, non-amanda disk.
-
-Proceed just as described in Scenario 1.  However, you won't have to go 
-through the rsh process, because you can just use amrestore to 
-replace the lost data directly.
-
-
-4)  Server machine fails, system critical, non-amanda disk.
-Example: / on Aaron
-
-First of all, boot off the CD, and reinstall the system critical 
-partition, restoring it to vendor supplied state.
-
-Then, follow steps in Scenario 3.
-
-
-5)  Server machine fails, non-system critical, amanda disk, with db.
-An example: /opt on Aaron
-
-If the disk that the amanda database is toast, then you need to rebuild 
-the database.  The easiest way to do it is to take the text file that you 
-had mailed to you via the 'amadmin export' command, and import via the 
-'amadmin import' command.  Then you should be able to follow the steps 
-outlined in Scenario 4.
-
-Note that amanda does not mail the exported database automatically;
-you may add this to the crontab entry that runs amanda.
-
-Maybe it's a good idea to print out the text files as well and store the
-last 2 dumpcycles worth of paper (the disc text files might have got
-toasted as well).  From the paper you still are able to reconstruct where
-your discs are.
-
-
-6)  Server machine fails, non-system critical, amanda disk, with binaries.
-Example: /usr/local on Aaron
-
-This is where things get hairy.  If the disk with the amanda binaries on 
-it is toast, you have three options.  
-
-i) reinstall the amanda binaries from another tape, on which you have 
-conveniently backed up the binaries within the last couple of weeks (not 
-using amanda).
-
-ii) recompile amanda, making sure not to overwrite your db files.
-
-iii) use dd to read amanda formatted tapes.  This is the option I am 
-going to explore most fully, because this seems the most likely to occur.
-
-a) Find out the device name used by amanda, by looking in amanda.conf. 
-Turns out to be /dev/rmt/0cn for this system.
-
-If amanda.conf isn't at hand: this must be a non-rewinding tape device
-specifier (which I believe the trailing `n' stands for).
-
-b) Look over the copy of the output of 'amadmin <config> export', and find
-out which tapes /usr/local was backed up on.
-
-c) Grab the tapes that /opt was backed up on, and stick the level 0 into 
-the drive.  cd to /usr/local.
-
-d) Skip the first record, which is just the tape header, by using the
-appropriate tape command.
-
-mt -f /dev/rmt/0cn fsf 1
-
-e) Now you want to start looking for /usr/local on this tape.
-
-dd if=/dev/rmt/0cn bs=32k skip=1 | gzip -d | /usr/sbin/ufsrestore -ivf -
-This command gives us an interactive restore of this record, including
-telling us what partition, what host, and what level the backup was.  The
-gzip -d portion of the pipe can be omitted if there was no compression. 
-
-f) If you don't find /usr/local on the first try, quit ufsrestore, and move 
-forward one record.
-mt -f /dev/rmt/0cn fsf 1
-and try the dd/restore command shown above.  Do this until you find /opt 
-on the disk.
-
-Another possibility: quick and dirty tape index in case you don't know
-which partition /usr/local was on: (from ralf@atg.venture.de)
-
-#!/bin/sh
-TAPEDEV=</dev/nrtape>
-while mt -f $TAPEDEV fsf 1 ; do
-  dd if=$TAPEDEV bs=32k count=1 | head -1
-  sleep 1
-done
-
-Example output:
-AMANDA: FILE 19971220 uri /root-sun4 lev 1 comp .gz program DUMP
-AMANDA: FILE 19971220 uri /misc lev 1 comp .gz program DUMP
-AMANDA: FILE 19971220 uri / lev 1 comp .gz program DUMP
-
-g) Restore the amanda binaries (what else do you need??), and then bail 
-out of ufsrestore.  You can use amrestore, as in Scenario 3.
diff --git a/docs/SAMBA b/docs/SAMBA
deleted file mode 100644 (file)
index 1e3adee..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-Notes for adding PC hosts to the Amanda backup system.
-
-============
-Installation
-============
-
-Amanda is able to back up Microsoft Windows shared disks by using Samba,
-a package that implements a SMB client and server for Unix:
-
-  http://www.samba.org
-
-Releases from 1.9.18p5 up to 1.9.18p10 logged information in the tar
-files produced, making them unusable!  If you really must use a release
-prior to Samba 2.0.6, a patch that fixes the problem is available in
-the Amanda patches page:
-
-  http://www.amanda.org/patches.html
-
-Amanda no longer supports Samba releases prior to 1.9.18.  If you're
-using Samba from 1.9.18 through 1.9.18p3, make sure you don't set a low
-logging/debugging level in smb.conf.  This flag may prevent estimate
-sizes from printing correctly and Amanda will report an estimate failure.
-
-This problem may also occur if you have large (>2GB) shares with Samba
-prior to 2.0.4.  In this case, apply samba-largefs.patch from the Amanda
-patches page.
-
-After building and installing samba with the selected patches, Amanda
-must be configured with smbclient support.  Amanda will automatically
-find smbclient if it is in your PATH when you run configure, or you may
-add the following argument:
-
-  --with-smbclient=/full/path/to/smbclient
-
-=====
-Setup
-=====
-
-Once Amanda and Samba are installed, the only difference between a Unix
-client/disk and PC client/share is in how the backup disks are specified
-in the disklist file.  For each PC share, the entry lists the 'samba
-server' host (where the patched Samba software is installed) and the
-disk field is the share name.  The remaining fields are like any other
-disklist entry.
-
-A user must be created on the PC with full access rights (read/write)
-to the share.  Amanda, via the Samba server, will connect to the PC via
-this user.  If the user does not have full access, incremental backups
-will not work and the whole share will be backed up every time (Archive
-bits are never reset).
-
-File /etc/amandapass must be created by hand.  It contains share name
-to user name, password and workgroup mapping.  Each line consists of two
-or three whitespace separated fields:
-
-  * Share name followed by optional directory.
-  
-    Must use forward slashes (/), not backslashes (\).
-
-    Must match the disklist entry exactly (case sensitive).
-
-    May be asterisk (*) to match all remaining shares for this Samba
-    server.  The first match in the file is used, so specific entries
-    must be listed first.
-
-    The directory is appended to the share name as full M$ network path.
-    Like //thepc/c$/mydir . No blanks in directory!
-
-  * User name and password.
-
-    Separated by a percent sign (%).  See the description of the -U
-    option to smbclient.
-
-    No whitespace allowed in either the user name or password.
-
-  * Workgroup (optional).
-
-This file must be owned by the amanda user, and disallow world access
-privileges.  Blank lines are ignored.  A '#' on a line at the start of a
-field (including start of line) causes the rest of the line to be ignored.
-
-=======
-Example
-=======
-
-The Amanda client software and patched Samba is installed on host
-'pcserver'.  A share to be backed up called 'backupc' is on PC 'thepc'.
-The share will be accessed via PC user 'bozo' and password 'f00bar'
-and does not require a workgroup.
-
-The entry in the disklist file is:
-
-pcserver       //thepc/backupc         nocomp-user-gnutar
-
-^ samba installed unix host
-                ^ pc host and share name
-                                       ^ dumptype must include the tar option
-
-In /etc/amandapass on the machine 'pcserver':
-
-//thepc/backupc                bozo%f00bar
-
-If smbclient requires a workgroup specification (-W), you may add it as
-a third argument in /etc/amandapass line:
-
-//thepc/backupc                bozo%f00bar     NTGROUP
-
-This will cause smbclient to be invoked with -W NTGROUP.
-
-An example dumptype in amanda.conf would be:
-
-define dumptype nocomp-user-gnutar {
-    program "GNUTAR"
-    comment "user partitions dumped with tar and no compression"
-    options no-compress
-    priority medium
-}
-
-Essentially, the disklist entry is a 'pseudo-disk' which contains all the
-relevant information needed by the smbclient program to backup the disk,
-but in an Amanda compatible way.
-
-Amcheck does a quick check to see if smbclient exists and tries to connect
-to the PC clients.  It also checks for the existence and permissions of
-/etc/amandapass.
-
-==============
-Bugs and notes
-==============
-
-Samba will not back up open files (such as PAGEFILE.SYS and registry
-files) nor Access Control List data.  Furthermore, at restore time,
-smbclient is unable to overwrite read-only files.  Hence, Amanda+Samba is
-not a perfect solution for backing up (restoring, actually) system disks.
-
-Samba does not use the Windows Backup API, so configuring the Amanda
-backup user as a member of group backup on the Windows host is useless.
-You will probably have to configure it as an Administrator, and make
-sure it can read and change permission of *all* files in the share.
-
-It seems impossible to detect when a per-user based login fails, e.g. the
-username doesn't have sufficient access.  It connects but cannot see any
-files (e.g. backups do nothing).  The selfcheck code isn't particularly
-robust in this area either, so you may get no warnings when a disk isn't
-being backed up.  Just check to see that level 0 dumps are bigger than
-64K, otherwise it means the backup was empty.
-
-The estimate and totals are probably a bit off since tar pads to the
-nearest 512 bytes after each file (i think).  Not sure how much of a
-problem this is.
-
-Smbclient only supports excluding a single file from the command line,
-not a file of patterns like GNU tar.  So "exclude" is supported from a
-dumptype but not "exclude list".
-
-The size estimate calculation does not use the same method as the
-dump, so it may be inaccurate.  It also does not support any type of
-exclusion ("exclude" is ignored).  Things are done this way because
-doing a simulated dump to /dev/null, like other dump programs, would
-take forever with current implementations of Samba.
-
-If you compile with smbclient support, gnutar support is automatically
-enabled.  If you aren't using the gnutar part, you may get warnings
-about the availability of /usr/local/bin/gtar (or whatever it was
-compiled with).  These may safely be ignored, unless you enable index
-generation for those filesystems.
-
-Original text by:
-Michael Zucchi
-School of Computer and Information Science
-University of South Australia
-M.Zucchi@CIS.UniSA.Edu.Au
-
-Updated by:
-John R. Jackson
-Purdue University Computing Center
-jrj@purdue.edu
diff --git a/docs/SECURITY b/docs/SECURITY
deleted file mode 100644 (file)
index 2b7c735..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-AMANDA TEAM RESPONSE TO CPIO Security Notice Issue 11:
-
-The Amanda development team confirms the existence of the amrecover
-security hole in recent versions of Amanda.  We have made a new
-release, Amanda 2.4.0b5, that fixes the amrecover problem and other
-potential security holes, and is the product of a security audit
-conducted in conjunction with the OpenBSD effort.  The new version is
-available at:
-
-       ftp://ftp.amanda.org/pub/amanda/amanda-2.4.0b5.tar.gz
-
-Here's some more information about the amrecover problem to supplement the
-information given in the CPIO Security Notice:
-
-VERSIONS AFFECTED:
-
-The Amanda 2.3.0.x interim releases that introduced amrecover, and the
-2.4.0 beta releases by the Amanda team are vulnerable.  
-
-Amanda 2.3.0 and earlier UMD releases are not affected by this particular
-bug, as amrecover was not part of those releases.  However, earlier
-releases do have potential security problems and other bugs, so the Amanda
-Team recommends upgrading to the new release as soon as practicable.
-
-WORKAROUND:
-
-At an active site running Amanda 2.3.0.x or 2.4.0 beta, amrecover/amindexd
-can be disabled by:
-
-- removing amandaidx and amidxtape from /etc/inetd.conf
-
-- restarting inetd.conf (kill -HUP should do)
-
-This will avoid this particular vulnerability while continuing to run backups.
-However, other vulnerabilities might exist, so the Amanda Team recommends
-upgrading to the new release as soon as practicable.
-
-ACKNOWLEGMENTS:
-
-This release (2.4.0) has addressed a number of security concerns with
-the assistance of Theo de Raadt, Ejovi Nuwere and David Sacerdote of
-the OpenBSD project.  Thanks guys!  Any problems that remain are our
-own fault, of course.
-
-The Amanda Team would also like to thank the many other people who have
-contributed suggestions, patches, and new subsystems for Amanda.  We're
-grateful for any contribution that helps us achieve and sustain critical
-mass for improving Amanda.
diff --git a/docs/SYSTEM.NOTES b/docs/SYSTEM.NOTES
deleted file mode 100644 (file)
index a8277f7..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-Amanda 2.4 - System-Specific Installation Notes
-
-Please read the notes that correspond to the architectures you are
-installing for.  If you find additional gotchas, or anything incorrect
-in these notes, please send your updates to amanda-hackers@amanda.org,
-after checking that they are not known/fixed problems in the amanda
-patches page: http://www.amanda.org/patches.html
-
----------------------------------------------------------------------------
-Solaris 2.6
------------
-
-You may have compilation errors on statfs.c if you're running, on a
-Solaris 2.6 host, a gcc that was not build on a Solaris 2.6 host.
-This happens because gcc stores fixed copies of some Solaris header
-files on an internal directory.  You must rebuild gcc if you get this
-kind of trouble.  Note, however, that gcc 2.7.2.3 does not support
-Solaris 2.6, you should upgrade to 2.8.0 or higher, or egcs.
-
----------------------------------------------------------------------------
-Trusted Solaris
----------------
-
-According to Julian Stevens <julian.stevens@baedsl.co.uk>, the format
-of inetd.conf on Trusted Solaris 1.2 is a bit different.  Just before
-the user name, you should insert the word `untrusted':
-
-amanda dgram udp wait untrusted amuser /usr/local/libexec/amandad amandad
-
-The patch-system script is *NOT* aware of this detail; you must fix it
-yourself.
-
----------------------------------------------------------------------------
-SunOS 4.x
----------
-
-A bug in GNU tar 1.12 causes it to miscalculate (in fact, to
-misreport) the size of filesystems.  A patch for GNU tar is available
-in the patches directory.
-
----------------------------------------------------------------------------
-Ultrix
-------
-
-The Ultrix dump program contains an explicit check that it is being
-run by root.  This defeats the usual practice of a non-root "operator"
-userid for dumps.  For this reason, the rundump program (a setuid-root
-wrapper for dump) is enabled by default.  If you find rundump is not
-necessary for you, just configure --without-rundump.
-
-
-The Ultrix restore program will fail if it is not connected to a tty.
-Since the restore program is invoked in the clients in order to create
-index files, and it the client is not connected to a tty, index
-creation will fail.  Using GNUTAR instead of DUMP is an option.
-Thanks to Edwin Wiles <ewiles@mclean.sterling.com> for the
-investigation.  Another alternative proposed by Martyn Johnson
-<Martyn.Johnson@cl.cam.ac.uk> is to use a modified restore program:
-use a binary program editor and replace `/dev/tty' with `/dev/nul',
-for instance, and link /dev/nul to /dev/null.  Note that the chosen
-file name must be exactly 8 bytes long, otherwise you'll break the
-restore program.  A nice one-liner perl script by Martyn Johnson will
-do the trick (make sure you preserve a copy of the original restore
-program, it will be rewritten by running this script!):
-
-perl -pi -e 'BEGIN { $/ = "/dev/tty" } s-$/-/dev/nul-' restore
-
-
-The Ultrix C compiler seems to be too broken to compile Amanda.  You
-are likely to need gcc or egcs.
-
----------------------------------------------------------------------------
-HP/UX
------
-
-You may run into an internal /bin/sh limit when running the configure
-script.  The error message is:
-
-       ./configure: sh internal 2K buffer overflow
-
-Using /bin/posix/sh usually works around the problem.  Another
-solution is to install GNU bash and use it instead of /bin/sh.
-
-
-If `configure' complains about not finding `lex', you'll have to get
-`flex' installed.  Look for its URL in docs/INSTALL.
-
-
-If you use logical volumes, you may refer to mountpoints or full
-device pathnames instead of device names in the disk list file.
-
-
-According to Stan Brown <stanb@awod.com>, amverify won't work with
-HP/UX's stock `mt'.  The work-around is to install GNU cpio, that
-contains an implementation of `mt', and edit amverify so that MT
-points to GNU mt and MTOPT is `-f', or reconfigure and rebuild amanda
-from scratch, making sure it finds GNU mt before the stock mt in the
-PATH.
-
-
-If you have vxfs filesystems to back up, amanda will pick vxdump
-automatically.
-
-
-GNU tar 1.12 will incorrectly report the size of backups.  There's a
-patch in the patches directory that fixes this problem.
-
-
-The use of `amhpfixdevs' is deprecated, since you can list
-mount-points or full device names in the disklist.  The script may be
-removed in future releases of Amanda.
-
-
-Sometimes you may get the error message `Link severed' from an HP/UX
-client.  This is just a cute name the developers of HP/UX found for
-`Network error'.  Reported by Michael Brehl <mbr@condor.de>
-
----------------------------------------------------------------------------
-Linux
------
-
-Linux hosts intended to back up efs partitions with dump should
-install the dump package, as it is not installed by default on most
-Linux distributions.  It is possible to find compiled versions of dump
-on most Linux sites and CD-ROMs.
-
-Note, however, that DUMP for Linux has been quite unreliable,
-sometimes being unable to perform backups, producing weird error
-messages such as `master/slave protocol botched', and sometimes
-creating unrestorable dump images, especially of active filesystems.
-The first problem can sometimes be fixed by cleaning up outdated
-entries in /etc/dumpdates, but your best bet is probably GNU tar.
-
-
-Make sure the user that runs configure has permission to run the dump
-program, otherwise configure may misdetect an ability of dump to
-accept a -E (for estimates) switch.
-
-
-GNUtar 1.11.8, distributed with some Linux versions, will cause index
-failures (Index returned -1).  Upgrading to GNUtar 1.12 fixes this
-problem.  This is not a Linux-specific problem, but it is quite common
-in this platform.
-
-
-Amanda now supports the ftape driver version 3.04d.  It adjusts the
-blocksize automatically to 32k and supports QIC volume tables.  More
-details con be found in the file ZFTAPE in this directory.
-
-
-Some releases of dump for Linux, such as the one distributed with
-Debian 2.0, have modified dump so that it stores dumpdates in
-/var/lib.  If this is your case, you should create a link to it in
-/etc.  Suggested by David Wolfskill <dhw@whistle.com>
-
----------------------------------------------------------------------------
-Digital Unix 4
---------------
-
-According to Michael Galloway <mgx@spruce.lsd.ornl.gov>, the stock
-DUX4 dump is broken.  There is a patch available at
-ftp://ftp.service.digital.com/public/dunix/v4.0b/duv40bas00005-19970926.README
-
-
-When both dump and vdump are available, amanda will use vdump for
-backing up advfs filesystems only, and dump will be used for the rest.
-If you'd rather back up all filesystems with vdump, #undef DUMP in
-config/config.h after running configure.
-
-
-Unfortunately, the output of `dump -E' incorrectly matches a line of
-output from SAMBA, which gets Amanda's estimate process confused.
-client-src/sendsize.c will refuse to compile if both
-HAVE_DUMP_ESTIMATE and SAMBA_CLIENT are defined in config/config.h.
-Amanda will work correctly if you undefine HAVE_DUMP_ESTIMATE in
-config/config.h; if you prefer to have incorrect estimates for SAMBA
-backups, follow the instructions in sendsize.c on removing the
-compile-time error.
-
-
-According to Oren Laadan <orenl@cs.huji.ac.il>, DEC compiler version
-"DEC C V5.2-033 on Digital UNIX V4.0 (Rev. 564)" (obtained with "cc -V")
-does not build Amanda properly, in particular, taper.c.  Using gcc is OK.
-
----------------------------------------------------------------------------
-Sinix 5.43 (Reliant Unix)
--------------------------
-
-The use of `amsinixfixdevs' is deprecated, since you can list
-mount-points or full device names in the disklist.  The script may be
-removed in future releases of Amanda.
-
-Sinix port originally by Michael Schmitz <mschmitz@iname.com>.
-
----------------------------------------------------------------------------
-IRIX (all)
-----------
-
-When setting the tape device name in either amanda.conf or one of the
-changer configuration files, make sure you specify the "variable" device
-name, which has a 'v' on the end.  If not, IRIX will write 4KByte blocks
-instead of the 32KByte blocks Amanda tells it to.  This apparantly works
-OK unless you take the tape to a non-IRIX system, where amrestore will
-complain about a short (4096) read.
-
-If you do end up in this situation, the dd command to use to pipe into
-your system restore program is:
-
-    dd if=/dev/whatever bs=4k skip=8 | ...
-
-
-Jean-Francois Malouin <Jean-Francois.Malouin@bic.mni.mcgill.ca>
-reports that, if you are going to use an IRIX host as the tape server,
-you *must* patch your system with *all* kernel and scsi rollup
-patches, otherwise you may end up with useless tapes, due to tape
-rewinding after short periods of inactivity.  See
-http://www-viz.tamu.edu/~sgi-faq/ for more details.
-
-
-Some unpatched version of xfsdump are reported as not printing
-estimates.  This causes estimates to take much longer than they had
-to, because backups are always performed twice.  According to Mike
-Acar <mike@kentinfoworks.com>, patch 2333 for IRIX 5.3 and 6.1 will
-fix this problem.
-
----------------------------------------------------------------------------
-IRIX 6
-------
-
-Seems like SGI `make' program is a bit broken, in a way that causes it
-to rebuild some files if doesn't have to if you happen to run `make'
-again.  Using GNU make fixes this problem.
-
-
-If you have xfs filesystems to back up, amanda will pick xfsdump
-automatically.
-
-
----------------------------------------------------------------------------
-SCO
----
-
-Jens Krause <jens@transcom.de> has reported some problems with GNU tar
-1.12 on SCO Release 5.  Although the `sparse' files patch was applied,
-GNU tar would consistently crash.  GNU tar had to be built linked with
-malloc-libraries, and the `--sparse' switches had to be removed from
-client-src/sendbackup-gnutar.c and client-src/sendsize.c.
-
-
----------------------------------------------------------------------------
-FreeBSD 3.0
------------
-
-chg-scsi was not updated to support the new camlib.h-dependent chio.h,
-so chg-scsi will be automatically disabled if camlib.h is found.  You
-may use chg-chio instead.
-
-
----------------------------------------------------------------------------
-FreeBSD 5.1
------------
-
-Nicolas Ecarnot <nicolas.ecarnot@accim.com> discovered that for
-FreeBSD 5.1 (maybe earlier, and surely further), you have to set the
-net.inet.udp.maxdgram TCP/IP variable to 65535.  The default is 9216,
-and this is a problem when trying to backup a large number of clients
-as indicated by errors in during amcheck or the estimate phase.
-
-You can just run the command:
-
-  sysctl net.inet.udp.maxdgram=63535
-
-but this won't last until the next reboot.
-
-To make it permanent, just add this line:
-
-  net.inet.udp.maxdgram=65535
-
-in the /etc/sysctl.conf file.
-
-
----------------------------------------------------------------------------
-AIX
------------
-
-sendsize is reported to coredump on AIX 4.3.3, this is a linking problem,
-try configuring amanda with --disable-shared option.
-
-
----------------------------------------------------------------------------
-Microsoft Windows
------------------
-
-Although amanda won't run standalone on MS-Windows hosts, it is
-possible to use it to back up their disks, by using SAMBA.  Please
-read docs/SAMBA for more information.
-
-SAMBA may be unable to back up some files due to file locking
-restrictions.  Particularly, paging and registry files usually present
-problems.  Backing up page files is pointless, but registry files are
-quite important to back up.  It is possible to create regular files
-that contain registry information by using the Regback utility, from
-the Windows NT Resource Kit.  Unfortunately, is not part of the
-Windows NT standard distribution, you have to purchase it separately.
-Thanks to Ernie Oporto <ernie_oporto@mentorg.com> for the tip.
diff --git a/docs/TAPE.CHANGERS b/docs/TAPE.CHANGERS
deleted file mode 100644 (file)
index ba53ec5..0000000
+++ /dev/null
@@ -1,791 +0,0 @@
-AMANDA TAPE CHANGER SUPPORT
-
-Originally by James da Silva <jds@cs.umd.edu>
-Heavily modified by various contributors
-
-1. INTRODUCTION
-
-This document outlines the tape changer support design of Amanda 2.2
-and beyond.  It defines a small interface for changer software to follow
-so that Amanda can remain device-independent but still support the widest
-range of tape software and hardware possible.
-
-The interface is a bit simplistic and has only had complications added
-when there is a body of field experience.
-
-
-2. SPECIFYING A TAPE CHANGER IN AMANDA.CONF
-
-All device-specifics are hidden by a glue program that the rest of Amanda
-calls to interact with the tape changer.
-
-The name of this changer program is given by the "tpchanger" variable
-in the amanda.conf file.  Example entry:
-
-       tpchanger "chg-multi"      # use multi-unit tape changer emulator
-
-The tapedev parameter is ignored if a tpchanger program is specified,
-unless the changer program itself reads tapedev from amanda.conf.
-The chg-multi changer doesn't, as it reads all its configuration arguments
-from its own configuration file, specified as changerfile.
-
-If the tpchanger program does not begin with a '/', Amanda expects it
-to reside in libexecdir, and possibly have the version suffix appended
-depending on how Amanda was configured.
-
-Two other amanda.conf parameters are available for changer use, however
-their definition is left entirely up to the changer script itself.
-They are changerfile and changerdev.  Typically changerfile will point
-to the configuration file specific to the changer, or be a base name
-of several related changer files.  The changerdev variable may point to
-the /dev entry used to access the changer device.
-
-See the documentation with the specific changer you're interested in to
-see exaclty how these variables are used (if at all).
-
-
-3. DEVICE-SPECIFIC TAPE CHANGER SCRIPT
-
-The tape changer script/program is always from the directory with
-amanda.conf.  It is never passed the configuration name it is running
-on behalf of, but since amgetconf works without a name from the current
-directory, that should be sufficient.
-
-The script/program must support the following commands:
-
-    <tpchanger> -slot <slot-specifier>
-
-               If changer is loaded, unloads the current slot (if
-               different than "slot-specifier") and puts that tape away,
-               then loads the requested slot.  See the next section for
-               the list of valid slot requests.
-
-               Outputs to stdout the slot name and name of the device
-               file to access the tape on success, or a slot name and
-               error text.
-
-               Returns 0 on success.
-
-               Returns 1 on positioning error (eg at bottom of gravity
-               stacker or slot empty).
-
-               Returns 2 any other fatal error.
-               The slot name may be invalid, but must be present.
-               Error message goes to stdout in place of device name.
-
-       Examples:
-               % chg-multi -slot 0
-               0 /dev/nrst8                    # exitcode returned is 0
-
-               % chg-multi -slot 1
-               1 slot 1 is empty               # exitcode returned is 1
-
-               % chg-multi -slot bogus-slot
-               <none> no slot `bogus-slot'     # exitcode returned is 2
-
-
-    <tpchanger> -info 
-
-               Outputs to stdout three or more fields:
-               
-                 * The current slot string (required)
-                 
-                 * The number of slots (required)
-
-                 * Flag indicating whether the changer can go backwards
-                   (0 if it can't, 1 if it can). (required)
-
-                 * Flag indicating whether the changer is searchable
-                   (optional).  Shows whether the changer supports
-                   the -search and -label commands and is able to
-                   load a tape given only the Amanda label string
-                   (0 or omitted if it can't, 1 if it can). (optional)
-
-       Examples:
-               % chg-multi -info
-               0 10 1                          # exitcode returned is 0
-
-               % chg-zd-mtx -info
-               0 10 1 1
-
-    <tpchanger> -reset
-
-               Resets the changer to known state and loads the first slot.
-
-               Output and error handling are the same as
-
-                 "<tpchanger> -slot first"
-
-               In the case of a gravity stacker that must be reset
-               by hand, this could be run (via "amtape <conf> reset")
-               to inform the software the stacker is positioned back
-               at the top.
-
-       Examples:
-               % chg-multi -reset
-               0 /dev/nrst8                    # exitcode returned is 0
-
-               % chg-multi -reset
-               0 slot 0 is empty               # exitcode returned is 1
-
-               % chg-multi -reset
-               0 tape-changer not responding   # exitcode returned is 2
-
-    <tpchanger> -eject
-
-               Unloads the current slot (if loaded) and puts that tape away.
-
-               Output and error handling are the same as the -slot command.
-
-               Note that a tape may or may not be loaded when this command
-               completes, depending on the hardware.
-
-       Examples:
-               % chg-multi -eject
-               0 /dev/nrst8                    # exitcode returned is 0
-
-               % chg-multi -eject
-               0 drive was not loaded          # exitcode returned is 1
-
-The tape changer program MAY support the following commands:
-
-    <tpchanger> -search <labelstr>
-
-               Loads an Amanda tape by name (labelstr).
-               
-               Output and error handling are the same as the -slot command.
-
-               Taper, amcheck and amtape will use this command if the
-               changer reports it is searchable.
-
-       Example:
-               % chg-zd-mtx -search DailySet005
-               5 /dev/nrst8                    # exitcode returned is 0
-
-    <tpchanger> -label <labelstr>
-               Associates the Amanda label <labelstr> with the barcode 
-               of the currently loaded (in the tape drive) tape.
-
-               Outputs to stdout the current slot and tape device.
-               Amlabel will use this command if your changer is
-               searchable to build up the barcode database.
-
-       Example:
-               % chg-zd-mtx -label DailySet006
-               6 /dev/nrst8                    # exitcode returned is 0
-
-
-For all the commands:
-
-       An exit code of 0 implies that the operation was completely
-       successful, and the output may be parsed by the Amanda code as
-       described above.
-
-       For non-zero exit codes, the first field is still the slot name,
-       but the actual error messages are not fixed.  They are just
-       displayed and/or logged as-is by the calling amanda program.
-
-       An exit code of 1 implies the operation failed in a benign way,
-       for example an empty slot or an attempt to go backwards in a
-       gravity stacker.  The calling Amanda program will print the
-       error message if appropriate and continue, perhaps requesting
-       a different slot be loaded.
-
-       Any other exit code is considered fatal and will cause Amanda
-       to stop attempting to talk to the tape changer.
-
-
-4.  SLOT NAMES AND THE "CURRENT" SLOT
-
-Some tape changers, such as carousels and gravity stackers, have a hardware
-notion of current position.  Others have no current position when no tape
-is loaded: all tapes are in their slots and the changer arm is docked away
-from the slots.
-
-Nevertheless, Amanda requires tape-changer scripts to maintain the
-notion of a "current" position.  This is for performance reasons: as
-tapes tend to be loaded into the rack in order, and Amanda uses them in
-order, the next tape to use can be found much quicker if the position
-of the current one is remembered.  As an example, the chg-multi script
-maintains the current position in a "chg-multi.state" file (or any other
-file specified in a `statefile' line in the changer configuration file).
-
-Amanda does not care how slots are available or how they are named.
-They could be numbered 0 to N-1, numbered 1 to N, or even designated by
-letter, A .. Z.  The only requirement is that the names do not contain
-whitespace and that the names "current", "next", "prev", "first", "last"
-and "advance" retain their meaning as follows:
-
-       current The position of the last loaded tape, as described above
-
-       next    The position after current, wrapping from the last slot to
-               the first.
-
-       prev    The position before current, wrapping from the first slot to
-               the last.
-
-       first   The first slot in the tape rack.
-
-       last    The last slot in the tape rack.
-
-       advance The same as "next" except the next tape may not be loaded if
-               the changer supports advancing to the next slot without
-               putting that tape in the drive.
-
-The current position must be updated even if there is a positioning error
-(such as "empty slot").  This allows amanda to step through the entire tape
-rack by issuing successive "-slot next" positioning commands.
-
-
-5. OPERATOR INTERFACE
-
-The amtape program is the main operator interface to Amanda's tape
-changer support.  The commands supported include:
-
-       amtape <conf> slot <slot-specifier>
-               Load the tape from the specified slot into the drive
-
-       amtape <conf> eject
-               Send an eject command to the tape-changer.  Effect is changer
-               specific.
-
-       amtape <conf> reset
-               Send a reset command to the tape-changer.  Effect is changer
-               specific.
-
-       amtape <conf> show
-               Go through the entire tape rack, showing the labels of all 
-               amanda tapes encountered.
-
-       amtape <conf> label <label>
-               Find and load the tape with the specified label
-
-       amtape <conf> taper
-               Perform taper's scan algorithm (see below), loading the tape
-               which would be picked for the next amdump run.
-
-       amtape <conf> clean
-               If a cleaning tape is defined by the changer, load it in
-               the drive and put it away when done.
-       
-       amtape <conf> device
-               Output the current tape device name.
-       
-       amtape <conf> current
-               Display the contents of the current slot.
-       
-       amtape <conf> update
-               Scan the entire tape rack and update the barcode database.
-
-See the amtape(8) man page for more details.
-
-In addition to amtape, amlabel has been modified to allow optionally
-specifying a slot:
-
-       amlabel <conf> <label> [slot <slot-specifier>]
-
-Amcheck looks for the next tape in the rack the same way the taper does.
-If multiple tapes are used in one night, amcheck attempts to find all the
-needed tapes in turn if the tape-changer is random access.  On a one-way
-gravity stacker, amcheck only finds the first tape, since finding the
-subsequent ones would put the first one out of reach of that night's
-amdump run.
-
-Amrestore and amrecover do not yet include any tape changer support
-directly, as amrestore knows nothing about the amanda.conf files or
-server-side databases.  This is a deliberate decision to keep amrestore
-independent, so it can be run from any host with a tape drive, even
-if the original tape server host is down.  To use amrestore in a
-tape-changer environment, use amtape to find the right tape, then run
-amrestore giving the resulting tape device name.
-
-
-6. HOW AMDUMP INTERACTS WITH THE TAPE CHANGER
-
-Amanda does not require a particular tape label for a run.  Any label
-that matches the labelstr regex and is determined to be "inactive"
-according to the tapelist database, may be written to.  However, there
-is a preferred 'next' tape, the one that is next in the cycle implied
-by the current tapelist.
-
-Amdump uses two algorithms, depending on whether the tape changer can go
-backwards in the rack or not.  If multiple tapes are needed in a single
-run, this algorithm is repeated in turn whenever a new tape is required.
-
-Normal tape changers (those that can go backwards):
-
-With a full-access tape changer, Amdump searches the entire rack for the
-preferred tape label.  This tape will usually be found at the current
-or next position, but might be located anywhere.  If the tape is found,
-it is used.  If it is not found, the first tape encountered that matches
-the labelstr and is not active is picked.
-
-Gravity stackers (anything that can not go backwards):
-
-To avoid going all the way to the bottom of the stacker only to find that
-the preferred tape isn't present and nothing can be done, Amanda picks the
-first tape (starting at the current position) that matches the labelstr
-and is not active, regardless of whether it is the preferred tape.
-
-
-7. BUILT-IN TAPE CHANGERS
-
-================================
-chg-multi (formerly chg-generic)
-================================
-
-This tape changer script supports several common configurations:
-
-  - Using multiple tape drives in a single host to emulate a tape changer.
-    This can also be used with a single physical drive to write several
-    tapes in an amanda run.
-
-  - Using a gravity stacker or a real changer configured to sequentially
-    load the next tape when the current one is ejected.  Also supports
-    a changer which cycles to the first tape after loading the last one.
-
-  - Using a changer accessed through several "virtual" tape devices
-    which determine which slot actually gets loaded in the tape drive.
-
-The advantage of this changer script is that you do not need to get into
-the complexity of dealing with a real changer interface.  All the action
-goes through the tape device interface with standard "mt" commands,
-which eases many portability issues.  Many common tape jukeboxes can be
-configured in a sequential or cycle mode.
-
-chg-multi ignores `tapedev' and `changerdev' because `changerfile' may
-specify several tape devices to be used.  A sample configuration file
-may be found in example/chg-multi.conf.
-
-================================
-chg-manual (formerly no-changer)
-================================
-
-This is a poor man's tape changer that requires the backup operator to
-change tapes manually.  It expects `tapedev' in amanda.conf to point to
-a valid tape device, and stores some status data in files whose names
-start with the `changerfile'.  `changerdev' is ignored.
-
-=============================
-chg-mtx (formerly hp-changer)
-=============================
-
-An mtx-based tape changer script.  `changerdev' must specify the tape
-device controlled by the mtx program, and `tapedev' must point to the
-no-rewind tape device to be used.  More than likely, both `changerdev' and
-`tapedev' will reference the same device file.  `changerfile' must specify
-a prefix for status files maintained by this script.  It will maintain
-files named `changerfile'/changer-clean and `changerfile'/changer-access.
-You may have to edit the script to specify which slot contains a cleaning
-tape (cleanslot).
-
-The `mtx' program must support commands such as `-s', `-l' and `-u'.
-If the one you've got requires `status', `load' and `unload', you should
-use chg-zd-mtx instead (see below).
-
-==========
-chg-zd-mtx
-==========
-
-Based on chg-mtx, but modified in order to support the Zubkoff/Dandelion
-version of mtx.  Eric DOUTRELEAU <Eric.Doutreleau@int-evry.fr>, who
-contributed this script, reported that it works on a Solaris/sparc box
-with a HP 1557A stacker.
-
-In addition to the `changerfile'-clean and the `changerfile'-access files,
-it maintains a `changerfile'-slot file that indicates the currently
-loaded slot.
-
-There are lots of comments at the start of the script describing how to
-set it up.
-
-========
-chg-disk
-========
-
-Clone of the chg-zd-mtx, but modified to be applied on local directories
-instead of tapes. This changer emulates a robotic that uses virtual
-tapes instead of real ones, where the virtual tapes are real directories
-on a hard disk.
-
-The directory tree should be:
-slot_root_dir -|
-               |- info
-               |- data -> slot1/
-               |- slot1/
-              |- slot2/
-              |- ...
-              |- slotn/
-
-Where "slot_root_dir" is the tapedev "file:xxx" parameter and "n" the
-tapecycle parameter.
-
-Please refer to the HOWTO-FILE-DRIVER for details of usage.
-
-
-
-
-=======================================================
-chg-scsi-chio (formerly seagate-changer, then chg-chio)
-=======================================================
-
-A C program that relies on scsi tape-changer interfaces.  It may
-either use the tape changer interface specified in chio.h (Gerd Knor's
-SCSI media changer driver, a Linux kernel loadable module), or it may
-use built-in tape changer interfaces available on HPUX, Solaris 2.5,
-IRIX and possibly others, but only the chio and HPUX interfaces are
-currently implemented .  `tapedev' specifies the tape device to be
-used; `changer_dev' is the device used to talk to the kernel module
-(for chio, usually /dev/ch0), and `changerfile' specifies a filename
-in which the current slot number will be stored.
-
-Now there is another way, to get the chg-scsi a little bit more
-flexible.  If you use only one digit in the `tapedev' parameter, the
-chg-scsi expects that changerfile points to a real configuration file,
-not only a counting file.  In this configuration file you may specify
-that the tapedrive needs an eject command and an optional waittime,
-necessary after inserting the tape into the drive.  You are also able
-to configure a range of slots which should be used by your
-configuration.  The idea behind this is, that you don't want amanda to
-cycle all the tapes if amanda searches exactly one tape.  If you have
-a library which supports more than one drive you can also specify
-which drive to use.  For each configuration (there should be at least
-one) you have to specify a file, where amanda remembers which tape is
-actually in the drive.  For future use there is also some stuff for
-cleaning the drives.
-
-In amanda.conf:
-
-tapedev "x"       with x between 0 and 9, selects the configuration to use
-changerfile "filename"            specifies the changer configuration file
-
-In the changer-config-file the following could be set:
-number_configs x       x between 0 and 9       number of configurations
-                                               defined. This should be
-                                               the first parameter in the
-                                               config-file.
-eject  x               x 0 or 1                1 means that the drives need
-                                               an eject command, before the 
-                                               robot can handle the tape.
-sleep  x               x between 0 and MAX_INT specifies the seconds to wait
-                                               before the drive could be used
-                                               after inserting a tape. 5
-                                               should be OK.
-cleanmax x             x some positive int     How many cleanings does a 
-                                               cleaning tape survive
-changerdev  <device>                           The device for the robot
-
-And then there come some configuration sections, separated by the word `config`
-followed by the ordinal of that configuration (0 to 9). In each configuration
-section you should specify:
-
-drivenum x             x between 0 and the number of drives in the library
-                                               This one specifies the drive to
-                                               use with this configuration
-dev    <device>                                The device for the tapedrive
-startuse    x          x between 0 and maximum slotnumber of your library
-                                               Starting here we may use the tapes
-enduse  x              x between start and maximum slotnumber
-                                               This is the last tape we may use
-                                               in this configuration. If we reach
-                                               this one the next will be start..
-statfile <filename>                            Here we remember the last used
-                                               slot for this configuration
-cleancart      x       x between 0 and maximum slotnumber 
-                                               In this slot we find the 
-                                                cleaning tape
-cleanfile <filename>                           Here we will remember how 
-                                               often we used the cleaning tape
-usagecount <filename>                          This points to a file which is
-                                               deleted after cleaning the drive
-                                               e.g. the usagetime of the drive
-                                                                                        
-Comments begin with an '#' until end of line.
-Allowed separators are TAB and SPACE. 
-
-========================================================================
-chg-scsi (new interface, try to drive a robot with direct scsi commands)
-========================================================================
-
-The config and the sysntax is the same as for chg-scsi-chio. New
-is the config type 
-
-emubarcode     1
-
-With this option and the option labelfile chg-scsi will try to create an inventory.
-With this inventory it should be possible to use the search feature for loading tapes.
-
-debuglevel x:y
-
-This option will set the debug level and select for which part debug messages should be sent
-to the debug file. In case of problems you should set it to 9:0
-
-havebarcode 1
-
-This will force the program to read the barcodes, and don not try to figure out if there is an
-barcode reader available.
-
-scsitapedev <devicename>
-
-This device is used to control the tape, read status infos etc.
-
-tapestatus <filename>
-
-If this option is given on every eject/move the log pages of the tape
-device will be dumped in this file. There are 2 log pages were you
-can see how many read/write errors (corrected) are processed by the tape
-
-labelfile <filename>
-
-This file is used for the mapping from barcode labels to amanda volume labels.
-It is used if the changer has a barcode reader. To initialize run amtape show,
-this will add the mapping for the tapes in the magazine.
-
-eject > 1
-
-Use the mtio ioctl to eject the tape, use only if the standard (1) does
-not work, and send the debug output (/tmp/amanda/chg-scsi.debug) to
-th@ant.han.de
-
-changerident <ident>
-
-With this it is possible to specify which internal driver to use for
-controlling/error handling of the robot
-
-tapeident <ident>
-
-Some as above but for the tape.
-
-
-New command line option:
--status [all|types|robot|sense|ModeSenseRobot|ModeSenseTape|fd]
-
-<all> will show the result form all options.
-<types> will list the known driver types.
-<robot> will show the status of all elements (tape/robot/slots..)
-<sense> will show the result from a request sense
-<ModeSenseRobot> will show the sense page from the robot
-<ModeSenseTape> will show the sense page from the tape
-<fd> will show the devices which are open, and some info about it.
-
-
-At the moment changer with tape and robot on the same SCSI id (
-but on different luns) will run on the following plattforms
-HP_UX 10.20    
-IRIX 6.x
-Solaris
-Linux
-AIX
-FreeBSD 3.0/4.0
-
-Tape and robot on different IDs run native on
-Linux
-HP-UX 10.20
-Irix 6.x
-FreeBSD
-
-Tape and robot on different IDs with special modules run on:
-
-Solaris        with sst kernel module, which is not any longer needed in solaris 2.8.
-See in the contrib/sst directory
-The configuration on solaris 2.8 with the sgen driver is done by creating
-the file /kernel/drv/sgen.conf
-This file should contain at the beginning the following
-device-type-config-list="changer","sequential"
-
-This will force the driver to attach only to the devices with type either
-changer (the robot) and sequential (the tape).
-Next you must tell the driver on which id it should check for devices
-(tape on id 5, robot on id 6 in this example),
-name="sgen" class="scsi" target=5 lun=0;
-name="sgen" class="scsi" target=6 lun=0;
-
-This will create the 2 device files
-/dev/scsi/sequential/c0t5d0         (scsitapedev option in chg-scsi.conf)
-/dev/scsi/changer/c0t6d0            (changer option in chg-scsi.conf)
-
-So the complete sgen.conf looks like:
-device-type-config-list="changer","sequential
-name="sgen" class="scsi" target=5 lun=0;
-name="sgen" class="scsi" target=6 lun=0;
-
-
-For HP you have to create the special device files for the pass throu
-interface. Check if the ctl driver is installed.
-Example:
-# lsdev -C ctl
-    Character     Block       Driver          Class
-      203          -1         sctl            ctl
-
-Next check on which bus your drives are connected. (ioscan)
-
-with the Character device num form the lsdev and the card instance from
-ioscan create the special file.
-Example:
-mknod /dev/scsi/1 c 203 0x001000
-                          ||||
-                          ||| LUN of device
-                          ||SCSI ID of the device
-                          2 digit instance number from ioscan
-
-On FreeBSD 4.0 the syntax for the device files has changed. Now you
-have to tell chg-scsi the bus:target:lun combination. If you for
-example on your scsi bus 0 target 3 an robot the syntax is
-changerdev 0:3:0
-To get this info you can use the camcontrol command, <camcontrl devlist>
-will give you a list of known devices.
-Don't specify dev and scsitapedev in your chg-scsi.conf !!, this will
-not work.
-
-On Linux you need either sg (generic scsi) as module or it must be compiled
-into the kernel. If the sg driver doses not work try to use the ioctl interface.
-For that you have to undef the LINUX_CHG define in changer-src/scsi-linux.c
-Also you have to change the NORMAL_TIMEOUT in /usr/src/linux/drivers/scsi/scsi_ioctl.c
-from (10 * HZ) to (5 * 60 * HZ).
-On linux it does not run if you are using an aha1542 SCSI controller. The
-driver can not handle the extended request sense.
-
-On IRIX you find the SCSI pass through interfaces for every device in /dev/scsi
-
-chg-scsi has been tested/run with the following devices
-Exabyte 10h and eliant tape
-HP-Surestore 1200e and C1553A tape
-BreeceHill Q2.15 (EXB-120) and DLT7000 tape
-Powerstor L200 and DLT7000 
-ARCHIVE Python 28849-XXX 
-TANDBERG TDS 1420
-ADIC VLS DLT Library
-
-It is now possible with a changer that has barcode reader to load tapes faster.
-Also amdump will find tapes faster. Every time a tape is labeled the information
-in the labelfile will be updated. To initialize the label mapping you can also
-do an amtape config show. This will put the mapping for all tapes in the magazine
-into the mapping file.
-
-For all problems please contact th@ant.han.de. Please include in your
-mail the debug file. (/tmp/amanda/chg-scsi.debug)
-
-
-===========================================================================
-chg-chio (new perl script that replaces the original chg-chio written in C)
-===========================================================================
-
-This script is based on the FreeBSD version of chio, a program to
-communicate with the jukebox.  This script has for the moment only
-been test with FreeBSD and is likely not to work on any other system.
-Let me know if this is the case and send me the output of the chio
-program for your version of chio.
-
-It does not restrict the number of tapes, except that if there is only
-one tape in the juke, it is supposed to be in max_slot and not in slot 1.
-
-[This is the first version of the changer script and I would
-appreciate all comments on it, at nick.hibma@jrc.it.  It has been
-tested only with FreeBSD 2.2.5 and the accompanying chio program.]
-
-==============================
-chg-chs (formerly chs-changer)
-==============================
-
-A tape changer script very similar to chg-multi, that uses the `chs'
-program to change tapes.  As in chg-multi, `tapedev' is ignored.
-`changerfile' names its configuration file, similar to chg-multi.conf.
-`changerdev' will be passed to CHS in a -f command-line switch, unless
-it is set to an empty string or "/dev/null" (watch out for default
-values!)
-
-==============================
-chg-rth (formerly rth-changer)
-==============================
-
-A perl5 script that controls an HPc1553 tape drive via a Peripheral
-Vision Inc. SCSI control subsystem that interprets commands sent on
-the SCSI bus.  It expects `tapedev' to specify the tape device to be
-used.  `changerfile' and `changerdev' are ignored.
-
-==============================
-chg-juke
-==============================
-
-A shell script that uses the Fermilab "juke" software (see 
-http://www.fnal.gov/fermitools/, the "juke" link) to control
-tape chagners.  It supports mounting multiple tapes for RAIT 
-tapedrive sets, both multiple jukeboxes, or one jukebox with
-multiple tape drives, or combinations.  'juke' must be configured
-to know tape drives by the same name Amanda calls them.
-
-It uses 'changerfile' to track Amanda's current tape state, 
-'tapedev' must be the tape drive (or RAIT set) name, and 'changerdev' 
-is the juke software's name for the changer, or a csh-glob that
-expands to several jukebox names (i.e. "changer{a,b,c}")
-
-==============================
-chg-rait
-==============================
-
-A shell script that runs other changers in tandem, and returns
-a rait:{dev1,dev2,...} tape device based on the results of 
-each other changer.  So if you wanted to have 2 stackers
-striped with no parity, and you have chg-mtx support for your
-stackers, you would use the follwing changerfile:
-   nchangers=3
-   tpchanger_1="chg-mtx"
-   changerdev_1="/dev/mtx1"
-   changerfile_1="/some/file1"
-   tapedev_1="/some/dev"
-   tpchanger_2="chg-mtx"
-   changerdev_2="/dev/mtx2"
-   changerfile_2="/some/file2"
-   tapedev_2="/some/dev"
-   tpchanger_3="chg-null"
-   changerdev_3="/dev/null"
-   changerfile_3="/some/file3"
-   tapedev_3="/some/dev"
-
-The third uses the null changer.  The tapedev_n entries are only needed
-if the changerfile in question uses them.
-
-
-================================
-chg-iomega
-================================
-
-This changer script is designed for IOMEGA or JAZZ disks of various sizes
-as well as any other removable disk media.
-
-This is a PURELY MANUAL changer. It requests insertion of disk media via
-messages on /dev/tty. So it cannot be used via crontab.
-
-Make sure you comply with any of the following.
-- Add statements 
-        tpchanger "chg-iomega"
-        tapedev "file:<mount_point_of_removable_disk>"
-        (e.g. tapedev "file:/mnt/iomega" )
-        tapetype IOMEGA      
-
-        
-        define tapetype IOMEGA {
-            comment "IOMega 250 MB floppys"
-            length 250 mbytes
-            filemark 100 kbytes
-            speed 1 mbytes
-        }
-  to your /etc/amanda/<backup_set>/amanda.conf file
-- Add entry to /etc/fstab to specify mount point of removable disk
-  and make this disk mountable by any user.
-- Format all disks, add a "data" sub directory and label all disks
-  by a call to amlabel.
-- Be aware that as of version 2.4.4p1, amanda can't handle backups that are
-  larger than the size of the removable disk media. So make sure
-  /etc/amanda/<backup_set>/disklist specifies chunks smaller than the 
-  disk size.
-
-
-==============================
-chg-null
-==============================
-
-A trivial changer which loads/unloads on a null: device.  Useful with
-chg-rait to throw away a parity stripe by puttin on a null jukebox, 
-or for testing.
diff --git a/docs/TAPETYPES b/docs/TAPETYPES
deleted file mode 100644 (file)
index 444eb3c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Several tapetype definitions are available in example/amanda.conf.
-They inform Amanda how much it is supposed to be able to store in a
-tape (length), how much space is wasted at the end of a dump image
-with the EOF mark (filemark) and how fast the tape unit is (speed).
-
-The most inportant parameter is length, since Amanda may decide to
-delay a backup if length is too small, but, if it is too large, Amanda
-may end up leaving dumps in the holding disk or having to abort some
-dump.
-
-Filemark is important if you have many disks, particularly with small
-incremental backups.  The space wasted by so many filemarks may add up
-and considerably modify the available tape space.
-
-The speed is currently unused.
-
-
-If none of the sample tapetype entries match your needs, you may
-search the mailing list archives or look up the on-line list of
-tapetype entries.  Just follow the links from www.amanda.org.
-
-
-Amanda provides the 'amtapetype' utility to calculate the size of a tape,
-to generate a `tapetype' entry for your amanda.conf.
-
-Specifying the appropriate tape
-device, but beware that it may take many hours to run.  Make sure you
-do not use hardware compression, even if you plan to use hardware
-compression in the future.  `tapetype' writes random data to tape, and
-random data will expand instead of compressing, therefore you'll get
-an estimate that's smaller than expected.
-
diff --git a/docs/UPGRADE b/docs/UPGRADE
deleted file mode 100644 (file)
index b0334fa..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-Amanda Upgrade Issues
-
------
-
-Amanda 2.4.0 has introduced a major incompatibility in the Amanda
-protocol.  This means that pre-2.4.0 clients won't interoperate with a
-2.4.0 server, nor will 2.4.0 clients interoperate with pre-2.4.0
-servers.  You have to upgrade them all at the same time.
-
-To ease the upgrade process Amanda has, from release 2.4.0 on, a
-configure flag (--with-testing) that will cause Amanda to use alternate
-service names (amanda-test) instead of the standard ones.  This allows
-you to keep using your old version of Amanda while you test the new one.
-
------
-
-Depending upon the version of Amanda you are upgrading from, Amanda may
-use a different database library to store the backup information, and
-the new Amanda may not be able to read the old Amanda database files.
-In this case, you will want to do something like the following:
-
-Before the upgrade (using the old version of amadmin):
-
-       # cd /var/amanda/CONFIG
-       # amadmin CONFIG export > zzz
-       # mkdir backup
-       # mv curinfo* backup
-
-and after the upgrade (using the new version of amadmin):
-
-       # cd /var/amanda/CONFIG
-       # amadmin CONFIG import < zzz
-
-and a month (:-) after you are happy with the new version:
-
-       # cd /var/amanda/CONFIG
-       # rm -rf backup
-
------
-
-After 2.4.0, the structure of the directory holding the index files
-was changed to have three levels instead of being flat.  This greatly
-reduces the number of files in a given directory, which was a problem
-for some systems.
-
-The new layout is:
-
-       [indexdir]/hostname/filesystem/YYYYMMDD_L.gz
-
-where hostname and filesystem are "sanitized" versions of the names from
-disklist, i.e. '/' characters are converted to '_' and so on.  This new
-naming convention matches the one used for the text formatted database.
-
-A script is available to convert the flat directory structure to the
-new layout:
-
-       ftp://ftp.amanda.org/pub/amanda/maillist-archives/amanda-users/www/Apr-Jun.1998/msg00428.html
-
------
diff --git a/docs/VTAPE-API b/docs/VTAPE-API
deleted file mode 100644 (file)
index 6443221..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-The upper level amanda code (including some of the other tape_xxx 
-routines) calls the following routines which implement a virtual
-tape table:
-    int tape_access(filename, mode) 
-       Acts like access(2) on possibly virtual devices
-    int tape_open(filename, mode)
-       Acts like open(2) on possibly virtual devices
-    int tape_stat(filename, buf) 
-       Acts like stat(2) on possibly virtual devices
-    int tapefd_close(tapefd)
-       Acts like close(2) on possibly virtual devices
-    int tapefd_fsf(tapefd, count)
-       Forward skips the (possibly virtual) device.
-    int tapefd_read(tapefd, buffer, count)
-       Reads a block from the (possibly virtual) device.
-    int tapefd_rewind(tapefd)
-       Reads a block from a (possibly virtual) device.
-    void tapefd_resetofs(tapefd)
-       Uses lseek() tricks to reset the write/read offset counter on
-       a virtual tape device.
-    int tapefd_unload(tapefd)
-       Unloads the media from a (possibly virtual) device.
-    int tapefd_status(tapefd) 
-       prints status of the (possibly virtual) device to standard output.
-    int tapefd_weof(tapefd, count)
-       writes a filemark/moves to the next file on a device for writing.
-    int tapefd_write(tapefd, buffer, count)
-       writes a block of data to a (possibly virtual) device.
-
-For a tape type xxx, the following routines must be provided, and 
-entered into the table "vtable" in tape-src/tapeio.c:
-    int xxx_tape_access(filename, mode) 
-    int xxx_tape_open(filename, mode)
-    int xxx_tape_stat(filename, buf) 
-    int xxx_tapefd_close(xxx_tapefd)
-    int xxx_tapefd_fsf(xxx_tapefd, count)
-    int xxx_tapefd_read(xxx_tapefd, buffer, count)
-    int xxx_tapefd_rewind(xxx_tapefd)
-    void xxx_tapefd_resetofs(xxx_tapefd)
-    int xxx_tapefd_unload(xxx_tapefd)
-    int xxx_tapefd_status(xxx_tapefd) 
-    int xxx_tapefd_weof(xxx_tapefd, count)
-    int xxx_tapefd_write(xxx_tapefd, buffer, count)
-
-Along with a prefix string which will identify the type.  The initial
-vtape layer has two types "plain" and "rait" (Redundant Array of
-Inexpensive Tapes) but we hope to add a "rmt" (remote tape client),
-and possibly "dvd" types soon.
diff --git a/docs/WHATS.NEW b/docs/WHATS.NEW
deleted file mode 100644 (file)
index c0ff598..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-This document contains notes on new features in Amanda 2.3 that may
-not yet be fully documented elsewhere.
-
-* INDEXING BACKUPS FOR EASIER RESTORE
-
-Read more about this in the file named INDEXING.
-
-* SAMBA SUPPORT
-
-Read more about this in the file named SAMBA.
-
-* GNUTAR SUPPORT
-
-Amanda now supports dumps made via Gnu TAR.  To use this, set your
-dumptypes set the program name to "GNUTAR":
-
-        dumptype tar-client {
-                ....
-               program "GNUTAR"
-        }
-
-Since Gnu TAR does not maintain a dumpdates file itself, nor give an
-estimate of backup size, those need to be done within Amanda.  Amanda
-maintains an /etc/amandates file to track the backup dates analogously to
-how dump does it.
-
-NOTE: if your /etc directory is not writable by your dumpuser, you'll have
-to create the empty file initially by hand, and make it writable by your
-dumpuser ala /etc/dumpdates.
-
-NOTE: Since tar traverses the directory heirarchy and reads files as a
-regular user would, it must run as root.  The two new amanda programs
-"calcsize" and "runtar" therefore must be installed setuid root.  I've made
-them as simple as possible to to avoid potential security holes.
-
-
-* MULTIPLE BACKUPS IN PARALLEL FROM ONE CLIENT HOST
-
-A new "maxdumps" parameter for the conf file gives the default value for
-the amount of parallelism per client:
-
-    maxdumps 2 # default max num. dumps to do in parallel per client
-
-If this default parameter is not specified, the default for the default :-0
-is 1.  Then, you can override the parameter per client through the
-dumptype, eg:
-
-        dumptype fast-client {
-                ....
-                maxdumps 4
-        }
-
-If the "maxdumps" parameter isn't given in the dumptypes, the default is
-used.  The idea is that maxdumps is set roughly proportional to the speed
-of the client host.  You probably wont get much benefit from setting it
-very high, but all but the slowest hosts should be able to handle a
-maxdumps of at least 2.  
-
-Amanda doesn't really have any per-host parameters, just per-disk, so the
-per-client-host maxdumps is taken from the last disk listed for that host.
-
-Just to make things more complicated, I've added the ability to specify a
-"spindle number" for each filesystem in the disklist file.  For example:
-
-        wiggum /        fast-comp-user  0
-        wiggum /usr     fast-comp-user  0
-        wiggum /larry   fast-comp-user  1
-        wiggum /curly   fast-comp-user  1
-        wiggum /moe     fast-comp-user  1
-        wiggum /itchy   fast-comp-user  2
-        wiggum /scratchy fast-comp-user 3
-
-The spindle number represents the disk number, eg every filesystem on sd0
-can get a spindle number of 0, everything on sd1 gets spindle 1, etc (but
-there's no enforced requirement that there be a match with the underlying
-hardware situation).  Now, even with a high maxdumps, amanda will refrain
-from scheduling two disks on the same spindle at the same time, which would
-just slow them both down by adding a lot of seeks.
-
-The default spindle if you don't specify one is -1, which is defined to be
-a spindle that doesn't interfere with itself.  That is if you don't specify
-any spindle numbers, any and all filesystems on the host can be scheduled
-concurrently up to the maxdumps.
-
-Just to be clear, there's no relation between spindle numbers and maxdumps:
-number the spindles by the disks that you have, even if that's more than
-maxdumps.
-
-Also, I'm not sure that putting spindle numbers everywhere is of much
-value: their purpose is to prevent multiple big dumps from being run at the
-same time on two partitions on the same disk, on the theory that the extra
-seeking between the partitions would cause the dumps to run slower than
-they would if they ran sequentially.  But, given the client-side
-compression and network output that must occur between blocks read from the
-disk, there may be enough slack time at the disk to support the seeks and
-have a little parallelism left over to do some good.
-
-
-* MULTIPLE TAPES IN ONE RUN
-
-I've rewritten the taper - it now supports one run spanning multiple tapes
-if you have a tape-changer.  The necessary changes in support of this have
-also been made to driver and reporter - planner already had support.  There
-are a couple other places that should probably be updated, like amcheck.
-Dumps are not split across tapes - when taper runs into the end of a tape,
-it loads the next tape and tells driver to try sending the dump again.
-
-If you are feeling brave, set "runtapes" to something other than 1.
-
-The new taper also keeps the tape open the entire time it is writing the
-files out - no more having amchecks or other accesses/rewinds in the middle
-of the run screw you royally if they hit when the tape is closed for
-writing a filemark.
-
-
-* BOTTLENECK DETERMINATION
-
-I've made some experimental changes to Driver to determine what the
-bottleneck is at any time.  Since Amanda tries to do many things at once,
-it's hard to pinpoint a single bottleneck, but I _think_ I've got it down
-well enough to say something useful.  For now it just outputs the current
-bottleneck as part of its "driver: state" line in the debug output, but
-once I'm comfortable with its conclusions, I'll output it to the log file
-and have the reporter generate a nice table.  The current choices are:
-        not-idle - if there were dumps to do, they got done
-        no-dumpers - there were dumps to do but no dumpers free
-        no-hold - there were dumps to do and dumpers free but the dumps
-                  couldn't go to the holding disks (no-hold conf flag)
-        no-diskspace - no diskspace on holding disks
-        no-bandwidth - ran out of bandwidth
-        client-constrained - couldn't start any dumps because the clients
-                were busy
-
-
-* 2 GB LIMIT REMOVED
-
-I've fixed the 2-gig limits by representing sizes in Kbytes instead of
-bytes everywhere.  This gives us a new 2 TB dump-file size limit (on 32bit
-machines), which should last us a couple more years.  This seemed
-preferable to me than going to long-long or some other non-portable type
-for the size.
-
-
-* AMADMIN IMPORT/EXPORT
-
-Amadmin now has "import" and "export" commands, to convert the curinfo
-database to/from text format, for: moving an amanda server to a different
-arch, compressing the database after deleting lots of hosts, or editing one
-or all entries in batch form or via a script.
-
-
----------------------------------------------------------------------------
-Here's the old 2.2.x stuff from this file.  I'm pretty sure most of this
-is in the mainline documentation already.
----------------------------------------------------------------------------
-
-This document contains notes on new features in Amanda 2.2 that may
-not yet be fully documented elsewhere.
-
-* CLIENT SIDE SETUP HAS CHANGED
-
-The new /etc/services lines are:
-    amanda       10080/udp             # bsd security amanda daemon
-    kamanda      10081/udp             # krb4 security amanda daemon
-
-The new /etc/inetd.conf lines are:
-    amanda  dgram udp wait /usr/local/libexec/amanda/amandad amandad
-    kamanda dgram udp wait /usr/local/libexec/amanda/amandad amandad -krb4
-
-(you don't need the vanilla amanda lines if you are using kerberos for
- everything, and vice-versa)
-
-
-* VERSION SUFFIXES ON EXECUTABLES
-
-The new USE_VERSION_SUFFIXES define in options.h controls whether to
-install the Amanda executables with the version number attached to the
-name, eg "amdump-2.2.1".  I recommend that you leave this defined, since
-the this allows multiple versions to co-exist - particularly important
-while amanda 2.2 is under development.  You can always symlink the names
-without the version suffix to the version you want to be your "production"
-version.
-
-
-* KERBEROS 
-
-Read the comments in file docs/KERBEROS for how to configure the kerberos
-version.  With KRB4_SECURITY defined, there are two new dumptype options:
-
-       krb4-auth       use krb4 auth for this host 
-                       (you can mingle krb hosts & bsd .rhosts in one conf)
-       kencrypt        encrypt this filesystem over the net using the krb4
-                       session key.  About 2x slower.  Good for those root
-                       partitions containing your keyfiles.  Don't want to
-                       give away the keys to an ethernet sniffer!
-
-
-* MULTIPLE HOLDING DISKS
-
-You can have more than one holding disk for those really big installations.
-Just add extra diskdir and disksize lines to your amanda.conf:
-
-       diskdir "/amanda2/amanda/work"  # where the holding disk is
-       disksize 880 MB                 # how much space can we use on it
-
-       diskdir "/dumps/amanda/work"    # a second holding disk!
-       disksize 1500 MB
-
-Amanda will load-balance between the two disks as long as there is space.
-Amanda now also actually stats files to get a more accurate view of
-available and used disk space while running.
-
-* REMOTE SELF-CHECKS
-
-Amcheck will now cause self-checks to run on the client hosts, quickly
-detecting which hosts are up and communicating, which have permissions
-problems, etc.  This is amazingly fast for what it does: here it checks
-more than 130 hosts in less than a minute.  My favorite gee-whiz new
-feature!  The new -s and -c options control whether server-only or
-client-only checks are done.
-
-* MMAP SUPPORT
-
-System V shared memory primitives are no longer required on the server
-side, if your system has a version of mmap() that will allocate
-anonymous memory.  BSD 4.4 systems (and OSF/1) have an explicitly
-anonymous mmap() type, but others (like SunOS) support the trick of
-mmap'ing /dev/zero for the same effect.  Amanda should work with both
-varieties.
-
-Defined HAVE_SYSVSHM or HAVE_MMAP (or both) in config.h.  If you have
-both, SYSVSHM is selected (simply because this code in Amanda is more
-mature, not because the sysv stuff is better).
-
-
-* GZIP SUPPORT
-
-This was most requested feature #1; I've finally slipped it in.  Define
-HAVE_GZIP in options.h.  See options.h-vanilla for details.  There are two
-new amanda.conf dumptype options "compress-fast" and "compress-best".  The
-default is "compress-fast".  With gzip, compress-fast seems to always do
-better than the old lzw compress (in particular it will never expand the
-file), and runs faster too.  Gzip's compress-best does very good
-compression, but is about twice as slow as the old lzw compress, so you
-don't want to use it for filesystems that take a long time to full-dump
-anyway.
-
-
-* MOUNT POINT NAMES IN DISKLIST
-
-Most requested feature #2: You can specify mount names in the disklist
-instead of dev names.  The rule is, if the filesystem name starts with a
-slash, it is a mount point name, if it doesn't, it is a dev name, and has
-DEVDIR prepended.  For example:
-
-       obelix  sd0a            # dev-name: /dev/sd0a
-       obelix  /obelix         # mount name: /obelix, aka /dev/sd0g
-
-
-* INITIAL TAPE CHANGER SUPPORT INCLUDED
-
-A new amanda.conf parameter, tpchanger, controls whether Amanda
-communicates with a tape changer program to load tapes rather than
-just opening the tapedev itself.  The tpchanger parameter is a string
-which specifies the name of a program that follows the API specified
-in docs/TAPE.CHANGERS.  Read that doc for more information.
-
-* GENERIC TAPE CHANGER WRAPPER SCRIPT
-
-An initial tape-changer glue script, chg-generic.sh, implements the
-Amanda changer API using an array of tape devices to simulate a tape
-changer, with the device names specified via a conf file.  This script
-can be quickly customized by inserting calls tape-changer-specific
-programs at appropriate places, making support for new changers
-painless.  If you know what command to execute to get your changer to
-put a particular tape in the drive, you can get Amanda to support your
-changer.
-
-The generic script works as-is for sites that want to cascade between
-two or more tape drives hooked directly up to the tape server host.
-It also should work as-is with tape-changer drivers that use separate
-device names to specify the slot to be loaded, wheres simply opening
-the slot device causes the tape from that slot to be loaded.
-
-chg-generic has its own small conf file.  See example/chg-generic.conf
-for a documented sample.
-
-* NEW "amtape" COMMAND
-
-The amtape is the user front-end to the amanda tape changer support
-facilities.  The operators can use amtape to load tapes for restores,
-position the changer, see what amanda tapes are loaded in the tape
-rack, and see which tape would be picked by taper for the next amdump
-run.
-
-No man page yet, but running amtape with no arguments gives a detailed
-usage statement.  See docs/TAPE.CHANGERS for more info.
-
-* CHANGER SUPPORT ADDED TO "amlabel" COMMAND
-
-The amlabel command now takes an optional slot argument for labeling
-particular tapes in the tape rack.  See docs/TAPE.CHANGERS for more
-info.
-
-
-* TAPE CHANGER SUPPORT IMPROVED
-
-The specs in docs/TAPE.CHANGERS has been updated, and the code changed to
-match.  The major difference is that Amanda no longer assumes slots in the
-tape rack are numbered from 0 to N-1.  They can be numbered or labeled in
-any manner that suits your tape-changer, amanda doesn't care what the
-actual slot names are.  Also added "first" and "last" slot specifiers, and
-an -eject command.
-
-The chg-generic.sh tape changer script now has new "firstslot", "lastslot",
-and "needeject" parameters for the chg-generic.conf file.  It now keeps
-track of whether the current slot is loaded into the drive, so that it can
-issue an explicit eject command for those tape changers that need one.  See
-example/chg-generic.conf for more info.
-
-
-* A FEW WORDS ABOUT MULTI-TAPE RUNS
-
-I'm still holding back on support for multiple tapes in one run.  I'm
-not yet completely happy with how Amanda should handle splitting dumps
-across tapes (eg when end-of-tape is encountered in the middle of a long
-dump).  For example, this creates issues for amrestore, which currently
-doesn't know about configurations or tape changers --- on purpose, so
-that you can do restores on any machine with a tape drive, not just the
-server, and so that you can recover with no online databases present.
-
-However, because the current snapshot DOES support tape changers, and
-multiple runs in one day, some of the benefit of multi-tape runs can be
-had by simply running amanda several times in a row.  Eg, to fill three
-tapes per night, you can put
-       amdump <conf>; amdump <conf>; amdump <conf>
-in you crontab.  On the down side, this will generate three reports
-instead of one, will do more incremental dumps than necessary, and will
-run slower.  Not very satisfying, but if you *need* to fill more than
-one tape per day NOW, it should work.
-
-
-* BIG PLANNER CHANGES
-
-The support for writing to multiple tapes in one run is almost finished
-now.  See docs/MULTITAPE for an outline of the design.  The planner support
-for this is included in this snapshot, but the taper part is not.
-
-There is a new amanda.conf variable "runtapes" which specifies the number
-of tapes to use on each amdump run.  For now this should stay at 1, the
-default.  Also, the old "mincycle" and "maxcycle" amanda.conf variables are
-deprecated, but still work for now.  "maxcycle" was never used, and
-"mincycle" is now called "dumpcycle".
-
-There are two visible differences in the new planner: First, Planner now
-thinks in real-time, rather than by the number of tapes as before.  That
-is, a filesystem is due for a full backup once every <dumpcycle> days,
-regardless of how many times amanda is run in that interval.  As a
-consequence, you need to make sure the dumpcycle variable marks real time
-instead of the number of days.  For example, previously "mincycle 10"
-worked for a two week cycle if you ran amdump only on weekdays (for 10 runs
-in a cycle).  Now a two week cycle must be specified as "dumpcycle 14" or
-"dumpcycle 2 weeks".  The "2 weeks" specifier works with both the old and
-new versions of planner, because previously "weeks" multiplied by 5, and
-now it multiplies by 7.
-
-Second, planner now warns about impending overwrites of full backups.  If a
-filesystem's last full backup is on a tape that is due to be overwritten in
-the next 5 runs, planner will give you a heads-up about it, so that you can
-restore the filesystem somewhere, or switch that tape out of rotation
-(substitute a new tape with the same label).  This situation often occurs
-after a hardware failure brings a machine or disk down for some days. 
-
-* LEVEL-0 DUMPS ALLOWED WITH NO TAPE
-
-If there is no tape present (or the tape drive fails during dumping),
-Amanda switches to degraded mode.  In degraded mode, level-0 dumps
-are not allowed.  This can be a pain for unattended sites over the
-weekend (especially when there is a large holding disk that can hold
-any necessary dumps).  Amanda now supports a new configuration file
-directive, "reserve".  This tells Amanda to reserve that percentage
-of total holding disk space for degraded mode dumps.  Example: your
-total holding disk space adds up to 8.4GB.  If you specify a reserve
-of 50, 4.2GB (50%) of the holding disk space will be allowed to be
-used for regular dumps, but if that limit is hit, Amanda will switch
-to degraded dumps.  For backward compatibility, if no 'reserve' keyword
-is present, 100 will be assumed (e.g. never do full dumps if degraded
-mode is in effect).  NOTE: this percentage applies from run to run, so,
-as in the previous example, when Amanda runs the next day, if there is
-3.8GB left on the holding disk, 1.9GB will be reserved for degraded
-mode dumps (e.g. the percentage keeps sliding).
-
diff --git a/docs/WISHLIST b/docs/WISHLIST
deleted file mode 100644 (file)
index 6907195..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-Amanda WISHLIST
----------------
-
-These are items that we are planning to address, OR which we would
-like to see happen sometime in the future.  They appear in vaguely
-decreasing order of priority and feasibility.  Of course, we aren't
-promising to deliver anything, but it's a reasonable bet that at least
-the first few things will get done.
-
-You may find more up-to-date information in the Amanda Ongoing
-Projects page, http://www.amanda.org/ongoing.html.
-
-If you have any ideas about any of the following, please send an
-e-mail note to amanda-users@amanda.org or amanda-hackers@amanda.org.
-
-* Setting tapecycle to infinity (which is reasonable for archive
-configurations) will cause planner to crash, because it will try to
-allocate a huge memory block.  The current workaround is to use a
-finite tapecycle; a correct fix would involve dynamically growing the
-structure allocated by planner as needed.
-
-* amcheck and amadmin should check whether the user that invoked it is
-the user configured to run amanda.
-
-* Amanda should be able to retry failed backups in a single run.  So,
-if backup fails because of active filesystems or lack of memory,
-amanda could throw the failed backup away and run it again, instead of
-trying it again in the next run only.
-
-* SAMBA should be treated as a different backup program, not as
-GNUTAR, because it cannot handle dump-style incrementals (as of
-samba-1.9.17p5).  We should be able to back up subdirectories of
-shares (using the -D switch).  It should be possible to specify the
-samba user, instead of assuming user `backup'.  /etc/amandapass could
-be specified (in a backward-compatible way) as follows:
-
-// password [-U default_user] [[-W] default_workgroup]
-//hostname password [-U default_user] [[-W] default_workgroup]
-//hostname/sharename[/subdir] password [-U default_user] [[-W] default_workgroup | -W-]
-
-So that:
-
-// XXXX -W Win32-LAB
-//win-srv XXXX -U srv-backup
-//win-srv/F$ XXXX -U backup
-//other XXXX -U amanda -W-
-
-would be equivalent to:
-
-//win-client1/C$ XXXX -W Win32-LAB
-//win-client2/C$ XXXX -W Win32-LAB
-//win-srv/C$ XXXX -U srv-backup -W Win32-LAB
-//win-srv/D$ XXXX -U srv-backup -W Win32-LAB
-//win-srv/F$ XXXX -U backup -W Win32-LAB
-//other/C$ XXXX -U amanda  (no domain specified)
-
-* When a disk is configured to skip-incr, it will present no estimate
-errors every day except the day it is scheduled for a full dump.
-Besides, it will never be promoted, because no estimate is requested
-on such days.  Maybe we should request a full estimate anyway, and
-skip incrementals after analysis takes place.
-
-* It should be possible to re-generate databases and indexes from
-tapes.
-
-* amanda should install man-pages for installed programs only.
-
-* we should provide for client-side configuration files, to specify
-default tape server, index server, and perhaps even pathnames to some
-programs.
-
-* amidxtaped should be able to deal with tape changers, and it should
-check whether it has the appropriate tape before reading any backup
-files from it.  It should also be possible to configure whether
-amidxtaped should decompress the dump stream or not (so amrecover
-could decompress it locally).  Suggested by Chris Jones
-<cjones@honors.montana.edu>
-
-* Ports to non-Unix platforms, specifically Macs and PCs.  The hooks
-are in the Amanda protocol to support non-dump backup programs, but
-no-one has volunteered to implement the client side.  Sorry, I'm not a
-Mac programmer!
-
-* More tools in Amadmin.  The administrator should be able to look at
-the database in various ways.  Adding / deleting / moving disks and
-hosts should be done through amadmin instead of editing the disklist
-directly.  This will allow Amanda to do some sanity checks for the
-operators, to make sure permissions are set up right, etc.
-  You should be able to force full dumps for nights other than
-tonight.  Rather than one command at a time on the command line,
-amadmin could be a little shell with a help facility (ala ckermit or
-gnuplot, if you've seen those).
-
-* A tape-verify pass after the Amanda run (we already have one, but it
-doesn't work with dump as well as it does with GNU tar).  Perhaps
-taper could calculate a CRC for each file and store that in the
-database, to be checked by the verifier.
-
-* More sophisticated tape management.  Should Amanda track tapes
-globally, counting the number of times tapes were used, and
-recommending retirement for tapes at the appropriate time?  I'm not
-convinced, but I'm interested in the subject.  What do you think?  How
-does your site deal with this?
-
-* Automatically notice that disks have moved around.  This is a
-nice-to-have but don't hold your breath.  It would be nice if planner
-(via sendsize) would notice and optionally add/delete filesystems as
-they appear/disappear from the fstab.
-
-* Automatically notice that external dumps have been done.  Sendsize
-could also notice if a filesystem was dumped externally to Amanda.
-Right now the planner assumes that the incrementals it is doing are
-relative to the full dumps it is doing.  If someone does a full dump
-of one of its filesystems (and writes /etc/dumpdates) outside of
-Amanda, data could be lost.  I think Sun's Backup-Copilot handles this
-well.  We should too.
-
-* Support for client-initiated backups might be interesting, but the
-server would have to keep listening for clients backup requests for a
-configurable period of time.  This could be used to back up secure
-hosts, for instance.
-
-* Backups to remote tape devices (i.e., not in the main amanda
-server), as well as to filesystems, should be supported.  Instead of
-hard-coding the interface with tape devices in amanda, there should be
-a higher level interface that allowed different storage devices to be
-used.  Amanda should also be able to retain backups in disk, even
-after they are taped, for faster restore of recently backed up data.
-It should also be possible to store a single backup in multiple tapes,
-for redundancy.
-
-* We need a better protocol between the driver and dumpers.
-- setup terminated (to not start to dump onn the same host at the
-  same time).
-- dumper should ask for holding space if the dump is larger that
-  estimated.  It is needed if we want to write a dump on multiple
-  holding disks.
-- driver should ask periodicaly if the dumper is still alive (in case       
-  the dumper hang).
-
-* From: "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
-Here's an idea for someone to think about.  What if we made the
-"length" in a tapetype definition always be the "no compression"
-value?  Then change the dumptype "compress" option to accept
-"hardware" as another type (ala "client" and "server") and let planner
-do its normal thing with that information (including "comprate", which
-at the current default of 50% is the usual first guess for hardware
-compression).
-  This would make setting the tape length value less confusing, and
-make the tapetype program easier to run.  You could even get more
-accurate planning than what is currently available by setting the
-comprate to what you know the data is like on a dumptype by dumptype
-basis.
-
-* We could have an autoflush flag to tell amdump to automatically
-flush the contents of the holding disk to tape.  We'd have to figure
-out a way to tell planner to take that space into account.
-
-* Insert your favorite feature here, and send us e-mail telling about
-what you'd like to see!  Of course, we can't please everyone, and
-can't implement everything, but we are very interested in how other
-sites operate so that we can find common ground and learn from each
-other.  Thanks!
diff --git a/docs/YEAR2000 b/docs/YEAR2000
deleted file mode 100644 (file)
index a826c7b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-The amanda developers believe Amanda is Y2K-compliant, as long as the
-underlying operating system and C library are.  The only date
-manipulations performed by Amanda use C-language time manipulation
-functions and/or strings where years are represented with the
-century-included notation.
diff --git a/docs/ZFTAPE b/docs/ZFTAPE
deleted file mode 100644 (file)
index 9541aee..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-Amanda with floppy tape drives on Linux: 
-(A.Gebhardt <albrecht.gebhardt@uni-klu.ac.at>)
-
-
-Amanda now supports the ftape driver version 3.04d (see 
-http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape).
-It adjusts the blocksize automatically to 32k and supports QIC volume tables.
-
-It uses only one open() call for writing backups to one tape, so the 
-"busy"-lamp of the drive will be on all the time. (With normal amanda
-code it would be off in pauses between two files written to tape.)
-
-For volume table support you have to get libvtblc first (Available at
-ftp://pc02-stat.sci.uni-klu.ac.at/pub/Linux/libvtblc). This library contains
-the functions and subroutines from the vtblc utility, distributed with ftape.
-(May be, this library will be part of a future ftape package).
-
-You have to set the raw tape device for volume table operations, usually
-/dev/rawft0, either via "configure --with-ftape-rawdevice=..." or
-with "rawtapedev=..." in amanda.conf (configure checks for /dev/rawft[0-3],
-to get a guess for this value). 
-Dont forget to make this device read/writeable for your backup user.
-
-For compilation you need the header files from ftape 3.04d in your include
-tree.
-
-The volumetable of a tape "amlabeled" TEST-VOL2 with 4 backups on it
-would look like (listed with vtblc utility from ftape):
-
-gamma@backup[backup]$ vtblc
- Nr  Id          Label                   Date           Start      End    Space
---------------------------------------------------------------------------------
-  0 VTBL "TEST-VOL2             "  23:08:06 03/15/98        3        4    0.00%
-  1 VTBL "gamma //beta/C 0      "  00:00:00 03/15/98        5      374    0.68%
-  2 VTBL "gamma sda2 0          "  00:00:00 03/15/98      375     1029    1.21%
-  3 VTBL "alpha sda2 0          "  00:00:00 03/15/98     1030     1906    1.62%
-  4 VTBL "alpha sda6 0          "  00:00:00 03/15/98     1907     8092    11.45%
-  5 VTBL "AMANDA Tape End       "  01:45:15 03/16/98     8093     8094    0.00%
-
-With lvtblc, currently available with the libvtblc library, you can list 
-the complete label strings 
-(44 characters, not only the first 22 characters as with vtblc):
-  
-gamma@backup[backup]$ lvtblc -l
- Nr  Id          Label                                         Date 
---------------------------------------------------------------------------------
-  0 VTBL "TEST-VOL2                                   "  23:08:06 03/15/98
-  1 VTBL "gamma //beta/C 0                            "  00:00:00 03/15/98
-  2 VTBL "gamma sda2 0                                "  00:00:00 03/15/98
-  3 VTBL "alpha sda2 0                                "  00:00:00 03/15/98
-  4 VTBL "alpha sda6 0                                "  00:00:00 03/15/98
-  5 VTBL "AMANDA Tape End                             "  01:45:15 03/16/98
-
-Note on datestamps:
-volume 0    (amanda label): reflects the time of starting the backup 
-volume i    (backup files): amanda datestamps of the backup files
-last volume (end marker)  : reflects the time of finishing the backup
-
-
-I tested this on a Linux machine (P90 / 96Mb RAM / 256 Mb swap) with two other 
-clients (Linux / WfW) using
-
-kernel 2.0.33, 
-ftape 3.04d, 
-amanda 2.4.0b6p4 
-
-with an internal Iomega Ditto 3200 (TR-3) drive attached to an Iomega Ditto 
-Dash controller (at 2000 Kbps). My "tapetype" follows:
-
-define tapetype DITTO-TR3 {
-    comment "Iomega DITTO 3200 Travan 3 tape drives"
-    length 1500 mbytes          #
-    filemark 29 kbytes          # ???
-    speed 256 kbytes            # = 2000 Kbit/s ?
-}
-
-Note on filemark size:
-Filemarks are not written to the tape (they are written to the header segment 
-and use there 128 byte), so their size could even be 0. But a tape segment 
-takes at least 29 kb (+3 kb ecc-code = 32 kb), so in the worst case an eof will
-waste 29 kb.
-
diff --git a/docs/amadmin.8.txt b/docs/amadmin.8.txt
new file mode 100644 (file)
index 0000000..209c3af
--- /dev/null
@@ -0,0 +1,220 @@
+
+                              amadmin
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amadmin \14 administrative interface to control AMANDA backups
+
+Synopsis
+
+amadmin config command [ command options ]
+
+DESCRIPTION
+
+Amadmin performs various administrative tasks on the config AMANDA
+configuration.
+See the amanda(8) man page for more details about AMANDA.
+
+COMMANDS
+
+Commands that take a hostname [ disks ] parameter pair operate on all disks in
+the disklist for that hostname if no disks are specified. Where hostname is
+also marked as being optional, the command operates on all hosts and disks in
+the disklist. Both hostname and disks are special expressions, see the "HOST &
+DISK EXPRESSION" section of amanda(8) for a description.
+
+
+  version
+      Show the current version and some compile time and runtime parameters.
+      The config parameter must be present but is ignored.
+
+  force-bump [ hostname [ disks ]* ]+
+      Force the disks on hostname to bump to a new incremental level during the
+      next AMANDA run.
+
+  force-no-bump [ hostname [ disks ]* ]+
+      Force the disks on hostname to not bump to a new incremental level during
+      the next AMANDA run.
+
+  unforce-bump [ hostname [ disks ]* ]+
+      Undo a previous force-bump or force-no-bump command.
+
+  force [ hostname [ disks ]* ]+
+      Force the disks on hostname to do a full (level 0) backup during the next
+      AMANDA run.
+
+  unforce [ hostname [ disks ]* ]+
+      Undo a previous force command.
+
+  reuse tapelabel [ ... ]
+      The tapes listed will be available for reuse at their point in the tape
+      cycle.
+
+  no-reuse tapelabel [ ... ]
+      The tapes listed will not be reused when their turn comes up again in the
+      tape cycle. Note that if this causes the number of reusable tapes to drop
+      below the amanda.conf tapecycle value, AMANDA will request new tapes
+      until the count is satisfied again.
+
+  due [ hostname [ disks ]* ]*
+      Show when the next full dump is due.
+
+  find [ --sort hkdlb ] [ hostname [ disks ]* ]*
+      Display all backups currently on tape or in the holding disk. The tape
+      label or holding disk filename, file number, and status are displayed.
+      The --sort option changes the sort order using the following flags:
+      hhost name kdisk name ddump date lbackup level btape label
+      An uppercase letter reverses the sort order for that key. The default
+      sort order is hkdlb.
+
+  delete [ hostname [ disks ]* ]+
+      Delete the specified disks on hostname from the AMANDA database.
+
+      Note
+
+      If you do not also remove the disk from the disklist file, AMANDA will
+      treat it as a new disk during the next run.
+
+  tape
+      Display the tape(s) AMANDA expects to write to during the next run. See
+      also amcheck(8).
+
+  bumpsize
+      Display the current bump threshold parameters, calculated for all backup
+      levels.
+
+  balance [ --days <num> ]
+      Display the distribution of full backups throughout the dump schedule.
+
+  export [ hostname [ disks ]* ]*
+      Convert records from the AMANDA database to a text format that may be
+      transmitted to another AMANDA machine and imported.
+
+  import
+      Convert exported records read from standard input to a form AMANDA uses
+      and insert them into the database on this machine.
+
+  disklist [ hostname [ disks ]* ]*
+      Display the disklist information for each of the disks on hostname (or
+      all hosts). Mostly used for debugging.
+
+  info [ hostname [ disks ]* ]*
+      Display the database record for each of the disks on hostname (or all
+      hosts). Mostly used for debugging.
+
+
+EXAMPLES
+
+Request three specific file systems on machine-a get a full level 0 backup
+during the next AMANDA run.
+
+  $ amadmin daily force machine-a / /var /usr
+  amadmin: machine-a:/ is set to a forced level 0 tonight.
+  amadmin: machine-a:/var is set to a forced level 0 tonight.
+  amadmin: machine-a:/usr is set to a forced level 0 tonight.
+
+Request all file systems on machine-b get a full level 0 backup during the next
+AMANDA run.
+
+  $ amadmin daily force machine-b
+  amadmin: machine-b:/ is set to a forced level 0 tonight.
+  amadmin: machine-b:/var is set to a forced level 0 tonight.
+  amadmin: machine-b:/usr is set to a forced level 0 tonight.
+  amadmin: machine-b:/home is set to a forced level 0 tonight.
+
+Undo the previous force request for /home on machine-b. The other file systems
+will still get a full level 0 backup.
+
+  $ amadmin daily unforce machine-b /home
+  amadmin: force command for machine-b:/home cleared.
+
+Locate backup images of /var from machine-c. The tape or file column displays
+either a tape label or a filename depending on whether the image is on tape or
+is still in the holding disk. If the image is on tape, the file column tells
+you which file on the tape has the image (file number zero is a tape label).
+This column shows zero and is not meaningful if the image is still in the
+holding disk. The status column tells you whether the backup was successful or
+had some type of error.
+
+  $ amadmin daily find machine-c /var
+  date        host      disk lv tape or file                    file status
+  2000-11-09  machine-c /var  0 000110                             9 OK
+  2000-11-08  machine-c /var  2 000109                             2 OK
+  2000-11-07  machine-c /var  2 /amanda/20001107/machine-c._var.2  0 OK
+  2000-11-06  machine-c /var  2 000107                             2 OK
+  2000-11-05  machine-c /var  2 000106                             3 OK
+  2000-11-04  machine-c /var  2 000105                             2 OK
+  2000-11-03  machine-c /var  2 000104                             2 OK
+  2000-11-02  machine-c /var  2 000103                             2 OK
+  2000-11-01  machine-c /var  1 000102                             5 OK
+  2000-10-31  machine-c /var  1 000101                             3 OK
+
+Forget about the /workspace disk on machine-d. If you do not also remove the
+disk from the disklist file, AMANDA will treat it as a new disk during the next
+run.
+
+  $ amadmin daily delete machine-d /workspace
+  amadmin: machine-d:/workspace deleted from database.
+  amadmin: NOTE: you'll have to remove these from the disklist yourself.
+
+Find the next tape AMANDA will use (in this case, 123456).
+
+  $ amadmin daily tape
+  The next AMANDA run should go onto tape 123456 or a new tape.
+
+Show how well full backups are balanced across the dump cycle. The due-date
+column is the day the backups are due for a full backup. #fs shows the number
+of filesystems doing full backups that night, and orig KB and out KB show the
+estimated total size of the backups before and after any compression,
+respectively.
+The balance column shows how far off that night's backups are from the average
+size (shown at the bottom of the balance column). AMANDA tries to keep the
+backups within +/- 5%, but since the amount of data on each filesystem is
+always changing, and AMANDA will never delay backups just to rebalance the
+schedule, it is common for the schedule to fluctuate by larger percentages. In
+particular, in the case of a tape or backup failure, a bump will occur the
+following night, which will not be smoothed out until the next pass through the
+schedule.
+The last line also shows an estimate of how many AMANDA runs will be made
+between full backups for a file system. In the example, a file system will
+probably have a full backup done every eight times AMANDA is run (e.g. every
+eight days).
+
+  $ amadmin daily balance
+   due-date  #fs   orig KB    out KB  balance
+  -------------------------------------------
+  11/10 Mon   21    930389    768753    +5.1%
+  11/11 Tue   29   1236272    733211    +0.2%
+  11/12 Wed   31   1552381    735796    +0.6%
+  11/13 Thu   23   1368447    684552    -6.4%
+  11/14 Fri   32   1065603    758155    +3.6%
+  11/15 Sat   14   1300535    738430    +0.9%
+  11/16 Sun   31   1362696    740365    +1.2%
+  11/17 Mon   30   1427936    773397    +5.7%
+  11/18 Tue   11   1059191    721786    -1.3%
+  11/19 Wed   19   1108737    661867    -9.5%
+  -------------------------------------------
+  TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
+
+
+FILES
+
+/usr/local/etc/amanda/config/amanda.conf
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amcheck(8), amdump(8), amrestore(8)
+-------------------------------------------------------------------------------
+
+Prev                                   Up     Next
+Chapter 35. The AMANDA Manual Pages.  Home  amanda
+
diff --git a/docs/amanda.8.txt b/docs/amanda.8.txt
new file mode 100644 (file)
index 0000000..cb98f62
--- /dev/null
@@ -0,0 +1,1182 @@
+
+                               amanda
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amanda \14 Advanced Maryland Automatic Network Disk Archiver
+
+Synopsis
+
+amdump config
+amflush [-f ] config
+amcleanup config
+amrecover [config] [options]
+amrestore [options] tapedevice [ hostname [diskname]]
+amlabel config label [ slot slot ]
+amcheck [options] config
+amadmin config command [options]
+amtape config command [options]
+amverify config
+amrmtape [options] config label
+amstatus config [options]
+amoverview config [options]
+amplot [options] amdump-files
+amreport [config] [options]
+amtoc [options] logfile
+amcheckdb config
+amgetconf [config] parameter
+
+DESCRIPTION
+
+AMANDA is the "Advanced Maryland Automatic Network Disk Archiver". This manual
+page gives an overview of the AMANDA commands and configuration files for quick
+reference.
+Here are all the AMANDA commands. Each one has its own manual page. See them
+for all the gory details.
+
+
+  amdump
+      Take care of automatic AMANDA backups. This is normally executed by cron
+      on a computer called the tape server host and requests backups of file
+      systems located on backup clients. Amdump backs up all disks in the
+      disklist file (discussed below) to tape or, if there is a problem, to a
+      special holding disk. After all backups are done, amdump sends mail
+      reporting failures and successes.
+
+  amflush
+      Flush backups from the holding disk to tape. Amflush is used after amdump
+      has reported it could not write backups to tape for some reason. When
+      this happens, backups stay in the holding disk. Run amflush after the
+      tape problem is corrected to write backups from the holding disk to tape.
+
+  amcleanup
+      Clean up after an interrupted amdump. This command is only needed if
+      amdump was unable to complete for some reason, usually because the tape
+      server host crashed while amdump was running.
+
+  amrecover
+      Provides an interactive interface to browse the AMANDA index files
+      (backup image catalogues) and select which tapes to recover files from.
+      It can also run amrestore and a restore program (e.g. tar) to actually
+      recover the files.
+
+  amrestore
+      Read an AMANDA tape, searching for requested backups. Amrestore is
+      suitable for everything from interactive restores of single files to a
+      full restore of all partitions on a failed disk.
+
+  amlabel
+      Write an AMANDA format label onto a tape. All AMANDA tapes must be
+      labeled with amlabel. Amdump and amflush will not write to an unlabeled
+      tape (see TAPE MANAGEMENT below).
+
+  amcheck
+      Verify the correct tape is mounted and all file systems on all backup
+      client systems are ready to be backed up. Often run by cron before amdump
+      to generate a mail warning that backups might fail unless corrective
+      action is taken.
+
+  amadmin
+      Take care of administrative tasks like finding out which tapes are needed
+      to restore a filesystem, forcing hosts to do full backups of selected
+      disks and looking at schedule balance information.
+
+  amtape
+      Take care of tape changer control operations like loading particular
+      tapes, ejecting tapes and scanning the tape storage slots.
+
+  amverify
+      Check AMANDA backup tapes for errors.
+
+  amrmtape
+      Delete a tape from the AMANDA databases.
+
+  amstatus
+      Report the status of a running or completed amdump.
+
+  amoverview
+      Display a chart of hosts and file systems backed up every run.
+
+  amplot
+      Generate utilization plots of AMANDA runs for performance tuning.
+
+  amreport
+      Generate an AMANDA summary E-mail report.
+
+  amtoc
+      Generate table of content files for AMANDA tapes.
+
+  amcheckdb
+      Verify every tape AMANDA knows about is consistent in the database.
+
+  amgetconf
+      Look up parameters in the AMANDA configuration file.
+
+
+CONFIGURATION
+
+There are three user-editable files that control the behavior of AMANDA. The
+first is amanda.conf, the main configuration file. It contains parameters to
+customize AMANDA for the site. Second is the disklist file, which lists hosts
+and disk partitions to back up. Third is the tapelist file, which lists tapes
+that are currently active. These files are described in more detail in the
+following sections.
+All files are stored in individual configuration directories under /usr/local/
+etc/amanda/. A site will often have more than one configuration. For example,
+it might have a normal configuration for everyday backups and an archive
+configuration for infrequent full archival backups. The configuration files
+would be stored under directories /usr/local/etc/amanda/normal/ and /usr/local/
+etc/amanda/archive/, respectively. Part of the job of an AMANDA administrator
+is to create, populate and maintain these directories.
+All log and database files generated by AMANDA go in corresponding directories
+somewhere. The exact location is controlled by entries in amanda.conf. A
+typical location would be under /var/adm/amanda. For the above example, the
+files might go in /var/adm/amanda/normal/ and /var/adm/amanda/archive/.
+As log files are no longer needed (no longer contain relevant information),
+AMANDA cycles them out in various ways, depending on the type of file.
+Detailed information about amdump runs are stored in files named amdump.NN
+where NN is a sequence number, with 1 being the most recent file. Amdump
+rotates these files each run, keeping roughly the last tapecycle (see below)
+worth of them.
+The file used by amreport to generate the mail summary is named log.YYYYMMDD.NN
+where YYYYMMDD is the datestamp of the start of the amdump run and NN is a
+sequence number started at 0. At the end of each amdump run, log files for runs
+whose tapes have been reused are renamed into a subdirectory of the main log
+directory (see the logdir parameter below) named oldlog. It is up to the AMANDA
+administrator to remove them from this directory when desired.
+Index (backup image catalogue) files older than the full dump matching the
+oldest backup image for a given client and disk are removed by amdump at the
+end of each run.
+
+CONFIG FILE PARAMETERS
+
+There are a number of configuration parameters that control the behavior of the
+AMANDA programs. All have default values, so you need not specify the parameter
+in amanda.conf if the default is suitable.
+Lines starting with # are ignored, as are blank lines. Comments may be placed
+on a line with a directive by starting the comment with a #. The remainder of
+the line is ignored.
+Keywords are case insensitive, i.e. mailto and MailTo are treated the same.
+Integer arguments may have one of the following (case insensitive) suffixes,
+some of which have a multiplier effect:
+
+
+  b byte bytes
+      Some number of bytes.
+
+  bps
+      Some number of bytes per second.
+
+  k kb kbyte kbytes kilobyte kilobytes
+      Some number of kilobytes (bytes*1024).
+
+  kps kbps
+      Some number of kilobytes per second (bytes*1024).
+
+  m mb meg mbyte mbytes megabyte megabytes
+      Some number of megabytes (bytes*1024*1024).
+
+  mps mbps
+      Some number of megabytes per second (bytes*1024*1024).
+
+  g gb gbyte gbytes gigabyte gigabytes
+      Some number of gigabytes (bytes*1024*1024*1024).
+
+  tape tapes
+      Some number of tapes.
+
+  day days
+      Some number of days.
+
+  week weeks
+      Some number of weeks (days*7).
+
+      Note
+
+      The value inf may be used in most places where an integer is expected to
+      mean an infinite amount.
+      Boolean arguments may have any of the values y, yes, t, true or on to
+      indicate a true state, or n, no, f, false or off to indicate a false
+      state. If no argument is given, true is assumed.
+
+
+
+  org string
+      Default: daily. A descriptive name for the configuration. This string
+      appears in the Subject line of mail reports. Each AMANDA configuration
+      should have a different string to keep mail reports distinct.
+
+  mailto string
+      Default: operators. A space separated list of recipients for mail
+      reports.
+
+  dumpcycle int
+      Default: 10 days. The number of days in the backup cycle. Each disk will
+      get a full backup at least this often. Setting this to zero tries to do a
+      full backup each run.
+
+      Note
+
+      This parameter may also be set in a specific dumptype (see below). This
+      value sets the default for all dumptypes so must appear in amanda.conf
+      before any dumptypes are defined.
+
+  runspercycle int
+      Default: same as dumpcycle. The number of amdump runs in dumpcycle days.
+      A value of 0 means the same value as dumpcycle. A value of -1 means guess
+      the number of runs from the tapelist file, which is the number of tapes
+      used in the last dumpcycle days / runtapes.
+
+  tapecycle int
+      Default: 15 tapes. Typically tapes are used by AMANDA in an ordered
+      rotation. The tapecycle parameter defines the size of that rotation. The
+      number of tapes in rotation must be larger than the number of tapes
+      required for a complete dump cycle (see the dumpcycle parameter).
+      This is calculated by multiplying the number of amdump runs per dump
+      cycle (runspercycle parameter) times the number of tapes used per run
+      (runtapes parameter). Typically two to four times this calculated number
+      of tapes are in rotation. While AMANDA is always willing to use a new
+      tape in its rotation, it refuses to reuse a tape until at least
+      'tapecycle -1' number of other tapes have been used.
+      It is considered good administrative practice to set the tapecycle
+      parameter slightly lower than the actual number of tapes in rotation.
+      This allows the administrator to more easily cope with damaged or
+      misplaced tapes or schedule adjustments that call for slight adjustments
+      in the rotation order.
+
+
+
+  dumpuser string
+      Default: amanda. The login name AMANDA uses to run the backups. The
+      backup client hosts must allow access from the tape server host as this
+      user via .rhosts or .amandahosts, depending on how the AMANDA software
+      was built.
+
+  printer string
+      Printer to use when doing tape labels. See the lbl-templ tapetype option.
+
+  tapedev string
+      Default: /dev/nst0. The path name of the non-rewinding tape device. Non-
+      rewinding tape device names often have an 'n' in the name, e.g. /dev/rmt/
+      0mn, however this is operating system specific and you should consult
+      that documentation for detailed naming information.
+      If a tape changer is configured (see the tpchanger option), this option
+      might not be used.
+      If the null output driver is selected (see the OUTPUT_DRIVERS section
+      later for more information), programs such as amdump will run normally
+      but all images will be thrown away. This should only be used for
+      debugging and testing, and probably only with the record option set to
+      no.
+
+  rawtapedev string
+      Default: /dev/null. The path name of the raw tape device. This is only
+      used if AMANDA is compiled for Linux machines with floppy tapes and is
+      needed for QIC volume table operations.
+
+  tpchanger string
+      Default: none. The name of the tape changer. If a tape changer is not
+      configured, this option is not used and should be commented out of the
+      configuration file.
+      If a tape changer is configured, choose one of the changer scripts (e.g.
+      chg-scsi) and enter that here.
+
+
+
+  changerdev string
+      Default: /dev/null. A tape changer configuration parameter. Usage depends
+      on the particular changer defined with the tpchanger option.
+
+  changerfile string
+      Default: /usr/adm/amanda/log/changer-status. A tape changer configuration
+      parameter. Usage depends on the particular changer defined with the
+      tpchanger option.
+
+  runtapes int
+      Default: 1. The maximum number of tapes used in a single run. If a tape
+      changer is not configured, this option is not used and should be
+      commented out of the configuration file.
+      If a tape changer is configured, this may be set larger than one to let
+      AMANDA write to more than one tape.
+      Note that this is an upper bound on the number of tapes, and AMANDA may
+      use less.
+      Also note that as of this release, AMANDA does not support true tape
+      overflow. When it reaches the end of one tape, the backup image AMANDA
+      was processing starts over again on the next tape.
+
+
+
+  maxdumpsize int
+      Default: runtapes*tape_length. Maximum number of bytes the planner will
+      schedule for a run.
+
+  taperalgo [first|firstfit|largest|largestfit|smallest|last]
+      Default: first. The algorithm used to choose which dump image to send to
+      the taper.
+
+
+        first
+            First in, first out.
+
+        firstfit
+            The first dump image that will fit on the current tape.
+
+        largest
+            The largest dump image.
+
+        largestfit
+            The largest dump image that will fit on the current tape.
+
+        smallest
+            The smallest dump image.
+
+        last
+            Last in, first out.
+
+
+  labelstr string
+      Default: .*. The tape label constraint regular expression. All tape
+      labels generated (see amlabel(8)) and used by this configuration must
+      match the regular expression. If multiple configurations are run from the
+      same tape server host, it is helpful to set their labels to different
+      strings (for example, "DAILY[0-9][0-9]*" vs. "ARCHIVE[0-9][0-9]*") to
+      avoid overwriting each other's tapes.
+
+  tapetype string
+      Default: EXABYTE. The type of tape drive associated with tapedev or
+      tpchanger. This refers to one of the defined tapetypes in the config file
+      (see below), which specify various tape parameters, like the length,
+      filemark size, and speed of the tape media and device.
+
+  ctimeout int
+      Default: 30 seconds. Maximum amount of time that amcheck will wait for
+      each client host.
+
+  dtimeout int
+      Default: 1800 seconds. Amount of idle time per disk on a given client
+      that a dumper running from within amdump will wait before it fails with a
+      data timeout error.
+
+  etimeout int
+      Default: 300 seconds. Amount of time per disk on a given client that the
+      planner step of amdump will wait to get the dump size estimates. For
+      instance, with the default of 300 seconds and four disks on client A,
+      planner will wait up to 20 minutes for that machine. A negative value
+      will be interpreted as a total amount of time to wait per client instead
+      of per disk.
+
+  netusage int
+      Default: 300 Kbps. The maximum network bandwidth allocated to AMANDA, in
+      Kbytes per second. See also the interface section.
+
+  inparallel int
+      Default: 10. The maximum number of backups that AMANDA will attempt to
+      run in parallel. AMANDA will stay within the constraints of network
+      bandwidth and holding disk space available, so it doesn't hurt to set
+      this number a bit high. Some contention can occur with larger numbers of
+      backups, but this effect is relatively small on most systems.
+
+  displayunit "k|m|g|t"
+      Default: "k". The unit used to print many numbers, k=kilo, m=mega,
+      g=giga, t=tera.
+
+  dumporder string
+      Default: tttTTTTTTT. The priority order of each dumper:
+
+      * s: smallest size
+      * S: largest size
+      * t: smallest time
+      * T: largest time
+      * b: smallest bandwidth
+      * B: largest bandwidth
+
+
+
+
+  maxdumps int
+      Default: 1. The maximum number of backups from a single host that AMANDA
+      will attempt to run in parallel. See also the inparallel option.
+      Note that this parameter may also be set in a specific dumptype (see
+      below). This value sets the default for all dumptypes so must appear in
+      amanda.conf before any dumptypes are defined.
+
+
+
+  bumpsize int
+      Default: 10 Mbytes. The minimum savings required to trigger an automatic
+      bump from one incremental level to the next. If AMANDA determines that
+      the next higher backup level will be this much smaller than the current
+      level, it will do the next level. See also the bumpmult option.
+
+  bumpmult float
+      Default: 1.5. The bump size multiplier. AMANDA multiplies bumpsize by
+      this factor for each level. This prevents active filesystems from bumping
+      too much by making it harder to bump to the next level. For example, with
+      the default bumpsize and bumpmult set to 2.0, the bump threshold will be
+      10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level
+      three, and so on.
+
+  bumpdays int
+      Default: 2 days. To insure redundancy in the dumps, AMANDA keeps
+      filesystems at the same incremental level for at least bumpdays days,
+      even if the other bump threshold criteria are met.
+
+  diskfile string
+      Default: disklist. The file name for the disklist file holding client
+      hosts, disks and other client dumping information.
+
+  infofile string
+      Default: /usr/adm/amanda/curinfo. The file or directory name for the
+      historical information database. If AMANDA was configured to use DBM
+      databases, this is the base file name for them. If it was configured to
+      use text formated databases (the default), this is the base directory and
+      within here will be a directory per client, then a directory per disk,
+      then a text file of data.
+
+  logdir string
+      Default: /usr/adm/amanda. The directory for the amdump and log files.
+
+  indexdir string
+      Default /usr/adm/amanda/index. The directory where index files (backup
+      image catalogues) are stored. Index files are only generated for
+      filesystems whose dumptype has the index option enabled.
+
+  tapelist string
+      Default: tapelist. The file name for the active tapelist file. AMANDA
+      maintains this file with information about the active set of tapes.
+
+  tapebufs int
+      Default: 20. The number of buffers used by the taper process run by
+      amdump and amflush to hold data as it is read from the network or disk
+      before it is written to tape. Each buffer is a little larger than 32
+      KBytes and is held in a shared memory region.
+
+  reserve number
+      Default: 100. The part of holding-disk space that should be reserved for
+      incremental backups if no tape is available, expressed as a percentage of
+      the available holding-disk space (0-100). By default, when there is no
+      tape to write to, degraded mode (incremental) backups will be performed
+      to the holding disk. If full backups should also be allowed in this case,
+      the amount of holding disk space reserved for incrementals should be
+      lowered.
+
+  autoflush bool
+      Default: off. Whether an amdump run will flush the dump already on
+      holding disk to tape.
+
+  amrecover_do_fsf bool
+      Default: off. Amrecover will call amrestore with the -f flag for faster
+      positioning of the tape.
+
+  amrecover_check_label bool
+      Default: off. Amrecover will call amrestore with the -l flag to check the
+      label.
+
+  amrecover_changer string
+      Default: ''. Amrecover will use the changer if you use 'settape <string>'
+      and that string is the same as the amrecover_changer setting.
+
+  columnspec string
+      Defines the width of columns amreport should use. String is a comma (',')
+      separated list of triples. Each triple consists of three parts which are
+      separated by a equal sign ('=') and a colon (':') (see the example).
+      These three parts specify:
+
+      * the name of the column, which may be:
+
+        o Compress (compression ratio)
+        o Disk (client disk name)
+        o DumpRate (dump rate in KBytes/sec)
+        o DumpTime (total dump time in hours:minutes)
+        o HostName (client host name)
+        o Level (dump level)
+        o OrigKB (original image size in KBytes)
+        o OutKB (output image size in KBytes)
+        o TapeRate (tape writing rate in KBytes/sec)
+        o TapeTime (total tape time in hours:minutes)
+
+      * the amount of space to display before the column (used to get
+        whitespace between columns).
+      * the width of the column itself. If set to a negative value, the width
+        will be calculated on demand to fit the largest entry in this column.
+
+      Here is an example:
+
+        columnspec "Disk=1:18,HostName=0:10,OutKB=1:7"
+
+      The above will display the disk information in 18 characters and put one
+      space before it. The hostname column will be 10 characters wide with no
+      space to the left. The output KBytes column is seven characters wide with
+      one space before it.
+
+
+
+  includefile string
+      Default: none. The name of an AMANDA configuration file to include within
+      the current file. Useful for sharing dumptypes, tapetypes and interface
+      definitions among several configurations.
+
+
+HOLDINGDISK SECTION
+
+The amanda.conf file may define one or more holding disks used as buffers to
+hold backup images before they are written to tape. The syntax is:
+
+  holdingdisk name {
+      holdingdisk-option holdingdisk-value
+      ...
+  }
+
+Name is a logical name for this holding disk.
+The options and values are:
+
+
+  comment string
+      Default: none. A comment string describing this holding disk.
+
+  directory disk
+      Default: /dumps/amanda. The path to this holding area.
+
+  use int
+      Default: 0 Gb. Amount of space that can be used in this holding disk
+      area. If the value is zero, all available space on the file system is
+      used. If the value is negative, AMANDA will use all available space minus
+      that value.
+
+  chunksize int
+      Default: 1 Gb. Holding disk chunk size. Dumps larger than the specified
+      size will be stored in multiple holding disk files. The size of each
+      chunk will not exceed the specified value. However, even though dump
+      images are split in the holding disk, they are concatenated as they are
+      written to tape, so each dump image still corresponds to a single
+      continuous tape section.
+      If 0 is specified, AMANDA will create holding disk chunks as large as (
+      (INT_MAX/1024)-64) Kbytes.
+      Each holding disk chunk includes a 32 Kbyte header, so the minimum chunk
+      size is 64 Kbytes (but that would be really silly).
+      Operating systems that are limited to a maximum file size of 2 Gbytes
+      actually cannot handle files that large. They must be at least one byte
+      less than 2 Gbytes. Since AMANDA works with 32 Kbyte blocks, and to
+      handle the final read at the end of the chunk, the chunk size should be
+      at least 64 Kbytes (2 * 32 Kbytes) smaller than the maximum file size,
+      e.g. 2047 Mbytes.
+
+
+DUMPTYPE SECTION
+
+The amanda.conf file may define multiple sets of backup options and refer to
+them by name from the disklist file. For instance, one set of options might be
+defined for file systems that can benefit from high compression, another set
+that does not compress well, another set for file systems that should always
+get a full backup and so on.
+A set of backup options are entered in a dumptype section, which looks like
+this:
+
+  define dumptype name {
+      dumptype-option dumptype-value
+      ...
+  }
+
+Name is the name of this set of backup options. It is referenced from the
+disklist file.
+Some of the options in a dumptype section are the same as those in the main
+part of amanda.conf. The main option value is used to set the default for all
+dumptype sections. For instance, setting dumpcycle to 50 in the main part of
+the config file causes all following dumptype sections to start with that
+value, but the value may be changed on a section by section basis. Changes to
+variables in the main part of the config file must be done before (earlier in
+the file) any dumptypes are defined.
+The dumptype options and values are:
+
+
+  auth string
+      Default: bsd. Type of authorization to perform between tape server and
+      backup client hosts. May be krb4 to use Kerberos-IV authorization.
+
+  comment string
+      Default: none. A comment string describing this set of backup options.
+
+  comprate float [, float ]
+      Default: 0.50, 0.50. The expected full and incremental compression factor
+      for dumps. It is only used if AMANDA does not have any history
+      information on compression rates for a filesystem, so should not usually
+      need to be set. However, it may be useful for the first time a very large
+      filesystem that compresses very little is backed up.
+
+  compress [client|server] string
+      Default: client fast. If AMANDA does compression of the backup images, it
+      can do so either on the backup client host before it crosses the network
+      or on the tape server host as it goes from the network into the holding
+      disk or to tape. Which place to do compression (if at all) depends on how
+      well the dump image usually compresses, the speed and load on the client
+      or server, network capacity, holding disk capacity, availability of tape
+      hardware compression, etc.
+      For either type of compression, AMANDA also allows the selection of two
+      styles of compression. Best is the best compression available, often at
+      the expense of CPU overhead. Fast is often not as good a compression as
+      best, but usually less CPU overhead.
+      So the compress options line may be one of:
+
+      * compress none
+      * compress [client] fast
+      * compress [client] best
+      * compress server fast
+      * compress server best
+
+      Note that some tape devices do compression and this option has nothing to
+      do with whether that is used. If hardware compression is used (usually
+      via a particular tape device name or mt option), AMANDA (software)
+      compression should be disabled.
+
+  dumpcycle int
+      Default: 10 days. The number of days in the backup cycle. Each disk using
+      this set of options will get a full backup at least this often. Setting
+      this to zero tries to do a full backup each run.
+
+  exclude [ list|file ][[optional][ append ][ string ]+]
+      Default: file. There are two exclude lists, exclude file and exclude
+      list. With exclude file , the string is a GNU-tar exclude expression.
+      With exclude list , the string is a file name on the client containing
+      GNU-tar exclude expressions.
+      All exclude expressions are concatenated in one file and passed to GNU-
+      tar as an --exclude-from argument.
+      With the append keyword, the string is appended to the current list,
+      without it, the string overwrites the list.
+      If optional is specified for exclude list, then amcheck will not complain
+      if the file doesn't exist or is not readable.
+      For exclude list, if the file name is relative, the disk name being
+      backed up is prepended. So if this is entered:
+
+            exclude list ".amanda.excludes"
+
+      the actual file used would be /var/.amanda.excludes for a backup of /var,
+      /usr/local/.amanda.excludes for a backup of /usr/local, and so on.
+
+  holdingdisk boolean
+      Default: yes. Whether a holding disk should be used for these backups or
+      whether they should go directly to tape. If the holding disk is a portion
+      of another file system that AMANDA is backing up, that file system should
+      refer to a dumptype with holdingdisk set to no to avoid backing up the
+      holding disk into itself.
+
+  ignore boolean
+      Default: no. Whether disks associated with this backup type should be
+      backed up or not. This option is useful when the disklist file is shared
+      among several configurations, some of which should not back up all the
+      listed file systems.
+
+  include [ list|file ][[optional][ append ][ string ]+]
+      Default: file ".". There are two include lists, include file and include
+      list. With include file , the string is a glob expression. With include
+      list , the string is a file name on the client containing glob
+      expressions.
+      All include expressions are expanded by AMANDA, concatenated in one file
+      and passed to GNU-tar as a --files-from argument. They must start with
+      "./" and contain no other "/".
+      With the append keyword, the string is appended to the current list,
+      without it, the string overwrites the list.
+      If optional is specified for include list, then amcheck will not complain
+      if the file doesn't exist or is not readable.
+      For include list, If the file name is relative, the disk name being
+      backed up is prepended.
+
+  index boolean
+      Default: no. Whether an index (catalogue) of the backup should be
+      generated and saved in indexdir. These catalogues are used by the
+      amrecover utility.
+
+  kencrypt boolean
+      Default: no. Whether the backup image should be encrypted by Kerberos as
+      it is sent across the network from the backup client host to the tape
+      server host.
+
+  maxdumps int
+      Default: 1. The maximum number of backups from a single host that AMANDA
+      will attempt to run in parallel. See also the main section parameter
+      inparallel.
+
+  maxpromoteday int
+      Default: 10000. The maximum number of day for a promotion, set it 0 if
+      you don't want promotion, set it to 1 or 2 if your disks get
+      overpromoted.
+
+  priority string
+      Default: medium. When there is no tape to write to, AMANDA will do
+      incremental backups in priority order to the holding disk. The priority
+      may be high (2). medium (1), low (0) or a number of your choice.
+
+  program string
+      Default: DUMP. The type of backup to perform. Valid values are DUMP for
+      the native operating system backup program, and GNUTAR to use GNU-tar or
+      to do PC backups using Samba.
+
+  record boolean
+      Default: yes. Whether to ask the backup program to update its database
+      (e.g. /etc/dumpdates for DUMP or /usr/local/var/amanda/gnutar-lists for
+      GNUTAR) of time stamps. This is normally enabled for daily backups and
+      turned off for periodic archival runs.
+
+  skip-full boolean
+      Default: no. If true and planner has scheduled a full backup, these disks
+      will be skipped, and full backups should be run off-line on these days.
+      It was reported that AMANDA only schedules level 1 incrementals in this
+      configuration; this is probably a bug.
+
+  skip-incr boolean
+      Default: no. If true and planner has scheduled an incremental backup,
+      these disks will be skipped.
+
+  starttime int
+      Default: none. Backups will not start until after this time of day. The
+      value should be hh*100+mm, e.g. 6:30PM (18:30) would be entered as 1830.
+
+  strategy string
+      Default: standard. Strategy to use when planning what level of backup to
+      run next. Values are:
+
+The following dumptype entries are predefined by AMANDA:
+
+  define dumptype no-compress {
+      compress none
+  }
+  define dumptype compress-fast {
+      compress client fast
+  }
+  define dumptype compress-best {
+      compress client best
+  }
+  define dumptype srvcompress {
+      compress server fast
+  }
+  define dumptype bsd-auth {
+      auth bsd
+  }
+  define dumptype krb4-auth {
+      auth krb4
+  }
+  define dumptype no-record {
+      record no
+  }
+  define dumptype no-hold {
+      holdingdisk no
+  }
+  define dumptype no-full {
+      skip-full yes
+  }
+
+In addition to options in a dumptype section, one or more other dumptype names
+may be entered, which make this dumptype inherit options from other previously
+defined dumptypes. For instance, two sections might be the same except for the
+record option:
+
+  define dumptype normal {
+      comment "Normal backup, no compression, do indexing"
+      no-compress
+      index yes
+      maxdumps 2
+  }
+  define dumptype testing {
+      comment "Test backup, no compression, do indexing, no recording"
+      normal
+      record no
+  }
+
+AMANDA provides a dumptype named global in the sample amanda.conf file that all
+dumptypes should reference. This provides an easy place to make changes that
+will affect every dumptype.
+
+TAPETYPE SECTION
+
+The amanda.conf file may define multiple types of tape media and devices. The
+information is entered in a tapetype section, which looks like this in the
+config file:
+
+  define tapetype name {
+      tapetype-option tapetype-value
+      ...
+  }
+
+Name is the name of this type of tape medium/device. It is referenced from the
+tapetype option in the main part of the config file.
+The tapetype options and values are:
+
+
+  comment string
+      Default: none. A comment string describing this set of tape information.
+
+  filemark int
+      Default: 1000 bytes. How large a file mark (tape mark) is, measured in
+      bytes. If the size is only known in some linear measurement (e.g.
+      inches), convert it to bytes using the device density.
+
+  length int
+      Default: 2000 kbytes. How much data will fit on a tape.
+      Note that this value is only used by AMANDA to schedule which backups
+      will be run. Once the backups start, AMANDA will continue to write to a
+      tape until it gets an error, regardless of what value is entered for
+      length (but see the OUTPUT_DRIVERS section later for exceptions).
+
+  blocksize int
+      Default: 32. How much data will be written in each tape record expressed
+      in KiloBytes. The tape record size (= blocksize) can not be reduced below
+      the default 32 KBytes. The parameter blocksize can only be raised if
+      AMANDA was compiled with the configure option --with-maxtapeblocksize=N
+      set with "N" greater than 32 during configure.
+
+  file-pad boolean
+      Default: true. If true, every record, including the last one in the file,
+      will have the same length. This matches the way AMANDA wrote tapes prior
+      to the availability of this parameter. It may also be useful on devices
+      that only support a fixed blocksize.
+      Note that the last record on the tape probably includes trailing null
+      byte padding, which will be passed back to gzip, compress or the restore
+      program. Most programs just ignore this (although possibly with a
+      warning).
+      If this parameter is false, the last record in a file may be shorter than
+      the block size. The file will contain the same amount of data the dump
+      program generated, without trailing null byte padding. When read, the
+      same amount of data that was written will be returned.
+
+  speed int
+      Default: 200 bps. How fast the drive will accept data, in bytes per
+      second. This parameter is NOT currently used by AMANDA.
+
+  lbl-templ string
+      A PostScript template file used by amreport to generate labels. Several
+      sample files are provided with the AMANDA sources in the example
+      directory. See the amreport(8) man page for more information.
+
+In addition to options, another tapetype name may be entered, which makes this
+tapetype inherit options from another tapetype. For instance, the only
+difference between a DLT4000 tape drive using Compact-III tapes and one using
+Compact-IV tapes is the length of the tape. So they could be entered as:
+
+  define tapetype DLT4000-III {
+      comment "DLT4000 tape drives with Compact-III tapes"
+      length 12500 mbytes         # 10 Gig tapes with some compression
+      filemark 2000 kbytes
+      speed 1536 kps
+  }
+  define tapetype DLT4000-IV {
+      DLT4000-III
+      comment "DLT4000 tape drives with Compact-IV tapes"
+      length 25000 mbytes         # 20 Gig tapes with some compression
+  }
+
+
+INTERFACE SECTION
+
+The amanda.conf file may define multiple types of network interfaces. The
+information is entered in an interface section, which looks like this:
+
+  define interface name {
+      interface-option interface-value
+      ...
+  }
+
+name is the name of this type of network interface. It is referenced from the
+disklist file.
+Note that these sections define network interface characteristics, not the
+actual interface that will be used. Nor do they impose limits on the bandwidth
+that will actually be taken up by AMANDA. AMANDA computes the estimated
+bandwidth each file system backup will take based on the estimated size and
+time, then compares that plus any other running backups with the limit as
+another of the criteria when deciding whether to start the backup. Once a
+backup starts, AMANDA will use as much of the network as it can leaving
+throttling up to the operating system and network hardware.
+The interface options and values are:
+
+
+  comment string
+      Default: none. A comment string describing this set of network
+      information.
+
+  use int
+      Default: 300 Kbps. The speed of the interface in Kbytes per second.
+
+In addition to options, another interface name may be entered, which makes this
+interface inherit options from another interface. At the moment, this is of
+little use.
+
+DISKLIST FILE
+
+The disklist file determines which disks will be backed up by AMANDA. The file
+usually contains one line per disk:
+
+  hostname diskname [diskdevice] dumptype [spindle [interface] ]
+
+All pairs [ hostname diskname ] must be unique.
+Lines starting with # are ignored, as are blank lines. The fields have the
+following meanings:
+
+
+  hostname
+      The name of the host to be backed up. If diskdevice refers to a PC share,
+      this is the host AMANDA will run the Samba smbclient program on to back
+      up the share.
+
+  diskname
+      The name of the disk (a label). In most case, you set your diskname to
+      the diskdevice and you don't set the diskdevice. If you want multiple
+      entries with the same diskdevice, you must set a different diskname for
+      each entry. It's the diskname that you use on the commandline for any
+      AMANDA command. Look at the example/disklist file for example.
+
+  diskdevice
+      Default: same as diskname. The name of the disk device to be backed up.
+      It may be a full device name, a device name without the /dev/ prefix,
+      e.g. sd0a, or a mount point such as /usr.
+      It may also refer to a PC share by starting the name with two (forward)
+      slashes, e.g. //some-pc/home. In this case, the program option in the
+      associated dumptype must be entered as GNUTAR. It is the combination of
+      the double slash disk name and program GNUTAR in the dumptype that
+      triggers the use of Samba.
+
+  dumptype
+      Refers to a dumptype defined in the amanda.conf file. Dumptypes specify
+      backup related parameters, such as whether to compress the backups,
+      whether to record backup results in /etc/dumpdates, the disk's relative
+      priority, etc.
+
+  spindle
+      Default: -1. A number used to balance backup load on a host. AMANDA will
+      not run multiple backups at the same time on the same spindle, unless the
+      spindle number is -1, which means there is no spindle restriction.
+
+  interface
+      Default: local. The name of a network interface definition in the
+      amanda.conf file, used to balance network load.
+
+Instead of naming a dumptype, it is possible to define one in-line, enclosing
+dumptype options within curly braces, one per line, just like a dumptype
+definition in amanda.conf. Since pre-existing dumptypes are valid option names,
+this syntax may be used to customize dumptypes for particular disks.
+A line break must follow the left curly bracket.
+For instance, if a dumptype named normal is used for most disks, but use of the
+holding disk needs to be disabled for the file system that holds it, this would
+work instead of defining a new dumptype:
+
+  hostname diskname [ diskdevice ] {
+    normal
+    holdingdisk no
+  } [ spindle [ interface ] ]
+
+
+TAPE MANAGEMENT
+
+The tapelist file contains the list of tapes in active use. This file is
+maintained entirely by AMANDA and should not be created or edited during normal
+operation. It contains lines of the form:
+
+  YYYYMMDD label flags
+
+Where YYYYMMDD is the date the tape was written, label is a label for the tape
+as written by amlabel and flags tell AMANDA whether the tape may be reused, etc
+(see the reuse options of amadmin).
+Amdump and amflush will refuse to write to an unlabeled tape, or to a labeled
+tape that is considered active. There must be more tapes in active rotation
+(see the tapecycle option) than there are runs in the backup cycle (see the
+dumpcycle option) to prevent overwriting a backup image that would be needed to
+do a full recovery.
+
+OUTPUT DRIVERS
+
+The normal value for the tapedev parameter, or for what a tape changer returns,
+is a full path name to a non-rewinding tape device, such as /dev/nst0 or /dev/
+rmt/0mn or /dev/nst0.1 or whatever conventions the operating system uses.
+AMANDA provides additional application level drivers that support non-
+traditional tape-simulations or features. To access a specific output driver,
+set tapedev (or configure your changer to return) a string of the form driver:
+driver-info where driver is one of the supported drivers and driver-info is
+optional additional information needed by the driver.
+The supported drivers are:
+
+
+  tape
+      This is the default driver. The driver-info is the tape device name.
+      Entering
+
+        tapedev /dev/rmt/0mn
+
+      is really a short hand for
+
+        tapedev tape:/dev/rmt/0mn
+
+      .
+
+  null
+      This driver throws away anything written to it and returns EOF for any
+      reads except a special case is made for reading a label, in which case a
+      "fake" value is returned that AMANDA checks for and allows through
+      regardless of what you have set in labelstr. The driver-info field is not
+      used and may be left blank:
+
+        tapedev null:
+
+      The length value from the associated tapetype is used to limit the amount
+      of data written. When the limit is reached, the driver will simulate end
+      of tape.
+
+      Note
+
+      This driver should only be used for debugging and testing, and probably
+      only with the record option set to no.
+
+  rait
+      Redundant Array of Inexpensive (?) Tapes. Reads and writes tapes mounted
+      on multiple drives by spreading the data across N-1 drives and using the
+      last drive for a checksum. See docs/RAIT for more information.
+      The driver-info field describes the devices to use. Curly braces indicate
+      multiple replacements in the string. For instance:
+
+        tapedev rait:/dev/rmt/tps0d{4,5,6}n
+
+      would use the following devices:
+      /dev/rmt/tps0d4n /dev/rmt/tps0d5n /dev/rmt/tps0d6n
+
+
+
+  file
+      This driver emulates a tape device with a set of files in a directory.
+      The driver-info field must be the name of an existing directory. The
+      driver will test for a subdirectory of that named data and return offline
+      until it is present. When present, the driver uses two files in the data
+      subdirectory for each tape file. One contains the actual data. The other
+      contains record length information.
+      The driver uses a file named status in the file device directory to hold
+      driver status information, such as tape position. If not present, the
+      driver will create it as though the device is rewound.
+      The length value from the associated tapetype is used to limit the amount
+      of data written. When the limit is reached, the driver will simulate end
+      of tape.
+      One way to use this driver with a real device such as a CD-writer is to
+      create a directory for the file device and one or more other directories
+      for the actual data. Create a symlink named data in the file directory to
+      one of the data directories. Set the tapetype length to whatever the
+      medium will hold.
+      When AMANDA fills the file device, remove the symlink and (optionally)
+      create a new symlink to another data area. Use a CD writer software
+      package to burn the image from the first data area.
+      To read the CD, mount it and create the data symlink in the file device
+      directory.
+
+
+AUTHORIZATION
+
+AMANDA processes on the tape server host run as the dumpuser user listed in
+amanda.conf. When they connect to a backup client, they do so with an AMANDA-
+specific protocol. They do not, for instance, use rsh or ssh directly.
+On the client side, the amandad daemon validates the connection using one of
+several methods, depending on how it was compiled and on options it is passed:
+
+
+  .rhosts
+      Even though AMANDA does not use rsh, it can use .rhosts-style
+      authentication and a .rhosts file.
+
+  .amandahosts
+      This is essentially the same as .rhosts authentication except a different
+      file, with almost the same format, is used. This is the default mechanism
+      built into AMANDA.
+      The format of the .amandahosts file is:
+      hostname [ username ]
+      If username is ommitted, it defaults to the user running amandad, i.e.
+      the user listed in the inetd or xinetd configuration file.
+
+  Kerberos
+      AMANDA may use the Kerberos authentication system. Further information is
+      in the docs/KERBEROS file that comes with an AMANDA distribution.
+      For Samba access, AMANDA needs a file on the Samba server (which may or
+      may not also be the tape server) named /etc/amandapass with share names,
+      (clear text) passwords and (optional) domain names, in that order, one
+      per line, whitespace separated. By default, the user used to connect to
+      the PC is the same for all PC's and is compiled into AMANDA. It may be
+      changed on a host by host basis by listing it first in the password field
+      followed by a percent sign and then the password. For instance:
+
+          //some-pc/home normalpw
+          //another-pc/disk otheruser%otherpw
+
+      With clear text passwords, this file should obviously be tightly
+      protected. It only needs to be readable by the AMANDA-user on the Samba
+      server.
+      You can find further information in the docs/SAMBA file that comes with
+      an AMANDA distribution.
+
+
+HOST & DISK EXPRESSION
+
+All host and disk arguments to programs are special expressions. The command
+applies to all disks that match your arguments. This section describes the
+matcher.
+The matcher matches by word, each word is a glob expression, words are
+separated by the separator '.' for host and '/' for disk. You can anchor the
+expression at left with a '^'. You can anchor the expression at right with a
+'$'. The matcher is case insensitive for host but is case sensitive for disk. A
+match succeeds if all words in your expression match contiguous words in the
+host or disk.
+
+   .   word separator for a host
+   /   word separator for a disk
+   ^   anchor at left
+   $   anchor at right
+   ?   match exactly one character except the separator
+   *   match zero or more characters except the separator
+   **  match zero or more characters including the separator
+
+Some examples:
+
+    EXPRESSION      WILL MATCH              WILL NOT MATCH
+    hosta           hosta                   hostb
+                    hoSTA.dOMAIna.ORG
+                    foo.hosta.org
+    host            host                    hosta
+    host?           hosta                   host
+                    hostb
+    ho*na           hoina                   ho.aina.org
+    ho**na          hoina
+                    ho.aina.org
+    ^hosta          hosta                   foo.hosta.org
+    sda*            /dev/sda1
+                    /dev/sda12
+    /opt/           opt (disk)              opt (host)
+    .opt.           opt (host)              opt (disk)
+    /               /                       any other disk
+    /usr            /usr
+                    /usr/opt
+    /usr$           /usr                    /usr/opt
+
+
+DATESTAMP EXPRESSION
+
+A datestamp expression is a range expression where we only match the prefix.
+Leading ^ is removed. Trailing $ forces an exact match.
+
+    20001212-14  match all dates beginning with 20001212, 20001213 or 20001214
+    20001212-4   same as previous
+    20001212-24  match all dates between 20001212 and 20001224
+    2000121      match all dates that start with 2000121 (20001210-20001219)
+    2            match all dates that start with 2 (20000101-29991231)
+    2000-10      match all dates between 20000101-20101231
+    200010$      match only 200010
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion,major update
+
+SEE ALSO
+
+amadmin(8), amcheck(8), amcheckdb(8), amcleanup(8), amdd(8), amdump(8), amflush
+(8), amgetconf(8), amlabel(8), ammt(8), amoverview(8), amplot(8), amrecover(8),
+amreport(8), amrestore(8), amrmtape(8), amstatus(8), amtape(8), amtoc(8),
+amverify(8), amverifyrun(8)
+-------------------------------------------------------------------------------
+
+Prev      Up      Next
+amadmin  Home  amcheck
+
diff --git a/docs/amcheck.8.txt b/docs/amcheck.8.txt
new file mode 100644 (file)
index 0000000..794bab1
--- /dev/null
@@ -0,0 +1,367 @@
+
+                              amcheck
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amcheck \14 run AMANDA self-checks
+
+Synopsis
+
+amcheck [-mwsclt ] [-Maddress ] config [ host [disk...]...]
+
+DESCRIPTION
+
+Amcheck runs a number of self-checks on both the AMANDA tape server host and
+the AMANDA client hosts.
+On the tape server host, amcheck can go through the same tape checking used at
+the start of the nightly amdump run to verify the correct tape for the next run
+is mounted.
+Amcheck can also do a self-check on all client hosts to make sure each host is
+running and that permissions on filesystems to be backed up are correct.
+You can specify many host/disk expressions, only disks that match an expression
+will be checked. All disks are checked if no expressions are given.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+
+  -s
+      Run the tape server local and tape checks (same as -lt).
+
+  -c
+      Run the client host checks.
+
+  -l
+      Run the local tests (e.g. permissions) on the server host.
+
+  -t
+      Run the tape tests on the server host.
+
+  -w
+      Enables a destructive check for write-protection on the tape (which would
+      otherwise 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 implies -t and 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 specified in the amanda.conf file or the
+      address value if -M is set.
+
+  -a
+      Like -m but the mail is always sent.
+
+  -Maddress
+      Mail the report to address instead of the mailto value from amanda.conf.
+      Implies -m.
+
+The default is -cs.
+
+EXAMPLES
+
+In this example, both the tape server and client tests are run. The results are
+displayed on standard output.
+
+  % amcheck daily
+  AMANDA Tape Server Host Check
+  -----------------------------
+  /amanda2/amanda/work: 911475 KB disk space available, that's plenty.
+  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.5)
+
+In this example, if the line mailto csd-amanda is in amanda.conf, mail will be
+sent to csd-amanda if the server check returns an error.
+
+  % amcheck -s -m daily
+
+
+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 pattern 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 scanning will continue if necessary.
+
+        labelstr match
+            This tape is the next one that matches the labelstr pattern in
+            amanda.conf. Tape scanning will continue.
+
+
+  ERROR: cannot look up dump user user
+      (error) Dump user user from amanda.conf could not be found in the system
+      password information.
+
+  ERROR: cannot look up my own uid (uid)
+      (error) User id uid running amcheck could not be found in the system
+      password information.
+
+  ERROR: running as user runuser instead of dumpuser
+      (error) Amcheck should be run as the dump user dumpuser from amanda.conf
+      instead of runuser.
+
+  ERROR: program dir directory: not accessible
+      (error) The directory AMANDA expects to find its auxiliary programs in,
+      directory, is not accessible.
+
+  ERROR: program program: does not exist
+      (error) Program program needed on the tape server could not be found.
+
+  ERROR: program program: not a file
+      (error) Program program needed on the tape server exists but is not a
+      file.
+
+  ERROR: program program: not executable
+      (error) Program program needed on the tape server exists but is not
+      executable.
+
+  WARNING: program program: not setuid-root
+      (warning) Program program needed on the tape server exists but should be
+      owned by user "root" and setuid.
+
+  ERROR: XXX dir directory: not writable
+      (error) Directory directory is either not writable, i.e. the dump user
+      will not be able to create or remove files, or cannot be accessed,
+      perhaps because a parent directory does not allow search permission. The
+      XXX may be:
+
+
+        log
+            for the AMANDA log directory (see logdir in amanda.conf)
+
+        oldlog
+            for the directory that holds the old log files (see logdir in
+            amanda.conf)
+
+        info
+            for an AMANDA database information directory (see curinfo in
+            amanda.conf) or
+
+        index
+            for an AMANDA index directory (see indexdir in amanda.conf)
+
+        tapelist
+            for the AMANDA tapelist directory (see tapelist in amanda.conf)
+
+
+  NOTE: XXX dir directory: does not exist
+      (info) A database (info) or index directory does not exist or cannot be
+      accessed. This might just mean this is a new client or disk, but if that
+      is not the case, this should be treated as an error.
+
+  NOTE: it will be created on the next run
+      (info) This indicates the info directory listed in the previous message
+      will be created on the next run.
+
+  ERROR: XXX dir name: not a directory
+      (error) Amcheck expected name to be a directory, but it is something else
+      (e.g. file).
+
+  WARNING: info file file: does not exist
+      (warning) File file does not exist in the text format database. Since the
+      parent directories do exist, the file should already have been created.
+
+  ERROR: info file name: not a file
+      (error) Amcheck expected name to be a file, but it is something else
+      (e.g. file).
+
+  ERROR: info file file: not readable
+      (error) The text format database file file is not readable.
+
+  ERROR: log file file: not writable
+      (error) Log file file (file log in logdir from amanda.conf) is either not
+      writable, or cannot be accessed, perhaps because a parent directory does
+      not allow search permission.
+
+  ERROR: tape list tapelist: not writable
+      (error) AMANDA tape list file tapelist (see tapelist in amanda.conf) is
+      not writable or was not found.
+
+  ERROR: tape list tapelist: parse error
+      (error) AMANDA tape list file tapelist (see tapelist in amanda.conf)
+      could not be read or parsed.
+
+  WARNING: tapedev is /dev/null, dumps will be thrown away
+      (warning) The tapedev parameter in amanda.conf is set to /dev/null and
+      AMANDA uses that when debugging to throw all the dump images away.
+
+  WARNING: hold file file exists
+      (info) Hold file file exists and will cause amdump to pause at the
+      beginning until it is removed.
+
+  ERROR: holding disk disk: statfs: error message
+      (error) An error was returned from the statfs system call on holding disk
+      disk (maybe because it does not exist).
+
+  ERROR: holding disk disk: not writable
+      (error) Holding disk disk, is not writable, probably because the caller
+      does not have write permission or a parent directory does not allow
+      search permission.
+
+  WARNING: holding disk disk: available space unknown 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: holding disk 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 warning, it causes amcheck to
+      exit with a non-zero status.
+
+
+
+  Holding disk disk: N KB disk space available, that's plenty.
+      (info) There was sufficient free space on holding disk disk.
+
+  WARNING: holding disk disk: only F KB free, using nothing
+      (warning) Holding disk disk has F KBytes of free space, but that is not
+      enough for what is requested in amanda.conf.
+
+  Holding disk disk: F KB disk space available, using U KB
+      (info) Holding disk disk has F KBytes of free space and AMANDA will be
+      using up to U Kbytes.
+
+  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: label label doesn't match labelstr pattern .
+      (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.
+
+  WARNING: skipping tape test because amdump or amflush seem to be running,
+  WARNING: if they are not, you must run amcleanup,
+      (warning) It looked to amcheck like either amdump or amflush were running
+      because a log file or amdump file exists. If they are not running, you
+      probably need to run amcleanup to clear up a previous failure. Otherwise,
+      you need to wait until they complete before running amcheck.
+
+  NOTE: skipping tape checks
+      (info) The tape tests are being skipped because you used the -t command
+      line option.
+
+  WARNING: compress is not executable, server-compression and indexing will not
+  work
+      (warning) Compression program compress is not executable, so compression
+      on the tape server host and creating index files will not work.
+
+  Tape label label ok.
+      (info) Tape label is OK for the next run.
+
+  Server check took S seconds.
+      (info) Reports how long the tape server host checks took.
+
+  ERROR: host: could not resolve hostname
+      (error) Could not look up client hostname host.
+
+  Client check: H hosts checked in S seconds, N problems found.
+      (info) Reports the number of 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 trying to do the client
+      checks. The host might really be down or it might not be configured
+      properly.
+
+  ERROR: host NAK: message
+      (error) Host reported a negative acknowledgment error of message to the
+      status check request.
+
+  ERROR: host NAK: [NAK parse failed]
+      (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 contacting host.
+
+  ERROR: host: message
+      (error) Error message was reported by the status check on host.
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amdump(8)
+-------------------------------------------------------------------------------
+
+Prev     Up        Next
+amanda  Home  amcheckdb
+
diff --git a/docs/amcheckdb.8.txt b/docs/amcheckdb.8.txt
new file mode 100644 (file)
index 0000000..c5b7ef3
--- /dev/null
@@ -0,0 +1,49 @@
+
+                             amcheckdb
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amcheckdb \14 check AMANDA database for tape consistency
+
+Synopsis
+
+amcheckdb config
+
+DESCRIPTION
+
+Amcheckdb verifies that every tape mentioned in the AMANDA database is still
+valid in the tapelist file.
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLE
+
+This shows a normal response:
+
+  # amcheckdb daily
+  Ready.
+
+This shows tape DMP014 is still listed in the database but is no longer listed
+in the tapelist file:
+
+  # amcheckdb daily
+  Tape DMP014 missing in /usr/local/etc/amanda//daily/tapelist
+  Ready.
+
+
+AUTHOR
+
+Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amadmin(8), amrmtape(8), amanda(8)
+-------------------------------------------------------------------------------
+
+Prev      Up        Next
+amcheck  Home  amcleanup
+
diff --git a/docs/amcleanup.8.txt b/docs/amcleanup.8.txt
new file mode 100644 (file)
index 0000000..6ad14ed
--- /dev/null
@@ -0,0 +1,54 @@
+
+                             amcleanup
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amcleanup \14 run the AMANDA cleanup process after a failure
+
+Synopsis
+
+amcleanup config
+
+DESCRIPTION
+
+Amcleanup generates the AMANDA Mail Report and updates the AMANDA databases
+after a system failure on a tape server host. This cleanup process is normally
+done automatically as part of the amdump program, but if amdump cannot complete
+for some reason (usually because of a tape server host crash), amcleanup must
+be run some time later (usually during system boot).
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLES
+
+This example runs the AMANDA cleanup process by hand after a failure.
+
+  % amcleanup daily
+
+Putting the following line in a system boot script (e.g. /etc/rc.local) runs
+the AMANDA cleanup process as part of the reboot, eliminating the need to run
+it by hand.
+
+  /usr/local/sbin/amcleanup daily
+
+If nothing needs to be done, amcleanup exits normally with the message:
+
+  amcleanup: no unprocessed logfile to clean up.
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org>: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amdump(8)
+-------------------------------------------------------------------------------
+
+Prev        Up   Next
+amcheckdb  Home  amdd
+
diff --git a/docs/amdd.8.txt b/docs/amdd.8.txt
new file mode 100644 (file)
index 0000000..149d464
--- /dev/null
@@ -0,0 +1,85 @@
+
+                                 amdd
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amdd \14 AMANDA version of dd
+
+Synopsis
+
+amdd [-d ] [if=input] [of=output] [bs=blocksize] [skip=count] [count=count]
+
+DESCRIPTION
+
+Amdd provides just enough of the standard UNIX dd command for the needs of
+AMANDA. This is handy when doing a full restore and the standard dd program has
+not yet been found.
+Amdd also provides access to the AMANDA output drivers that support various
+tape simulations. This may be used for debugging or to convert from one format
+to another.
+See the amanda(8) man page for more details about AMANDA. See the OUTPUT
+DRIVERS section of amanda(8) for more information on the AMANDA output drivers.
+
+OPTIONS
+
+
+
+  -d
+      Turn on debugging output.
+
+  -llength
+      Set the output length. If the output driver limits the output size, this
+      controls when end of tape will be simulated.
+      Length may have a multiplier suffix:
+
+      k -> 1024 (Kilobytes)
+      b -> 512 (Blocks)
+      M -> 1024*1024 (Megabytes)
+      The default is no multiplier (bytes).
+
+
+
+  if=input
+      Input to dd. Default is stdin.
+
+  of=output
+      Where to send the output of dd. Default is stdout.
+
+  bs=blocksize
+      Size of each record. Input records smaller than this will not be padded.
+      Output records will be the same size as the corresponding input record.
+      Default is 512 bytes.
+      Blocksize may have a multiplier suffix:
+
+      k -> 1024 (Kilobytes)
+      b -> 512 (Blocks)
+      M -> 1024*1024 (Megabytes)
+      The default is no multiplier (bytes).
+
+
+
+  count=count
+      Number of records to copy. Default is all records until end of file.
+
+  skip=count
+      Number of records to skip before copying input to output. Default is
+      zero.
+
+
+AUTHOR
+
+Marc Mengel <mengel@fnal.gov>, John R. Jackson <jrj@purdue.edu> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8)
+-------------------------------------------------------------------------------
+
+Prev        Up     Next
+amcleanup  Home  amdump
+
diff --git a/docs/amdump.8.txt b/docs/amdump.8.txt
new file mode 100644 (file)
index 0000000..9b03ee8
--- /dev/null
@@ -0,0 +1,67 @@
+
+                               amdump
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amdump \14 back up all disks in an AMANDA configuration
+
+Synopsis
+
+amdump config [ host [disk...]...]
+
+DESCRIPTION
+
+Amdump switches to the appropriate AMANDA configuration directory, e.g. /usr/
+local/etc/amanda/config, then attempts to back up every disk specified by the
+amanda.conf file. Amdump is normally run by cron.
+You can specify many host/disk expressions, only disks that match an expression
+will be dumped. All disks are dumped if no expressions are given.
+If the file /usr/local/etc/amanda/config/hold exists, amdump will wait until it
+is removed before starting the backups. This allows scheduled backups to be
+delayed when circumstances warrant, for example, if the tape device is being
+used for some other purpose. While waiting, amdump checks for the hold file
+every minute.
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLE
+
+Here is a typical crontab entry. It runs amdump every weeknight at 1 a.m. as
+user bin:
+
+  0 1 * * 1-5 bin /usr/local/sbin/amdump daily
+
+Please see the crontab(5) or crontab(1) manual page for the correct crontab
+format for your system.
+
+MESSAGES
+
+
+
+  amdump: waiting for hold file to be removed
+      The "hold" file exists and amdump is waiting for it to be removed before
+      starting backups.
+
+  amdump: amdump or amflush is already running, or you must run amcleanup
+      Amdump detected another amdump or amflush running, or the remains of a
+      previous incomplete amdump or amflush run. This run is terminated. If the
+      problem is caused by the remains of a previous run, you must execute
+      amcleanup(8) and then rerun amdump.
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amcheck(8), amcleanup(8), amrestore(8), amflush(8), cron(8)
+-------------------------------------------------------------------------------
+
+Prev   Up      Next
+amdd  Home  amflush
+
diff --git a/docs/amflush.8.txt b/docs/amflush.8.txt
new file mode 100644 (file)
index 0000000..399bf06
--- /dev/null
@@ -0,0 +1,93 @@
+
+                              amflush
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amflush \14 flush AMANDA backup files from holding disk to tape
+
+Synopsis
+
+amflush [-b ] [-f ] [-s ] [ -D datestamp ...] config [ host [disk...]...]
+
+DESCRIPTION
+
+Amflush writes AMANDA backups from the holding disks to tape, and updates the
+AMANDA info database and tapelist accordingly. Backups may stay in a holding
+disk when something is wrong with the tape at the time amdump is run. When this
+happens, the problem must be corrected and amflush run by hand.
+
+OPTIONS
+
+
+
+  -b
+      Run amflush in batch mode. All datestamps are selected unless specified.
+      The flush is started without confirmation.
+
+  -f
+      Run amflush in foreground. Amflush normally detaches itself from the tty
+      and runs as a background process. With the -f option, amflush stays in
+      the foreground. This is useful if amflush is run as part of another
+      script that, for example, advances the tape after the flush is completed.
+
+  -s
+      Write log to stdout/stderr instead of the amflush log file. Requires the
+      -f option.
+
+  -D datestamp
+      specify a datestamp expression you want to flush, see the "DATESTAMP
+      EXPRESSION" section of amanda(8) for a description. -D 20001225-7 will
+      flush all dumps from 25 december 2000 to 27 december 2000.
+
+You can specify many host/disk expressions, only disks that match an expression
+will be flushed. All disks are flushed if no expressions are given. see the
+"HOST & DISK EXPRESSION" section of amanda(8) for a description.
+Amflush will look in the holding disks specified by the amanda.conf file in /
+usr/local/etc/amanda/config for any non-empty AMANDA work directories. It then
+prompts you to select a directory or to process all of the directories. The
+work directories in the holding disks are named by the date at the time amdump
+was run, e.g. 19910215.
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLE
+
+Amflush will search for holding areas associated with the daily configuration.
+After you select which holding area to flush, amflush writes the data to tape,
+updates the databases and sends a mail report similar to amdump(8).
+
+  % amflush daily
+  Scanning /amanda-hold...
+    20001113: found AMANDA directory.
+    20001114: found AMANDA directory.
+
+  Multiple AMANDA directories, please pick one by letter:
+    A. 20001113
+    B. 20001114
+  Select directories to flush [A..B]: [ALL] all
+
+  Flushing dumps in 20001113, 20001114,
+  today: 20001117
+  to tape drive /dev/rmt/0mn.
+  Expecting tape DMP014 or a new tape.  (The last dumps were to tape DMP013)
+  Are you sure you want to do this? yes
+  Running in background, you can log off now.
+  You'll get mail when amflush is finished.
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amdump(8)
+-------------------------------------------------------------------------------
+
+Prev     Up        Next
+amdump  Home  amgetconf
+
diff --git a/docs/amgetconf.8.txt b/docs/amgetconf.8.txt
new file mode 100644 (file)
index 0000000..46a3805
--- /dev/null
@@ -0,0 +1,72 @@
+
+                             amgetconf
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amgetconf \14 look up amanda.conf variables
+
+Synopsis
+
+amgetconf [config] parameter
+
+DESCRIPTION
+
+Amgetconf looks up parameters in amanda.conf, the AMANDA configuration file, or
+from the build and runtime environment, and returns their corresponding value.
+If config is not specified, amgetconf assumes it is being run from the
+configuration directory and that amanda.conf is present.
+If parameter begins with build., the (case insensitive) string following the
+period is a build environment variable. Variables without a value (e.g. XFSDUMP
+on a system that does not support that type of file system) will not report an
+error and will return an empty string as the value. Flag variables (e.g.
+USE_AMANDAHOSTS) will return 1 if the flag is set or an empty string if it is
+not.
+If parameter begins with dbopen., the string following the period is a program
+name and an AMANDA debug file will be created for the caller. The name of the
+file is returned.
+If parameter begins with dbclose., the string following the period is a program
+name previously used with dbopen., followed by a colon (:) and the previously
+opened file name.
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLE
+
+Find out the path to the log file directory:
+
+% amgetconf daily logdir
+/usr/local/etc/amanda//daily
+Find out the current tape type:
+
+% amgetconf daily tapetype
+DLT4000-IV
+Find out the default configuration directory:
+
+% amgetconf daily build.CONFIG_DIR
+/usr/local/etc/amanda/
+Create, use and close a debug file in a script:
+
+% set debug_file = `amgetconf daily dbopen.myscript`
+% echo debug information >> $debug_file
+% amgetconf daily dbclose.myscript:$debug_file
+
+MESSAGES
+
+
+
+  amgetconf: no such parameter param
+      Parameter param is not a known keyword (e.g. not a valid amanda.conf
+      keyword). In this case, amgetconf will write "BUGGY" to stdout as the
+      value.
+
+
+SEE ALSO
+
+amanda(8)
+-------------------------------------------------------------------------------
+
+Prev      Up      Next
+amflush  Home  amlabel
+
diff --git a/docs/amlabel.8.txt b/docs/amlabel.8.txt
new file mode 100644 (file)
index 0000000..6fb8d17
--- /dev/null
@@ -0,0 +1,92 @@
+
+                              amlabel
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amlabel \14 label an AMANDA tape
+
+Synopsis
+
+amlabel [-f ] config label [ slot slot ]
+
+DESCRIPTION
+
+All AMANDA tapes must be pre-labeled before they are used. AMANDA verifies the
+label in amdump and amflush before writing to make sure the proper tape is
+loaded.
+Amlabel writes an AMANDA label on the tape in the device specified by the
+amanda.conf file in /usr/local/etc/amanda/config. Label may be any string that
+does not contain whitespace and that matches the amanda.conf labelstr regular
+expression option. It is up to the system administrator to define a naming
+convention.
+Amlabel appends the new tape to the tapelist file so it will be used by AMANDA
+before it reuses any other tapes. When you amlabel multiple tapes, they will be
+used in the order you amlabel them.
+Amlabel will not write the label if the tape contains an active AMANDA tape or
+if the label specified is on an active tape. The -f (force) flag bypasses these
+verifications.
+An optional slot may be specified after the tape label. If a tape changer is in
+use, amlabel will label the tape in the specified slot instead of the currently
+loaded tape.
+See the amanda(8) man page for more details about AMANDA.
+
+EXAMPLE
+
+Write an AMANDA label with the string "DMP000" on the tape loaded in the device
+named in the tapedev option in /usr/local/etc/amanda/daily/amanda.conf:
+
+  % amlabel daily DMP000
+
+Label the tape in slot 3 of the currently configured tape changer with the
+string "DMP003":
+
+  % amlabel daily DMP003 slot 3
+
+
+MESSAGES
+
+
+
+  label label doesn't match labelstr str
+      Label label on the command line does not match the labelstr regular
+      expression str from amanda.conf.
+
+  label label already on a tape
+      Label label is already listed as an active AMANDA tape.
+
+  no tpchanger specified in path , so slot command invalid
+      The command line has the slot parameter but the amanda.conf file in path
+      does not have a tape changer configured.
+
+  reading label label, tape is in another amanda configuration
+      This tape appears to be a valid AMANDA tape, but label does not match
+      labelstr for this configuration so it is probably part of a different
+      AMANDA configuration.
+
+  reading label label, tape is active
+      Tape label appears to already be part of this AMANDA configuration and
+      active, i.e. has valid data on it.
+
+  no label found, are you sure tape is non-rewinding?
+      While checking that the label was written correctly, amlabel got an error
+      that might be caused by mis-configuring AMANDA with a rewinding tape
+      device name instead of a non-rewinding device name for tape.
+
+
+AUTHOR
+
+James da Silva, <jds@amanda.org>: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8) amdump(8) amflush(8)
+-------------------------------------------------------------------------------
+
+Prev        Up   Next
+amgetconf  Home  ammt
+
diff --git a/docs/ammt.8.txt b/docs/ammt.8.txt
new file mode 100644 (file)
index 0000000..5b437ed
--- /dev/null
@@ -0,0 +1,118 @@
+
+                                 ammt
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+ammt \14 AMANDA version of mt
+
+Synopsis
+
+ammt [-d ] [ -f | -t | device ] command [count]
+
+DESCRIPTION
+
+Ammt provides just enough of the standard UNIX mt command for the needs of
+AMANDA. This is handy when doing a full restore and the standard mt program has
+not yet been found.
+Ammt also provides access to the AMANDA output drivers that support various
+tape simulations.
+See the amanda(8) man page for more details about AMANDA. See the OUTPUT
+DRIVERS section of amanda(8) for more information on the AMANDA output drivers.
+
+OPTIONS
+
+
+
+  -d
+      Turn on debugging output.
+
+  -fdevice
+      Access tape device device. If not specified, the TAPE environment
+      variable is used.
+
+  -tdevice
+      Same as -f.
+
+  commandcount
+      Which command to issue, and an optional count of operations.
+
+
+COMMANDS
+
+Each command may be abbreviated to whatever length makes it unique.
+
+
+  eof|weofcount
+      Write count (default: 1) end of file marks (tapemarks).
+
+  fsfcount
+      Skip forward count (default: 1) files.
+
+  bsfcount
+      Skip backward count (default: 1) files.
+
+  asfcount
+      Position to file number count (default: 0) where zero is beginning of
+      tape. This is the same as a rewind followed by a fsf count.
+
+  rewind
+      Rewind to beginning of tape.
+
+  offline|rewoffl
+      Rewind to beginning of tape and unload the tape from the drive.
+
+  status
+      Report status information about the drive. Which data reported, and what
+      it means, depends on the underlying operating system, and may include:
+
+
+        ONLINE
+            Indicates the drive is online and ready.
+
+        OFFLINE
+            Indicates the drive is offline or not ready.
+
+        BOT
+            Indicates the drive is at beginning of tape.
+
+        EOT
+            Indicates the drive is at end of tape.
+
+        PROTECTED
+            Indicates the tape is write protected.
+
+        ds
+            Device status.
+
+        er
+            Error register.
+
+        fileno
+            Current tape file number.
+
+        blkno
+            Current tape block number file.
+
+
+
+Note
+
+Many systems only report good data when a tape is in the drive and ready.
+
+AUTHOR
+
+Marc Mengel <mengel@fnal.gov>, John R. Jackson <jrj@purdue.edu>: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8)
+-------------------------------------------------------------------------------
+
+Prev      Up         Next
+amlabel  Home  amoverview
+
diff --git a/docs/amoverview.8.txt b/docs/amoverview.8.txt
new file mode 100644 (file)
index 0000000..ccd7964
--- /dev/null
@@ -0,0 +1,87 @@
+
+                            amoverview
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amoverview \14 display file systems processed by AMANDA over time
+
+Synopsis
+
+amoverview [[-config ] config ] [-hostwidth width] [-diskwidth width] [-
+skipmissed] [-verbose]
+
+DESCRIPTION
+
+Amoverview displays a chart showing hosts and file systems processed by AMANDA
+along with the backup level performed each day.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+
+  -config config
+      Use configuration config instead of configuration daily.
+
+  -hostwidth width
+      Set host field column width to width characters instead of 8.
+
+  -diskwidth width
+      Set disk field column width to width characters instead of 20.
+
+  -skipmissed
+      Compacts the output by only printing stats for the days AMANDA actually
+      ran.
+
+  -verbose
+      Amoverview can take a long while on large systems. This option reports
+      intermediate steps while it is working.
+
+
+RESULTS
+
+amoverview is a summary of the output of " amadmin <config> find ". When the
+last column of amadmin find contains anything other than "OK", amoverview
+translates this into "E" for that day.
+A number indicates the level of backup and it succeeded. An "E" indicates an
+error for that day. You get an "E" for all errors, like failed to connect,
+datatimeout, computer crashed, etc, but also for failing to write to tape.
+You can have an "E" followed by a number if a filesystem ran into end-of-tape
+once (gives an "E", and later that day, you flush it to a second tape (a
+number: the level, indicating success). If the flush failed too, you get a
+double "EE" for that day.
+You can also have a double code if you have two tapes in the changer and AMANDA
+failed to write to tape the first time because it hit end of tape (resulting in
+"E0", for a full, "E1" for an incremental etc.) or twice with error ("EE"), and
+may a successful flush afterwards giving maybe "EE0". (Only the latest 2
+characters are printed).
+
+EXAMPLE
+
+This shows the /home file system on host2 was backed up at level 3 on the 8th,
+9th and 10th of December, had a full backup on the 11th, a level 1 on the 12th
+and a level 2 on the 13th.
+
+  # amoverview
+                           date 12 12 12 12 12 12
+  host     disk                 08 09 10 11 12 13
+
+  host1    /                     0  1  1  1  1  1
+  host1    /var                  0  1  1  1  1  1
+  host2    /                     1  1  1  1  1  0
+  host2    /home                 3  3  3  0  1  2
+  host2    /opt                  1  1  1  1  1  1
+  host2    /var                  1  1  0  1  1  1
+
+
+SEE ALSO
+
+amadmin(8), amanda(8)
+-------------------------------------------------------------------------------
+
+Prev   Up     Next
+ammt  Home  amplot
+
diff --git a/docs/amplot.8.txt b/docs/amplot.8.txt
new file mode 100644 (file)
index 0000000..1f71f57
--- /dev/null
@@ -0,0 +1,99 @@
+
+                               amplot
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amplot \14 visualize the behavior of AMANDA
+
+Synopsis
+
+amplot [-b ] [-c ] [-e ] [-g ] [-l ] [-p ] [ -t T ] amdump_files
+
+DESCRIPTION
+
+Amplot reads an amdump output file that AMANDA generates each run (e.g.
+amdump.1) and translates the information into a picture format that may be used
+to determine how your installation is doing and if any parameters need to be
+changed. Amplot also prints out amdump lines that it either does not understand
+or knows to be warning or error lines and a summary of the start, end and total
+time for each backup image.
+Amplot is a shell script that executes an awk program (amplot.awk) to scan the
+amdump output file. It then executes a gnuplot program (amplot.g) to generate
+the graph. The awk program is written in an enhanced version of awk, such as
+GNU awk (gawk version 2.15 or later) or nawk.
+During execution, amplot generates a few temporary files that gnuplot uses.
+These files are deleted at the end of execution.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+
+  -b
+      Generate b/w postscript file (need -p).
+
+  -c
+      Compress amdump_files after plotting.
+
+  -e
+      Extend the X (time) axis if needed.
+
+  -g
+      Direct gnuplot output directly to the X11 display (default).
+
+  -p
+      Direct postscript output to file YYYYMMDD.ps (opposite of -g).
+
+  -l
+      Generate landscape oriented output (needs -p).
+
+  -tT
+      Set the right edge of the plot to be T hours.
+
+The amdump_files may be in various compressed formats (compress, gzip, pact,
+compact).
+
+INTERPRETATION
+
+The figure is divided into a number of regions. There are titles on the top
+that show important statistical information about the configuration and from
+this execution of amdump. In the figure, the X axis is time, with 0 being the
+moment amdump was started. The Y axis is divided into 5 regions:
+QUEUES: How many backups have not been started, how many are waiting on space
+in the holding disk and how many have been transferred successfully to tape.
+%BANDWIDTH: Percentage of allowed network bandwidth in use.
+HOLDING DISK: The higher line depicts space allocated on the holding disk to
+backups in progress and completed backups waiting to be written to tape. The
+lower line depicts the fraction of the holding disk containing completed
+backups waiting to be written to tape including the file currently being
+written to tape. The scale is percentage of the holding disk.
+TAPE: Tape drive usage.
+%DUMPERS: Percentage of active dumpers.
+The idle period at the left of the graph is time amdump is asking the machines
+how much data they are going to dump. This process can take a while if hosts
+are down or it takes them a long time to generate estimates.
+
+AUTHOR
+
+Olafur Gudmundsson <ogud@tis.com>, Trusted Information Systems, formerly at
+University of Maryland, College Park: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+BUGS
+
+Reports lines it does not recognize, mainly error cases but some are legitimate
+lines the program needs to be taught about.
+
+SEE ALSO
+
+amanda(8), amdump(8), gawk(1), nawk(1), awk(1), gnuplot(1), sh(1), compress(1),
+gzip(1)
+-------------------------------------------------------------------------------
+
+Prev         Up        Next
+amoverview  Home  amrecover
+
diff --git a/docs/amrecover.8.txt b/docs/amrecover.8.txt
new file mode 100644 (file)
index 0000000..f957e7d
--- /dev/null
@@ -0,0 +1,353 @@
+
+                             amrecover
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amrecover \14 AMANDA index database browser
+
+Synopsis
+
+amrecover [[-C ] config ] [ -s index-server ] [ -t tape-server ] [ -d tape-
+device ]
+
+DESCRIPTION
+
+Amrecover browses the database of AMANDA index files to determine which tapes
+contain files to recover. Furthermore, it is able to recover files.
+In order to restore files in place, you must invoke amrecover from the root of
+the backed up filesystem, or use lcd to move into that directory, otherwise a
+directory tree that resembles the backed up filesystem will be created in the
+current directory. See the examples below for details.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+Note
+
+The listed defaults map to the values you ran the configure-script with.
+
+
+  [ -C ] config
+      AMANDA configuration (default: daily).
+
+  -s index-server
+      Host that runs the index daemon (default: oops).
+
+  -t tape-server
+      Host that runs the tape server daemon (default: 192.168.0.10).
+
+  -d tape-device
+      Tape device to use on the tape server host (default: /dev/nst0).
+
+
+COMMANDS
+
+Amrecover connects to the index server and then presents a command line prompt.
+Usage is similar to an ftp client. The GNU readline library is used to provide
+command line history and editing if it was built in to amrecover.
+The purpose of browsing the database is to build up a restore list of files to
+be extracted from the backup system. The following commands are available:
+
+
+  sethost hostname
+      Specifies which host to look at backup files for (default: the local
+      host).
+
+  setdate YYYY-MM-DD
+      Set the date (default: today). File listing commands only return
+      information on backup images for this day, for the day before with the
+      next lower dump level, and so on, until the most recent level 0 backup on
+      or before the specified date is encountered.
+      For example, if:
+
+      1996-07-01 was a level 0 backup
+      1996-07-02 through 1996-07-05 were level 1 backups
+      1996-07-06 through 1997-07-08 were level 2 backups
+      then if 1997-07-08 is the requested date, files from the following days
+      would be used:
+
+      1997-07-08 (the latest level 2 backup)
+      1997-07-05 (the latest level 1 backup)
+      1997-07-01 (the latest level 0 backup)
+      Only the most recent version of a file will be presented.
+      The following abbreviated date specifications are accepted:
+
+
+        --MM-DD
+            dates in the current year
+
+        ---DD
+            dates in the current month of the current year
+
+
+
+
+  setdisk diskname mountpoint
+      Specifies which disk to consider (default: the disk holding the working
+      directory where amrecover is started). It can only be set after the host
+      is set with sethost. Diskname is the device name specified in the
+      amanda.conf or disklist configuration file. The disk must be local to the
+      host. If mountpoint is not specified, all pathnames will be relative to
+      the (unknown) mount point instead of full pathnames.
+
+  listdisk [diskdevice]
+      List all diskname
+
+  settape [[server]:][tapedev|default]
+      Specifies the host to use as the tape server, and which of its tape
+      devices to use. If the server is omitted, but the colon is not, the
+      server name reverts to 192.168.0.10, the configure-time default. If the
+      tape device is omitted, it remains unchanged. To use the default tape
+      device selected by the tape server, the word default must be specified.
+      If no argument is specified, or the argument is an empty string, no
+      changes occur, and the current settings are displayed.
+      If you want amrecover to use your changer, the tapedev must be equal to
+      the amrecover_changer setting on the server.
+      If you need to change the protocol (tape:, rait:, file:, null:) then you
+      must specify the hostname.
+
+        settape 192.168.0.10:file:/file1
+
+      You can change the tape device when amrecover ask you to load the tape:
+
+        Load tape DMP014 now
+        Continue? [Y/n/t]: t
+        Tape device: server2:/dev/nst2
+        Continue? [Y/n/t]: Y
+        Using tape /dev/nst2 from server server2.
+
+
+
+
+  setmode mode
+      Set the extraction mode for Samba shares. If mode is smb, shares are sent
+      to the Samba server to be restored back onto the PC. If mode is tar, they
+      are extracted on the local machine the same way tar volumes are
+      extracted.
+
+  mode
+      Displays the extracting mode for Samba shares.
+
+  history
+      Show the backup history of the current host and disk. Dates, levels,
+      tapes and file position on tape of each backup are displayed.
+
+  pwd
+      Display the name of the current backup working directory.
+
+  cd dir
+      Change the backup working directory to dir. If the mount point was
+      specified with setdisk, this can be a full pathname or it can be relative
+      to the current backup working directory. If the mount point was not
+      specified, paths are relative to the mount point if they start with "/",
+      otherwise they are relative to the current backup working directory. The
+      dir can be a shell style wildcards.
+
+  cdx dir
+      Like the cd command but allow regular expression.
+
+  lpwd
+      Display the amrecover working directory. Files will be restored under
+      this directory, relative to the backed up filesystem.
+
+  lcd path
+      Change the amrecover working directory to path.
+
+  ls
+      List the contents of the current backup working directory. See the
+      description of the setdate command for how the view of the directory is
+      built up. The backup date is shown for each file.
+
+  add item1 item2 ...
+      Add the specified files or directories to the restore list. Each item may
+      have shell style wildcards.
+
+  addx item1 item2 ...
+      Add the specified files or directories to the restore list. Each item may
+      be a regular expression.
+
+  delete item1 item2 ...
+      Delete the specified files or directories from the restore list. Each
+      item may have shell style wildcards.
+
+  deletex item1 item2 ...
+      Delete the specified files or directories from the restore list. Each
+      item may be a regular expression.
+
+  list file
+      Display the contents of the restore list. If a file name is specified,
+      the restore list is written to that file. This can be used to manually
+      extract the files from the AMANDA tapes with amrestore.
+
+  clear
+      Clear the restore list.
+
+  quit
+      Close the connection to the index server and exit.
+
+  exit
+      Close the connection to the index server and exit.
+
+  extract
+      Start the extract sequence (see the examples below). Make sure the local
+      working directory is the root of the backed up filesystem, or another
+      directory that will behave like that. Use lpwd to display the local
+      working directory, and lcd to change it.
+
+  help
+      Display a brief list of these commands.
+
+
+EXAMPLES
+
+The following shows the recovery of an old syslog file.
+
+  # cd /var/log
+  # ls -l syslog.7
+  syslog.7: No such file or directory
+  # amrecover
+  AMRECOVER Version 2.4.2. Contacting server on oops ...
+  220 oops AMANDA index server (2.4.2) ready.
+  Setting restore date to today (1997-12-09)
+  200 Working date set to 1997-12-09.
+  200 Config set to daily.
+  200 Dump host set to this-host.some.org.
+  $CWD '/var/log' is on disk '/var' mounted at '/var'.
+  200 Disk set to /var.
+  /var/log
+  WARNING: not on root of selected filesystem, check man-page!
+  amrecover> ls
+  1997-12-09 daemon.log
+  1997-12-09 syslog
+  1997-12-08 authlog
+  1997-12-08 sysidconfig.log
+  1997-12-08 syslog.0
+  1997-12-08 syslog.1
+  1997-12-08 syslog.2
+  1997-12-08 syslog.3
+  1997-12-08 syslog.4
+  1997-12-08 syslog.5
+  1997-12-08 syslog.6
+  1997-12-08 syslog.7
+  amrecover> add syslog.7
+  Added /log/syslog.7
+  amrecover> lpwd
+  /var/log
+  amrecover> lcd ..
+  /var
+  amrecover> extract
+
+  Extracting files using tape drive /dev/nst0 on host 192.168.0.10
+
+  The following tapes are needed: DMP014
+
+  Restoring files into directory /var
+  Continue? [Y/n]: y
+
+  Load tape DMP014 now
+  Continue? [Y/n/t]: y
+  set owner/mode for '.'? [yn] n
+  amrecover> quit
+  200 Good bye.
+  # ls -l syslog.7
+  total 26
+  -rw-r--r--   1 root     other      12678 Oct 14 16:36 syslog.7
+
+If you do not want to overwrite existing files, create a subdirectory to run
+amrecover from and then move the restored files afterward.
+
+  # cd /var
+  # (umask 077 ; mkdir .restore)
+  # cd .restore
+  # amrecover
+  AMRECOVER Version 2.4.2. Contacting server on oops ...
+  ...
+  amrecover> cd log
+  /var/log
+  amrecover> ls
+  ...
+  amrecover> add syslog.7
+  Added /log/syslog.7
+  amrecover> lpwd
+  /var/.restore
+  amrecover> extract
+
+  Extracting files using tape drive /dev/nst0 on host 192.168.0.10
+  ...
+  amrecover> quit
+  200 Good bye.
+  # mv -i log/syslog.7 ../log/syslog.7-restored
+  # cd ..
+  # rm -fr .restore
+
+If you need to run amrestore by hand instead of letting amrecover control it,
+use the list command after browsing to display the needed tapes.
+
+  # cd /var/log
+  # amrecover
+  AMRECOVER Version 2.4.2. Contacting server on oops ...
+  ...
+  amrecover> ls
+  ...
+  amrecover> add syslog syslog.6 syslog.7
+  Added /log/syslog
+  Added /log/syslog.6
+  Added /log/syslog.7
+  amrecover> list
+  TAPE DMP014 LEVEL 0 DATE 1997-12-08
+          /log/syslog.7
+          /log/syslog.6
+  TAPE DMP015 LEVEL 1 DATE 1997-12-09
+          /log/syslog
+  amrecover> quit
+
+The history command shows each tape that has a backup of the current disk along
+with the date of the backup, the level, the tape label and the file position on
+the tape. All active tapes are listed, not just back to the most recent full
+dump.
+Tape file position zero is a label. The first backup image is in file position
+one.
+
+  # cd /var/log
+  # amrecover
+  AMRECOVER Version 2.4.2. Contacting server on oops ...
+  ...
+  amrecover> history
+  200- Dump history for config "daily" host "this-host.some.org" disk "/var"
+  201- 1997-12-09 1 DMP015 9
+  201- 1997-12-08 1 DMP014 11
+  201- 1997-12-07 0 DMP013 22
+  201- 1997-12-06 1 DMP012 16
+  201- 1997-12-05 1 DMP011 9
+  201- 1997-12-04 0 DMP010 11
+  201- 1997-12-03 1 DMP009 7
+  201- 1997-12-02 1 DMP008 7
+  201- 1997-12-01 1 DMP007 9
+  201- 1997-11-30 1 DMP006 6
+  ...
+  amrecover> quit
+
+
+ENVIRONMENT
+
+PAGER The ls and list commands will use $PAGER to display the file lists.
+Defaults to more if PAGER is not set.
+
+AUTHOR
+
+Alan M. McIvor <alan@kauri.auck.irl.cri.nz> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amrestore(8), readline(3)
+-------------------------------------------------------------------------------
+
+Prev     Up       Next
+amplot  Home  amreport
+
diff --git a/docs/amreport.8.txt b/docs/amreport.8.txt
new file mode 100644 (file)
index 0000000..3f27de1
--- /dev/null
@@ -0,0 +1,84 @@
+
+                              amreport
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amreport \14 generate a formatted output of statistics for an AMANDA run
+
+Synopsis
+
+amreport [config] [ -l logfile ] [ -f outputfile ] [ -p postscriptfile ]
+
+DESCRIPTION
+
+Amreport generates a summary report of an amanda(8) backup run. If no
+configuration name is specified, amanda.conf is read from the current
+directory.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+
+  config
+      Name of the configuration to process.
+
+  -l logfile
+      Name of the log file to parse to generate the report. If a log file is
+      not specified, it defaults to the file:
+
+logdir/log
+where logdir is the log directory defined in amanda.conf.
+
+
+  -f outputfile
+      Normally, amreport sends the report via e-mail to the mailto user as
+      defined in the amanda.conf file. If outputfile is specified, then the
+      report is put in outputfile.
+
+  -p postscriptfile
+      Send the postscript output to the file postscriptfile instead of to the
+      lpr(1) command. This option has an effect only if the lbl-templ directive
+      is specified in amanda.conf.
+
+
+LABEL PRINTING
+
+AMANDA can print postscript labels describing the contents of tape(s) written
+in a run. The labels are designed to be folded and inserted into the tape case
+along with the tape or hole punched and put in a 3-ring binder. Various label
+templates are provided to format data for different tape sizes.
+The information printed varies slightly between label templates due to size
+constraints. Labels contain one line for each host/file-system pair and may
+also contain the file number on the tape, the level of the dump, the original
+size of the dump and the size of the (possibly compressed) tape file.
+Add the lbl-templ parameter to the tapetype definition in amanda.conf to enable
+labels. If you don't add this line to your tapetype definition, amreport will
+not print tape labels.
+You may use the remap='I'>printer keyword in amanda.conf to print to other than
+the system default printer.
+
+TEMPLATES
+
+AMANDA provides label templates for the following tape types. These are pretty
+generic labels and should be easy to customize for other tape types or
+particular site needs.
+
+* ExaByte 8mm tapes
+* DAT 4mm tapes
+* DLT tapes
+* 3-ring binder
+The 3-ring binder type is the most generic. It may be used to make a hardcopy
+log of the tapes.
+
+SEE ALSO
+
+amanda(8), amflush(8)
+-------------------------------------------------------------------------------
+
+Prev        Up        Next
+amrecover  Home  amrestore
+
diff --git a/docs/amrestore.8.txt b/docs/amrestore.8.txt
new file mode 100644 (file)
index 0000000..61603ea
--- /dev/null
@@ -0,0 +1,145 @@
+
+                             amrestore
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amrestore \14 extract backup images from an AMANDA tape
+
+Synopsis
+
+amrestore [ -r | -c | -C ] [ -b blocksize ] [ -f fileno ] [ -l label ] [-p ] [-
+h ] tapedevice | holdingfile | [ hostname [ diskname [ datestamp [ hostname
+[ diskname [datestamp...]]]]]]
+
+DESCRIPTION
+
+Amrestore extracts backup images from the tape mounted on tapedevice or from
+the holding disk file holdingfile that match hostname, diskname and datestamp
+patterns given on the command line. The tape or holding file must be in a
+format written by the amdump or amflush program.
+If diskname is not specified, all backups on the tape for the previous hostname
+are candidates. If datestamp is not specified, all backups on the tape for the
+previous hostname and diskname are candidates. If no hostname, diskname or
+datestamp are specified, every backup on the tape is a candidate.
+Hostname and diskname are special expressions described in the "HOST & DISK
+EXPRESSION" section of amanda(8). Datestamp are special expression described in
+the "DATESTAMP EXPRESSION" section of amanda(8). For example, if diskname is
+"rz[23]a", it would match disks rz2a and rz3a.
+Datestamp is useful if amflush writes multiple backup runs to a single tape.
+Unless -p is used, candidate backup images are extracted to files in the
+current directory named:
+hostname.diskname.datestamp.dumplevel
+Amrestore doesn't use a changer, it restore from the tape already loaded in the
+tapedevice.
+
+OPTIONS
+
+
+
+  -b
+      Set the blocksize used to read the tape or holding file. All holding
+      files must be read with a blocksize of 32 KBytes. Amrestore should
+      normally be able to determine the blocksize for tapes on its own and not
+      need this parameter.
+
+The default is 32 KBytes.
+
+
+  -f
+      Do a rewind followed by a fsf <fileno> before trying to restore an image.
+
+  -l
+      Check if we restoring from the tape with the right label
+
+  -p
+      Pipe output. The first matching backup image is sent to standard output,
+      which is normally a pipe to restore or tar, then amrestore quits. It may
+      be run again to continue selecting backups to process. Make sure you
+      specify the no-rewind tapedevice when doing this.
+
+Note: restore may report "short read" errors when reading from a pipe. Most
+versions of restore support a blocking factor option to let you set the read
+block size, and you should set it to 2. See the example below.
+
+
+  -c
+      Compress output using the fastest method the compression program
+      provides. Amrestore normally writes output files in a format understood
+      by restore or tar, even if the backups on the tape are compressed. With
+      the -c or -C option, amrestore writes all files in compressed format,
+      even if the backups on the tape are not compressed. Output file names
+      will have a .Z or .gz extension depending on whether compress or gzip is
+      the preferred compression program. This option is useful when the current
+      directory disk is small.
+
+  -C
+      Compress output using the best method the compression program provides
+      (may be very CPU intensive). See the notes above about the -c option.
+
+  -r
+      Raw output. Backup images are output exactly as they are on the tape,
+      including the amdump headers. Output file names will have a .RAW
+      extension. This option is only useful for debugging and other strange
+      circumstances.
+
+  -h
+      Header output. The tape header block is output at the beginning of each
+      file. This is like -r except -c or -C may also be used to compress the
+      result. Amrecover uses the header to determine the restore program to
+      use.
+
+If a header is written (-r or -h), only 32 KBytes are output regardless of the
+tape blocksize. This makes the resulting image usable as a holding file.
+
+EXAMPLES
+
+The following does an interactive restore of disk rz3g from host seine, to
+restore particular files. Note the use of the b option to restore, which causes
+it to read in units of two 512-byte blocks (1 Kbyte) at a time. This helps keep
+it from complaining about short reads.
+
+% amrestore -p /dev/nrmt9 seine rz3g | restore -ivbf 2 -
+The next example extracts all backup images for host seine. This is the usual
+way to extract all data for a host after a disk crash.
+
+% amrestore /dev/nrmt9 seine
+If the backup datestamp in the above example is 19910125 and seine has level 0
+backups of disks rz1a and rz1g on the tape, these files will be created in the
+current directory:
+
+seine.rz1a.19910125.0
+seine.rz1g.19910125.0
+You may also use amrestore to extract a backup image from a holding disk file
+that has not yet been flushed to tape:
+
+% amrestore -p /amanda/20001119/seine.rz1a.2 | restore -ivbf 2 -
+Amrestore may be used to generate a listing of images on a tape:
+
+% mt -f /dev/nrmt9 rewind
+% amrestore -p /dev/nrmt9 no-such-host > /dev/null
+This asks amrestore to find images for host no-such-host. It will not find any
+entries that match, but along the way will report each image it skips.
+
+CAVEATS
+
+GNU-tar must be used to restore files from backup images created with the
+GNUTAR dumptype. Vendor tar programs sometimes fail to read GNU tar images.
+
+AUTHOR
+
+James da Silva, <jds@amanda.org>, University of Maryland, College Park:
+Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8), amdump(8), amflush(8), tar(1) restore(8)
+-------------------------------------------------------------------------------
+
+Prev       Up       Next
+amreport  Home  amrmtape
+
diff --git a/docs/amrmtape.8.txt b/docs/amrmtape.8.txt
new file mode 100644 (file)
index 0000000..fd37e97
--- /dev/null
@@ -0,0 +1,62 @@
+
+                              amrmtape
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amrmtape \14 remove a tape from the AMANDA database
+
+Synopsis
+
+amrmtape [-n ] [-v ] [-q ] [-d ] config label
+
+DESCRIPTION
+
+Amrmtape invalidates the contents of an existing backup tape in the
+configuration database. This is meant as a recovery mechanism when a good
+backup is damaged either by faulty hardware or user error, e.g. the tape is
+eaten by the drive or is overwritten.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+
+
+  -n
+      Generate new tapelist and database files with label removed, but leave
+      them in /tmp and do not update the original copies.
+
+  -v
+      List backups of hosts and disks that are being discarded. Enabled by
+      default.
+
+  -q
+      Opposite of -v.
+
+  -d
+      Run in debugging mode so all executed commands are shown.
+
+
+EXAMPLE
+
+Remove tape labeled DAILY034 from the DailySet1 configuration.
+
+  # amrmtape DailySet1 DAILY034
+
+
+AUTHOR
+
+Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>: Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amadmin(8), amanda(8)
+-------------------------------------------------------------------------------
+
+Prev        Up       Next
+amrestore  Home  amstatus
+
diff --git a/docs/amstatus.8.txt b/docs/amstatus.8.txt
new file mode 100644 (file)
index 0000000..fdb9d9a
--- /dev/null
@@ -0,0 +1,80 @@
+
+                              amstatus
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amstatus \14 display the state of an AMANDA run
+
+Synopsis
+
+amstatus [--config ] config [ --file amdumpfile ] [--summary ] [--dumping ] [--
+waitdumping ] [--waittaper ] [--dumpingtape ] [--writingtape ] [--finished ] [-
+-failed ] [--estimate ] [--gestimate ] [--stats ]
+
+DESCRIPTION
+
+Amstatus gives the current state of the AMANDA run specified by the config
+configuration. If there is no active AMANDA running, it summarizes the result
+of the last run. It may also be used to summarize the results of a previous
+run.
+See the amanda(8) man page for more details about AMANDA.
+
+OPTIONS
+
+All options may be abbreviated to the shortest non-ambiguous sub-string. If no
+options are given, everything is displayed.
+
+
+  [--config] config
+      Specify the AMANDA configuration you want to display the state for.
+
+  --file amdumpfile
+      Specify an alternate file instead of the amdump or amflush file.
+
+  --summary
+      Display a summary of the state of the run.
+
+  --dumping
+      Display all partitions that are dumping.
+
+  --waitdumping|wdumping
+      Display all partitions that are waiting to be dumped.
+
+  --waittaper|wtaper
+      Display all partitions dumped that are waiting to be written to tape.
+
+  --dumpingtape|dtape
+      Display all partitions that are dumping directly to tape.
+
+  --writingtape|wtape
+      Display all partitions that are writing to tape.
+
+  --finished
+      Display all partitions that are dumped and written to tape.
+
+  --failed|error
+      Display all partitions that failed.
+
+  --estimate
+      Display all partitions whose estimate is finished. Works only during the
+      estimate phase.
+
+  --gestimate|gettingestimate
+      Display all partitions whose estimate is not finished. Works only during
+      the estimate phase.
+
+  --stats|statistics
+      Display statistics about active-time of taper and dumpers.
+
+
+SEE ALSO
+
+amanda(8), amcheck(8), amdump(8), amrestore(8), amadmin(8)
+-------------------------------------------------------------------------------
+
+Prev       Up     Next
+amrmtape  Home  amtape
+
diff --git a/docs/amtape.8.txt b/docs/amtape.8.txt
new file mode 100644 (file)
index 0000000..232cc33
--- /dev/null
@@ -0,0 +1,114 @@
+
+                               amtape
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amtape \14 user interface to AMANDA tape changer controls
+
+Synopsis
+
+amtape config command [ command options ]
+
+DESCRIPTION
+
+Amtape performs tape changer control operations. It uses the underlying tape
+changer script defined by the tpchanger option for a particular AMANDA
+configuration as specified by the config argument.
+Tape changers maintain a notion of the current and next slot for each
+configuration. These may or may not correspond to an actual physical state of
+the device, but do tend to minimize searching through the tape storage slots.
+If the desired tape is in the current slot, it is likely the next tape needed
+is in the next slot rather than at some random position in the storage slots.
+See the amanda(8) man page for more details about AMANDA.
+
+COMMANDS
+
+
+
+  reset
+      Reset the tape changer to a known state. The current slot is set to the
+      first slot. Other device-specific side effects may occur. Some gravity
+      stackers need to be reset to the top position by hand. This command
+      notifies AMANDA the stacker is back in that position.
+
+  eject
+      If a tape is loaded in the drive, it is ejected and returned to the slot
+      from which it was loaded.
+
+  clean
+      If a cleaning tape is defined for the changer, it is used to clean the
+      drive.
+
+  show
+      Show the contents of all slots. This can be slow.
+
+  label label
+      Search for and load the AMANDA tape with label label.
+
+  taper
+      Perform the taper scan algorithm. Load the next tape in the
+      configuration's tape sequence, or a fresh tape with a suitable label.
+
+  device
+      Display the name of the current tape device on stdout.
+
+  current
+      Display the current slot.
+
+  update
+      Update the changer label database, if it has one, to match the tapes now
+      available.
+
+  slot slot
+      Eject any tape in the drive and put it away, then load the tape from slot
+      slot and reset current.
+
+  slot current
+      Eject any tape in the drive and put it away, then load the tape from the
+      current slot.
+
+  slot prev
+      Eject any tape in the drive and put it away, then load the tape from the
+      previous slot and reset current.
+
+  slot next
+      Eject any tape in the drive and put it away, then load the tape from the
+      next slot and reset current.
+
+  slot first
+      Eject any tape in the drive and put it away, then load the tape from the
+      first slot and reset current.
+
+  slot last
+      Eject any tape in the drive and put it away, then load the tape from the
+      last slot and reset current.
+
+  slot advance
+      Eject any tape in the drive and put it away. Advance current to the next
+      tape, but do not load it.
+
+This is useful with non-gravity stackers to unload the last tape used and set
+up AMANDA for the next run. If you just use eject, the current tape will be
+mounted again in the next run, where it will be rejected as being still in use,
+ejected and the next tape requested. Using slot next followed by eject does an
+unnecessary mount.
+Note: most changers optimize the slot commands to not eject the loaded tape if
+it is the one being requested.
+
+AUTHOR
+
+James da Silva, <jds@amanda.org> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amanda(8)
+-------------------------------------------------------------------------------
+
+Prev       Up         Next
+amstatus  Home  amtapetype
+
diff --git a/docs/amtapetype.8.txt b/docs/amtapetype.8.txt
new file mode 100644 (file)
index 0000000..0e482db
--- /dev/null
@@ -0,0 +1,100 @@
+
+                            amtapetype
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amtapetype \14 generate a tapetype definition.
+
+Synopsis
+
+amtapetype [-h ] [-c ] [-o ] [-b blocksize] [-e estsize] [-f tapedev] [-
+t typename]
+
+DESCRIPTION
+
+amtapetype generates a tapetype entry for AMANDA.
+
+OPTIONS
+
+
+
+  -h
+      Display an help message.
+
+  -c
+      Run only the hardware compression detection heuristic test and stop. This
+      takes a few minutes only.
+
+  -o
+      Overwrite the tape, even if it's an AMANDA tape.
+
+  -bblocksize
+      record block size (default: 32k)
+
+  -eestsize
+      estimated tape size (default: 1g == 1024m)
+
+  -ftapedev
+      tape device name (default: $TAPE) The device to perform the test.
+
+  -ttypename
+      tapetype name (default: unknown-tapetype)
+
+
+EXAMPLE
+
+Generate a tapetype definition for your tape device:
+
+% amtapetype -f /dev/nst0
+
+NOTES
+
+Hardware compression is detected by measuring the writing speed difference of
+the tape drive when writing an amount of compressable and uncompresseable data.
+It does not rely on the status bits of the tape drive or the OS parameters. If
+your tape drive has very large buffers or is very fast, the program could fail
+to detect hardware compression status reliably.
+During the first pass, it writes files that are estimated to be 1% of the
+expected tape capacity. It gets the expected capacity from the -e command line
+flag, or defaults to 1 GByte. In a perfect world (which means there is zero
+chance of this happening with tapes :-), there would be 100 files and 100 file
+marks.
+During the second pass, the file size is cut in half. In that same fairyland
+world, this means 200 files and 200 file marks.
+In both passes the total amount of data written is summed as well as the number
+of file marks written. At the end of the second pass, quoting from the code:
+* Compute the size of a filemark as the difference in data written between pass
+1 and pass 2 divided by the difference in number of file marks written between
+pass 1 and pass 2. ... *
+So if we wrote 1.0 GBytes on the first pass and 100 file marks, and 0.9 GBytes
+on the second pass with 200 file marks, those additional 100 file marks in the
+second pass took 0.1 GBytes and therefor a file mark is 0.001 GBytes (1 MByte).
+Note that if the estimated capacity is wrong, the only thing that happens is a
+lot more (or less, but unlikely) files, and thus, file marks, get written. But
+the math still works out the same. The -e flag is there to keep the number of
+file marks down because they can be slow (since they force the drive to flush
+all its buffers to physical media).
+All sorts of things might happen to cause the amount of data written to vary
+enough to generate a big file mark size guess. A little more "shoe shining"
+because of the additional file marks (and flushes), dirt left on the heads from
+the first pass of a brand new tape, the temperature/humidity changed during the
+multi-hour run, a different amount of data was written after the last file mark
+before EOT was reported, etc.
+Note that the file mark size might really be zero for whatever device this is,
+and it was just the measured capacity variation that caused amtapetype to think
+those extra file marks in pass 2 actually took up space.
+It also explains why amtapetype used to sometimes report a negative file mark
+size if the math happened to end up that way. When that happens now we just
+report it as zero.
+
+SEE ALSO
+
+amanda(8)
+-------------------------------------------------------------------------------
+
+Prev     Up    Next
+amtape  Home  amtoc
+
diff --git a/docs/amtoc.8.txt b/docs/amtoc.8.txt
new file mode 100644 (file)
index 0000000..5d475b6
--- /dev/null
@@ -0,0 +1,98 @@
+
+                                amtoc
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amtoc \14 generate TOC (Table Of Contents) for an AMANDA run
+
+Synopsis
+
+amtoc [-a ] [-i ] [-t ] [ -f file ] [ -s subs ] [-w ] [-- ] logfile
+
+DESCRIPTION
+
+Amtoc generates a table of contents for an AMANDA run. It's a perl script (if
+you don't have perl, install it first!).
+
+OPTIONS
+
+
+
+  -a
+      The output file name will be label-of-the-tape.toc in the same directory
+      as logfile.
+
+  -i
+      Display help about amtoc.
+
+  -t
+      Generate the output in tabular form.
+
+  -f file
+      Write the output to a file ('-' for stdout).
+
+  -s subs
+      Evaluate the output file name from subs, with $_ set to label-of-the-
+      tape. The -a option is equivalent to -s 's/$_/.toc/'.
+
+  -w
+      Separate tapes with form-feeds and display blank lines before totals.
+
+  --
+      Marks the last option so the next parameter is the logfile.
+
+  logfile
+      (use '-' for stdin)
+
+
+OUTPUT FORMAT
+
+The standard output has five fields separated by two spaces:
+
+#  Server:/partition  date  level  size[Kb]
+0  daily-05:  19991005  -  -
+1  cuisun15:/cuisun15/home  19991005  1  96
+2  cuinfs:/export/dentiste  19991005  1  96
+  ...
+103  cuisg11:/  19991005  0  4139136
+103  total:  -  -  16716288
+
+
+In tabular format (-t), this would look like:
+
+  #  Server:/partition           date      lev  size[Kb]
+  0  daily-05:                   19991005    -         -
+  1  cuisun15:/cuisun15/home     19991005    1        96
+  2  cuinfs:/export/dentiste     19991005    1        96
+  ...
+103  cuisg11:/                   19991005    0   4139136
+103  total:                      -           -  16716288
+
+
+USAGE
+
+The easiest way to use it is to run amtoc right after amdump in the cron job:
+
+amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-
+9] | head -1` ; amtoc -a $log
+which will generate /usr/local/etc/amanda//daily/tape_label.toc. You may also
+want to call amtoc after an amflush.
+
+SEE ALSO
+
+amanda(8), amdump(8), amflush(8), amgetconf(8), cron, perl
+
+AUTHOR
+
+Nicolas Mayencourt <Nicolas.Mayencourt@cui.unige.ch>, University of Geneva/
+Switzerland : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+-------------------------------------------------------------------------------
+
+Prev         Up       Next
+amtapetype  Home  amverify
+
diff --git a/docs/amverify.8.txt b/docs/amverify.8.txt
new file mode 100644 (file)
index 0000000..fcee013
--- /dev/null
@@ -0,0 +1,47 @@
+
+                              amverify
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amverify \14 check an Amanda tape for errors
+
+Synopsis
+
+amverify config [ slot [runtapes]]
+
+DESCRIPTION
+
+Amverify reads an Amanda format tape and makes sure each backup image can be
+processed by amrestore and, if possible, the appropriate restore program (e.g.
+tar).
+Amverify runs amrestore on each file of the tape and pipes the output to a
+restore program (if available) with an option to create a catalogue of the
+backup. The catalogue itself is discarded. Only the success or failure of the
+operation itself is reported.
+If the backup image cannot be processed by the restore program, e.g. if it was
+written on a different operating system, the image is sent through dd to /dev/
+null. This still determines if the tape is readable, but does not do any
+internal consistency check on the image.
+If config is set up to use a tape changer, the slot argument may be used to
+choose the first tape to process. Otherwise, the current slot is used.
+The runtapes configuration parameter determines how many tapes are processed
+unless it is specified on the command line.
+See the amanda(8) man page for more details about Amanda.
+
+AUTHOR
+
+Axel Zinser <fifi@icem.de> : Original text
+Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the AMANDA-documentation:
+XML-conversion
+
+SEE ALSO
+
+amrestore(8), amanda(8), amverifyrun(8)
+-------------------------------------------------------------------------------
+
+Prev    Up          Next
+amtoc  Home  amverifyrun
+
diff --git a/docs/amverifyrun.8.txt b/docs/amverifyrun.8.txt
new file mode 100644 (file)
index 0000000..d4f1464
--- /dev/null
@@ -0,0 +1,27 @@
+
+                           amverifyrun
+Prev  Chapter 35. The AMANDA Manual Pages.  Next
+
+-------------------------------------------------------------------------------
+
+Name
+
+amverifyrun \14 check the tapes written by the last AMANDA run
+
+Synopsis
+
+amverifyrun config
+
+DESCRIPTION
+
+Amverifyrun read the log from the last AMANDA run to find the slot of the first
+tape used and the number of tapes used. It call amverify with these argument.
+
+SEE ALSO
+
+amanda(8), amverify(8)
+-------------------------------------------------------------------------------
+
+Prev       Up    Next
+amverify  Home  Index
+
diff --git a/docs/chg-scsi.notes b/docs/chg-scsi.notes
deleted file mode 100644 (file)
index 220e66c..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-CHG-SCSI
-
-Jason's new and improved chg-scsi documentation.  this documentation 
-will also include an occasional reference to the mtx suite as I have
-attempted to use chg-zd-mtx.  I use mtx often as a fast query tool.
-Please also refer to docs/TAPE.CHANGERS for additional details.
-
-My equipment list is as follows:
-       Redhat 7.0 machine 
-               - dual processor p-III
-               - sony dds3 tape drive
-               - lots of hard disk space
-               - Quantum/ATL L500 scsi changer
-                       1 DLT tape drive (three possible)
-                       barcode reader
-                       fourteen tape slots 
-
-I base this documentation on the following:
-       mtx version 1.2.16rel 
-       amanda version 2.4.3b3
-       SCSI2 specification: X3T9.2/375R revision 10L
-       Quantum/ATL Field Service Manual 6321101-03 Ver.3, rel.0
-       Quantum dlt800 Tape system product manual 02 April, 2001 81-60118-04
-       the SCSI bus and IDE interface 2nd ed by Friedhelm Schmidt
-               pub: Addision Wesley 1998
-
-Note that quantum/atl's L-series changers follow the scsi command set,
-and do not use any proprietary commands.  thus, it was fairly simple to
-make this work.  
-
-I had to install amanda --with-suffixes and setup my server's client
-side of things using amanda-2.4.2p2 --with-suffixes.
-
-Please note that my usage of "barcode" and "barcode reader" throughout
-this document really refers to "physical tape identification system".
-for example: the EEPROM in the AIT cartridge .
-
-------------------------
-command line options:
-
-chg-scsi's command line options:
-       -slot <param>
-       -info
-       -reset
-       -eject
-       -clean
-       -label <param>
-       -search <param>
-       -status <param>
-       -trace <param>
-       -inventory
-       -dumpdb
-       -scan
-       -genconf
-
-
-Note that chg-scsi is called by amanda in the context of whatever amanda
-configuration amanda is currently using.  In short, to call chg-scsi by
-hand, change to your amanda configuration directory, then run chg-scsi.
-
--slot <param> command:
-
-       this command takes either a slot number, or any one of the
-       following: 
-               current, next, prev, first, last, advance
-
-       It then loads the appropriate tape into the drive.
-
-       Note that if the tape is already loaded, no changer motion will
-       happen.  No reading of the tape is done here.
-
--info command:
-       
-       four numbers are printed:
-       <slot# loaded> <number of slots> <reversable> <searchable>
-
-       with chg-scsi, the reversable number is always 1.  Searchable is
-       set based on if a barcode reader is available and working
-       correctly.
-
--reset command:
-       
-       Tape is unloaded, and slot 0 is loaded.  No actual reset command
-       is sent to the changer.
-
--eject command:
-       
-       Tape is unloaded, and put back into its original slot.
-
--clean command:
-       
-       Cleaning tape (if configured) is loaded into the tape.  It is
-       probably unloaded when done.  I haven't looked closely at this
-       yet.
-
--label <param> command:  
-
-       This appears to take the currently loaded tape's barcode and
-       write it to the labelfile with the given parameter as it's tape
-       header.  I have not tested this.
-       
--search <param> command:
-
-       this only should be used if a barcode reader is present, or
-       emulate barcode is turned on.
-       
-       the required parameter is an amanda tape label.  the label
-       searched in the labelfile.  If a barcode is found, then that
-       tape is loaded directly.
-
-       I believe the fallback is to search the entire magazine.
-
--status command:
-       
-       the tape changer is queried, and the results are printed out.
-       Values printed are what slots exist, are they full or empty, and
-       what volume labels (barcodes) they are.
-               Q. what about changers that don't retain current slot?
-               A. this is what the "statfile" is for.
-       
--trace command:
-       
-       present only for a particular type of changer.
-       
--inventory:  (this takes a LONG time to do)
-       
-       1) unloads tape back to its slot
-       2) issues command to changer to do an inventory of itself (read all
-               barcodes...)
-       3) loads each tape, retrieves the barcode, and reads the amanda
-               label off of the tape itself
-       4) stores/updates the label database file
-       
--dumpdb:
-       
-       prints out in human readable form the label database contents
-       from the labelfile.
-
--scan:  (aka scanbus)
-       scans the scsi generic interfaces (eg: linux sg), and prints out the
-       device name and the device types.  I found that linux didn't
-       classify either of my tape devices as generic, but this facility
-       did.  USE THIS FOR FINDING VALUE OF scsitapedev.  Be certain
-       though you have the correct tape drive: I came close to wreaking
-       havoc with my dds3 drive while it was flushing amanda data...and
-       my changer has a DLT drive!  Please refer to my configuration
-       notes below.
-
--genconf:
-
-       prints out a SAMPLE changer.conf file.  Note that I said sample.
-       except for that it also does a scanbus.  if you have more than
-       one tape drive, please be certain it is correct as chg-scsi uses
-       the first one it finds.
-       
-       Please refer to my configuration notes below.
-
---------------------------------------------
-
-changer.conf notes:
-
-Here, I try to be a bit more clear on what these config values mean.  
-
-"number_configs" MUST be the first entry (not counting comments)
-
-"emubarcode" will set this value in chg-scsi regardless of the value you
-try to assign it.  If you don't want "emubarcode" set, don't list it!
-
-"havebarcode"  
-       have barcode is tempered by what devices chg-scsi is aware of.
-       if chg-scsi doesn't know about your changer explicitly, it will
-       default to a default changer.  the default changer has no
-       barcode reader.
-       
-       In a patch I plan to post, I have added a generic changer that
-       does use a barcode.  set "changerident" to "genericbarcode" to
-       use this.
-       
-"sleep"
-       number of seconds for chg-scsi to wait for a "tape drive ready"
-       command after loading a new tape.  Mine is 140 as I have a DLT
-       tape drive, and my tape drive manual reports a max of 133
-       seconds to be ready.
-
-"config" 
-       this is a header telling chg-scsi that all values following, up
-       to the next "config" line apply to this drive number.  It is
-       this number that is refered to in your amanda.conf file as line
-       "tapedev"
-       
-"drivenum"
-       this is the tape drive number in your changer.  for a single
-       tape drive, this is zero.  Mine can handle up to three, so I
-       expect I could make this 0, 1, or 2.
-
-"dev"
-       the scsi device of your tape drive.  under linux, in my case
-       it is /dev/nst1.  This MUST be defined.
-
-"scsitapedev"
-       the generic scsi device of your tape drive.  this is simply the
-       generic interface to the device "dev" above.  This entry is
-       optional.  In my case, it is /dev/sg2.  If this entry exists and
-       is legitimate, then scsi commands are formed directly instead of
-       using ioctl commands.
-
-"startuse"
-"enduse"
-       the start and end slots of your changer.  Note that these also
-       start with zero.
-
-"eject"
-       chg-scsi tells the tape changer to eject.  You might need to
-       explicitly tell the tape drive to unload first.  that's what
-       this setting is for.  Have you ever removed a loaded VCR tape
-       by hand?
-
-"changerident" 
-       chg-scsi will first read the changer's identification from the
-       return of the scsi "inquiry" command.  If changerident is set in
-       the configuration file, the scsi inquiry's value is overridden.
-       chg-scsi will attempt to match the value with its built-in
-       changertypes.
-
-       "generic" is what the chg-scsi will default to
-       "genericbarcode" is a hack of mine that forces the changer's
-               barcode reader to work.  Note that if your changer
-               uses a superset of the scsi command set, this probably
-               won't work.
-       "L500" is another addition of mine that will enable a
-               quantum/atl L500 to work correctly.  It might even work
-               with an L200.
-
-       other values are (taken from the code)
-               C1553A (HP Auto Loader)
-               EXB-10e, EXB-120 (Exabyte Robot)
-               EXB-85058HE-0000 (Exabyte Tape)
-               TDS 1420 (Tandberg Robot)
-               VLS DLT, VLS SDX (ADIC VLS DLT Library)
-               FastStor DLT (ADIC FastStor DLT Library) 
-               Scalar DLT 448 (ADIC DLT 448)
-               215 (Spectra Logic TreeFrog)
-               Quad 7 (Breece Hill)
-               DLT7000, DLT4000 (DLT Tape)
-
-"debuglevel"
-       setting this to "9:0" is very informative.
-
-"statfile" 
-       stores which "slot" that the tape in the drive came from
-
-"labelfile"
-       binary file that stores the tape header and barcode information
-
-cleanmax
-cleancart
-cleanfile
-       I have my changer set to autoclean, and the slot the cleaning
-       cartridge is in is not available for any other use.  
-
-
------------------------------------------------
-
-Amanda's actual usage of chg-scsi
-
-this should be brief:
-       amanda really only issues "slot next" type commands.  currently
-       amanda doesn't ask chg-scsi to load "tape x with label
-       Daily_set023".  the chg-scsi mechanism is there for use, and
-       functions quite well for the user to load a particular tape.
-       I understand they (the amanda team) is working on this.
-
------------------------------------------------
-
-Configuration notes:
-
-       (assuming one changer with one tape drive!)
-
-in "amanda.conf":
-
-       set tpchanger to chg-scsi
-       set changerfile to <pathname>/changer.conf
-       set tapedev to 0
-       set changerdev to /dev/<changer generic device>
-               - this value is usually listed in the system boot
-                 messages or will be printed via syslog when the
-                 appropriate kernel module is loaded. 
-                       eg: linux "modprobe sg"
-
-in changer.conf:
-       set number_configs to 1
-       set dev to <non-rewinding tape device eg: /dev/nst1>
-       set debug to 9:0
-       
-run "chg-scsi -scan" from your amanda configuration directory
-       I get:
-               name /dev/sg0 Tape
-               Count 1
-               name /dev/sg1 Changer
-               Count 2
-               name /dev/sg2 Tape
-               Count 3
-
-       I set scsitapedev to "/dev/sg0" to test with, then ran "chg-scsi
-       -info".  check the chg-scsi debug file for tapeidentification
-       details.  this is where I discoverd that "sg0" was not the
-       correct tape!
-
-       set scsitapedev to "/dev/<generic device>"
-
-       if you have no barcode, try "changerident generic"
-       if you have a barcode reader try "changerident genericbarcode"
-
-
-
------------------------------------------------
-
-Hacking notes:
-       
-my hacks are:
-       adding printout of "emubarcode" values in the debug file
-       
-       added dlt8000 tape drive to ChangerIO[], and SenseType[]
-       added genericbarcode to ChangerIO[], and SenseType[]
-       added L500 to ChangerIO[], and SenseType[]
-       
-
-       added a couple of basic sensecodes listed in the scsi specs for
-       the generic and genericbarcode tape changers.
-
-
-
-My desires are:
-       modify the sensecode code such that all scsi devices inherit the
-       standard scsi codes and may override or append to them as
-       needed.
-
-       modify the configuration reading code and the "inquiry" command
-       to allow spaces.  
-               eg: my changer displays the following ident data: 
-               "L500   6320000" but I had to create a type called "L500"
-               or else the spaces would throw off the comparisons.
-
diff --git a/docs/chgscsi.txt b/docs/chgscsi.txt
new file mode 100644 (file)
index 0000000..eb50c21
--- /dev/null
@@ -0,0 +1,266 @@
+
+                   Chapter 9. chg-scsi
+Prev  Part II. About Tapes and Changers  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 9. chg-scsi
+
+
+Jason X (report real name to <sgw@amanda.org>)
+
+Original version
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Command_line_options
+
+  Notes_about_changer.conf
+
+  AMANDA's_actual_usage_of_chg-scsi
+
+  Configuration_notes
+
+  Hacking_notes
+
+
+Note
+
+Refer to http://www.amanda.org/docs/chgscsi.html for the current version of
+this document.
+Jason's new and improved chg-scsi documentation.
+This documentation will also include an occasional reference to the mtx suite
+as I have attempted to use chg-zd-mtx. I use mtx often as a fast query tool.
+Please also refer to AMANDA_Tape_Changer_Support for additional details.
+My equipment list is as follows:
+
+* Redhat 7.0 machine
+*
+  o Dual Processor P-III
+  o Sony DDS3 tape drive
+  o lots of hard disk space
+
+* Quantum/ATL L500 SCSI changer
+* DLT tape drive (three possible)
+* barcode reader fourteen tape slots
+
+I base this documentation on the following:
+
+* mtx version 1.2.16rel
+* AMANDA version 2.4.3b3
+* SCSI2 specification: X3T9.2/375R revision 10L
+* Quantum/ATL Field Service Manual 6321101-03 Ver.3, rel.0
+* Quantum DLT800 Tape system product manual 02 April, 2001 81-60118-04
+* the SCSI bus and IDE interface 2nd ed by Friedhelm Schmidt pub: Addison-
+  Wesley 1998
+
+Note that Quantum/ATL's L-series changers follow the SCSI command set, and do
+not use any proprietary commands. Thus, it was fairly simple to make this work.
+I had to install AMANDA --with-suffixes and setup my server's client side of
+things using AMANDA-2.4.2p2 --with-suffixes.
+Please note that my usage of "barcode" and "barcode reader" throughout this
+document really refers to "physical tape identification system". for example:
+the EEPROM in the AIT cartridge.
+
+ Command line options
+
+chg-scsi's command line options:
+
+  -slot <param>
+  -info
+  -reset
+  -eject
+  -clean
+  -label <param>
+  -search <param>
+  -status <param>
+  -trace <param>
+  -inventory
+  -dumpdb
+  -scan
+  -genconf
+
+Note that chg-scsi is called by AMANDA in the context of whatever AMANDA
+configuration AMANDA is currently using. In short, to call chg-scsi by hand,
+change to your AMANDA configuration directory, then run chg-scsi.
+-slot <param> command:
+this command takes either a slot number, or any one of the following: current,
+next, prev, first, last, advance
+It then loads the appropriate tape into the drive.
+Note that if the tape is already loaded, no changer motion will happen. No
+reading of the tape is done here.
+-info command:
+four numbers are printed: <slot# loaded> <number of slots> <reversable>
+<searchable>
+with chg-scsi, the reversable number is always 1. Searchable is set based on if
+a barcode reader is available and working correctly.
+-reset command:
+Tape is unloaded, and slot 0 is loaded. No actual reset command is sent to the
+changer.
+-eject command:
+Tape is unloaded, and put back into its original slot.
+-clean command:
+Cleaning tape (if configured) is loaded into the tape. It is probably unloaded
+when done. I haven't looked closely at this yet.
+-label <param> command:
+This appears to take the currently loaded tape's barcode and write it to the
+labelfile with the given parameter as it's tape header. I have not tested this.
+-search <param> command:
+this only should be used if a barcode reader is present, or emulate barcode is
+turned on.
+the required parameter is an AMANDA tape label. The label searched in the
+labelfile. If a barcode is found, then that tape is loaded directly.
+I believe the fallback is to search the entire magazine.
+-status command:
+The tape changer is queried, and the results are printed out. Values printed
+are what slots exist, are they full or empty, and what volume labels (barcodes)
+they are.
+Q. what about changers that don't retain current slot? A. this is what the
+"statfile" is for.
+-trace command:
+present only for a particular type of changer.
+-inventory: (this takes a LONG time to do)
+unloads tape back to its slot issues command to changer to do an inventory of
+itself (read all barcodes...)
+loads each tape, retrieves the barcode, and reads the AMANDA
+label off of the tape itself stores/updates the label database file
+-dumpdb:
+prints out in human readable form the label database contents from the
+labelfile.
+-scan: (aka scanbus)
+scans the SCSI generic interfaces (eg: linux sg), and prints out the device
+name and the device types. I found that linux didn't classify either of my tape
+devices as generic, but this facility did.
+USE THIS FOR FINDING VALUE OF SCSItapedev. Be certain though you have the
+correct tape drive: I came close to wreaking havoc with my DDS3 drive while it
+was flushing AMANDA data...and my changer has a DLT drive! Please refer to my
+configuration notes below.
+-genconf:
+prints out a SAMPLE changer.conf file. Note that I said sample. except for that
+it also does a scanbus. if you have more than one tape drive, please be certain
+it is correct as chg-scsi uses the first one it finds.
+Please refer to my configuration notes below.
+
+ Notes about changer.conf
+
+Here, I try to be a bit more clear on what these config values mean.
+"number_configs" MUST be the first entry (not counting comments)
+"emubarcode" will set this value in chg-scsi regardless of the value you try to
+assign it. If you don't want "emubarcode" set, don't list it!
+"havebarcode" have barcode is tempered by what devices chg-scsi is aware of. if
+chg-scsi doesn't know about your changer explicitly, it will default to a
+default changer. the default changer has no barcode reader.
+In a patch I plan to post, I have added a generic changer that does use a
+barcode. set "changerident" to "genericbarcode" to use this.
+"sleep" number of seconds for chg-scsi to wait for a "tape drive ready" command
+after loading a new tape. Mine is 140 as I have a DLT tape drive, and my tape
+drive manual reports a max of 133 seconds to be ready.
+"config" this is a header telling chg-scsi that all values following, up to the
+next "config" line apply to this drive number. It is this number that is
+refered to in your amanda.conf file as line tapedev
+"drivenum" this is the tape drive number in your changer. For a single tape
+drive, this is zero. Mine can handle up to three, so I expect I could make this
+0, 1, or 2.
+"dev" the SCSI device of your tape drive. under linux, in my case it is /dev/
+nst1. This MUST be defined.
+"SCSItapedev" The generic SCSI device of your tape drive. this is simply the
+generic interface to the device "dev" above. This entry is optional. In my
+case, it is /dev/sg2. If this entry exists and is legitimate, then SCSI
+commands are formed directly instead of using ioctl commands.
+"startuse" "enduse" The start and end slots of your changer. Note that these
+also start with zero.
+"eject" chg-scsi tells the tape changer to eject. You might need to explicitly
+tell the tape drive to unload first. That's what this setting is for. Have you
+ever removed a loaded VCR tape by hand?
+"changerident" chg-scsi will first read the changer's identification from the
+return of the SCSI "inquiry" command. If changerident is set in the
+configuration file, the SCSI inquiry's value is overridden. chg-scsi will
+attempt to match the value with its built-in changertypes.
+"generic" is what the chg-scsi will default to "genericbarcode" is a hack of
+mine that forces the changer's barcode reader to work. Note that if your
+changer uses a superset of the SCSI command set, this probably won't work.
+"L500" is another addition of mine that will enable a quantum/atl L500 to work
+correctly. It might even work with an L200.
+other values are (taken from the code)
+
+* C1553A (HP Auto Loader)
+* EXB-10e, EXB-120 (Exabyte Robot)
+* EXB-85058HE-0000 (Exabyte Tape)
+* TDS 1420 (Tandberg Robot)
+* VLS DLT, VLS SDX (ADIC VLS DLT Library)
+* FastStor DLT (ADIC FastStor DLT Library)
+* Scalar DLT 448 (ADIC DLT 448)
+* 215 (Spectra Logic TreeFrog)
+* Quad 7 (Breece Hill)
+* DLT7000, DLT4000 (DLT Tape)
+
+"debuglevel" setting this to "9:0" is very informative.
+"statfile" stores which "slot" that the tape in the drive came from
+"labelfile" binary file that stores the tape header and barcode information
+cleanmax cleancart cleanfile I have my changer set to autoclean, and the slot
+the cleaning cartridge is in is not available for any other use.
+
+ AMANDA's actual usage of chg-scsi
+
+this should be brief: AMANDA really only issues "slot next" type commands.
+Currently AMANDA doesn't ask chg-scsi to load "tape x with label Daily_set023".
+the chg-scsi mechanism is there for use, and functions quite well for the user
+to load a particular tape. I understand they (the AMANDA team) are working on
+this.
+
+ Configuration notes
+
+(assuming one changer with one tape drive!)
+in amanda.conf:
+set tpchanger to chg-scsi set changerfile to <pathname>/changer.conf set
+tapedev to 0 set changerdev to /dev/<changer generic device>
+
+* this value is usually listed in the system boot messages or will be printed
+  via syslog when the appropriate kernel module is loaded. eg: linux modprobe
+  sg
+
+in changer.conf: set number_configs to 1 set dev to <non-rewinding tape device
+eg: /dev/nst1> set debug to 9:0
+run "chg-scsi -scan" from your AMANDA configuration directory I get: name /dev/
+sg0 Tape Count 1 name /dev/sg1 Changer Count 2 name /dev/sg2 Tape Count 3
+I set SCSItapedev to /dev/sg0 to test with, then ran chg-scsi -info. Check the
+chg-scsi debug file for tapeidentification details. This is where I discoverd
+that "sg0" was not the correct tape!
+set SCSItapedev to "/dev/<generic device>"
+if you have no barcode, try "changerident generic" if you have a barcode reader
+try "changerident genericbarcode"
+
+ Hacking notes
+
+My hacks are:
+
+* adding printout of "emubarcode" values in the debug file
+* added dlt8000 tape drive to ChangerIO[], and SenseType[]
+* added genericbarcode to ChangerIO[], and SenseType[]
+* added L500 to ChangerIO[], and SenseType[]
+* added a couple of basic sensecodes listed in the SCSI specs for the generic
+  and genericbarcode tape changers.
+
+My desires are:
+
+* modify the sensecode code such that all SCSI devices inherit the standard
+  SCSI codes and may override or append to them as needed.
+
+
+* modify the configuration reading code and the inquiry command to allow
+  spaces. eg: my changer displays the following ident data: "L500 6320000" but
+  I had to create a type called "L500" or else the spaces would throw off the
+  comparisons.
+
+-------------------------------------------------------------------------------
+
+Prev                            Up                                   Next
+Chapter 8. AMANDA Tape Changer Home  Chapter 10. RAIT (Redundant Array of
+Support                                         Inexpensive Tape) Support
+
diff --git a/docs/dumperapi.txt b/docs/dumperapi.txt
new file mode 100644 (file)
index 0000000..e593ff2
--- /dev/null
@@ -0,0 +1,325 @@
+
+        Chapter 21. AMANDA dumper API
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 21. AMANDA dumper API
+
+
+Alexandre Oliva
+
+Original text
+AMANDA Core Team
+<oliva@dcc.unicamp.br>>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  The_Problem
+
+  Overview_of_the_API
+
+
+        The_`support'_command
+
+
+  The_`selfcheck'_command
+
+  The_`estimate'_and_`estimate-parse'_commands
+
+  The_`backup'_and_`backup-parse'_commands
+
+  The_`index-from-output'_and_`index-from-image'_commands
+
+  The_`restore'_command
+
+  The_`print-command'_command
+
+  Conclusion
+
+
+Note
+
+Refer to http://www.amanda.org/docs/dumperapi.html for the current version of
+this document.
+
+ Introduction
+
+This is a proposal of a mechanism for AMANDA to support arbitrary backup
+programs, that relies on a generic backup driver and scripts or programs that
+interface with backup programs such as dump, tar, smbclient, and others. It can
+also be used to introduce pre- and post-backup commands.
+The interface is simple, but supports everything that is currently supported by
+AMANDA, and it can be consistently extended to support new abstractions that
+may be introduced in the backup driver in the future.
+This proposal does not imply any modification in the AMANDA protocol or in
+AMANDA servers; only AMANDA clients have to be modified. By AMANDA clients, we
+refer to hosts whose disks are to be backed up; an AMANDA server is a host
+connected to a tape unit.
+Currently (as of release 2.4.1 of AMANDA), AMANDA clients support three
+operations: selfcheck, estimate and backup.
+Selfcheck is used by the server program amcheck, to check whether a client is
+responding or if there are configuration or permission problems in the client
+that might prevent the backup from taking place.
+Estimates are requested by the AMANDA planner, that runs on the server and
+collects information about the expected sizes of backups of each disk at
+several levels. Given this information and the amount of available tape space,
+the planner can select which disks and which levels it should tell dumper to
+run.
+dumper is yet another server-side program; it requests clients to perform
+dumps, as determined by planner, and stores these dumps in holding disks or
+sends them directly to the taper program. The interaction between dumper and
+taper is beyond the scope of this text.
+We are going to focus on the interaction between the AMANDA client program and
+wrappers of dump programs. These wrappers must implement the DUMPER API. The
+dumptype option `program' should name the wrapper that will be used to back up
+filesystems of that dumptype. One wrapper may call another, so as to extend its
+functionality.
+
+ The Problem
+
+Different backup programs present distinct requirements; some must be run as
+super-user, whereas others can be run under other user-ids. Some require a
+directory name, the root of the tree to be backed up; others prefer a raw
+device name; some don't even refer to local disks (SAMBA). Some wrappers may
+need to know a filesystem type in order to decide which particular backup
+program to use (dump, vdump, vxdump, xfsdump, backup).
+Some provide special options for estimates, whereas others must be started as
+if a complete dump were to be performed, and must be killed as soon as they
+print an estimate.
+Furthermore, the output formats of these backup programs vary wildly. Some will
+print estimates and total sizes in bytes, in 512-byte tape blocks units, in
+Kbytes, Mbytes, Gbytes, and possibly Tbytes in the near future. Some will print
+a timestamp for the backup; some won't.
+There are also restrictions related with possible scheduling policies. For
+example, some backup programs only support full backups or incrementals based
+on the last full backup (0-1). Some support full backups or incrementals based
+on the last backup, be it a full or an incremental backup (0-inf++). Some
+support incrementals based on a timestamp (incr/date); whereas others are based
+on a limited number of incremental levels, but incrementals of the same level
+can be repeated, such as dump (0-9).
+AMANDA was originally built upon DUMP incremental levels, so this is the only
+model it currently supports. Backup programs that use other incremental
+management mechanisms had to be adapted to this policy. Wrapper scripts are
+responsible for this adaptation.
+Another important issue has to do with index generation. Some backup programs
+can generate indexes, but each one lists files in its own particular format,
+but they must be stored in a common format, so that the AMANDA server can
+manipulate them.
+The DUMPER API must accomodate for all these variations.
+
+ Overview of the API
+
+We are going to define a standard format of argument lists that the backup
+driver will provide to wrapper programs, and the expected result of the
+execution of these wrappers.
+The first argument to a wrapper should always be a command name. If no
+arguments are given, or an unsupported command is requested, an error message
+should be printed to stderr, and the program should terminate with exit status
+1.
+
+ The `support' command
+
+As a general mechanism for AMANDA to probe for features provided by a backup
+program, a wrapper script must support at least the `support' command. Some
+features must be supported, and AMANDA won't ever ask about them. Others will
+be considered as extensions, and AMANDA will ask the wrapper whether they are
+supported before issuing the corresponding commands.
+
+ The `level-incrementals' subcommand
+
+For example, before requesting for an incremental backup of a given level,
+AMANDA should ask the wrapper whether the backup program supports level-based
+incrementals. We don't currently support backup programs that don't, but we may
+in the future, so it would be nice if wrappers already implemented the command
+`support level-incrementals', by returning a 0 exit status, printing, say, the
+maximum incremental level it supports, i.e., 9. A sample session would be:
+
+  % /usr/local/amanda/libexec/wrappers/dump support level-incrementals hda0 9
+       
+
+Note that the result of this support command may depend on filesystem
+information, so the disklist filesystem entry should be specified as a command
+line argument. In the next examples, we are not going to use full pathnames to
+wrapper scripts any more.
+We could have defined a `support' command for full backups, but I can't think
+of a backup program that does not support full backups...
+
+ The `index' subcommand
+
+The ability to produce index files is also subject to an invocation of
+`support' command. When the support sub-command is `index', like in the
+invocation below, the wrapper must print a list of valid indexing mechanisms,
+one per line, most preferred first. If indexing is not supported, nothing
+should be printed, and the exit status should be 1.
+DUMP support index hda0
+The currently known indexing mechanisms are:
+output: implies that the command `index-from-output' generates an index file
+from the output produced by the backup program (for example, from tar -cv).
+image: implies that the command `index-from-image' generates an index file from
+a backup image (for example, tar -t).
+direct: implies that the `backup' command can produce an index file as it
+generates the backup image.
+parse: implies that the `backup-parse' command can produce an index file as it
+generates the backup formatted output .
+The indexing mechanisms will be explicitly requested with the additionnal
+option `index-<mode>' in the `backup' and `backup-parse' command invocation.
+`index-from-image' should be supported, if possible, even if other index
+commands are not, since it can be used in the future to create index files from
+previously backed up filesystems.
+
+ The `parse-estimate' subcommand
+
+The `parse-estimate' support subcommand print a list of valid mechanisms to
+parse the estimate output and write the estimate size to its output, the two
+mechanisms are:
+direct: implies that the `estimate' command can produce the estimate output.
+parse: implies that the `estimate-parse' command can produce the estimate
+output when fed with the `estimate' output.
+The estimate parsing mechanisms will be explicitly requested with the
+additionnal option `estimate-<mode>' in the `estimate' and `estimate-parse'
+command invocation.
+
+ The `parse-backup' subcommand
+
+The `parse-backup' support subcommand print a list of valid mechanisms to parse
+the backup stderr, the two mechanisms are:
+direct: implies that the `backup' command can produce the backup-formatted-
+ouput.
+parse: implies that the `backup-parse' command can produce the backup-
+formatted-ouput when fed with the `backup' stderr.
+The backup parsing mechanisms will be explicitly requested with the additional
+option `backup-<mode>' in the `backup' and `backup-parse' command invocation.
+
+ Other subcommands
+
+Some other standard `support' sub-commands are `exclude' and `exclude-list'.
+One may think (and several people did :-) ) that there should be only one
+support command, that would print information about all supported commands. The
+main arguments against this proposal have to do with extensibility:
+The availability of commands might vary from filesystem to filesystem. No, I
+don't have an example, I just want to keep it as open as possible :-) one
+support subcommand may require command line arguments that others don't, and we
+can't know in advance what these command line arguments are going to be
+The output format and exit status conventions of a support command may vary
+from command to command; the only pre-defined convention is that, if a wrapper
+does not know about a support subcommand, it should return exit status 1,
+implying that the inquired feature is not supported.
+
+ The `selfcheck' command
+
+We should support commands to perform self-checks, run estimates, backups and
+restores (for future extensions of the AMANDA protocol so as to support
+restores)
+A selfcheck request would go like this:
+DUMP selfcheck hda0 option option=value ...
+The options specified as command-line arguments are dumptype options enabled
+for that disk, such as `index', `norecord', etc. Unknown options should be
+ignored. For each successful check, a message such as:
+OK [/dev/hda0 is readable] OK [/usr/sbin/dump is executable]
+Errors should be printed as:
+ERROR [/etc/dumpdates is not writable]
+A wrapper script will certainly have to figure out either the disk device name
+or its mount point, given a filesystem name such as `hda0', as specified in the
+disklist. In order to help these scripts, AMANDA provides a helper program that
+can guess device names, mount points and filesystem types, when given disklist
+entries.
+The filesystem type can be useful on some operation systems, in which more than
+one dump program is available; this information can help automatically
+selecting the appropriate dump program.
+The exit status of selfcheck and of this alternate script are probably going to
+be disregarded. Anyway, for consistency, selfcheck should return exit status 0
+for complete success, 1 if any failures have occurred.
+
+ The `estimate' and `estimate-parse' commands
+
+Estimate requests can be on several different forms. An estimate of a full
+backup may be requested, or estimates for level- or timestamp-based
+incrementals:
+DUMP estimate full hda0 option ... DUMP estimate level 1 hda0 option ... DUMP
+estimate diff 1998:09:24:01:02:03 hda0 option ...
+If requested estimate type is not supported, exit status 3 should be returned.
+If the option `estimate-direct' is set, then the `estimate' command should
+write to stdout the estimated size, in bytes, a pair of numbers that,
+multiplied by one another, yield the estimated size in bytes.
+If the option `estimate-parse' is set, then the `estimate' command should write
+to stdout the informations needed by the `estimate-parse' command, that should
+extract from its input the estimated size.
+The syntax of `estimate-parse' is identical to that of `estimate'.
+Both `estimate' and `estimate-parse' can output the word `KILL', after printing
+the estimate. In this case, AMANDA will send a SIGTERM signal to the process
+group of the `estimate' process. If it does not die within a few seconds, a
+SIGKILL will be issued.
+If `estimate' or `estimate-parse' succeed, they should exit 0, otherwise exit
+1, except for the already listed cases of exit status 3.
+
+ The `backup' and `backup-parse' commands
+
+The syntax of `backup' is the same as that of `estimate'. The backup image
+should be written to standard output, whereas stderr should be used for the
+user-oriented output of the backup program and other messages.
+If the option `backup-direct' is set, then the `backup' command should write to
+stderr a formatted-output-backup.
+If the option `backup-parse' is set, then the `backup' command should write to
+stderr the informations needed by the `backup-parse' command, that should edit
+its input so that it prints to standard output a formatted-output-backup.
+If the option `no-record' is set, then the `backup' command should not modify
+its state file (ex. dump should not modify /etc/dumpdates).
+The syntax of `backup-parse' is identical to that of `backup'.
+The syntax of the formatted-output-backup is as follow: All lines should start
+with either `| ' for normal output, `? ' for strange output or `& ' for error
+output. If the wrapper can determine the total backup size from the output of
+the backup program, it should print a line starting with `# ', followed by the
+total backup size in bytes or by a pair of numbers that, multiplied, yield the
+total backup size; this number will be used for consistency check.
+The option `index-direct' should cause commands `backup' to output the index
+directly to file descriptor 3. The option `index-parse' should cause commands
+`backup-parse' to output the index directly to file descriptor 3. The syntax of
+the index file is described in the next section.
+
+ The `index-from-output' and `index-from-image' commands
+
+The syntax of the `index-from-output' and `index-from-image' commands is
+identical to the one of `backup'. They are fed the backup output or image, and
+they must produce a list of files and directories, one per line, to the
+standard output. Directories must be identified by the `/' termination.
+After the file name and a blank space, any additional information about the
+file or directory, such as permission data, size, etc, can be added. For this
+reason, blanks and backslashes within filenames should be quoted with
+backslashes. Linefeeds should be represented as `\n', although it is not always
+possible to distinguish linefeeds in the middle of filenames from ones that
+separate one file from another, in the output of, say `restore -t'. It is not
+clear whether we should also support quoting mechanisms such as `\xHH', `\OOO'
+or `\uXXXX'.
+
+ The `restore' command
+
+Yet to be specified.
+
+ The `print-command' command
+
+This command must be followed by a valid backup or restore command, and it
+should print a shell-command that would produce an equivalent result, i.e.,
+that would perform the backup to standard output, or that would restore the
+whole filesystem reading from standard input. This command is to be included in
+the header of backup images, to ease crash-recovery.
+
+ Conclusion
+
+Well, that's all. Drop us a note at the amanda-hackers mailing list (mailto://
+amanda-hackers@amanda.org) if you have suggestions to improve this document
+and/or the API. Some help on its implementation would be welcome, too.
+-------------------------------------------------------------------------------
+
+Prev                                     Up                           Next
+Chapter 20. How AMANDA uses UDP and TCP Home  Chapter 22. AMANDA Internals
+ports 
+
diff --git a/docs/eventapi.txt b/docs/eventapi.txt
new file mode 100644 (file)
index 0000000..0b5e0c9
--- /dev/null
@@ -0,0 +1,167 @@
+
+         Chapter 23. AMANDA Event API
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 23. AMANDA Event API
+
+
+Mike Grupenhoff
+
+Original text
+AMANDA Core Team
+<kashmir@munge.com>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  The_API
+
+
+        event_register
+
+        event_release
+
+        event_loop
+
+        event_wakeup
+
+
+  Data_types
+
+
+        event_handle_t
+
+        event_id_t
+
+        event_type_t
+
+        event_fn_t
+
+
+  Event_Types
+
+
+        EV_READFD
+
+        EV_WRITEFD
+
+        EV_SIG
+
+        EV_TIME
+
+        EV_WAIT
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/eventapi.html for the current version of
+this document.
+
+ Introduction
+
+This is a document of the API for the event handler. The purpose of the event
+handler is to allow scheduling and serialization of multiple different types of
+events.
+
+ The API
+
+
+ event_register
+
+event_handle_t *event_register(event_id_t data, event_type_t type, event_fn_t
+callback, void *arg);
+Sets up an event of the given type to call the given function with the given
+argument.
+The 'data' argument is type specific.
+EV_READFD, EV_WRITEFD - the file descriptor to monitor EV_SIG - the signal
+number to monitor EV_TIME - the number of seconds between each pulse EV_WAIT -
+the wait identifier used with event_wakeup() EV_DEAD - internal use only
+
+ event_release
+
+void event_release(event_handle_t *handle);
+Remove an event from the queue. This can happen at any time, even while the
+event is firing.
+
+ event_loop
+
+void event_loop(int dontblock);
+Process all pending events. If the argument is zero, this will keep running
+until all events have been released. If the argument is nonzero, this will do
+one pass over all pending events, and fire the ones that are immediately ready,
+and then return.
+
+ event_wakeup
+
+int event_wakeup(event_id_t id);
+Fire all EV_WAIT events registered with an argument value of 'id' immediately.
+Returns the number of events that were fired.
+
+ Data types
+
+
+ event_handle_t
+
+This is an opaque structure that describes a registered event. It is only
+useful to keep if you need to unregister the event later.
+
+ event_id_t
+
+This is type-specific data. The contents and format depend on on the type of
+the event. This is an unsigned integral type.
+
+ event_type_t
+
+This is an enumerated type describing the different events we handle.
+
+ event_fn_t
+
+typedef void (*event_fn_t)(void *arg);
+This is a function signature for the type of function that needs to get passed
+to event_register. The argument to the function is a pointer of the caller's
+choosing.
+
+ Event Types
+
+
+ EV_READFD
+
+This type of event will fire when the file descriptor passed to event_register
+has data waiting to be read.
+
+ EV_WRITEFD
+
+This type of event will fire when the file descriptor passed to event_register
+can have data written to it without blocking.
+
+ EV_SIG
+
+This type of event will fire when the signal number passed to event_register
+has been caught. Note that if a signal is caught while processing is not in
+event_loop(), the event will be delayed until processing returns to event_loop
+().
+
+ EV_TIME
+
+This type of event will fire repeatedly with a delay of the number of seconds
+passed to event_register between each interval.
+
+ EV_WAIT
+
+This type of event will fire when someone calls event_wakeup() with the numeric
+argument equal to the argument this event was registered with.
+-------------------------------------------------------------------------------
+
+Prev                           Up                              Next
+Chapter 22. AMANDA Internals  Home  Chapter 24. AMANDA Security API
+
diff --git a/docs/exclude.txt b/docs/exclude.txt
new file mode 100644 (file)
index 0000000..cfb0f48
--- /dev/null
@@ -0,0 +1,338 @@
+
+         Chapter 3. Excluding
+Prev  Part I. Installation  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 3. Excluding
+
+
+Andrew Hall
+
+Original text
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  Please_Read
+
+  Before_We_Begin
+
+  Choosing_an_exclude_mechanism
+
+
+        Exclude_Mechanisms
+
+
+  Expression
+
+  Wildcard_Expansion
+
+  Troubleshooting
+
+
+        Broken_gnutar?
+
+        The_ps_command_is_your_friend.
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/exclude.html for the current version of
+this document.
+
+ Introduction
+
+There are times when data needs to be excluded from a backup. When these times
+arise be confident that AMANDA has this capability. (Actually it's not AMANDA,
+it's tar.) There are three ways of excluding data in an AMANDA backup:
+
+* Exclude an individual item explicitly in the dumptype
+* Utilize an "Exclude List"
+* Do not include the data in the disklist
+
+This document is based on AMANDA 2.4.2 and some of this might not work with
+older versions. This was compiled from my personal experience and with help
+from the members of the amanda-users mailing list (mailto://amanda-
+users@amanda.org) when I was originally setting this up, to whom I wish to
+thank for all of their support.
+
+ Please Read
+
+As far as I am able to tell the only way to exclude files or directories with
+AMANDA is to use GNU-tar as the dump program (others?). The file system dump
+programs provided with unix systems (e.g. dump, ufsdump) get data at a raw
+drive level and generally do not allow exclusion of specific files or
+directories.
+The GNU version of tar, (GNU-tar or gtar), reads its data at a file system, (or
+higher), level and does include the option to exclude specific files and/or
+directories. It should be mentioned here that tar will change the access times
+on files. Tar has the ability to preserve the access times however, doing so
+effectively disables incremental backups since resetting the access time alters
+the inode change time, which in turn causes the file to look like it needs to
+be archived again.
+The only exception that I am aware of is to just not include the data in
+question in the disklist. This option may not be suitable for everyone's needs
+and can confuse the issue some, so I have elected to include this mechanism in
+its own section named Do_not_include_the_data_in_the_disklist.
+For the purpose of this document an AMANDA backup configuration named "exclude-
+test" will be used. The machine that contains the tape drive which receives
+data to be archived will be referred to as "SERVER". The machine that data is
+being archived from will be referred to as "CLIENT". These two systems are
+usually different machines but are not required to be, and may be the same
+machine. Parts of this setup are on the server and some are on the client.
+
+Note
+
+When AMANDA attempts to exclude a file or directory it does so relative to the
+area being archived. For example if /var is in your disklist and you want to
+exclude /var/log/somefile, then your exclude file would contain ./log/somefile.
+You may use one exclude file in multiple dumptypes without any restriction.
+
+ Before We Begin
+
+The first step that should be taken is to verify that backups are currently
+working. Connect to SERVER and run amcheck as your AMANDA user, to verify that
+there are no errors in the current setup.
+
+  $ amcheck -cl CLIENT
+
+Output should look something like below for success:
+
+       AMANDA Tape Server Host Check
+       -----------------------------
+
+       /path/to/holding-disk: 4771300 KB disk space available, that's plenty.
+       AMANDA Backup Client Hosts Check
+       --------------------------------
+       Client check: 1 host checked in 0.084 seconds, 0 problems found.
+
+Next make sure that GNU-tar is the dump program currently in use. The easiest
+way to tell if your dumptype is using gnutar is to run the following:
+
+  $ amadmin exclude-test disklist CLIENT
+
+Among all the output is the "program" value currently in use. This value is
+also specified with the "program" option in the dumptype. If the dumptype has
+the line "program GNUTAR" your setup should be ready to exclude data.
+If GNU-tar is not in use add the line "program GNUTAR" to the dumptype, and
+then run amcheck again to verify that backups should work. The capitalization
+of GNUTAR is required.
+The dumptype should look something like:
+
+  define dumptype exclude-test {
+  comment "test dumptype for documentation"
+  priority high
+  program "GNUTAR"
+  }
+
+
+ Choosing an exclude mechanism
+
+If the need is to exclude only one file or directory then the easiest way to
+accomplish this is to exclude an individual item explicitly in the dumptype. If
+the need is to exclude multiple files or directories then use an Exclude List.
+
+ Exclude Mechanisms
+
+
+ Exclude an individual item explicitly in the dumptype
+
+The easiest way to exclude a file or directory is to specify it with the
+"exclude" option in the dumptype. This option accepts an argument of the file
+or directory to be excluded. AMANDA allows only one exclude option in any
+dumptype at a time.
+
+Note
+
+UPDATE: Recent AMANDA-releases bring the option "exclude append" which enables
+the administrator to define more than one exclusion-pattern within one dumptype
+without using a exclude-list. Please look at the amanda.8-manpage for details.
+Any path specified to be excluded must be encapsulated with quotes. Continuing
+with our example from above /var/log/somefile and using the same dumptype as
+above, the dumptype would now look like:
+
+  define dumptype exclude-test {
+  comment "test dumptype for documentation"
+  priority high
+  program "GNUTAR"
+  exclude "./log/somefile"
+  }
+
+Next run amcheck again to verify that there are no problems with the revised
+AMANDA configuration. If the data is not being excluded as expected please see
+the Troubleshooting section below. This completes the setup of excluding an
+individual item in the dumptype.
+
+ Utilize an Exclude List
+
+An exclude list is a file that resides on the CLIENT machine and contains paths
+to be excluded, one per line. This file can be in any location on the CLIENT so
+long as the same path is specified in the dumptype. Some find /usr/local/etc/
+amanda an appropriate location, but it is up to you. I personally like to have
+a subdirectory for exclude files but it is up to you where you place this file.
+The exclude file may also be placed in the area being archived. This is an easy
+way to have a different exclusion file for each disklist entry without needing
+separate dumptype definitions. To use this technique, enter a path relative to
+the area being archived as the exclude file below instead of an absolute path.
+Connect to CLIENT and create the exclude directory as root. For example:
+
+  $ mkdir -p /usr/local/etc/amanda/exclude
+  $ cd /usr/local/etc/amanda/exclude
+
+Next create the exclude list for AMANDA to use. You can name the exclude file
+anything you wish it to be. Create a file, and in this file place all paths to
+files and directories that are to be excluded. Keeping with the /var example,
+assume that /var/log/XFree86.0.log, and /var/log/maillog need to be excluded.
+Remember that all paths are relative. The exclude list would look like:
+
+  ./log/XFree86.0.log
+  ./log/maillog
+
+Make sure that permissions are restricted on this file. Run the following as
+root, where exclude-filename is the name of the file you just created. For
+example:
+
+  $ chmod 644 /usr/local/etc/amanda/exclude/exclude-filename
+
+This concludes the necessary configuration on the client.
+Connect to SERVER and cd to the exclude-test AMANDA configuration directory.
+Edit the AMANDA configuration file e.g. amanda.conf. Add an entry similar to
+the following line, to the dumptype for the client in question, where the
+exclude-filename is the file that was created on CLIENT in the step above
+including the quotes. For example:
+
+  exclude list "/usr/local/etc/amanda/exclude/exclude-filename"
+
+The new dumptype should look something like:
+
+  define dumptype exclude-test{
+  comment "test dumptype for documentation"
+  priority high
+  program "GNUTAR"
+  exclude list "/usr/local/etc/amanda/exclude/exclude-filename"
+  }
+
+Save the file. Run amcheck again to verify that there are no problems with the
+revised AMANDA configuration. If amcheck succeeds then run amdump to verify the
+data is being excluded correctly. If the data is not being excluded as expected
+please see the Troubleshooting section below. This completes the setup of an
+exclude list.
+
+ Do not include the data in the disklist
+
+AMANDA uses disklist entries to define which directories or partitions should
+be archived. This allows us to exclude data by just not placing the data in
+question in the disklist. Assume that there is a disk mounted on /example. The
+directory /example has five subdirectories "a", "b", "c", "d", and "e". The
+directories "a", "b", and "c" need to be archived, while "d" and "e" should
+not. This can be accomplished by not specifying "d" and "e" in the disklist.
+Using the same dumptype and host in the above examples the disklist would
+contain:
+
+  CLIENT /examples/a   exclude-test
+  CLIENT /examples/b   exclude-test
+  CLIENT /examples/c   exclude-test
+
+Run amcheck to verify that AMANDA is working correctly. If the data is not
+being excluded as expected please see the Troubleshooting section below. This
+completes the setup of using a disklist to exclude data.
+
+ Expression
+
+Quiz: what is the difference between the following entries in an exclude list?
+
+  ./foo
+  ./foo/
+  ./foo/*
+
+case 1 : directory ./foo won't be in the backup image (that's what you want)
+case 2 : matches nothing (don't use it) case 3 : directory ./foo will be in the
+backup image but nothing below it.
+
+ Wildcard Expansion
+
+AMANDA has the ability to use wildcard expansion while excluding data as
+implemented by tar(1). The only places that wildcard expansion is allowed is in
+the "exclude" option in the dumptype, or in the exclude list. Some simple
+examples:
+Exclude any file or directory that ends in ".log" e.g. ppp.log, XFree86.0.log
+
+  ./*.log
+
+Exclude any file or directory with the string "log" e.g. logfile, maillog,
+syslog, ppp.log, XFree86.0.log
+
+  */*log*
+
+Exclude any file or directory that starts with string "cron" and ends in ".gz"
+e.g. cron.1.gz, cron.2.gz, log/cron.1.gz
+
+  ./*cron*.gz
+
+The question mark can be used to specify a single character. e.g. log.1, log.2,
+etc
+
+  ./log.?
+
+
+ Troubleshooting
+
+If you find that you are having trouble getting the exclude patterns to match
+correctly, check out this really cool script written by John R. Jackson.
+ftp://gandalf.cc.purdue.edu/pub/amanda/gtartest-exclude
+This script allows you to test your patterns before placing them in an exclude
+list or in the dumptype. Instructions on how to run the script are included in
+the script.
+
+ Broken gnutar?
+
+There are versions of GNU-tar that do not correctly exclude data. Version 1.12
+(plus the AMANDA patches from http://www.amanda.org) are known to work
+correctly, as does version 1.13.19 (and later). Anything else is questionable.
+
+Note
+
+UPDATE:Using GNU-tar 1.13.25 is recommended.
+
+ The ps command is your friend.
+
+Connect to CLIENT and run a
+
+  ps ax | grep tar
+
+(or
+
+  ps ef | grep tar
+
+on Solaris)
+to see exactly how the tar command is running. Look in the output for the --
+exclude or --exclude-from options in the running tar process. For example:
+
+  $ ps ax | grep tar
+
+  ?        R      0:37 /bin/tar --create --directory /var
+  --listed-incremental /var/lib/amanda/gnutar-lists/CLIENTvar_0.new
+  --sparse --one-file-system --ignore-failed-read --totals --file
+  /dev/null --exclude-from=/usr/local/etc/amanda/exclude-test/exclude.var
+  .
+
+In the above output notice the string "--exclude-from=". The string following
+the "=" is the exclude file currently in use. If the string was "--exclude"
+then the string following the "=" is the file or directory that is currently
+set to be excluded.
+Contact the amanda-users mailing list: mailto://amanda-users@amanda.org.
+Subscription information is available at http://www.amanda.org.
+-------------------------------------------------------------------------------
+
+Prev                                   Up                              Next
+Chapter 2. AMANDA Installation Notes  Home  Chapter 4. Indexing with AMANDA
+
diff --git a/docs/faq.txt b/docs/faq.txt
new file mode 100644 (file)
index 0000000..2c30deb
--- /dev/null
@@ -0,0 +1,543 @@
+
+             Chapter 16. AMANDA FAQ
+Prev  Part IV. Various Information  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 16. AMANDA FAQ
+
+
+AMANDA Core Team
+
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  QUESTION:_Why_does_AMANDA_fail_to_build_on_my_system?
+
+  QUESTION:_Why_does_amdump_report_that_all_disks_failed?
+
+  QUESTION:_Why_does_amcheck_say_"port_NNN_is_not_secure"?
+
+  QUESTION:_Why_does_amcheck_claim_that_the_tape_is_"not_an_amanda_tape"?
+
+  QUESTION:_Why_does_amcheck_report_"selfcheck_request_timed_out"?
+
+  QUESTION:_Why_does_amandad.debug_contain_"error_receiving_message"?
+
+  QUESTION:_Why_does_amcheck_say_"access_as_<username>_not_allowed..."?
+
+  QUESTION:_Why_does_amcheck_report_"ip_address_#.#.#.#"_is_not_in_the_ip_list
+  list_for_<hostname>'?
+
+  QUESTION:_Why_does_amcheck_say_"cannot_overwrite_active_tape"?
+
+  QUESTION:_Why_does_amcheck_tell_me_"DUMP_program_not_available"?
+
+  QUESTION:_Which_tape_changer_configuration_should_I_use_in_amanda.conf?
+
+  QUESTION:_Should_I_use_software_or_hardware_compression?
+
+  QUESTION:_How_can_I_configure_AMANDA_so_that_it_performs_full_backups_on_the
+  week-end_and_incrementals_on_weekdays?
+
+  QUESTION:_What_if_my_tape_unit_uses_expensive_tapes,_and_I_don't_want_to_use
+  one_tape_per_day?_Can't_AMANDA_append_to_tapes?
+
+  QUESTION:_How_can_I_configure_AMANDA_for_long-term_archiving?
+
+  QUESTION:_Can_I_backup_separate_disks_of_the_same_host_in_different
+  configurations?
+
+  QUESTION:_Can_AMANDA_span_large_filesystems_across_multiple_tapes?
+
+  QUESTION:_What's_the_difference_between_option_"skip-full"_and_"strategy
+  nofull"?
+
+  QUESTION:_Why_does_amdump_report_"results_missing"?
+
+  QUESTION:_Why_does_amdump_report_"disk_offline"?
+
+  QUESTION:_What_if_amdump_reports_"dumps_way_too_big,_must_skip_incremental
+  dumps"?
+
+  QUESTION:_amdump_reported_"infofile_update_failed"._What_should_I_do?
+
+  QUESTION:_Why_does_AMANDA_sometimes_promote_full_dumps?
+
+  QUESTION:_Why_does_amrecover_report_"no_index_records"_or_"disk_not_found"?
+
+  QUESTION:_Ok,_I'm_done_with_testing_AMANDA,_now_I_want_to_put_it_in
+  production._How_can_I_reset_its_databases_so_as_to_start_from_scratch?
+
+  QUESTION:_The_man-page_of_dump_says_that_active_filesystems_may_be_backed_up
+  inconsistently._What_does_AMANDA_do_to_prevent_inconsistent_backups?
+
+  QUESTION:_Which_version_of_GNU-tar_should_I_use?
+
+
+Note
+
+Refer to http://www.amanda.org/docs/faq.html for the current version of this
+document.
+This file contains answers to some questions that are frequently asked in the
+AMANDA mailing lists, specially by new users. Please take a look at this file
+before posting, this can save us time that could be spent improving AMANDA and
+its documentation.
+New entries and modifications are welcome; send them to mailto://amanda-
+users@amanda.org or mailto://amanda-hackers@amanda.org.
+You may also want to take a look at the AMANDA FAQ-O-Matic http://
+www.amanda.org/fom-serve/cache/1.html.
+
+ QUESTION: Why does AMANDA fail to build on my system?
+
+ANSWER: One of the most common reasons for compile-time errors is stale
+information in config.cache, after a build on a different platform using the
+same build tree. In order to avoid this problem, make sure you don't ever reuse
+build trees across platforms, or at least run make distclean before running
+configure on another platform.
+Another common reason for failure, that causes link-time errors, is a problem
+in libtool that causes it to search for symbols in already-installed amanda
+libraries, instead of in the just-built ones. This problem is known to affect
+SunOS 4.1.3 and FreeBSD. You can usually work around it by specifying a
+different prefix when you configure the new version of AMANDA. However, it may
+not work if the previous version of AMANDA was installed in /usr/local and gcc
+searches this directory by default; in this case, you must either remove the
+old libraries (which you don't want to do, right? :-) or call configure with
+the flag --disable-libtool. In this case, AMANDA won't create shared libraries,
+so binaries will be larger, but you may worry about that later.
+You may also want to take a look at AMANDA_2.4.x_-_System-Specific_Installation
+Notes, as well as to the AMANDA Patches Page (http://www.amanda.org/patches/
+) for other known problems. If everything fails, you should read the manual,
+but since we don't have one yet, just post a help request to the amanda-users
+mailing list (mailto://amanda-users@amanda.org), showing the last few lines of
+the failed build.
+
+ QUESTION: Why does amdump report that all disks failed?
+
+ANSWER: Probably because the AMANDA clients are not properly configured. Before
+you ever run amdump, make sure amcheck succeeds. When it does, so should
+amdump.
+Make sure you run amcheck as the same user that is supposed to start amdump,
+otherwise you may get incorrect results.
+
+ QUESTION: Why does amcheck say "port NNN is not secure"?
+
+ANSWER: Because amcheck, as some other AMANDA programs, must be installed as
+setuid-root. Run make install as "root", or chown all AMANDA setuid programs to
+"root", then chown u+s them again, if chown drops the setuid bit.
+
+ QUESTION: Why does amcheck claim that the tape is "not an amanda tape"?
+
+ANSWER: Because AMANDA requires you to label tapes before it uses them. Run
+amlabel in order to label a tape.
+If, even after labeling a tape, amcheck still complains about it, make sure the
+regular expression specified in amanda.conf matches the label you have
+specified, and check whether you have configured non-rewinding tape devices for
+AMANDA to use. For example, use /dev/nrst0 instead of /dev/rst0, /dev/rmt/0bn
+instead of /dev/rmt/0b, or some other system-dependent device name that
+contains an "n", instead of one that does not. The "n" stands for non-
+rewinding.
+If you have labeled any tapes using the rewiding device configuration, you'll
+have to label them again.
+
+ QUESTION: Why does amcheck report "selfcheck request timed out"?
+
+ANSWER: This can occur under several different situations. First, make sure
+this problem is repeatable; if AMANDA programs are NFS-auto-mounted, some
+clients may fail to mount the AMANDA binaries in time.
+If the error is repeatable, log into the client, and check whether the
+directory /tmp/amanda exists, and a file named amandad.debug exists in there:
+amandad will create this file whenever it starts. If this file does not exist,
+amandad is not starting properly, or it lacks permission to create /tmp/amanda/
+amandad.debug.
+In the latter case, wipe out /tmp/amanda, and amandad should create it next
+time it runs. In the former case, check your inetd configuration. Make sure you
+have added the AMANDA services to /etc/services (or the NIS services map), that
+/etc/inetd.conf was properly configured, and that you have signalled inetd to
+reread this file (some systems may need rebooting). Check section 2.2 from in
+the Amanda_Installation_Notes for details. Check the inetd man-page for
+possible differences between the standard format of /etc/inetd.conf and the one
+in your system.
+Pay special attention to typos in /etc/inetd.conf; error messages will probably
+appear in /var/adm/messages or /var/log/messages if you have typed the amandad
+program name incorrectly. Make sure the same user that you have specified at
+configure-time (configure --with-user=<USERNAME>) is listed in /etc/inetd.conf.
+Check whether this user has permission to run amandad, as well as any shared
+libraries amandad depends upon, by running the specified amandad command by
+hand, as the AMANDA user. It should just time-out after 30 seconds waiting for
+a UDP packet. If you type anything, it will abort immediately, because it can't
+read a UDP packet from the keyboard.
+As soon as you have properly configured /etc/inetd.conf so as to run amandad,
+you should no longer get the "selfcheck request timed out" message. A nice tool
+to help make sure inetd is really listening on the amandad port is lsof,
+available at ftp://vic.cc.purdue.edu/pub/tools/unix/lsof.
+
+ QUESTION: Why does amandad.debug contain "error receiving message"?
+
+ANSWER: One possibility is that you have run amandad from the command line
+prompt and typed anything instead of waiting for it to time-out: in this case,
+it will try to read a UDP packet from the keyboard, and this was reported not
+to work on most keyboards :-). However, if you have run amandad as any user
+other than the one listed in /etc/inetd.conf, it may have created a /tmp/amanda
+directory that the AMANDA user cannot write to, so you should wipe it out.
+Another possibility is that the AMANDA service was not properly configured as a
+UDP service; check /etc/services and /etc/inetd.conf.
+
+ QUESTION: Why does amcheck say "access as <username> not allowed..."?
+
+ANSWER: There must be something wrong with .amandahosts configuration (or
+.rhosts, if you have configured --without-amandahosts).
+First, if the <username> is not what you expect (i.e., not what you have
+specified in the --with-user flag, at configure time), check the inetd
+configuration file: you must have specified the wrong username there.
+Make sure you specify the names exactly as they appear in the error message
+after the `@' sign in .amandahosts/.rhosts. You'll need a fully-qualified
+domain name or not, depending on how your client resolves IP addresses to host
+names.
+
+ QUESTION: Why does amcheck report "ip address #.#.#.#" is not in the ip list
+list for <hostname>'?
+
+ANSWER: Check your DNS configuration tables. In order to avoid DNS-spoofing,
+AMANDA double-checks hostname<->IP address mapping. If the IP address the
+request comes from maps to a hostname, but this hostname does not map back to
+the incoming IP address, the request is denied.
+
+ QUESTION: Why does amcheck say "cannot overwrite active tape"?
+
+ANSWER: Because, if you configure AMANDA to use N tapes, by setting tapecycle
+to N in amanda.conf, before AMANDA overwrites a tape, it must write to at least
+other N-1 tapes. Of course, AMANDA will always refuse to overwrite a tape
+marked for `noreuse' with amadmin. Furthermore, such tapes are not counted when
+AMANDA computes `N-1' tapes.
+If, for some reason, you want to tell AMANDA to overwrite a particular tape,
+regardless of its position in the cycle, use amrmtape. This command will remove
+this tape from the tapelist file, that is used to manage the tape cycle, and
+will delete information about backups stored in that tape from the AMANDA
+database.
+
+ QUESTION: Why does amcheck tell me "DUMP program not available"?
+
+ANSWER: Because configure could not find dump when it was first run. This is a
+common problem on Linux hosts, because most Linux distributions do not install
+dump by default.
+If you don't have a DUMP program installed, install it, remove config.cache,
+run configure again and rebuild AMANDA. While configure is running, make sure
+it can find the installed DUMP program. If it cannot, you may have to set the
+environment variables DUMP and RESTORE by hand, before running configure.
+If you can't or don't want to install DUMP, you may use GNU tar, but make sure
+it as release 1.12 or newer; release 1.11.8 may work, but estimates will be
+slow as hell.
+
+ QUESTION: Which tape changer configuration should I use in amanda.conf?
+
+ANSWER: If you only have one tape unit, you have two choices: (i) don't use a
+tape changer at all, i.e., set runtapes to 1, set tapedev to the non-rewinding
+device corresponding to the tape unit, and comment out tpchanger, changerfile
+and changerdev; or (ii) set up chg-manual, so that you can change tapes
+manually. If you select chg-manual, you will not be able to start amdump as a
+cron job, and you should always run amflush -f, because chg-manual will ask you
+to press return in the terminal where you started the controlling program.
+If you have several tape units, which you want to use to emulate a tape
+changer, you want chg-multi. Even if you do own a real tape changer, that
+operates based on ejecting a tape or such, chg-multi may be useful.
+Actual tape changers usually require specialized changer programs, such as mtx,
+chio or specific system calls. The availability of these programs is much more
+dependent on the operating system you're running than on the particular tape
+changer hardware you have.
+mtx, for example, is available for several platforms. However, even if you find
+it for your platform, beware that there exist several different programs named
+mtx, that require different command line arguments, and print different output,
+and AMANDA's chg-mtx does not support them all. You may have to edit the
+script, which shouldn't be hard to do.
+In section BUILT-IN TAPE CHANGERS of AMANDA_Tape_Changer_Support you will find
+details about the tape changer interfacing programs provided with AMANDA, that
+can interact with common tape changer programs and with tape changer-related
+system calls provided by some operating system. If none of them matches your
+needs, you may have to develop your own tape changer interface script.
+Before posting a question to the AMANDA mailing lists, *please* search the
+archives, and try to obtain as much information about driving your tape changer
+hardware from the vendor of the changer hardware and of the operating system,
+rather than from the AMANDA mailing lists. We usually don't have much to say
+about tape changer units, and several questions about them remain unanswered. :
+-(
+Anyway, if you decide to post a question, make sure you specify both the tape
+changer hardware *and* the OS/platform that is going to interface with it. Good
+luck! :-)
+
+ QUESTION: Should I use software or hardware compression?
+
+ANSWER: When you enable software compression, you drastically reduce the
+compression that might be achieved by hardware. In fact, tape drives will
+usually use *more* tape if you tell them to try to further compress already
+compressed data.
+Thus, you must choose whether you're going to use software or hardware
+compression; don't ever enable both unless you want to waste tape space.
+Since AMANDA prefers to have complete information about tape sizes and
+compression rates, it can do a better job if you use software compression.
+However, if you can't afford the extra CPU usage, AMANDA can live with the
+unpredictability of hardware compression, but you'll have to be very
+conservative about the specified tape size, specially if there are filesystems
+that contain mostly uncompressible data.
+
+ QUESTION: How can I configure AMANDA so that it performs full backups on the
+week-end and incrementals on weekdays?
+
+ANSWER: You can't. AMANDA doesn't work this way. You just have to tell AMANDA
+how many tapes you have (tapecycle), and how often you want it to perform full
+backups of each filesystem (dumpcycle). If you don't run it once a daily
+(including Saturdays and Sundays :-), you'll also want to tell AMANDA how many
+times you'll run it per dumpcycle (runspercycle). It will spread full backups
+along the dumpcycle, so you won't have any full-only or incremental-only runs.
+Please also refer to "the friday-tape-question" in Collection_of_the_top_ten
+AMANDA_questions._And_answers..
+
+ QUESTION: What if my tape unit uses expensive tapes, and I don't want to use
+one tape per day? Can't AMANDA append to tapes?
+
+ANSWER: It can't, and this is good. Tape drives and OS drivers are (in)famous
+for rewinding tapes at unexpected times, without telling the program that's
+writing to them. If you have a month's worth of backups in that tape, you
+really don't want them to be overwritten, so AMANDA has taken the safe approach
+of requiring tapes to be written from the beginning on every run.
+This can be wasteful, specially if you have a small amount of data to back up,
+but expensive large-capacity tapes. One possible approach is to run amdump with
+tapes only, say once a week, to perform full backups, and run it without tape
+on the other days, so that it performs incremental backups and stores them in
+the holding disk. Once or twice a week, you flush all backups in the holding
+disk to a single tape.
+If you don't trust your holding disk, and you'd rather have all your data on
+tapes daily, you can create an alternate configuration, with two tapes, that
+backs up the holding disk only, always as a full backup. You'd run this
+configuration always after your regular backup, so you always have a complete
+image of the holding disk on tape, just in case it fails.
+
+ QUESTION: How can I configure AMANDA for long-term archiving?
+
+ANSWER: The best approach is to create a separate configuration for your
+archive backups. It should use a separate set of tapes, and have all dumptypes
+configured with `record no', so it doesn't interfere with regular backups.
+
+ QUESTION: Can I backup separate disks of the same host in different
+configurations?
+
+ANSWER: Yes, but you have to be careful. AMANDA uses UDP to issue estimate and
+backup requests and, although replies to backup requests are immediate (so that
+TCP connections for the actual backup can be established), replies to estimate
+requests are not and, while one request is being processed, any other request
+is ignored. The effect is two-fold:
+(i) if another configuration requests for estimates, the request will be
+ignored, and the requester will end up timing out;
+(ii) if another configuration has already finished the estimates, and is now
+requesting for backups, the backup requests will time-out.
+So, there are two easy ways out:
+(i) ensure that the configurations never run concurrently, or
+(ii) set up two different installations of the AMANDA server, using different
+services names to contact the clients, i.e., different port numbers. This can
+be attained with the configure flag --with-testing=<service-suffix>i. Yes, the
+flag name is not appropriate, but so what?
+If you don't want to set up two installations of AMANDA (I agree, it's
+overkill), but you still want to back up disks of the same host in separate
+configurations, you can set up AMANDA so that one configuration only starts
+after the first one has already finished its One possible way to work-around
+this limitation is to start one configuration only after you know the estimates
+for the first one have already finished (modifying the crontab entries,
+according to history data). You'll also have to delay the starttime (a dumptype
+option) of the disks in the first configuration, so that they don't start
+backing up before the estimates of the second configuration finish.
+
+ QUESTION: Can AMANDA span large filesystems across multiple tapes?
+
+ANSWER: Not yet :-(
+This is an open project, looking for developers. If you'd like to help, please
+take a look at the AMANDA Ongoing Projects Page (http://www.amanda.org/
+ongoing.php), where more up-to-date information is likely to be found about
+this project.
+Update September 2004: Refer to the archive of the amanda-hackers mailinglist
+(http://marc.theaimsgroup.com/?l=amanda-hackers). A patch by John Stange is
+being discussed there, which allows splitting and spanning.
+The current work-around is to use GNU tar to back up subdirectories of the huge
+filesystem separately. But be aware of the problems listed in the question
+about "results missing".
+
+ QUESTION: What's the difference between option "skip-full" and "strategy
+nofull"?
+
+ANSWER: "strategy nofull" is supposed to handle the following situation: you
+run a full dump off-line once a millenium :-), because that disk isn't supposed
+to change at all and, if it does, changes are minimal. AMANDA will run only
+level 1 backups of that filesystem, to avoid the risk of overwriting a level 1
+backup needed to do a restore. Remember, you run full dumps once a millenium,
+and your tape cycle probably won't last that long :-)
+"skip-full", OTOH, is supposed to let the user run full dumps off-line
+regularly (i.e., as often as specified in the dumpcycle), while AMANDA takes
+care of the incrementals. Currently, AMANDA will tell you when you're supposed
+to run the level 0 backups but, if you fail to do so, AMANDA will not only skip
+a full day's worth of valuable backups of the filesystem, on the day it told
+you to the full backup manually, but it will also run a level 1 backup on the
+next day, even if you have not performed the full backup yet. Worse yet: it
+might perform a level 2 on the next day, just after you have run the level 0,
+so, if the disk should crash, you'd have to restore a level 0 then a level 2,
+but not the level 1! Not a real problem, but definitely strange, eh?
+
+ QUESTION: Why does amdump report "results missing"?
+
+ANSWER: One of the possible reasons is that you have requested too many backups
+of the host. In this case, the estimate request or the reply may not fit in a
+UDP packet. This will cause AMANDA not to perform some of the backups. Fixing
+this problem involves modifying the way estimate requests are issued, so that
+no packet exceeds the maximum packet size, and issuing additional requests that
+did not fit in a UDP packet after a reply for the previous set is obtained. The
+probability of getting this problem has been considerably reduced since we
+increased the maximum UDP packet size from 1Kb to 64Kb, but some operating
+systems may not support such large packets.
+One possible work-around is to try to shorten the pathnames of the directories
+and the exclude file names, so that more requests fit in the UDP packet. You
+may create short-named links in some directory closer to the root (/) so as to
+reduce the length of names. I.e., instead of backing up /usr/home/foo and /usr/
+home/bar, create the following links:
+
+  /.foo -> /usr/home/foo
+  /.bar -> /usr/home/bar
+
+then list /.foo and /.bar in the disklist.
+Another approach is to group sub-directories in backup sets, instead of backing
+up them all separately. For example, create /usr/home/.bkp1 and move `foo' and
+`bar' into it, then create links so that the original pathnames remain
+functional. Then, list /usr/home/.bkp1 in the disklist. You may create as many
+`.bkp<N>' directories as you need.
+A simpler approach, that may work for you, is to backup only a subset of the
+subdirectories of a filesystem separately. The others can be backed up together
+with the root of the filesystem, using an exclude list that prevents duplicate
+backups.
+
+ QUESTION: Why does amdump report "disk offline"?
+
+ANSWER: Well, assuming the disk is not really off line :-), it may be a
+permission problem, but then, amcheck would have reported it.
+Another possible reason for this failure is a filesystem error, that causes
+DUMP to crash before it estimates the backup size; a fsck may help.
+Yet another possibility is that the filesystem is so large that the backup
+program is incorrectly reporting the estimated size, for example, by printing a
+negative value that AMANDA will not accept as a valid estimate. If you are
+using dump, contact your vendor and request a patch for dump that fixes this
+bug. If you are using GNU tar, make sure it is release 1.12 or newer; 1.11.8
+won't do! Even release 1.12 may require a patch to correctly report estimates
+and dump sizes, as well as to handle sparse files correctly and quickly instead
+of printing error messages like `Read error at byte 0, reading 512 bytes, in
+file ./var/log/lastlog: Bad file number' in sendsize.debug and being very slow.
+Check the patches directory of the AMANDA distribution.
+
+ QUESTION: What if amdump reports "dumps way too big, must skip incremental
+dumps"?
+
+ANSWER: It means AMANDA couldn't back up some disk because it wouldn't fit in
+the tape(s) you have configured AMANDA to use. It considered performing some
+incrementals instead of full dumps, so that all disks would fit, but this
+wouldn't be enough, so the disk really had to be dropped in this run.
+In general, you can just ignore this message if it happens only once in a
+while. Low-priority disks are discarded first, so you'll hardly miss really
+important data.
+One real work-around is to configure AMANDA to use more tapes: increase
+`runtapes' in amanda.conf. Even if you don't have a real tape changer, you can
+act yourself as a changer (`chg-manual'; more details in the question about
+tape changer configuration), or use `chg-multi' with a single tape unit, and
+lie to AMANDA that it will have two tapes to use. If you have a holding disk as
+large as a tape, and configure AMANDA (2.4.1b1 or newer) not to reserve any
+space for degraded dumps, dumps that would be stored in the second tape of a
+run will be performed to the holding disk, so you can flush them to tape in the
+morning.
+
+ QUESTION: amdump reported "infofile update failed". What should I do?
+
+ANSWER: Make sure all directories and files are readable and writable by the
+AMANDA user, within the directory you specified as `infofile' in amanda.conf.
+From then on, only run amanda server commands ( amadmin, amdump, amflush,
+amcleanup) as the AMANDA user, not as root.
+
+ QUESTION: Why does AMANDA sometimes promote full dumps?
+
+ANSWER: To spread the full dumps along the dumpcycle, so that daily runs take
+roughly the same amount of tape and time. As soon as you start using AMANDA, it
+will run full dumps of all filesystems. Then, on the following runs, it will
+promote some backups, so as to adjust the balance. After one or two dumpcycles,
+it should stop promoting dumps. You can see how well it is doing with amadmin
+<conf> balance. If you find the results surprising, you may want to adjust
+dumpcycle or runspercycle.
+
+ QUESTION: Why does amrecover report "no index records" or "disk not found"?
+
+ANSWER: The most common cause of this problem is not having enabled index
+generation in amanda.conf. The `index yes' option must be present in every
+dumptype for whose disks indexes should be generated.
+Another possibility is that amrecover is not selecting the configuration name
+that contains the backups for the selected disk. You may specify a
+configuration name with the `-C' switch, when you invoke amrecover. The default
+configuration name can only be specified at AMANDA configure time (configure --
+with-config=<name>).
+Indexes are currently generated at backup-time only, so, if a backup was
+performed without creating an index, you won't be able to use amrecover to
+restore it, you'll have to use amrestore.
+
+ QUESTION: Ok, I'm done with testing AMANDA, now I want to put it in
+production. How can I reset its databases so as to start from scratch?
+
+ANSWER: First, remove the `curinfo' database. By default, it is a directory,
+but, if you have selected any other database format (don't, they're
+deprecated), they may be files with extensions such as .dir and .pag.
+Then, remove any log files from the log directory: log.<TIMESTAMP>.<count> and
+amdump.<count>. Finally, remove the tapelist file, stored in the directory that
+contains amanda.conf, unless amanda.conf specifies otherwise. Depending on the
+tape changer you have selected, you may also want to reset its state file.
+
+ QUESTION: The man-page of dump says that active filesystems may be backed up
+inconsistently. What does AMANDA do to prevent inconsistent backups?
+
+ANSWER: Nothing. When you back up an active filesystem, there are two
+possibilities:
+dump may print strange error messages about invalid blocks, then fail; in this
+case, AMANDA will retry the backup on the next run.
+Files that are modified while dump runs may be backed up inconsistently. But
+then, they will be included in the next incremental backup, which should
+usually be enough.
+Large, critical files such as databases should be locked somehow, to avoid
+inconsistent backups, but there's no direct support for that in AMANDA. The
+best bet is to configure AMANDA to use a wrapper to dump, that locks and
+unlocks the database when appropriate.
+
+ QUESTION: Which version of GNU-tar should I use?
+
+ANSWER: (slightly adapted from a posting by Paul Bijnens
+<paul.bijnens@xplanation.com>, Mon, 11 Apr 2005):
+
+* 1.13.19 is good.
+  However it still sets return code 2 for some infrequent conditions even with
+  --ignore-failed-read option. This results in AMANDA thinking the total
+  archive is bad, and drops the complete archive. Those conditions are very
+  rare on a quiet filesystem.
+* 1.13.25 is good: no problems found (yet).
+* 1.13.9x is not good.
+  It has changed the format of "tar -t", resulting in amrecover not able to use
+  the indexes.
+* 1.14.x is not good.
+  It writes good archives, but when restoring, it has trouble with sparse
+  files; the sparse file itself, and *all* files after it cannot be read
+  anymore. But you can read the archive with a good tar version (i.e. the tar
+  images produced are fine).
+* 1.15.1 is good: no problems found (yet).
+  Paul Bijnens: "I'm using this version on most of my clients since january
+  this year (2005), and have already done successful restore too."
+
+-------------------------------------------------------------------------------
+
+Prev                       Up                                           Next
+Chapter 15. Using AMANDA  Home  Chapter 17. Collection of the top ten AMANDA
+                                                     questions. And answers.
+
diff --git a/docs/historical.txt b/docs/historical.txt
new file mode 100644 (file)
index 0000000..ba9f05a
--- /dev/null
@@ -0,0 +1,138 @@
+
+Part VI. Historical files
+Prev                 Next
+
+-------------------------------------------------------------------------------
+
+
+Historical files
+
+
+
+Old and outdated material, proposals and drafts.
+
+Here you find some chapters which contain outdated informations. These chapters
+nonetheless can help to get a more complete picture of AMANDA.
+
+Note
+
+Please realize that the following does not necessarily describe current
+features of AMANDA. There are also features described which were never added to
+AMANDA.
+Table of Contents
+
+
+  27._Response_to_CPIO_Security_Notice_Issue_11:
+
+
+        Affected_Versions
+
+        Workaround
+
+        Acknowledgements
+
+
+  28._Upgrade_Issues
+
+  29._What_once_was_new
+
+
+        What's_new_in_AMANDA_2.3
+
+
+              Indexing_backups_for_easier_restore
+
+              Samba_Support
+
+              GnuTar_Support
+
+              Multiple_backups_in_parallel_from_one_client_host
+
+              Multiple_tapes_in_one_run
+
+              Bottleneck_determination
+
+              2_Gb_limit_removed
+
+              amadmin_import/export
+
+
+        What's_new_in_AMANDA_2.2
+
+
+              Client_side_setup_has_changed
+
+              Version_suffixes_on_executables
+
+              Kerberos
+
+              Multiple_holding_disks
+
+              Remote_self-checks
+
+              mmap_support
+
+              gzip_support
+
+              Mount_point_names_in_disklist
+
+              Initial_tape-changer_support_included
+
+              Generic_tape_changer_wrapper_script
+
+              New_command_amtape
+
+              Changer_support_added_to_command_amlabel
+
+              Tape_changer_support_improved
+
+              A_few_words_about_multi-tape_runs
+
+              Big_planner_changes
+
+              Level-0_dumps_allowed_with_no_tape
+
+
+
+  30._Multitape_support_in_AMANDA_2.2
+
+
+        Introduction
+
+        New_Planner_Algorithm
+
+
+              Time
+
+              Full_Backups
+
+              Schedule_Balancing
+
+              Overwrite_Detection
+
+
+        Taper_Algorithm
+
+
+              Choosing_a_tape
+
+              End_of_tape_handling
+
+              Tape_Format_Changes
+
+              Tapelist_File_Changes
+
+
+
+  31._Thoughts_about_a_Strategy_API
+
+  32._Y2K_Compliancy
+
+  33._Usage_of_floppy_tape_drives_on_Linux
+
+-------------------------------------------------------------------------------
+
+Prev                             Up                                    Next
+Chapter 26. Using Kerberos with Home  Chapter 27. Response to CPIO Security
+AMANDA                                                     Notice Issue 11:
+
diff --git a/docs/howto-afs.txt b/docs/howto-afs.txt
new file mode 100644 (file)
index 0000000..3b680d2
--- /dev/null
@@ -0,0 +1,35 @@
+
+     Chapter 14. AFS HOWTO
+Prev  Part III. HOWTOs  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 14. AFS HOWTO
+
+
+AMANDA Core Team
+
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/howto-afs.html for the current version of
+this document.
+You need to download the following package if you want to backup AFS volume
+with amanda:
+ftp://ftp.ccmr.cornell.edu/pub/amanda-afs/amanda-afs.tar.gz
+or anonymous cvs from :pserver:anonymous@cvs.ccmr.cornell.edu:/usr/common/cvs
+and checkout project 'amanda-afs'
+The patch to AMANDA is already included in this distribution.
+-------------------------------------------------------------------------------
+
+Prev                                     Up                           Next
+Chapter 13. How to use the AMANDA file- Home  Part IV. Various Information
+driver 
+
diff --git a/docs/howto-cygwin.txt b/docs/howto-cygwin.txt
new file mode 100644 (file)
index 0000000..5f762c5
--- /dev/null
@@ -0,0 +1,261 @@
+
+Chapter 12. AMANDA on Cygwin HOWTO
+Prev  Part III. HOWTOs        Next
+
+-------------------------------------------------------------------------------
+
+Chapter 12. AMANDA on Cygwin HOWTO
+
+
+Doug Kingston
+
+Original text<dpk@randomnotes.org>
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Install_Cygwin
+
+  Other_Preparation
+
+  Compile_AMANDA
+
+  Configure_Cygwin_files
+
+  Configure_Windows_System_Files
+
+  Configure_inetd_to_run_automatically_as_a_service
+
+  Windows_98/ME
+
+  Windows_NT/2000/XP
+
+  Notes_on_AMANDA_backup_options
+
+
+        Compression
+
+        Exclude_Lists
+
+        Debugging_Files
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/howto-cygwin.html for the current version
+of this document.
+by Doug Kingston, 30 January 2003. Based on Cygwin 1.3.18, and AMANDA 2.4.3-
+20021027 and some fixes which will be in the official release by the time you
+see this.
+With thanks to Enrico Bernardini from whom I have borrowed some material from
+an earlier attempt at documenting the installation of AMANDA on Cygwin in 2001.
+Please send annotations and corrections to mailto://amanda-hackers@amanda.org.
+I can be reached as dpk (at) randomnotes.org (do the obvious).
+
+ Install Cygwin
+
+The following Cygwin packages are required for binary installation (may be
+incomplete):
+
+* Category BASE: standard
+* Category MISC: gzip
+* Category MISC: tar
+* Category NET: inetutils
+
+You need also these packages to build from source (may be incomplete):
+
+* Category DEVELOP: ALL
+* Category INTERPRETERS: m4, gawk ?
+* Category LIBS:default selection? (libc, libiconv, others?)
+
+I have most or the basic utilities and libraries installed so I cannot give you
+a more specific list of what is required. If someone has a more definitive
+list, I would appreciate and email to mailto://amanda-hackers@amanda.org.
+One user reported some problems with access rights when running under Cygwin,
+which he solved by setting the CYGWIN environment variable to nontsec. I do not
+believe this is necessary if you run the AMANDA daemon as System (see below).
+
+ Other Preparation
+
+When doing backups on a NT, Windows 2000 or Windows XP system, the choice of
+user and group will be important if you are to properly interact with the
+security mechanisms of these more modern Microsoft product. For Windows 95/98/
+ME this is probably a non-issue. The most privileged account on the Windows
+systems is 'System', and I have chosen to use this account for AMANDA backups
+to ensure that I can access the widest set of files. On Unix we would run as
+root, with equivalent access permissions. I have also chose to run under the
+'Administrators' group, another standard Windows group. Ensure these exist
+before you continue - or identify another account to use. The Cygwin
+installation postinstall script should have already populated /etc/passwd and
+etc/group with these entries.
+
+* Make sure that System (or SYSTEM) has a home directory specified in /etc/
+  passwd.
+
+I used _/home/root_. You'll need to put the file .amandahosts here later. The
+relevant lines from my file /etc/passwd are:
+
+  SYSTEM:*:18:18:,S-1-5-18:/home/root:
+  root:*:18:18:,S-1-5-18:/home/root:
+
+
+ Compile AMANDA
+
+After installing Cygwin, unpack the AMANDA sources, typically in /usr/src/
+AMANDA or something similar. In the AMANDA directory, you will need to execute:
+
+  automake  # this may not be necessary in the official release
+  autoconf  # this may not be necessary in the official release
+
+  ./configure --without-server \
+    --without-force-uid \
+    --with-user=yourlogin \
+    --with-group=Administrators
+  make
+  make       # yes, I needed to run it a second time
+  make install
+
+The use of your own login instead of SYSTEM requires some explanation. If you
+were to call runconfigure with SYSTEM instead of your own login id as part of
+the -with-user parameter, the installation process will fail due to the way
+Cygwin and the NT/W2K/XP security system interact. Once you chown a file to
+another user (like SYSTEM) you are no longer able to chgrp or chmod the file.
+The installation process will abort at this point. By installing the files
+owned by yourself, you will be able to chgrp and chmod them as expected. Note
+that you still RUN as SYSTEM from /etc/inetd.conf (see below).
+
+ Configure Cygwin files
+
+You have to modify some config files:
+
+* /etc/inetd.conf: cleanup un-needed entries: Comment out any entries you do
+  not need by placing a '#' at the start of the lines. This is just good
+  practice, and if any of the entries reference non- existent users (e.g. uucp)
+  inetd may not start up.
+
+
+* /etc/inetd.conf: add
+
+               amanda dgram udp wait System /usr/local/libexec/amandad amandad
+
+  ATTENTION: Use tabs, don't use spaces.
+
+
+* create _/home/root/.amandahosts_ (or whereever System's home directory is):
+  <amanda server> <amanda user>
+
+Then create the following AMANDA directories and the file amandates:
+
+       mkdir -p /usr/local/var/amanda/gnutar-lists
+
+       mkdir /tmp/amanda
+
+       touch /etc/amandates
+
+
+ Configure Windows System Files
+
+Update the Windows services list
+
+* WINDIR\Services: add
+
+               amanda  10080/udp       # AMANDA backup services
+               amandaidx       10082/tcp       # AMANDA backup services
+               amidxtape       10083/tcp       # AMANDA backup services
+
+
+where WINDIR is C:\WINNT\system32\drivers\etc or something similar. The last
+two lines are needed if you want to use amrecover.
+Ensure that the default Windows PATH environment variable include your Cygwin /
+bin directory. This is necessary since inetd and hence the amandad that it
+spawns will not have the advantage of being started by the standard bash shell
+startup script and won't find the needed dynamic libraries (e.g. cygwin1.dll).
+My PATH is:
+
+  _%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin_
+
+This is on XP; My Computer, right click Properties, click on Environment
+Variables (at the bottom). Yours may vary, but make sure the Cygwin bin
+directory is represented somewhere in the PATH.
+
+ Configure inetd to run automatically as a service
+
+If you want to test your installation, you can call inetd from bash prompt:
+
+  /usr/sbin/inetd -d
+
+
+ Windows 98/ME
+
+
+* To start after the user logs in: Create a shortcut to c:
+  \cygwin\usr\sbin\inetd.exe in WINDIR\start menu\programs\startup
+
+
+* To start before the user logs in: Add the string key
+
+    CygwinInetd=C:\cygwin\usr\sbin\inetd.exe
+
+  under
+
+    HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
+
+  in the registry. You'll see a dos-like window on the startup: I did not find
+  a solution to iconize or to make invisible (suggestions are welcome).
+
+
+ Windows NT/2000/XP
+
+From bash prompt, type:
+
+  /usr/sbin/inetd --install-as-service
+
+Then, to start/stop the inetd service use the Services control panel or the
+following Windows command:
+net start/stop inetd
+
+ Notes on AMANDA backup options
+
+
+ Compression
+
+Currently, client side compression does not work, probably due to problems in
+pipe emulation in Cygwin. I have not tried to debug this yet. This may be
+addressed in a subsequent release, or it could be fixed in later releases of
+Cygwin. Due to this issue, we recommend that if you want compressed dumps from
+Windows clients, you configure AMANDA for server compression in amanda.conf on
+your AMANDA server:
+
+  define dumptype srv-comp-tar {
+      global
+      comment "partitions dumped via tar with server compression"
+      program "GNUTAR"
+      compress server fast
+      exclude list ".AMANDA.exclude"
+  }
+
+
+ Exclude Lists
+
+A note on exclude lists is also in order. If you specify a relative path, it
+will be expected that the file is in or relative to the root of the directory
+you are planning to dump. Typically this will not be '/' but '/cygdrive/c' or
+something similar if you want to get the Windows files and the Cygwin files. '/
+' is taken to be the root of the Cygwin tree, normally something like C:
+\cygwin or possibly C:\Program Files\cygwin.
+
+ Debugging Files
+
+AMANDA will leave debugging files in /tmp/amanda if it exists. I have
+recommended to create this directory above.
+-------------------------------------------------------------------------------
+
+Prev               Up                                            Next
+Part III. HOWTOs  Home  Chapter 13. How to use the AMANDA file-driver
+
diff --git a/docs/howto-filedriver.txt b/docs/howto-filedriver.txt
new file mode 100644 (file)
index 0000000..6d16a65
--- /dev/null
@@ -0,0 +1,434 @@
+
+Chapter 13. How to use the AMANDA file-driver
+Prev  Part III. HOWTOs                   Next
+
+-------------------------------------------------------------------------------
+
+Chapter 13. How to use the AMANDA file-driver
+
+
+Stefan G. Weichinger
+
+Original text;XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  Possible_Uses
+
+  Setup
+
+
+        Basics
+
+
+  Recovery
+
+
+Note
+
+Refer to http://www.amanda.org/docs/howto-filedriver.html for the current
+version of this document.
+This document covers the use of the file-driver in AMANDA 2.4.3 and higher.
+Examples given here have been taken from a SuSE-Linux-8.2-Pro-environment,
+using AMANDA 2.4.4p1 and the snapshot 2.4.4p1-20031202. Please adjust paths,
+configuration names and other parameters to your system.
+Stefan G. Weichinger, November - December, 2003 ; minor updates in April, 2005.
+
+Introduction
+
+Since release 2.4.3 AMANDA supports the usage of a output driver called "file".
+See man amanda, section OUTPUT DRIVERS, for more information on its
+implementation. As the name suggests, this driver uses files as virtual (or
+file) tapes. Once created and labeled, these file tapes can be selected and
+changed with the standard tape-changer-interface of the AMANDA server.
+
+ Possible Uses
+
+
+* test installations
+  You can easily explore the rich features of AMANDA on systems without tape
+  drives.
+* cheap installations
+  Without buying a tape drive you can enjoy the benefits of AMANDA and backup
+  to a bunch of harddisks. You can create CD/DVD-sized backups which you can
+  burn onto optical disks later.
+* disk-based installations
+  You can use the file-driver to backup onto a set of file tapes hosted on a
+  bunch of hard-disks or a RAID-system. Combined with another AMANDA-
+  configuration that dumps the file tapes to real tapes, you can provide
+  reliable backup with faster tapeless recovery. This is called "disk-to-disk-
+  to-tape"-backup by some people today.
+
+
+ Setup
+
+
+ Basics
+
+This guide assumes you have setup the basic AMANDA-services as described in
+Amanda_Installation_Notes
+The configuration in this HOWTO is called "daily". The file tapes are also
+called  vtapes in this document, which stands for "virtual tapes".
+Please be sure to understand the differences between holding disks and file
+tapes. The two serve different purposes; holding disks allow for parallelism of
+multiple DLE's being backed up while file tapes are a replacement for physical
+tapes.
+Before beginning you will need to decide on (a) dedicated part(s) of your hard
+disk(s) for your file tape storage. While this space could be spread among
+several file systems and hard disks, I recommend to dedicate at least a
+specific partition, better a specific physical harddisk to the task of keeping
+your vtapes. The use of a dedicated disk will speed things up definitely.
+The disk space you dedicate for your vtapes should NOT be backed up by AMANDA.
+Also, for performance reasons there should be NO holding disks on the same
+partition as the vtapes, preferably not even on the same physical drive.
+If you only have one harddisk, it will work out, too, but you will suffer low
+performance due to massive head-moving in your harddisk, resulting from copying
+data between the filesystems.
+Steps
+
+  1. Prepare the filesystem(s) used for the tapes.
+     Decide on where to put your files, create the appropriate partition(s) and
+     filesystem(s) and mount them.
+     In our example we have the dedicated partition hdc1, mounted on /
+     amandatapes for vtape storage.
+
+               $ mount
+               [...]
+               /dev/hdc1 on /amandatapes type reiserfs (rw)
+               [...]
+               
+
+     Make sure there is space left. Determine the amount of space you will use.
+
+               $ df -h /amandatapes
+               Filesystem      Size  Used  Avail  Use%   Mounted on
+               /dev/hdc1        20G    0G    20G    0%   /amandatapes
+               
+
+     In our example we have 20GB diskspace left on /amandatapes.
+  2. Determine length and number of tapes
+     After deciding on the number of vtapes you want to create, evenly allocate
+     the available space among them.
+     Look at the following rule of thumb:
+     As many filesystems exhibit dramatically reduced performance when they are
+     nearly full I have chosen to allocate only 90% of the available space. So
+     we have:
+     (Available Space * 0.9) >= tapelength * tapecycle
+     This is a very conservative approach to make sure you don´t suffer any
+     performance drop due to a nearly-full-filesystem.
+     As it is uncommon for AMANDA to fill, or almost fill an entire tape you
+     may also wish to use more space than that.
+     So you could determine possible combinations of tapelength/tapecycle with
+     the more general formula:
+     Available Space >= tapelength * tapecycle
+     In our example we take the conservative approach:
+
+     * 20 GB * 0.9 = 18 GB to use
+       and so we could create the following combinations:
+
+
+     * 18 GB = 18 GB * 1
+     * 18 GB = 9 GB * 2
+     * 18 GB = 6 GB * 3
+     * 18 GB = 3 GB * 6
+     * 18 GB = ......... you get the picture.
+
+     Using only one tape is generally considered a bad idea when it comes to
+     backup, so we should use at least 3 tapes (for testing purposes), better 6
+     or more tapes.
+
+     * 18 GB = 3 GB * 6
+       so we get the value 3 GB for the tapelength if we want to use 6 tapes.
+
+  3. Create a tapetype definition.
+     Add a new tapetype definition similar to the following to your
+     amanda.conf. I named my definition "HARD-DISK". Choose whatever name you
+     consider appropriate.
+
+               define tapetype HARD-DISK {
+                       comment "Dump onto hard disk"
+                       length 3072 mbytes      # specified in mbytes to get the exact size of 3GB
+               }
+               
+
+     You don´t have to specify the parameter speed (as it is commonly listed in
+     tapetype definitions and reported by the program amtapetype). AMANDA does
+     not use this parameter right now.
+     There is also an optional parameter filemark, which indicates the amount
+     of space "wasted" after each tape-listitem. Leave it blank and AMANDA uses
+     the default of 1KB.
+  4. Think about tapechangers.
+     As you will use a set of vtapes, you have to also use a kind of vtape-
+     changer. There are several tape-changer-scripts included in the AMANDA-
+     tarball. Read more about tape-changer-scripts in AMANDA_Tape_Changer
+     Support.
+     Right now there are two scripts that can be used with vtapes. These
+     scripts take different approaches to the handling of tapes.
+     The script chg-multi handles many drives with a tape in each drive. The
+     script chg-disk handles a library with one drive and multiple tapes.
+     So with vtapes you could look at it this way:
+     chg-multi simulates multiple tape drives with one tape in each drive. chg-
+     disk simulates one tape-library with multiple tapes in.
+     As chg-multi exists for a much longer time than chg-disk, it is still used
+     in many AMANDA-vtape-installations.
+     chg-disk was introduced with the snapshot 20031202. Contrary to chg-multi,
+     which is a generic changer-script that must be somewhat adjusted to the
+     use of the file-driver, chg-disk offers exactly the behavior needed for
+     handling vtapes
+     IMHO the approach is much more logical, so I recommend to use chg-disk in
+     new AMANDA-vtape-installations.
+
+     Note
+
+     To use chg-disk you need to have at least amanda-2.4.4p1-20031202.
+     Choose the one that fits your way of vtape-handling and -maintenance.
+     In this HOWTO I only cover the use of chg-disk. Usage of chg-multi is
+     pretty similar and will maybe covered in a later version of this document.
+  5. Set up your tape-config.
+     In the general section you have to set the parameters tapecycle , tapetype
+     , tpchanger , changerfile , tapedev , rawtapedev and changerdev.
+     Example:
+
+               $ vi /usr/local/etc/amanda/daily/amanda.conf
+               ...
+
+               tapecycle 6
+               tapetype HARD-DISK
+               tpchanger "chg-disk"
+               changerfile "/usr/local/etc/amanda/daily/changer"
+               tapedev  "file:/amandatapes/daily"
+               
+
+     This reflects the use of your defined tapetype.
+     The parameter tapecycle tells AMANDA how much tapes can be used, Set this
+     value according to the number of tapes you want to use.
+     The parameter tapetype , points to the tapetype definition you have
+     created before.
+     The parameter tpchanger tells AMANDA to use the generic tape-changer-
+     script to handle the vtapes. You can think of it as a virtual tape-
+     changer-device.
+     The parameter changerfile is used to give chg-disk the "prefix" for the
+     "%s-changer, %s-clean, %s-slot" files it needs. Use something like
+     "changer" in your config-dir. Please note that this file does NOT have to
+     exist, but it won't hurt anyway.
+     The parameter tapedev tells the chg-disk-script where the root-dir for
+     your vtapes is.
+     In our example the vtape-files go to /amandatapes.
+     To separate multiple configurations, we decided to use subdirectories
+     according to the configuration name "daily".
+
+     Note
+
+     The parameter changerdev is NOT needed with chg-disk as it is not parsed
+     by chg-disk.
+  6. Create the virtual tapes.
+
+     Note
+
+     Gene Heskett has committed a shell-script which creates and labels the
+     vtapes in one step. Stefan G. Weichinger will generalize this script and
+     contribute it, this script will just read your settings in amanda.conf and
+     create the appropriate vtape-directories.
+     Now you have to create the tape-directories. chg-disk needs a directory
+     structure like:
+
+               slot_root_dir -|
+                              |- info
+                              |- data -> slot1/
+                              |- slot1/
+                              |- slot2/
+                              |- ...
+                              |- slotn/
+                       
+
+     where 'slot_root_dir' is the tapedev 'file:xxx' parameter and 'n' is the
+     tapecycle parameter.
+     So in our example we do:
+
+               $ mkdir /amandatapes/daily
+               
+
+     for the 'slot_root_dir' and
+
+               $ mkdir /amandatapes/daily/slot1
+               $ mkdir /amandatapes/daily/slot2
+               ....
+               
+
+     for the virtual slots that will later contain the vtapes.
+     If you have many vtapes to create and their names follow a pattern you may
+     be able to do them all with a single loop such as:
+
+               $ for n in 1 2 3 4 5 6 7 8 9 10 11 12
+               > do
+               >    mkdir /amandatapes/daily/slot${n}
+               > done
+               
+
+     Create the info-file:
+
+               $ touch /amandatapes/daily/info
+               
+
+     and link the first slot to the data-file (to "load" the vtape into the
+     first slot):
+
+               $ ln -s /amandatapes/daily/slot1 /amandatapes/daily/data
+               
+
+     Make sure the AMANDA-user has write-permissions on these directories:
+
+               $ chown -R amanda_user /amandatapes
+               $ chgrp -R amanda_group /amandatapes
+               $ chmod -R 750 /amandatapes
+               
+
+  7. Label the virtual tapes.
+     As the virtual tapes are handled just like physical tapes by the AMANDA-
+     Server they have to be labeled before use.
+
+               Usage: amlabel [-f] <conf> <label> [slot <slot-number>]
+               
+
+     Example:
+
+               $ amlabel daily daily1 slot 1
+               ....
+               $ amlabel daily daily2 slot 2
+               ....
+               
+
+     If you have many vtapes to label and their names follow a pattern you may
+     be able to do them all with a single loop such as:
+
+               $ for n in 1 2 3 4 5 6 7 8 9 10 11 12
+               > do
+               >    amlabel daily daily${n} slot ${n}
+               > done
+               
+
+     Label all your created tapes according to the "labelstr"-parameter in your
+     amanda.conf. Consult the amlabel-man-page for details.
+  8. Test your setup with amcheck.
+     Run amcheck daily (or, more general, amcheck <config>) and look for
+     anything AMANDA complains about.
+     A proper output looks like:
+
+               $ amcheck daily
+               Amanda Tape Server Host Check
+               --
+               Holding disk /amhold: 6924940 KB disk space available,
+               that's plenty
+               amcheck-server: slot 2: date 20031115 label daily02
+               (exact label match)
+               NOTE: skipping tape-writable test
+               Tape daily02 label ok
+               Server check took 0.377 seconds
+               
+
+     Recheck your files if errors occur.
+
+
+ Recovery
+
+Recovering files from vtapes is very similar to recovering files from a "real"
+tapechanger.
+Make sure you read the chapter Restore.
+I will simply paste a amrecover-session here (provided by JC Simonetti, author
+of chg-disk):
+
+  # /usr/local/amanda/sbin/amrecover woo
+  AMRECOVER Version 2.4.4p3. Contacting server on backupserver.local ...
+  220 backupserver AMANDA index server (2.4.4p3) ready.
+  200 Access OK
+  Setting restore date to today (2004-10-08)
+  200 Working date set to 2004-10-08.
+  Scanning /BACKUP2/holding...
+  Scanning /BACKUP/holding...
+  200 Config set to woo.
+  200 Dump host set to backupserver.local.
+  Trying disk /tmp ...
+  $CWD '/tmp/RECOVER' is on disk '/tmp' mounted at '/tmp'.
+  200 Disk set to /tmp.
+  Invalid directory - /tmp/RECOVER
+  amrecover> sethost backupserver.local
+  200 Dump host set to backupserver.local.
+  amrecover> setdisk /
+  200 Disk set to /.
+  amrecover> cd /etc
+  /etc
+  amrecover> add passwd
+  Added /etc/passwd
+  amrecover> list
+  TAPE B3_14 LEVEL 0 DATE 2004-09-26
+          /etc/passwd
+  amrecover> extract
+
+  Extracting files using tape drive file:/BACKUP2/slots/ on host
+  backupserver.local. The following tapes are needed: B3_14
+
+  Restoring files into directory /tmp/RECOVER
+  Continue [?/Y/n]? Y
+
+  Extracting files using tape drive file:/BACKUP2/slots/ on host
+  backupserver.local. Load tape B3_14 now
+  Continue [?/Y/n/s/t]? Y
+  ./etc/passwd
+  amrecover> quit
+  200 Good bye.
+
+Nothing spectacular? The trick is this:
+When AMANDA asks you
+
+  Load tape B3_14 now Continue [?/Y/n/s/t]?
+
+you have to run the following in a second terminal:
+
+  $ amtape woo slot 14
+  amtape: changed to slot 14 on file:/BACKUP2/slots/
+
+This step is necessary to load the proper tape into your virtual changer.
+Let me express this in a more general way:
+When amrecover prompts for the tape it needs to restore the files you
+requested, you have to "load" the tape it requests.
+The recommended way to do this is to use amtape. The options that make sense in
+this context are:
+
+  # amtape
+  Usage: amtape <conf> <command>
+          Valid commands are:
+               [...]
+                  slot <slot #>        load tape from slot <slot #>
+               [...]
+                  label <label>        find and load labeled tape
+               [...]
+               
+
+If you know which slot contains the requested tape (for example, if you have
+tape daily01 in slot 1, tape daily02 in slot 2, and so on) you may use the
+first option. If you just know the label of the tape you need, use the second
+option.
+To continue the upper example:
+
+  amtape woo slot 14   # option 1 OR
+  amtape woo label B3_14       # option 2
+
+amtape will return something like:
+
+  amtape: label B3_14 is now loaded.
+
+After this you can return to your amrecover-session and continue restoring your
+files.
+Please be aware of the fact reported by JC Simonetti: " I have never never used
+the "settape" command of amrecover [with chg-disk] since there's some problems
+with it (tape not loaded correctly, or impossible to change from tape to tape
+when restoring data shared accross multiple tapes...) "
+-------------------------------------------------------------------------------
+
+Prev                                 Up                    Next
+Chapter 12. AMANDA on Cygwin HOWTO  Home  Chapter 14. AFS HOWTO
+
diff --git a/docs/howtos.txt b/docs/howtos.txt
new file mode 100644 (file)
index 0000000..b80e430
--- /dev/null
@@ -0,0 +1,71 @@
+
+Part III. HOWTOs
+Prev        Next
+
+-------------------------------------------------------------------------------
+
+
+HOWTOs
+
+
+
+How to do this?
+
+This section contains some HOWTO-style-documents which should help you to get
+AMANDA up and going with Cygwin, AFS or chg-disk ...
+Table of Contents
+
+
+  12._AMANDA_on_Cygwin_HOWTO
+
+
+        Install_Cygwin
+
+        Other_Preparation
+
+        Compile_AMANDA
+
+        Configure_Cygwin_files
+
+        Configure_Windows_System_Files
+
+        Configure_inetd_to_run_automatically_as_a_service
+
+        Windows_98/ME
+
+        Windows_NT/2000/XP
+
+        Notes_on_AMANDA_backup_options
+
+
+              Compression
+
+              Exclude_Lists
+
+              Debugging_Files
+
+
+
+  13._How_to_use_the_AMANDA_file-driver
+
+
+        Introduction
+
+        Possible_Uses
+
+        Setup
+
+
+              Basics
+
+
+        Recovery
+
+
+  14._AFS_HOWTO
+
+-------------------------------------------------------------------------------
+
+Prev                             Up                                 Next
+Chapter 11. Printing of Labels  Home  Chapter 12. AMANDA on Cygwin HOWTO
+
diff --git a/docs/index.txt b/docs/index.txt
new file mode 100644 (file)
index 0000000..9ab300f
--- /dev/null
@@ -0,0 +1,831 @@
+
+The Official AMANDA Documentation
+                             Next
+
+-------------------------------------------------------------------------------
+
+
+The Official AMANDA Documentation
+
+
+Edited by
+
+
+Stefan G. Weichinger
+
+
+AMANDA Core Team
+
+-------------------------------------------------------------------------------
+Table of Contents
+
+
+  Abstract
+
+  Copyright_Information
+
+  Attributions
+
+  I._Installation
+
+
+        1._AMANDA_2.4.x_-_System-Specific_Installation_Notes
+
+
+              Solaris_2.6
+
+              Trusted_Solaris
+
+              SunOS_4.x
+
+              Ultrix
+
+              HP/UX
+
+              Linux
+
+              Digital_Unix_4
+
+              Sinix_5.43_(Reliant_Unix)
+
+              IRIX_(all)
+
+              IRIX_6
+
+              IRIX_6.5.x
+
+              SCO
+
+              FreeBSD_3.0
+
+              FreeBSD_4.9
+
+              FreeBSD_5.1
+
+              AIX
+
+              Microsoft_Windows
+
+              Mac_OS_X
+
+
+        2._AMANDA_Installation_Notes
+
+
+              Before_doing_anything
+
+              Compiling_the_AMANDA_sources
+
+              Setting_up_your_AMANDA_Configuration
+
+
+                    Setting_up_the_Tape_Server_Host
+
+                    Set_up_the_Backup_Client_Hosts
+
+
+
+        3._Excluding
+
+
+              Introduction
+
+              Please_Read
+
+              Before_We_Begin
+
+              Choosing_an_exclude_mechanism
+
+
+                    Exclude_Mechanisms
+
+
+              Expression
+
+              Wildcard_Expansion
+
+              Troubleshooting
+
+
+                    Broken_gnutar?
+
+                    The_ps_command_is_your_friend.
+
+
+
+        4._Indexing_with_AMANDA
+
+
+              Database_Format
+
+              Database_Browsing
+
+              File_Extraction
+
+              Protocol_Between_amindexd_and_amrecover
+
+              Installation_Notes
+
+              Permissions
+
+              Changes_from_amindex-1.0
+
+              Changes_from_amindex-0.3
+
+              Changes_from_amindex-0.2
+
+              Changes_from_amindex-0.1
+
+              Changes/additions_to_2.3.0
+
+              Known_Bugs
+
+
+        5._Backup_PC_hosts_using_Samba
+
+
+              Installation
+
+              Setup
+
+              Example
+
+              Bugs_and_notes
+
+
+        6._Restore
+
+
+  II._About_Tapes_and_Changers
+
+
+        7._Tapetypes
+
+        8._AMANDA_Tape_Changer_Support
+
+
+              Introduction
+
+              Specifying_a_tape_changer_in_amanda.conf
+
+              Device-specific_tapechanger_script
+
+              Slot_names_and_the_"current"_slot
+
+              Operator_interface
+
+              How_amdump_interacts_with_the_tape_changer
+
+              Builtin_tape-changers
+
+
+                    chg-multi_(formerly_chg-generic)
+
+                    chg-manual_(formerly_no-changer)
+
+                    chg-mtx_(formerly_hp-changer)
+
+                    chg-zd-mtx
+
+                    chg-scsi-chio_(formerly_seagate-changer,_then_chg-chio)
+
+                    chg-scsi_(new_interface,_try_to_drive_a_robot_with_direct
+                    scsi_commands)
+
+                    chg-chio
+
+                    chg-chs
+
+                    chg-rth
+
+                    chg-juke
+
+                    chg-rait
+
+                    chg-disk
+
+                    chg-iomega
+
+                    chg-null
+
+
+
+        9._chg-scsi
+
+
+              Command_line_options
+
+              Notes_about_changer.conf
+
+              AMANDA's_actual_usage_of_chg-scsi
+
+              Configuration_notes
+
+              Hacking_notes
+
+
+        10._RAIT_(Redundant_Array_of_Inexpensive_Tape)_Support
+
+
+              What_is_a_RAIT?
+
+              Using_a_RAIT
+
+              Disaster_Recovery
+
+
+        11._Printing_of_Labels
+
+
+              The_New_Feature
+
+              Labels_provided
+
+              History
+
+              How_it_works
+
+
+
+  III._HOWTOs
+
+
+        12._AMANDA_on_Cygwin_HOWTO
+
+
+              Install_Cygwin
+
+              Other_Preparation
+
+              Compile_AMANDA
+
+              Configure_Cygwin_files
+
+              Configure_Windows_System_Files
+
+              Configure_inetd_to_run_automatically_as_a_service
+
+              Windows_98/ME
+
+              Windows_NT/2000/XP
+
+              Notes_on_AMANDA_backup_options
+
+
+                    Compression
+
+                    Exclude_Lists
+
+                    Debugging_Files
+
+
+
+        13._How_to_use_the_AMANDA_file-driver
+
+
+              Introduction
+
+              Possible_Uses
+
+              Setup
+
+
+                    Basics
+
+
+              Recovery
+
+
+        14._AFS_HOWTO
+
+
+  IV._Various_Information
+
+
+        15._Using_AMANDA
+
+
+              An_Introduction
+
+              AMANDA_Features
+
+              Future_Capabilities_of_AMANDA
+
+              AMANDA_Resources
+
+              Installing_AMANDA
+
+
+                    Install_Related_Packages
+
+                    Perform_Preliminary_Setup
+
+                    Configure_the_AMANDA_Build
+
+                    Build_and_Install_AMANDA
+
+                    Configuring_AMANDA
+
+                    Decide_on_a_Tape_Server
+
+                    Decide_Which_Tape_Devices_to_Use
+
+                    Decide_Whether_to_Use_Compression
+
+                    Decide_Where_the_Holding_Space_Will_Be
+
+                    Compute_Your_Dump_Cycle
+
+                    Copy_and_Edit_the_Default_Configuration_File
+
+                    Configure_the_Holding_Disk
+
+                    Configure_Tape_Devices_and_Label_Tapes
+
+                    Configure_Backup_Clients
+
+                    Test_and_Debug_Setup
+
+
+              Operating_Amanda
+
+
+                    Run_amdump
+
+                    Read_AMANDA's_Reports
+
+                    Monitor_Tape_and_Holding_Disk_Status
+
+                    Adding_Tapes_at_a_Particular_Position_in_the_Cycle
+
+                    Miscellanous_Operational_Notes
+
+
+              Advanced_AMANDA_Configuration
+
+
+                    Adjust_the_Backup_Cycle
+
+                    Adjust_Parallelism
+
+                    Monitor_for_Possible_Improvements
+
+                    Excluding_Files
+
+
+              Restoring_with_AMANDA
+
+
+                    Configuring_and_Using_amrecover
+
+                    Using_amrestore
+
+                    Restoring_Without_AMANDA
+
+
+
+        16._AMANDA_FAQ
+
+
+              QUESTION:_Why_does_AMANDA_fail_to_build_on_my_system?
+
+              QUESTION:_Why_does_amdump_report_that_all_disks_failed?
+
+              QUESTION:_Why_does_amcheck_say_"port_NNN_is_not_secure"?
+
+              QUESTION:_Why_does_amcheck_claim_that_the_tape_is_"not_an_amanda
+              tape"?
+
+              QUESTION:_Why_does_amcheck_report_"selfcheck_request_timed_out"?
+
+              QUESTION:_Why_does_amandad.debug_contain_"error_receiving
+              message"?
+
+              QUESTION:_Why_does_amcheck_say_"access_as_<username>_not
+              allowed..."?
+
+              QUESTION:_Why_does_amcheck_report_"ip_address_#.#.#.#"_is_not_in
+              the_ip_list_list_for_<hostname>'?
+
+              QUESTION:_Why_does_amcheck_say_"cannot_overwrite_active_tape"?
+
+              QUESTION:_Why_does_amcheck_tell_me_"DUMP_program_not_available"?
+
+              QUESTION:_Which_tape_changer_configuration_should_I_use_in
+              amanda.conf?
+
+              QUESTION:_Should_I_use_software_or_hardware_compression?
+
+              QUESTION:_How_can_I_configure_AMANDA_so_that_it_performs_full
+              backups_on_the_week-end_and_incrementals_on_weekdays?
+
+              QUESTION:_What_if_my_tape_unit_uses_expensive_tapes,_and_I_don't
+              want_to_use_one_tape_per_day?_Can't_AMANDA_append_to_tapes?
+
+              QUESTION:_How_can_I_configure_AMANDA_for_long-term_archiving?
+
+              QUESTION:_Can_I_backup_separate_disks_of_the_same_host_in
+              different_configurations?
+
+              QUESTION:_Can_AMANDA_span_large_filesystems_across_multiple
+              tapes?
+
+              QUESTION:_What's_the_difference_between_option_"skip-full"_and
+              "strategy_nofull"?
+
+              QUESTION:_Why_does_amdump_report_"results_missing"?
+
+              QUESTION:_Why_does_amdump_report_"disk_offline"?
+
+              QUESTION:_What_if_amdump_reports_"dumps_way_too_big,_must_skip
+              incremental_dumps"?
+
+              QUESTION:_amdump_reported_"infofile_update_failed"._What_should_I
+              do?
+
+              QUESTION:_Why_does_AMANDA_sometimes_promote_full_dumps?
+
+              QUESTION:_Why_does_amrecover_report_"no_index_records"_or_"disk
+              not_found"?
+
+              QUESTION:_Ok,_I'm_done_with_testing_AMANDA,_now_I_want_to_put_it
+              in_production._How_can_I_reset_its_databases_so_as_to_start_from
+              scratch?
+
+              QUESTION:_The_man-page_of_dump_says_that_active_filesystems_may
+              be_backed_up_inconsistently._What_does_AMANDA_do_to_prevent
+              inconsistent_backups?
+
+              QUESTION:_Which_version_of_GNU-tar_should_I_use?
+
+
+        17._Collection_of_the_top_ten_AMANDA_questions._And_answers.
+
+
+              Reason_for_starting_this_list.
+
+              the_DLE-question
+
+              the_localhost-question
+
+              the_friday-tape-question
+
+              the_multiple-dumps-question
+
+              the_mailing-list-question
+
+              the_distro-question
+
+              the_index-question
+
+              the_tapetype-questions
+
+              the_size-question
+
+              the_GUI-question
+
+              the_holding-disk_question
+
+              ...
+
+
+        18._AMANDA_WISHLIST
+
+        19._AMANDA_Survey_Results
+
+
+  V._Technical_Background
+
+
+        20._How_AMANDA_uses_UDP_and_TCP_ports
+
+
+              TCP_port_allocation
+
+              User_TCP_port_range_(--with-tcpportrange)_summary
+
+              UDP_port_allocation
+
+              User_UDP_port_range_(--with-udpportrange)_summary
+
+              Firewalls_and_NAT
+
+
+        21._AMANDA_dumper_API
+
+
+              Introduction
+
+              The_Problem
+
+              Overview_of_the_API
+
+
+                    The_`support'_command
+
+
+              The_`selfcheck'_command
+
+              The_`estimate'_and_`estimate-parse'_commands
+
+              The_`backup'_and_`backup-parse'_commands
+
+              The_`index-from-output'_and_`index-from-image'_commands
+
+              The_`restore'_command
+
+              The_`print-command'_command
+
+              Conclusion
+
+
+        22._AMANDA_Internals
+
+
+              Protocols
+
+              server_and_amandad_on_client
+
+              planner_and_driver
+
+              driver_and_dumper
+
+              taper(read)_and_taper(write)
+
+
+        23._AMANDA_Event_API
+
+
+              Introduction
+
+              The_API
+
+
+                    event_register
+
+                    event_release
+
+                    event_loop
+
+                    event_wakeup
+
+
+              Data_types
+
+
+                    event_handle_t
+
+                    event_id_t
+
+                    event_type_t
+
+                    event_fn_t
+
+
+              Event_Types
+
+
+                    EV_READFD
+
+                    EV_WRITEFD
+
+                    EV_SIG
+
+                    EV_TIME
+
+                    EV_WAIT
+
+
+
+        24._AMANDA_Security_API
+
+
+              Introduction
+
+              The_Problem
+
+              The_API
+
+
+                    protocol_packet_transmission_functions
+
+                    stream_functions
+
+
+              Data_Types
+
+
+                    security_driver_t
+
+                    security_handle_t
+
+                    security_stream_t
+
+                    security_status_t
+
+
+              SECURITY_DRIVERS
+
+
+                    name
+
+                    connect
+
+                    accept
+
+                    close
+
+                    sendpkt
+
+                    recvpkt
+
+                    recvpkt_cancel
+
+                    stream_server
+
+                    stream_accept
+
+                    stream_client
+
+                    stream_close
+
+                    stream_auth
+
+                    stream_id
+
+                    stream_write
+
+                    stream_read
+
+                    stream_read_cancel
+
+
+
+        25._Virtual_Tape_API
+
+        26._Using_Kerberos_with_AMANDA
+
+
+              AMANDA_2.5.0_-_KERBEROS_v4_SUPPORT_NOTES
+
+
+                    Configuration
+
+                    Installation
+
+                    conf_file
+
+
+              AMANDA_2.5.0_-_KERBEROS_v5_SUPPORT_NOTES
+
+
+                    Building
+
+                    Installation
+
+                    conf_file
+
+                    Destination_Host_Permissions_file
+
+
+
+
+  VI._Historical_files
+
+
+        27._Response_to_CPIO_Security_Notice_Issue_11:
+
+
+              Affected_Versions
+
+              Workaround
+
+              Acknowledgements
+
+
+        28._Upgrade_Issues
+
+        29._What_once_was_new
+
+
+              What's_new_in_AMANDA_2.3
+
+
+                    Indexing_backups_for_easier_restore
+
+                    Samba_Support
+
+                    GnuTar_Support
+
+                    Multiple_backups_in_parallel_from_one_client_host
+
+                    Multiple_tapes_in_one_run
+
+                    Bottleneck_determination
+
+                    2_Gb_limit_removed
+
+                    amadmin_import/export
+
+
+              What's_new_in_AMANDA_2.2
+
+
+                    Client_side_setup_has_changed
+
+                    Version_suffixes_on_executables
+
+                    Kerberos
+
+                    Multiple_holding_disks
+
+                    Remote_self-checks
+
+                    mmap_support
+
+                    gzip_support
+
+                    Mount_point_names_in_disklist
+
+                    Initial_tape-changer_support_included
+
+                    Generic_tape_changer_wrapper_script
+
+                    New_command_amtape
+
+                    Changer_support_added_to_command_amlabel
+
+                    Tape_changer_support_improved
+
+                    A_few_words_about_multi-tape_runs
+
+                    Big_planner_changes
+
+                    Level-0_dumps_allowed_with_no_tape
+
+
+
+        30._Multitape_support_in_AMANDA_2.2
+
+
+              Introduction
+
+              New_Planner_Algorithm
+
+
+                    Time
+
+                    Full_Backups
+
+                    Schedule_Balancing
+
+                    Overwrite_Detection
+
+
+              Taper_Algorithm
+
+
+                    Choosing_a_tape
+
+                    End_of_tape_handling
+
+                    Tape_Format_Changes
+
+                    Tapelist_File_Changes
+
+
+
+        31._Thoughts_about_a_Strategy_API
+
+        32._Y2K_Compliancy
+
+        33._Usage_of_floppy_tape_drives_on_Linux
+
+
+  VII._References
+
+
+        34._Web_Ressources
+
+        35._The_AMANDA_Manual_Pages.
+
+
+  Index
+
+List of Tables
+
+
+  4.1. Protocol_between_amindexd_and_amrecover
+
+  19.1. Operating_Systems_Running_on_AMANDA_Server_Hosts
+
+List of Examples
+
+
+  15.1. A_C_Program_to_Check_the_AMANDA_Service_Numbers
+
+-------------------------------------------------------------------------------
+
+         Next
+     Abstract
+
diff --git a/docs/indexing.txt b/docs/indexing.txt
new file mode 100644 (file)
index 0000000..0256d8a
--- /dev/null
@@ -0,0 +1,370 @@
+
+Chapter 4. Indexing with AMANDA
+Prev  Part I. Installation  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 4. Indexing with AMANDA
+
+
+Alan M. McIvor
+
+Original text
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Database_Format
+
+  Database_Browsing
+
+  File_Extraction
+
+  Protocol_Between_amindexd_and_amrecover
+
+  Installation_Notes
+
+  Permissions
+
+  Changes_from_amindex-1.0
+
+  Changes_from_amindex-0.3
+
+  Changes_from_amindex-0.2
+
+  Changes_from_amindex-0.1
+
+  Changes/additions_to_2.3.0
+
+  Known_Bugs
+
+
+Note
+
+Refer to http://www.amanda.org/docs/indexing.html for the current version of
+this document.
+This file describes how the index files are generated and how amrecover is
+used.
+
+ Database Format
+
+The database consists of a directory tree of the format: $host/$disk/
+$date_$level.gz
+The host and disk are those listed in the disklist file, the "$host/$disk/" is
+like the curinfo database, '/' are changed for '_'. There is an index file for
+each dump, the name of the file is made of the date and the level, they will
+have the .gz suffix if they are compressed with gzip.
+ex. The file foo/_usr/19991231_0.gz is the index of the level 0 made on
+19991231 of the disk /usr of the host foo.
+The files are ASCII text files containing a list of the directory and files of
+the dump, one per line. Each entry is the filename relative to the mount point,
+starting with a /, e.g., /home/user1/data from the disk mounted on /home would
+generate the entry /user1/data. The index files are stored in compressed format
+(eg gzip or compress).
+
+ Database Browsing
+
+The client is called amrecover and is loosely based on the functionality of the
+program recover from Backup Copilot. A user starts up amrecover. This requires
+specifying the index server and the AMANDA config name (defaults for both are
+compiled in as part of the installation). Then the user has to specify the name
+of the host information is wanted about, the disk name, and (optionally) the
+disk mount point. Finally a date needs to be specified. Given all this, the
+user can then roam around a virtual file system using ls and cd much like in a
+FTP client. The file system contains all files backed up on the specified date,
+or before that date, back to the last level 0 backup. Only the most recent
+version of any file is shown.
+As the file system is traversed, the user can add and delete files to a
+"shopping list", and print the list out.
+
+ File Extraction
+
+When a user has built up a list of files to extract, they can be extracted by
+issuing the command extract within amrecover.
+Files are extracted by the following, for each different tape needed.
+As part of the installation, a "tape server" daemon amidxtaped is installed on
+one or more designated hosts, which have an attached tape drive. This is used
+to read the tapes. See the config files for the options for specifying a
+default.
+amrecover contacts amidxtaped on the tape server host specifying which tape
+device to use, which host and disk files are needed for. On the tape server
+host, amidxtaped executes amrestore to get the dump image file off the tape,
+and returns the data to amrecover.
+If dumps are stored compressed for the client, then amrecover pipes the data
+through the appropriate uncompression routine to uncompress it before piping it
+into restore, which then extracts the required files from the dump image.
+Note that a user can only extract files from a host running the same operating
+system as he/she is executing amrecover on, since the native dump/restore tools
+are used - unless GNU-tar is used.
+
+ Protocol Between amindexd and amrecover
+
+The protocol talked between amindexd and amrecover is a simple ASCII chat
+protocol based on that used in FTP. amrecover sends a 1 line command, and
+amindexd replies with a 1 line or multi-line reply. Each line of the reply
+starts with a three digit code, starting with a '5' if an error occurred. For 1
+line replies, and the last line of a multi-line reply, the 4th character is a
+space. For all but the last line of a multi-line reply, the 4th character is a
+'-'.
+The commands and replies other than acknowledgments are:
+Table 4.1. Protocol between amindexd and amrecover
+ ____________________________________________________________________________
+|QUIT_______________|finish_up_and_close_connection__________________________|
+|HOST_<host>________|set_host_to_host________________________________________|
+|DISK_<disk>________|set_disk_to_disk________________________________________|
+|LISTDISK_[<device>]|list_the_disks_for_the_current_host_____________________|
+|SCNF_<config>______|set_AMANDA_configuration_to_config______________________|
+|DATE_<date>________|set_date_to_date________________________________________|
+|DHST_______________|return_dump_history_of_current_disk_____________________|
+|                   |Opaque is directory? query. Is the directory dir present|
+|OISD <dir>         |in the backups of the current disk back to and including|
+|___________________|the_last_level_0_dump.__________________________________|
+|                   |Opaque list directory. Give all filenames present in dir|
+|OLSD <dir>         |in the backups of the current disk back to and including|
+|___________________|the_last_level_0_dump.__________________________________|
+|                   |Opaque recursive list directory. Give all filenames     |
+|ORLD <dir>         |present in dir and subdir in the backups of the current |
+|___________________|disk_back_to_and_including_the_last_level_0_dump._______|
+|TAPE_______________|return_value_of_tapedev_from_amanda.conf_if_set.________|
+|DCMP               |returns "YES" if dumps for disk are compressed, "NO" if |
+|___________________|dumps_aren't.___________________________________________|
+
+
+ Installation Notes
+
+
+  1. Whether or not an index is created for a disk is controlled by a disk
+     configuration option index. So, in amanda.conf you need to define a
+     disktype with this option, e.g.,
+
+       define dumptype comp-user-index {
+       comment "Non-root partitions on reasonably fast machines"
+       compress client fast
+       index yes
+       priority medium
+       }
+
+  2. You need to define disks that you want to generate an index for to
+     be of one of the disktypes you defined which contain the index option.
+     This cause sendbackup-dump on the client machine to generate an index file
+     which is stored local to the client, for later recovery by amgetidx (which
+     is called by amdump).
+  3. AMANDA saves all the index files under a directory specified by
+     "indexdir" in amanda.conf. You need to create this directory by hand. It
+     needs to have read/write permissions set for the user you defined to run
+     AMANDA.
+     If you are using the "text database" option you may set indexdir and
+     infofile to be the same directory.
+  4. The index browser, amrecover, currently gets installed as part of the
+     client software. Its location may not be appropriate for your system and
+     you may need to move it to a more accessible place such as /usr/local/bin.
+     See its man page for how to use it.
+     Note that amindexd, amgetidx, amidxtaped, and amtrmidx all write debug
+     files on the server in /tmp (unless this feature is disabled in the source
+     code), which are useful for diagnosing problems. amrecover writes a debug
+     file in /tmp on the machine it is invoked.
+
+
+ Permissions
+
+The userid chosen to run the AMANDA client code must have permission to run
+restore since this is used by createindex-dump to generate the index files.
+For a user to be able to restore files from within amrecover, that user must
+have permission to run restore.
+
+ Changes from amindex-1.0
+
+Get index directory from amanda.conf.
+Integration into AMANDA-2.3.0.4.
+Rewriting of amgetidx to use amandad instead of using rsh/rcp.
+
+ Changes from amindex-0.3
+
+Support for index generation using GNU-tar.
+Support for restoring files from within amrecover.
+Bug fixes:
+
+* index/client/amrecover.c (guess_disk): Removed inclusion of mntent.h and use
+  of MAXMNTSTR since this was non-portable, as pointed out by Izzy Ergas
+  <erga00@nbhd.org>.
+
+
+* index/client/display_commands.c (list_directory): Removed point where
+  list_directory() could sleep for ever waiting for input that wasn't going to
+  come.
+
+
+* index/server/amindexd.c index/client/uscan.l Installed patches from Les
+  Gondor <les@trigraph.on.ca> to make amrecover handle spaces in file names.
+
+
+* server-src/amcontrol.sh: As pointed out by Neal Becker <neal@ctd.comsat.com>
+  there were still a few sh-style comments that needed conversion to c-style.
+
+
+ Changes from amindex-0.2
+
+
+* index/client/Makefile.in
+* index/client/help.c
+* index/client/amrecover.h
+* index/client/uparse.y
+* index/client/uscan.l Added a help command.
+
+
+* index/client/set_commands.c: set_disk() and set_host() now check for empty
+  extract list.
+
+
+* index/client/extract_list.c:
+* index/client/amrecover.h:
+* index/client/uparse.y:
+* index/client/uscan.l: Added clear extract list command.
+
+
+* index/client/set_commands.c (set_disk): Added code so working directory set
+  to mount point.
+
+
+* index/client/extract_list.c: If the last item on a tape list is deleted, the
+  tape list itself is now deleted from the extract list.
+
+
+* index/client/amrecover.c:
+* index/server/amindex.c: If the server started up and found that the index dir
+  doesn't exist, then it exited immediately and the client got informative
+  message. Corrected this so it is obvious what is wrong to the user, since
+  this is most likely to occur when somebody is setting up for the first time
+  and needs all the help they can get.
+
+
+* server-src/amgetidx.c Added patch from Pete Geenhuizen
+  <pete@gasbuggy.rockledge.fl.us> so that it works even when remote shell is
+  csh.
+
+
+* server-src/amcontrol.sh
+* server-src/Makefile.in Amcontrol is now parameterized like other scripts and
+  run through munge to generate installable version.
+
+
+* index/server/amindexd.c (main): Added code to set userid if FORCE_USERID set.
+
+
+* index/server/amindexd.c Removed #define for full path of grep. Assumed now to
+  be on path.
+
+
+* client-src/createindex-dump.c
+* client-src/sendbackup-dump.c
+* man/Makefile.in Added patch from Philippe Charnier <charnier@lirmm.fr> so
+  they work when things are installed with version numbers. This was also
+  reported by Neal Becker <neal@ctd.comsat.com>. Also patch to set installed
+  man page modes and create directory if needed.
+
+
+* config/options.h-sunos4 Corrected definition for flex library.
+
+
+* server-src/amtrmidx.c Added some pclose() commands, used remove() instead of
+  system("rm .."). Problems reported by Pete Geenhuizen
+  (<pete@gasbuggy.rockledge.fl.us>) on a system with small ulimits set.
+
+
+* index/server/amindexd.[ch]
+* index/server/list_dir.c
+* index/client/amrecover.c
+* index/client/set_commands.c
+* index/client/uparse.y Changes developed with the help of Pete Geenhuizen
+  <pete@gasbuggy.rockledge.fl.us> to support disks specified by logical names.
+  Also, now debug files generated by amrecover include PID so multiple users
+  can use amrecover simultaneously and without file deletion permission
+  problems.
+
+
+* config/config.h-hpux:
+* config/config-common.h:
+* server-src/amgetidx.c: Changes from Neal Becker re remote shell, making it a
+  configuration parameter.
+
+
+* config/options.h-sunos4 Had -Lfl instead of -lfl
+
+
+ Changes from amindex-0.1
+
+
+* index/client/uscan.l: added support for abbreviated date specs
+
+
+* index/client/amrecover.c (guess_disk): guess_disk got disk_path wrong if
+  mount point other than / (as subsequently pointed out by Eir Doutreleau
+  <ed@cti.ecp.fr>)
+
+
+* server-src/amtrmidx: Added amtrmidx which removes old index files.
+
+
+* index/client: Added a pwd command
+
+
+* server-src/amgetidx.c (main): Added use of CLIENT_LOGIN username on r
+  commands. (as pointed out by Eric Payan <Eric.Payan@ufrima.imag.fr>)
+
+
+* server-src/amgetidx.c: Bug: It was copying from all clients irrespective of
+  whether the client was configured for indices. A '}' in the wrong place.
+
+
+* server-src/amgetidx.c: Removed user configuration section. Instead include
+  amindexd.h to get information.
+
+
+ Changes/additions to 2.3.0
+
+common-src/conffile.[ch]
+
+* added "index" as a valid option
+
+server-src/driverio.c
+
+* added code to optionstr() to write "index" into option string
+
+client-src/sendback-dump.c
+
+* added code to generate index if requested.
+
+client-src/indexfilename.[ch] client-src/createindex-dump.c
+
+* code to generate index.
+
+client-src/Makefile.in
+
+* a new target. Another file for sendbackup-dump
+
+config/config-common.h
+
+* added def of restore.
+
+
+ Known Bugs
+
+
+* Empty directories don't get into the listing for a dump (at all dump levels).
+
+
+* When amrecover starts up, it tries to guess the disk and mount point from the
+  current directory of the working system. This doesn't work for disks
+  specified by logical names, nor when an automounter is being used, or a link
+  is in the path.
+
+-------------------------------------------------------------------------------
+
+Prev                   Up                                     Next
+Chapter 3. Excluding  Home  Chapter 5. Backup PC hosts using Samba
+
diff --git a/docs/install.txt b/docs/install.txt
new file mode 100644 (file)
index 0000000..45a0f79
--- /dev/null
@@ -0,0 +1,369 @@
+
+Chapter 2. AMANDA Installation Notes
+Prev  Part I. Installation      Next
+
+-------------------------------------------------------------------------------
+
+Chapter 2. AMANDA Installation Notes
+
+
+James da Silva
+
+Original text
+AMANDA Core Team
+<jds@amanda.org>
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Before_doing_anything
+
+  Compiling_the_AMANDA_sources
+
+  Setting_up_your_AMANDA_Configuration
+
+
+        Setting_up_the_Tape_Server_Host
+
+        Set_up_the_Backup_Client_Hosts
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/install.html for the current version of
+this document.
+This document covers the compilation, installation, and runtime setup of AMANDA
+2.4.2 and higher.
+
+ Before doing anything
+
+
+  a. Read this document all the way through.
+  b. Consult AMANDA_2.4.x_-_System-Specific_Installation_Notes for installation
+     notes specific to particular operating systems. There is often important
+     information there, so don't forget this step.
+  c. Read Upgrade_Issues if you are upgrading from a previous AMANDA version.
+     There are some issues that you will need to be aware of.
+  d. If you are using KERBEROS authentication, read Kerberos for details on
+     installing and running the kerberized version of AMANDA.
+  e. Check the AMANDA Patches Page, http://www.amanda.org/patches
+
+
+ Compiling the AMANDA sources
+
+If you have multiple architectures, you only need to install the whole AMANDA
+package on the tape server host (the one with tape drive). On the backup client
+hosts (the ones you are going to dump), you only need to compile some of the
+AMANDA programs (see section 1.2.H below).
+
+ Source configuration
+
+
+  a. AMANDA can optionally make use of the following packages to back up
+     different types of clients or clients with different filesystem dumping
+     programs. If you wish to use GNU-tar to back up filesystems, it is
+     recommended to use GNU-tar 1.13.25. Plain GNU-tar 1.12 needs to be patched
+     to handle large files (> 2GB). Plain GNU-tar 1.13 creates bad index-lists
+     which amrecover cannot handle, as does the rarely used GNU-tar 1.13.9x,
+     which changed the index-format again in an incompatible way.
+     If you need to use GNU-tar 1.12, get it at
+     ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
+     and apply the patch from patches/tar-1.12.patch. The first hunk may be
+     enough, unless it's a SunOS4 host. Read more about the patches in the
+     patch file itself.
+     GNU-tar 1.13.25 can be found at:
+     ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz
+     Samba allows Unix systems to talk to PC clients. AMANDA can back up
+     Microsoft Windows clients using Samba:
+     http://www.samba.org
+     Read Samba for configuration tips and known limitations.
+     Look at http://www.amanda.org/patches.html for up to date information on
+     patches.
+  b. If you wish to make use of some of the scripts that come with AMANDA, you
+     will need to install Perl. You can get Perl from any CPAN site. ftp://
+     ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
+  c. One of the programs included in this package is amplot, which reads a data
+     file that AMANDA generates for each dump and translates that information
+     in it into a nice picture that can be used to determine how your
+     installation is doing and if any parameters need to be changed. To use
+     amplot, you need a version of awk that understands command line variable
+     substitutions, such as nawk or gawk, which is available from
+     ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
+     Amplot also required that gnuplot be installed on your system. Gnuplot is
+     available at
+     http://www.gnuplot.org/ ftp://ftp.gnuplot.org/pub/gnuplot
+  d. The process of building AMANDA requires that some other packages be
+     installed on your system. The following packages are used:
+     ftp://ftp.gnu.org/pub/gnu/readline/readline-4.2.tar.gz amrecover
+     optionally uses the readline library for its command-line edition
+     mechanisms. This library itself requires either termcap, curses or
+     ncurses. termcap is preferred, and it may be obtained from: ftp://
+     ftp.gnu.org/pub/gnu/termcap/termcap-1.3.tar.gz
+     If you wish to edit and enhance AMANDA, you may need to install the
+     following tools. Autoconf and automake are required if you are going to
+     rebuild the Makefiles and auto configuration scripts. Bison is only needed
+     if you are going to work on the index server and client code.
+     ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz ftp://ftp.gnu.org/
+     pub/gnu/automake/automake-1.6.3.tar.gz ftp://ftp.gnu.org/pub/gnu/bison/
+     bison-1.27.tar.gz ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz
+  e. Read about the different configuration options available for building and
+     running AMANDA. To see the options, do both:
+
+       a. Run
+
+            ./configure --help
+
+          to see the available options that configure takes.
+       b. Read the example/config.site file which gives longer descriptions to
+          the same options as in step a).
+
+  f. Choose which user and group you will run the dumps under. Common choices
+     for user are `bin' or another user specifically created for AMANDA, such
+     as `amanda'; common choices for group are `operator' or `disk'. If you do
+     not specify --with-user=<username> and --with-group=<groupname>, configure
+     will abort. Also choose the default name for your configuration, such as
+     `csd' or `DailySet1'). This name is used by the AMANDA commands to choose
+     one of multiple possible configurations. You may specify it using the --
+     with-config=<confgname>.
+  g. Decide where AMANDA will live. You need to choose a root directory for
+     AMANDA. Let this root directory be called $prefix. Unless you change the
+     default behavior with the appropriate command line options, AMANDA will
+     install itself as. Listed below each directory is the appropriate
+     configure option to change the location of this part of AMANDA.
+
+       --sbindir=$prefix/sbin                                  AMANDA server side programs
+       --libexecdir=$prefix/libexec                            AMANDA backup client programs
+       --libdir=$prefix/lib                                    AMANDA dynamic libraries
+       --with-configdir=$prefix/etc/amanda                     Runtime configuration files
+       --with-gnutar-listdir=$prefix/var/amanda/gnutar-lists   Directory for
+       GNUtar lists (client)
+       --mandir=$prefix/man                                    Directory for manual pages
+
+     Note that the GNU-tar listdir should be a local filesystem on each client
+     that is going to be backed up with GNU tar. If it really must be NFS-
+     mounted, make sure the filesystem is exported so that the client has root
+     access to it.
+  h. Decide if you are compiling AMANDA on a server only or a client only
+     platform. If you have a particular operating system that will only be a
+     AMANDA client and will never run as the master tape host, then add the --
+     without-server option to configure. In the unlikely case that you have a
+     particular operating system that will serve as the tape host and you do
+     not wish to back up any machines that run this operating system, add the -
+     -without-client option to the configure options. There are many other
+     configuration switches for amanda. You may learn more about them by
+     running `configure --help' and by reading examples/config.site.
+  i. Now configure AMANDA. There are two ways of doing this. If you are running
+     AMANDA on a single OS, then probably the first method works better for
+     you. If you need to support multiple platforms, then the second method
+     will work better.
+
+       a. Run configure as non-root-user with the appropriate command line
+          options. You will probably want to remember the command line options
+          for future builds of AMANDA.
+       b. Edit example/config.site and install it in the directory $prefix/etc
+          or $prefix/share. When `configure' runs the next time it will look
+          for this file and use it to configure AMANDA.
+
+
+
+ Building and installing the binaries
+
+
+  a. Back at the top-level source directory, build the sources:
+
+       make
+       su root; make install
+
+     Make sure that you don't build the software as root, you may run the first
+     make-command as the AMANDA-user, for example. On the other hand you have
+     to run make install as root to get the binaries installed with the proper
+     permissions. If you want to change the compiler flags, you can do so like
+     this:
+
+       make CFLAGS="-O3 -Wall"
+
+  b. If you have built with USE_VERSION_SUFFIXES, you will want to create
+     symlinks to the version you wish to use, eg:
+
+       ln -s amdump-x.y.z amdump
+
+     This is not done automatically by the install process, so that you can
+     have multiple AMANDA versions co-existing, and choose yourself which to
+     make the default version. The script contrib/set_prod_link.pl may save you
+     some keystrokes.
+  c. Run `ldconfig' as root to update the paths to the recently installed
+     shared libraries.
+
+
+ Setting up your AMANDA Configuration
+
+
+ Setting up the Tape Server Host
+
+
+  a. Create the config directory (eg. /usr/local/etc/amanda/confname) and copy
+     the example/ files into that directory. Edit these files to be correct for
+     your site, consulting the amanda(8) man page if necessary. You can also
+     send mail to mailto://amanda-users@amanda.org if you are having trouble
+     deciding how to set things up. You will also need to create the directory
+     for the log and database files for the configuration to use (eg /usr/
+     local/var/amanda/confname), and the work directory on the holding disk.
+     These directories need to agree with the parameters in amanda.conf. Don't
+     forget to make all these directories writable by the dump user!
+     Make sure that you specify the *no-rewind* version of the tape device in
+     your amanda.conf file. This is a frequently encountered problem for new
+     sites.
+     Note that you might want to temporarily set the option "no-record" in all
+     your dumptypes when first installing AMANDA if you'd like to run tests of
+     AMANDA in parallel with your existing dump scheme. AMANDA will then run
+     but will not interfere with your current dumpdates. However, you don't
+     want to run with "no-record" under normal operations.
+  b. Put AMANDA into your crontab. Here's a sample:
+
+       0 16 * * 1-5 /usr/local/bin/amcheck -m confname
+       45 0 * * 2-6 /usr/local/bin/amdump confname
+
+     This is for SunOS 4.x, which has a per-user crontab; most other systems
+     also require a userid on each cron line. See your cron(8) for details.
+     With these cron lines, AMANDA will check that the correct tape is in the
+     drive every weekday afternoon at 4pm (if it isn't, all the operators will
+     get mail). At 12:45am that night the dumps will be run.
+  c. Put the AMANDA services into your /etc/services file. Add entries like:
+
+       amanda          10080/udp
+       amandaidx       10082/tcp
+       amidxtape       10083/tcp
+
+     You may choose a different port number if you like, but it must match that
+     in the services file on the client hosts too.
+     If you are running NIS (aka YP), you have to enter the AMANDA service into
+     your NIS services database. Consult your NIS documentation for details.
+     You may use the `patch-system' script, from client-src, in order to modify
+     this file. Run it with a `-h' argument for usage.
+  d. If you are going to use the indexing capabilities of AMANDA, and your
+     server uses inetd, then add these to your inetd.conf on the tape server
+     host:
+
+       amandaidx stream tcp nowait USER AMINDEXD_PATH amindexd
+       amidxtape stream tcp nowait USER AMIDXTAPED_PATH amidxtaped
+
+     where AMINDEXD_PATH and AMIDXTAPED_PATH are the complete paths to where
+     the amindexd and amidxtaped executables (usually libexec_dir/amindexd and
+     libexec_dir/amidxtaped), and USER is the AMANDA user.
+     You may use the `patch-system' script, from client-src, in order to modify
+     this file. Run it with a `-h' argument for usage.
+     If your tape server uses xinetd instead of inetd, then you have to add the
+     following two files to your xinetd-configuration (usually /etc/xinetd.d)
+     and edit the paths:
+
+       #/etc/xinetd.d/amandaidx
+       service amandaidx
+       {
+               socket_type             = stream
+               protocol                = tcp
+               wait                    = no
+               user                    = USER
+               group                   = GROUP
+               groups                  = yes
+               server                  = AMINDEXD_PATH/amindexd
+       }
+
+
+       #/etc/xinetd.d/amidxtaped
+       service amidxtape
+       {
+               socket_type             = stream
+               protocol                = tcp
+               wait                    = no
+               user                    = USER
+               group                   = GROUP
+               groups                  = yes
+               server                  = AMIDXTAPED_PATH/amidxtaped
+       }
+
+  e. If the tape server host is itself going to be backed up (as is usually the
+     case), you must also follow the client-side install instructions below on
+     the server host, INCLUDING setting up the file .amandahosts so that the
+     server host lets itself in. This is a frequently encountered problem for
+     new sites.
+
+
+ Set up the Backup Client Hosts
+
+
+  a. When using BSD-style security (enabled by default), set up your
+     ~dumpuser/.amandahosts (or ~dumpuser/.rhosts and/or /etc/hosts.equivi, if
+     you have configured --without-amandahosts) so that the dumpuser is allowed
+     in from the server host. Only canonical host names will be accepted in
+     .amandahosts, and usernames must be present in every line, because this is
+     safer.
+  b. Set up your raw disk devices so that the dumpuser can read them, and /etc/
+     dumpdates so that the dumpuser can write to it. Normally this is done by
+     making the disk devices readable by (and dumpdates read/writable by) group
+     `operator', and putting the dumpuser into that group.
+  c. Put the AMANDA service into your /etc/services file. Add entry like:
+
+       amanda          10080/udp
+       amandaidx       10082/tcp
+       amidxtape       10083/tcp
+
+     You may choose a different port number if you like, but it must match that
+     in the services file on the tape server host too.
+     If you are running NIS (aka YP), you have to enter the AMANDA service into
+     your NIS services database. Consult your NIS documentation for details.
+     You may use the `patch-system' script, from client-src, in order to modify
+     this file. Run it with a `-h' argument for usage.
+  d. If your AMANDA client uses inetd, put the AMANDA client service into
+     inetd's config file. This file is usually found in /etc/inetd.conf, but on
+     older systems it is /etc/servers. The format is different on different
+     OSes, so you must consult the inetd man page for your site. Here is an
+     example from our site, again from SunOS 4.x:
+
+       amanda dgram udp wait USER AMANDAD_PATH amandad
+
+     You may use the `patch-system' script, from client-src, in order to modify
+     this file. Run it with a `-h' argument for usage.
+     If your AMANDA client uses xinetd, you have to add the following file to
+     your xinetd-configuration (usually /etc/xinetd.d):
+
+       #/etc/xinetd.d/amanda
+       service amanda
+       {
+       socket_type             = dgram
+       protocol                = udp
+       wait                    = yes
+       user                    = USER
+       group                   = GROUP
+       groups                  = yes
+       server                  = AMANDAD_PATH/amandad
+       }
+
+  e. Kick inetd/xinetd to make it read its config file. On most systems you can
+     just execute kill -HUP inetd (or xinetd). On older systems you may have to
+     kill it completely and restart it. Note that killing/restarting (x)inetd
+     is not safe to do unless you are sure that no (x)inetd services (like
+     rlogin) are currently in use, otherwise (x)inetd will not be able to bind
+     that port and that service will be unavailable.
+  f. If you intend to back up xfs filesystems on hosts running IRIX, you must
+     create the directory /var/xfsdump/inventory, otherwise xfsdump will not
+     work.
+
+THAT'S IT! YOU ARE READY TO RUN, UNLESS WE FORGOT SOMETHING.
+Please send mail to mailto://amanda-users@amanda.org if you have any comments
+or questions. We're not afraid of negative reviews, so let us have it!
+Before writing questions, you may prefer to take a look at the AMANDA_FAQ and
+at the AMANDA home page, at http://www.amanda.org. Browsable archives of AMANDA
+mailing-lists are available at http://marc.theaimsgroup.com/?l=amanda-users and
+http://marc.theaimsgroup.com/?l=amanda-hackers.
+-------------------------------------------------------------------------------
+
+Prev                                       Up                   Next
+Chapter 1. AMANDA 2.4.x - System-Specific Home  Chapter 3. Excluding
+Installation Notes 
+
diff --git a/docs/internals.txt b/docs/internals.txt
new file mode 100644 (file)
index 0000000..bd56b08
--- /dev/null
@@ -0,0 +1,181 @@
+
+         Chapter 22. AMANDA Internals
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 22. AMANDA Internals
+
+
+George Scott
+
+Original text<George.Scott@cc.monash.edu.au>
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Protocols
+
+  server_and_amandad_on_client
+
+  planner_and_driver
+
+  driver_and_dumper
+
+  taper(read)_and_taper(write)
+
+
+Note
+
+Refer to http://www.amanda.org/docs/internals.html for the current version of
+this document.
+This is an attempt to document AMANDA's internals. Please feel free to make
+comments and suggest changes. Text for new sections gratefully accepted!
+
+ Protocols
+
+
+Note
+
+The following was an ASCII-illustration in the original docs, I managed to
+transfer it at last. Maybe someone will convert this to the first image in the
+AMANDA-docs ;-) . sgw.
+
+
+        Client I Server         +-planner-+
+               I                |         |
+               I                |         |
+               I                |         |                     ______
+  +-amandad-+  I                |         |                    (______)
+  |         |  I                |         |                    |amdump|
+  |         |  I                |         |           all ::::>|      |
+  |         |  I                |         |           stderr   |      |
+  |         |  I                |         |                    |      |
+  |         |  I                |   so    |                    +------+
+  |         |  I                +---------+
+  |         |  I                    ::                          ______
+  |         |  I                    \/                         (______)
+  |         |  I                +-driver--+                    | log  |
+  +---------+  I                |   si    |           all ::::>|      |
+               I                |         |           log      |      |
+               I                |         |                    |      |
+  +-sendback+  I                |         |                    +------+
+  |         |  I                |         |
+  |         |  I        ::::::::|         |<::::::
+  |         |  I       ::       |         |      ::
+  |         |  I      ::   ::::>|         |::::   ::
+  |         |  I      ::  ::    |         |   ::  ::
+  |         |  I      :: ::     +---------+    :: ::
+  |         |  I      :: ::                    :: ::
+  |         |  I      :: ::                    :: ::
+  |         |  I      :: ::       ______       :: ::
+  +---------+  I      :: ::      (______)      :: ::
+               I      :: ::      | /tmp |      :: ::
+               I      \/ ::    :>|      |      \/ ::
+  +-dump----+  I  +-dumper--+ :: +------+    +-taper/r-+    +-taper/w-+
+  |         |  I  |   si so | ::             | si so   |    |         |
+  |         |  I  |         | ::  ______     |         |    |         |
+  |         |  I  |mesgfd   | :: (______)    |         |    |         |
+  |       se|::::>|::::::::>|::  | hold |    |         |    |         |
+  |         |  I  |     errf|    | disk |    |      p2c|:::>|p2c      |
+  |         |  I  |         |    |      |    |      c2p|<:::|c2p      |
+  ____
+  |         |  I  |datafd   | ::>|      |::: |fd       |    |         |   /   \
+  |       so|::::>|::::::::>|::  +------+  :>|::::::::>SHDMEM::::::::>|::
+  >|tape|
+  |         |  I  |    outfd| ::          :: |         |    |   tapefd|   \ _ /
+  +---------+  I  +---------+  ::::::::::::  +---------+    +---------+
+               I
+
+
+ server and amandad on client
+
+XXX - still to be done
+
+ planner and driver
+
+planner interrogates all clients and generates a plan of which disks to backup
+and what dump level to do them at. The plan is plain text with one line per
+disk to be dumped. It is piped from planners stdout to drivers stdin. Plan
+lines come in two flavours:
+For total dumps: <host> <disk> <pri> <lev> <size> <time> <deg lev> <deg size>
+<deg time>
+For incremental dumps: <host> <disk> <pri> <lev> <size> <time>
+Where: <host> Host name of client (from disklist file) <disk> Name of disk
+(from disklist file) <pri> Priority of backup (pri from disklist and
+amanda.conf + days overdue for total) <lev> Dump level for dump (0 for total,
+1-9 for incremental) <size> Estimated size (in Kb after compression if
+requested) <time> Estimated time for backup (in seconds) <deg lev> <lev> to use
+if in degraded mode <deg size> <size> to use if in degraded mode <deg time>
+<time> to use if in degraded mode
+
+ driver and dumper
+
+dumper talks via two pipes connected to each dumper's stdin and stdout. The
+commands and responses are plain text.
+driver can ask dumper to do a dump to a file on the holding disk: FILE-DUMP
+<handle> <filename> <host> <disk> <level> <dumpdate> <chunksize> <prog>
+<options> or directly to taper: PORT-DUMP <handle> <port> <host> <disk> <level>
+<dumpdate> <prog> <options> or exit at the end of the run: QUIT
+If the dump finishes correctly dumper replies with: DONE <handle> [<message>]
+If something goes wrong with the dump, dumper can request that the dump be
+retried at a later time with: TRY-AGAIN <handle> [<message>] or, for fatal
+errors, be abandoned with: FAILED <handle> [<message>]
+If the holding disk runs out of space, dumper will give: NO-ROOM <handle> and
+wait for driver to either fix the problem and say: CONTINUE or just say: ABORT
+in which case dumper kills the dump and replies with: ABORT-FINISHED <handle>
+If driver says something that dumper doesn't recognise it responds with: BAD-
+COMMAND <message>
+Where: <handle> Request ID <filename> Name of file (on holding disk) to write
+dump <port> Port (of taper) to send dump directly <host> Hostname of client
+<disk> Disk to backup <level> Dump level to do backup at <prog> Dump program to
+use <options> Options to pass to sendbackup <message> Error or status message
+*driver and taper
+driver talks via two pipes connected to taper's stdin and stdout. The commands
+and responses are plain text.
+driver initialises taper with: START-TAPER <datestamp> to which taper replies
+with: TAPER-OK or, for fatal errors, with: TAPER-ERROR [<message>]
+driver can ask taper to to copy a file from the holding disk to tape: FILE-
+WRITE <handle> <filename> <host> <disk> <level> or directly from a dumper:
+PORT-WRITE <handle> <host> <disk> <level> or exit at the end of the run: QUIT
+taper responds to the PORT-WRITE command with: PORT <port> which driver should
+then hand on to dumper in a PORT-DUMP command.
+taper responds to the QUIT command with: QUITING
+If the copy to tape finishes correctly taper replies with: DONE <handle>
+[<message>]
+If something goes wrong with the tape, taper can request that the dump be
+retried at a later time with: TRY-AGAIN <handle> [<message>] or, for fatal
+errors, be abandoned with: TAPE-ERROR <handle> [<message>]
+If driver says something that taper doesn't recognise it responds with: BAD-
+COMMAND <message>
+Where: <datestamp> Todays date as "yymmdd" <handle> Request ID <filename> Name
+of file (on holding disk) to write dump <port> Port (of taper) to send dump
+directly <host> Hostname of client <disk> Disk to backup <level> Dump level to
+do backup at <message> Error or status message
+
+ taper(read) and taper(write)
+
+There are two parts to taper: the file reader and the tape writer.
+Communication between the two sides is via a bit of shared memory for data
+transfer and two pipes (one in each direction) for synchronisation.
+The shared memory area is made up of NBUFS (=20) buffers each of which contains
+a status word and a BUFFER_SIZE (=32*1024) byte data buffer.
+The sync pipes are used to transfer a simplistic command sequence:
+reader writer ------ ------
+Startup S<datestamp> ---> <--- S Start OK <--- E<messge> Error
+Open tape O<datestamp><hostname><diskname><level> ---> <--- O Opening
+Write buffer W<bufnum> ---> <--- R<bufnum> Buffer empty <--- E<message> Error
+<--- T<message> Error, try again E ack e ---> Protocol error X ---> <--- x X
+ack
+Close tape C ---> <--- C<label><filenum><stats> Closing
+Quit Q --->
+-------------------------------------------------------------------------------
+
+Prev                            Up                           Next
+Chapter 21. AMANDA dumper API  Home  Chapter 23. AMANDA Event API
+
diff --git a/docs/introduction.txt b/docs/introduction.txt
new file mode 100644 (file)
index 0000000..9098bbb
--- /dev/null
@@ -0,0 +1,150 @@
+
+Part I. Installation
+Prev            Next
+
+-------------------------------------------------------------------------------
+
+
+Installation
+
+
+
+Initial Installation
+
+This section of the AMANDA-docs contains general info on how to install AMANDA
+and how to configure its basic parts. Please read this!
+Table of Contents
+
+
+  1._AMANDA_2.4.x_-_System-Specific_Installation_Notes
+
+
+        Solaris_2.6
+
+        Trusted_Solaris
+
+        SunOS_4.x
+
+        Ultrix
+
+        HP/UX
+
+        Linux
+
+        Digital_Unix_4
+
+        Sinix_5.43_(Reliant_Unix)
+
+        IRIX_(all)
+
+        IRIX_6
+
+        IRIX_6.5.x
+
+        SCO
+
+        FreeBSD_3.0
+
+        FreeBSD_4.9
+
+        FreeBSD_5.1
+
+        AIX
+
+        Microsoft_Windows
+
+        Mac_OS_X
+
+
+  2._AMANDA_Installation_Notes
+
+
+        Before_doing_anything
+
+        Compiling_the_AMANDA_sources
+
+        Setting_up_your_AMANDA_Configuration
+
+
+              Setting_up_the_Tape_Server_Host
+
+              Set_up_the_Backup_Client_Hosts
+
+
+
+  3._Excluding
+
+
+        Introduction
+
+        Please_Read
+
+        Before_We_Begin
+
+        Choosing_an_exclude_mechanism
+
+
+              Exclude_Mechanisms
+
+
+        Expression
+
+        Wildcard_Expansion
+
+        Troubleshooting
+
+
+              Broken_gnutar?
+
+              The_ps_command_is_your_friend.
+
+
+
+  4._Indexing_with_AMANDA
+
+
+        Database_Format
+
+        Database_Browsing
+
+        File_Extraction
+
+        Protocol_Between_amindexd_and_amrecover
+
+        Installation_Notes
+
+        Permissions
+
+        Changes_from_amindex-1.0
+
+        Changes_from_amindex-0.3
+
+        Changes_from_amindex-0.2
+
+        Changes_from_amindex-0.1
+
+        Changes/additions_to_2.3.0
+
+        Known_Bugs
+
+
+  5._Backup_PC_hosts_using_Samba
+
+
+        Installation
+
+        Setup
+
+        Example
+
+        Bugs_and_notes
+
+
+  6._Restore
+
+-------------------------------------------------------------------------------
+
+Prev           Up                                                     Next
+Attributions  Home  Chapter 1. AMANDA 2.4.x - System-Specific Installation
+                                                                     Notes
+
diff --git a/docs/ix01.txt b/docs/ix01.txt
new file mode 100644 (file)
index 0000000..23f9fdf
--- /dev/null
@@ -0,0 +1,88 @@
+
+   Index
+Prev     
+
+-------------------------------------------------------------------------------
+
+Index
+
+
+A
+
+
+
+  autoflush, the_multiple-dumps-question
+
+
+C
+
+
+
+  changerdev, Setup
+
+  changerfile, Setup
+
+  changerident, Notes_about_changer.conf
+
+
+D
+
+
+
+  DLE, Setup, the_DLE-question
+
+
+F
+
+
+
+  filemark, Setup
+
+
+M
+
+
+
+  Mac OS X, Mac_OS_X
+
+
+R
+
+
+
+  rawtapedev, Setup
+
+  runtapes, Schedule_Balancing
+
+
+S
+
+
+
+  speed, Setup
+
+
+T
+
+
+
+  tapecycle, Setup
+
+  tapedev, Notes_about_changer.conf, Setup
+
+  tapetype, Setup
+
+  tpchanger, Setup
+
+
+V
+
+
+
+  vtapes, Basics
+
+-------------------------------------------------------------------------------
+
+Prev          Up   
+amverifyrun  Home  
+
diff --git a/docs/kerberos.txt b/docs/kerberos.txt
new file mode 100644 (file)
index 0000000..6859a2a
--- /dev/null
@@ -0,0 +1,253 @@
+
+ Chapter 26. Using Kerberos with AMANDA
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 26. Using Kerberos with AMANDA
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  AMANDA_2.5.0_-_KERBEROS_v4_SUPPORT_NOTES
+
+
+        Configuration
+
+        Installation
+
+        conf_file
+
+
+  AMANDA_2.5.0_-_KERBEROS_v5_SUPPORT_NOTES
+
+
+        Building
+
+        Installation
+
+        conf_file
+
+        Destination_Host_Permissions_file
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/kerberos.html for the current version of
+this document.
+
+ AMANDA 2.5.0 - KERBEROS v4 SUPPORT NOTES
+
+
+ Configuration
+
+The configure script defaults to:
+
+  #  define SERVER_HOST_PRINCIPLE "amanda"
+  #  define SERVER_HOST_INSTANCE  ""
+  #  define SERVER_HOST_KEY_FILE  "/.amanda"
+
+  #  define CLIENT_HOST_PRINCIPLE "rcmd"
+  #  define CLIENT_HOST_INSTANCE  HOSTNAME_INSTANCE
+  #  define CLIENT_HOST_KEY_FILE  KEYFILE
+
+  #  define TICKET_LIFETIME       128
+       
+
+You can override these with configure options if you so desire, with:
+
+       --with-server-principal=ARG    server host principal  [amanda]
+       --with-server-instance=ARG     server host instance   []
+       --with-server-keyfile=ARG      server host key file   [/.amanda]
+       --with-client-principal=ARG    client host principal  [rcmd]
+       --with-client-instance=ARG     client host instance
+  [HOSTNAME_INSTANCE]
+       --with-client-keyfile=ARG      client host key file   [KEYFILE]
+       --with-ticket-lifetime=ARG     ticket lifetime        [128]
+       
+
+The configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /
+usr/lib, and /opt/kerberos/lib for libkrb.a. (in that order) for the kerberos
+bits. If it finds them, kerberos support will be added in, if it doesn't, it
+won't. If the kerberos bits are found under some other hierarchy, you can
+specify this via the --with-krb4-security=DIR, where DIR is where the kerberos
+bits live. It'll look under the 'lib' directory under this hierarchy for
+libkrb.a.
+
+ Installation
+
+The kerberized AMANDA service uses a different port on the client hosts. The /
+etc/services line is:
+
+  kamanda      10081/udp
+       
+
+And the /etc/inetd.conf line is:
+
+  kamanda dgram udp wait root /usr/local/libexec/amanda/amandad amandad -
+  auth=krb4
+       
+
+Note that you're running this as root, rather than as your dump user. AMANDA
+will set it's uid down to the dump user at times it doesn't need to read the
+srvtab file, and give up root permissions entirely before it goes off and runs
+dump. Alternately you can change your srvtab files to be readable by user
+amanda.
+
+ conf file
+
+The following dumptype options apply to krb4:
+
+  auth "krb4"  # use krb4 auth for this host
+               # (you can mingle krb hosts & bsd .rhosts in one conf)
+  kencrypt     # encrypt this filesystem over the net using the krb4
+               # session key.  About 2x slower.  Good for those root
+               # partitions containing your keyfiles.  Don't want to
+               # give away the keys to an ethernet sniffer!
+               # This is currently always enabled.  There is no
+               # way to disable it.  This is a bug.
+       
+
+
+ AMANDA 2.5.0 - KERBEROS v5 SUPPORT NOTES
+
+
+ Building
+
+You must specify --with-krb5-security to configure, otherwise there will be no
+attempt to look for kerberos binaries. You may specify a path that the system
+should look for the kerberos libraries, or leave it to the default.
+By default, when --with-krb5-security is specified with with no path, the
+configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /usr/
+lib, and /opt/kerberos/lib for libkrb.a. (in that order) for the kerberos bits.
+If it finds them, kerberos support will be added in, if it doesn't, it won't.
+If the kerberos bits are found under some other hierarchy, you can specify this
+via the --with-krb5-security=DIR, where DIR is where the kerberos bits live.
+It'll look under the 'lib' directory under this hierarchy for libkrb.a.
+The krb5 driver script defaults to:
+
+  /*
+   * The lifetime of our tickets in minutes.
+   */
+  #define AMANDA_TKT_LIFETIME     (12*60)
+
+  /*
+   * The name of the service in /etc/services.
+   */
+  #define AMANDA_KRB5_SERVICE_NAME        "k5amanda"
+       
+
+You can currently only override these by editing the source.
+The principal and keytab file that the amanda uses are genearlly set in the
+amanda.conf file (see below). You can hardcode this in the source if you really
+want to and that's described in common-src/krb5-security.c
+
+ Installation
+
+The kerberized AMANDA service uses a different port on the client hosts. The /
+etc/services line is:
+
+  k5amanda      10082/tcp
+       
+
+And the /etc/inetd.conf line is:
+
+  k5amanda stream tcp nowait root /usr/local/libexec/amanda/amandad amandad -
+  auth=krb5
+       
+
+Note that you're running this as root, rather than as your dump user. AMANDA
+will set it's uid down to the dump user at times it doesn't need to read the
+keytab file, and give up root permissions entirely before it goes off and runs
+dump. Alternately you can change your keytab files to be readable by user
+amanda. You should understand the security implications of this before changing
+the permissions on the keytab.
+
+ conf file
+
+The following dumptype options apply to krb5:
+
+  auth "krb5"  # use krb5 auth for this host
+               # (you can mingle krb hosts & bsd .rhosts in one conf)
+       
+
+The following two configuration directives are required in the amanda.conf file
+for kerberos 5 dumps to work:
+
+  krb5keytab
+  krb5principal
+       
+
+For example:
+
+  krb5keytab   "/etc/krb5.keytab-amanda"
+  krb5principal        "amanda/saidin.omniscient.com"
+       
+
+The principal in the second option must be contained in the first. The keytab
+should be readable by the amanda user. (and definitely not world readable!)
+This is (obviously) on the server. In MIT's kadmin, the following:
+
+  addprinc -randkey amanda/saidin.omniscient.com
+  ktadd -k /etc/krb5.keytab-amanda amanda/saidin.omniscient.com
+       
+
+will do the trick. You will obviously want to change the principal name to
+reflect something appropriate for the conventions at your site.
+You must also configure each client to allow the amanda principal in for dumps.
+This is described in section 4.
+
+ Destination Host Permissions file
+
+There are several ways to go about authorizing a server to connect to a client.
+The normal way is via a .k5amandausers file or a .k5login file in the client
+user's home directory. The determination of which file to use is based on the
+way you ran configure on AMANDA. By default, AMANDA will use .k5amandahosts,
+but if you configured with --without-amandahosts, AMANDA will use .k5login.
+(similar to the default for .rhosts/.amandahosts-style security). The .k5login
+file syntax is a superset of the default krb5 .k5login. The routines to check
+it are implemented in amanda rather than using krb5_kuserok because the
+connections are actually gssapi based.
+This .k5amandahosts/.k5login is a hybrid of the .amandahosts and a .k5login
+file. You can just list principal names, as in a .k5login file and the
+principal will be permitted in from any host. If you do NOT specify a realm,
+then there is no attempt to validate the realm (this is only really a concern
+if you have cross-realm authentication set up with another realm or something
+else that allows you multiple realms in your kdc. If you do specify a realm,
+only that principal@realm will be permitted to connect.
+You may prepend this with a hostname and whitespace, and only that principal
+(with optional realm as above) will be permitted to access from that hostname.
+Here are examples of valid entries in the .k5amandahosts:
+
+  service/amanda
+  service/amanda@TEST.COM
+  dumpmaster.test.com service/amanda
+  dumpmaster.test.com service/amanda@TEST.COM
+       
+
+Rather than using a .k5amandahosts or .k5login file, the easiest way is to use
+a principal named after the destination user, (such as amanda@TEST.COM in our
+example) and not have either a .k5amandahosts or .k5login file in the
+destination user's home directory.
+
+Note
+
+There is no attempt to verify the realm in this case (only a concern if you
+have cross-realm authentication setup).
+-------------------------------------------------------------------------------
+
+Prev                           Up                        Next
+Chapter 25. Virtual Tape API  Home  Part VI. Historical files
+
diff --git a/docs/labelprinting.txt b/docs/labelprinting.txt
new file mode 100644 (file)
index 0000000..5693880
--- /dev/null
@@ -0,0 +1,81 @@
+
+           Chapter 11. Printing of Labels
+Prev  Part II. About Tapes and Changers  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 11. Printing of Labels
+
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  The_New_Feature
+
+  Labels_provided
+
+  History
+
+  How_it_works
+
+
+Note
+
+Refer to http://www.amanda.org/docs/labelprinting.html for the current version
+of this document.
+
+ The New Feature
+
+AMANDA now has the ability to print postscript paper tape labels. The labels
+have what machines, partitions, and the level of the dump the tape has on it.
+This is achieved by adding the lbl-templ field to the tapetype definition.
+Since the labels are specific to the type of tape you have, that seemed to most
+logical place to add it.
+You can also specify an alternate "printer" definition to print the label to
+other than the system default printer.
+If you don't add this line to your tapetype definition, AMANDA works as it
+always has.
+
+ Labels provided
+
+The author has provided label templates for the following tape types. These are
+pretty generic labels, and should be easy to customize for other tape types.
+Others are encouraged to do so.
+
+* Exabyte 8mm tapes
+* DDS 4mm tapes
+* DLT tapes (in progress).
+
+
+ History
+
+At the University of Colorado at Boulder, we used to use some dump scripts that
+printed out paper tape labels that went with the tape. When we started using
+AMANDA for our dumps, my boss insisted we still generate them, in case we
+weren't able to access the AMANDA database. The thought was that as long as we
+had an amrestore binary on a machine, we could just look at the label, grab the
+tapes, and do the restore.
+As a result of this we have had to hack this feature into every version of
+AMANDA from 2.1.1 through 2.4.0-prerelease.
+Our hope in adding this feature is that others find it as useful as we have.
+
+ How it works
+
+The majority of the changes are in reporter.c. Just as you might run the
+reporter by itself to see what the report will (or did) look like with a
+logfile. When the reporter prints out the report, the postscript label template
+is copied, and the successful machines, partitions, and dump levels are
+appended to this. The output either goes to /tmp/reporter.out.ps (when running
+in testing mode) or through a pipe to the printer (default printer, if an
+alternate "printer" is not specified).
+-------------------------------------------------------------------------------
+
+Prev                                                    Up               Next
+Chapter 10. RAIT (Redundant Array of Inexpensive Tape) Home  Part III. HOWTOs
+Support 
+
diff --git a/docs/links.txt b/docs/links.txt
new file mode 100644 (file)
index 0000000..33cba63
--- /dev/null
@@ -0,0 +1,33 @@
+
+    Chapter 34. Web Ressources
+Prev  Part VII. References  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 34. Web Ressources
+
+
+Stefan G. Weichinger
+
+Original text
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/links.html for the current version of this
+document.
+See some original AMANDA-papers by James da Silva and Olafur Gundmundsson here:
+
+* The presentation of AMANDA:
+  Postscript: http://www.amanda.org/docs/lisa-vii.ps
+  PDF: http://www.amanda.org/docs/lisa-vii.pdf
+* A document about the performance of AMANDA:
+  Postscript: http://www.amanda.org/docs/usenix92.ps
+  PDF: http://www.amanda.org/docs/usenix92.pdf
+
+-------------------------------------------------------------------------------
+
+Prev                   Up                                   Next
+Part VII. References  Home  Chapter 35. The AMANDA Manual Pages.
+
diff --git a/docs/manpages.txt b/docs/manpages.txt
new file mode 100644 (file)
index 0000000..488bb2f
--- /dev/null
@@ -0,0 +1,68 @@
+
+Chapter 35. The AMANDA Manual Pages.
+Prev  Part VII. References      Next
+
+-------------------------------------------------------------------------------
+
+Chapter 35. The AMANDA Manual Pages.
+
+Table of Contents
+
+
+  amadmin - administrative interface to control AMANDA backups
+
+  amanda - Advanced Maryland Automatic Network Disk Archiver
+
+  amcheck - run AMANDA self-checks
+
+  amcheckdb - check AMANDA database for tape consistency
+
+  amcleanup - run the AMANDA cleanup process after a failure
+
+  amdd - AMANDA version of dd
+
+  amdump - back up all disks in an AMANDA configuration
+
+  amflush - flush AMANDA backup files from holding disk to tape
+
+  amgetconf - look up amanda.conf variables
+
+  amlabel - label an AMANDA tape
+
+  ammt - AMANDA version of mt
+
+  amoverview - display file systems processed by AMANDA over time
+
+  amplot - visualize the behavior of AMANDA
+
+  amrecover - AMANDA index database browser
+
+  amreport - generate a formatted output of statistics for an AMANDA run
+
+  amrestore - extract backup images from an AMANDA tape
+
+  amrmtape - remove a tape from the AMANDA database
+
+  amstatus - display the state of an AMANDA run
+
+  amtape - user interface to AMANDA tape changer controls
+
+  amtapetype - generate a tapetype definition.
+
+  amtoc - generate TOC (Table Of Contents) for an AMANDA run
+
+  amverify - check an Amanda tape for errors
+
+  amverifyrun - check the tapes written by the last AMANDA run
+
+
+Note
+
+Refer to http://www.amanda.org/docs/manpages.html for the current version of
+this document.
+This chapter contains the manual pages from the official AMANDA distribution.
+-------------------------------------------------------------------------------
+
+Prev                         Up      Next
+Chapter 34. Web Ressources  Home  amadmin
+
diff --git a/docs/multitape.txt b/docs/multitape.txt
new file mode 100644 (file)
index 0000000..ca7d583
--- /dev/null
@@ -0,0 +1,182 @@
+
+Chapter 30. Multitape support in AMANDA 2.2
+Prev  Part VI. Historical files        Next
+
+-------------------------------------------------------------------------------
+
+Chapter 30. Multitape support in AMANDA 2.2
+
+
+James da Silva
+
+Original text
+AMANDA Core Team
+<jds@amanda.org>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Draft 1 - jds 3/29/94
+Table of Contents
+
+
+  Introduction
+
+  New_Planner_Algorithm
+
+
+        Time
+
+        Full_Backups
+
+        Schedule_Balancing
+
+        Overwrite_Detection
+
+
+  Taper_Algorithm
+
+
+        Choosing_a_tape
+
+        End_of_tape_handling
+
+        Tape_Format_Changes
+
+        Tapelist_File_Changes
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/multitape.html for the current version of
+this document.
+
+ Introduction
+
+The goal of this enhancement is to make AMANDA independent of the number of
+tapes used per run or even per dump cycle. Specifically, I would like AMANDA to
+handle the following:
+
+* output of amdump run goes to more than one tape
+* a single dump file can straddle two tapes
+* more than one amdump run can be done in a single day
+* planner should not care how many runs per cycle occur
+
+And later:
+
+* multiple runs of amdump can go onto one tape (eg an append mode)
+* any dump files from a previous run that are on the holding disk are written
+  to tape in this run (eg eliminate amflush)
+* taper write to multiple tape drives simultaneously
+
+
+ New Planner Algorithm
+
+
+ Time
+
+Previously, planner marked time by the number of amdump runs, which it equated
+with number of tapes, and number of days. In AMANDA 2.2, AMANDA keeps track of
+the real passage of time, and doesn't generally care about the number of runs
+or tapes between any two events.
+While AMANDA 2.2 doesn't care about spacing between runs, dump cycles are still
+in terms of days, to make things easy to understand for the user. So, time
+differences are rounded to the nearest 24 hours:
+days_diff(A,B) = (<B> - <A> + 86400/2) / 86400
+Where the times A and B are in seconds since the Unix epoch, and 86400 is the
+number of seconds per day. This rounds a 2.49 day difference down to 2 days,
+and a 2.5 day difference up to 3 days. No, Olafur, Unix time does not handle
+leap seconds. Give me a break. :-)
+
+ Full Backups
+
+The first thing planner does is calculate when each filesystem is due for a
+full backup. This is trivial for normal backups:
+full_is_due = days_diff(<time of last full>, <curtime>) >= dumpcycle
+There is a complication for "skip-full" filesystems. Under 2.2, these will be
+skipped on any runs that occur on the day the full is due, but we have to do
+the right thing if multiple runs are done that day, and if no runs are done
+that day (in which case we should be doing an incremental). Also, the time of
+last full dump is a fiction maintained by the planner -- AMANDA has no way to
+tell whether the full backup was actually done or when it was done:
+
+       if(skip-full) {
+               if(full_is_due)
+                       <time of last full> += dumpcycle;
+               if(days_diff(<time of last full>, <curtime>) == 0)
+                       skip the filesystem on this run;
+               else
+                       do an incremental dump of this filesystem;
+       }
+       
+
+
+ Schedule Balancing
+
+The runtapes parameter tells planner how many tapes it should plan to use each
+run. It multiplies this by the tape length to get the size available for the
+run. (NOTE: later amend this size if appending to tapes, or if there are dumps
+on the holding disk waiting to be flushed). Other than the size calculation,
+planner doesn't really care how many tapes will be written to.
+The fundamental problem with attempting to balance the schedule is that we no
+longer know how many amdump runs will be done in a full cycle. The number may
+change from cycle to cycle if there are extenuating circumstances.
+So, planner must guess at how many runs will be done in one cycle, by looking
+at the information for the last cycle, or, if this is the first cycle, assuming
+one run for each day in the dump cycle.
+
+ Overwrite Detection
+
+When can a tape be overwritten, considering that it might have old dumps on it?
+We want to be able to warn when full dumps are going to be overwritten, but
+given the possibility of old files on the tape, how can we know when the tape
+is no longer needed? I think we can get this when going through the info file,
+considering each full dump and what tape it is on. Make sure we correctly
+handle stale information.
+
+ Taper Algorithm
+
+
+ Choosing a tape
+
+taper must now handle writing to multiple tapes in one night, but choosing the
+tapes from the tape rack is done one at a time as needed, re-applying the same
+algorithm each time (see AMANDA_Tape_Changer_Support).
+
+ End of tape handling
+
+As in earlier versions of AMANDA, taper itself does not try to restrict writing
+to the tape size given in the config file. It relied on planner having
+correctly estimated backup sizes and limiting itself to what would fit on one
+tape.
+Now, taper needs to switch to a new tape when the current tape has filled up.
+The tape is considered full when taper gets a write error. This will most
+likely occur in the middle of writing a (potentially large) backup file,
+perhaps even from a direct-to-tape socket, so there is no possibility of
+starting the backup file over again on the next tape, it must start from where
+it left off, rewriting the block that got the error on the next tape.
+To insure correct operation, the file header of the continued file should
+contain an indication that it is a continuation, and at what offset. amrestore
+of course needs to be aware of this scheme and handle it correctly, perhaps by
+double-buffering internally. XXX provide more alg details here, or just leave
+it with the general idea?
+
+ Tape Format Changes
+
+We need to specify the sequence number of the tape in the run, in the tape
+header file. The file header block specifies whether it is a continuation file
+or not.
+
+ Tapelist File Changes
+
+The lines in the tapelist file should contain the sequence number of the tape
+in its run, as well as the amount of data written on the tape, and perhaps
+whether or not the end of tape was reached.
+-------------------------------------------------------------------------------
+
+Prev                            Up                                        Next
+Chapter 29. What once was new  Home  Chapter 31. Thoughts about a Strategy API
+
diff --git a/docs/portusage.txt b/docs/portusage.txt
new file mode 100644 (file)
index 0000000..3e46191
--- /dev/null
@@ -0,0 +1,206 @@
+
+Chapter 20. How AMANDA uses UDP and TCP ports
+Prev  Part V. Technical Background       Next
+
+-------------------------------------------------------------------------------
+
+Chapter 20. How AMANDA uses UDP and TCP ports
+
+
+John R. Jackson
+
+Original text
+AMANDA Core Team
+<jrj@purdue.edu>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  TCP_port_allocation
+
+  User_TCP_port_range_(--with-tcpportrange)_summary
+
+  UDP_port_allocation
+
+  User_UDP_port_range_(--with-udpportrange)_summary
+
+  Firewalls_and_NAT
+
+
+Note
+
+Refer to http://www.amanda.org/docs/portusage.html for the current version of
+this document.
+AMANDA uses both UDP and TCP ports during its operation. The amandad service is
+listening (via inetd/xinetd) at a well known (fixed) port on each client for
+UDP connections. The amindexd and amidxtaped services are listening (also via
+inetd/xinetd) at well known ports on the tape server for TCP connections.
+When a process on the tape server wants to talk to a client, it creates a UDP
+socket and binds it to a port on its side, then sends the packet to the well
+known amandad service port on the client. Because security information is
+passed, the port bound on the connecting (tape server) side must be privileged
+(less than 1024). This "proves" to amandad whoever is connecting is running as
+root, and therefore is trustworthy (there are all sorts of issues with the
+validity of this "trust" that are beyond the scope of this document).
+A similar sequence of events happens when amrecover on a client wants to
+contact amindexd or amidxtaped on the tape server. The port that amrecover
+binds to its TCP socket must be privileged, which is one of the reasons it must
+be run as root.
+AMANDA also uses TCP connections for transmitting the backup image, messages
+and (optionally) the index list from a client back to the dumper process on the
+tape server. A process called sendbackup is started by amandad on the client.
+It creates two (or three, if indexing is enabled) TCP sockets and sends their
+port numbers back to dumper in a UDP message. Then dumper creates and binds TCP
+sockets on its side and connects to the waiting sendbackup.
+Because sendbackup does not run as root on the client, it cannot allocate
+privileged TCP ports to listen on. The dumper process is setuid root and could
+bind privileged ports on its side (it currently does not), but because
+sendbackup does not care what port connects back to it (it assumes the only
+process that could have knowledge of the port numbers to use is dumper), it
+does not check the peer (connecting) port number.
+
+ TCP port allocation
+
+When AMANDA creates a TCP server socket to listen for incoming connections
+( sendbackup), it goes through the following bind steps:
+
+* try for the user TCP port range (--with-tcpportrange), if defined. If that
+  fails ...
+
+
+* try for a privileged port (512 .. 1023). If that fails ...
+
+
+* get any available port.
+
+This sequence is implemented in stream_server().
+When AMANDA ( dumper) creates an unprivileged TCP client socket to connect to a
+server, it goes through the following bind steps:
+
+* try for the user TCP port range (--with-tcpportrange), if defined. If that
+  fails ...
+
+
+* get any available port.
+
+This sequence is implemented in stream_client().
+When AMANDA ( amrecover) creates a privileged TCP client socket to connect to a
+server, it goes through the following bind step:
+
+* try for a privileged port (512 .. 1023). If that fails, the whole request is
+  aborted.
+
+This sequence is implemented in stream_client_privileged().
+The stream_server() routine is used in two ways:
+
+* taper to set up direct to tape communication with dumper on localhost.
+
+If a user TCP port range is defined, it needs to be unprivileged because taper
+is not running as root.
+
+* sendbackup to set up a transfer with its dumper.
+
+If a user TCP port range (--with-tcpportrange) is defined, it needs to be
+unprivileged because sendbackup is not running as root.
+A user TCP port range needs to be large enough for three ports (data, message
+and index) times the number of simultaneous backups the client may be asked to
+perform ("maxdumps" in amanda.conf).
+The stream_client() routine is used in two ways:
+
+* dumper to connect to taper for a direct to tape operation. Except for making
+  sure what is connecting is not (ftp) port 20 (a common attack entry point),
+  taper does not pay any attention to the source ( dumper) port number.
+
+
+* dumper to connect to sendbackup on a client. Again, except for port 20,
+  sendbackup does not care what port the request comes from.
+
+If a user TCP port range (--with-tcpportrange) is defined, it needs to be
+unprivileged because dumper is not running as root (at this point).
+A user TCP port range needs to be large enough for two ports (one to sendbackup
+on the client, and possibly one to taper) times the number of dumpers
+("inparallel" in amanda.conf).
+The stream_client_privileged() routine is used in one way:
+
+* amrecover to connect to amindexd and amidxtaped.
+
+Because security information is passed, amindexd/ amidxtaped (via security_ok()
+in security.c) insist the other end ( amrecover) be bound to a privileged port.
+
+ User TCP port range (--with-tcpportrange) summary
+
+Pick the max of (2 * inparallel) and (3 * largest maxdumps). Allocate at least
+that many ports in the unprivileged (1024 or larger) range. Stay away from
+other well known ports (e.g. in your /etc/services file) or account for their
+potential use by making the portrange larger.
+
+ UDP port allocation
+
+When AMANDA creates a UDP socket, the same order of assignment as above is used
+by dgram_bind():
+
+* try for the user UDP port range (--with-udpportrange), if defined. If that
+  fails ...
+
+
+* try for a privileged port (512 .. 1023). If that fails ...
+
+
+* get any available port.
+
+The dgram_bind() routine is called from three places, amcheck, planner and
+dumper. In each case, a connection to amandad on a client is being set up.
+amandad, in turn, calls security_ok(), which insists the other end of the
+connection be a privileged port, so a user UDP port range (--with-udpportrange)
+must specify privileged port numbers.
+A user UDP port range must allow for one port for each client that might be
+contacted at a time. planner and amcheck use a single socket to contact all
+their clients, but there may be multiple dumpers (based on "inparallel" in
+amanda.conf) and each needs its own port.
+
+ User UDP port range (--with-udpportrange) summary
+
+Allocate at least "inparallel" many ports in the privileged (1023 or smaller)
+range. Stay away from other well known ports (e.g. in your /etc/services file)
+or account for their potential use by making the portrange larger.
+
+ Firewalls and NAT
+
+I'm not familiar with firewalls or NAT -- one of the benefits of working in a
+University environment :-). So the following is likely to be completely wrong,
+but I have tried to get the advice of folks who do really understand this
+stuff.
+Firewalls and AMANDA should be pretty easy to set up. Just pick user UDP and
+TCP port ranges, build AMANDA with them (--with-udpportrange and --with-
+tcpportrange) and let them through the firewall. You also need to let the well
+known AMANDA ports through, just as you would ftp or telnet.
+NAT has other issues. If the AMANDA client is "outside" NAT, there should not
+be a problem for backups. Sendbackup will set up the ports and tell dumper what
+they are. Then dumper will connect to them from "inside" and NAT should leave
+that alone, although it doesn't really matter since sendbackup does not care
+who connects to it (other than it not be ftp port 20).
+If the AMANDA tape server is outside, NAT will have to be told how to translate
+the incoming connections from dumper to the client. To do that, the UDP and TCP
+port ranges will have to be known and only one client can be inside.
+The reverse is true for amrecover. If amrecover is run from inside NAT, there
+should not be a problem -- it's just like running ftp or telnet. But from the
+outside, NAT will have to know where the amindexd/amidxtaped services are and
+allow them through (much like ftp or telnet daemons). Since they are on known
+port numbers, the user TCP port range is not an issue.
+A user TCP port range is probably not important in the case of dumper and taper
+talking to each other since only the one machine (localhost) is involved and so
+it does not go through a firewall. But I could be wrong, especially if NAT is
+involved.
+The details of how you configure a specific firewall or NAT are beyond the
+scope of this document (although examples would be welcome). You need to read
+up on the documentation that comes with them.
+-------------------------------------------------------------------------------
+
+Prev                           Up                            Next
+Part V. Technical Background  Home  Chapter 21. AMANDA dumper API
+
diff --git a/docs/pr01.txt b/docs/pr01.txt
new file mode 100644 (file)
index 0000000..4d254f3
--- /dev/null
@@ -0,0 +1,38 @@
+
+   Abstract
+Prev     Next
+
+-------------------------------------------------------------------------------
+
+Abstract
+
+
+Note
+
+This is the first release of the Docbook/XML-version of the official AMANDA
+documentation. Please refer to http://www.amanda.org/docs/AMANDA-docs.html for
+the latest versions of these documents. They are available as html, ps and pdf.
+This is an effort to give the AMANDA-documentation a general overhaul. There
+are many parts that need to be reviewed and corrected, updated and added. The
+conversion of the old ASCII-formatted documentation to Docbook/XML should help
+to enhance the possibilities and to ease the generation of various output-
+formats.
+Recent changes:
+
+* addition of the AMANDA-chapter by John R. Jackson (with kind permission of W.
+  Curtis Preston).
+
+Planned:
+
+* addition of some historical AMANDA-papers.
+* addition of some illustrations and charts.
+* addition of more chapters ...
+
+Feel free to contact me with corrections, additions or updates. Thank you.
+Stefan G. Weichinger, for the AMANDA Core Team, April 2005.
+<sgw@amanda.org>
+-------------------------------------------------------------------------------
+
+Prev                                Up   Next
+The Official AMANDA Documentation  Home      
+
diff --git a/docs/pr02.txt b/docs/pr02.txt
new file mode 100644 (file)
index 0000000..652ab4a
--- /dev/null
@@ -0,0 +1,13 @@
+
+Prev     Next
+
+-------------------------------------------------------------------------------
+Conversion to Docbook/XML by Stefan G. Weichinger, member of the AMANDA Core
+Team.
+XML-Buildtree by Jelmer R. Vernooij, member of the Samba-Team. Thanks, Jelmer
+... !
+-------------------------------------------------------------------------------
+
+Prev       Up                    Next
+Abstract  Home  Copyright Information
+
diff --git a/docs/pr03.txt b/docs/pr03.txt
new file mode 100644 (file)
index 0000000..6790466
--- /dev/null
@@ -0,0 +1,27 @@
+
+Copyright Information
+Prev             Next
+
+-------------------------------------------------------------------------------
+
+Copyright Information
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that the
+above copyright notice appear in all copies and that both that copyright notice
+and this permission notice appear in supporting documentation, and that the
+name of U.M. not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission. U.M. makes no
+representations about the suitability of this software for any purpose. It is
+provided "as is" without express or implied warranty.
+U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M. BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+-------------------------------------------------------------------------------
+
+Prev   Up           Next
+      Home  Attributions
+
diff --git a/docs/pr04.txt b/docs/pr04.txt
new file mode 100644 (file)
index 0000000..1c55c94
--- /dev/null
@@ -0,0 +1,171 @@
+
+Attributions
+Prev     Next
+
+-------------------------------------------------------------------------------
+
+Attributions
+
+AMANDA_2.4.x_-_System-Specific_Installation_Notes
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_Installation_Notes
+
+* James da Silva <jds@amanda.org> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+Excluding
+
+* Andrew Hall (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Indexing_with_AMANDA
+
+* Alan M. McIvor (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Backup_PC_hosts_using_Samba
+
+* Michael Zucchi <M.Zucchi@CIS.UniSA.Edu.Au> (Original text)
+* John R. Jackson <jrj@purdue.edu> (Updates)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Restore
+
+* Daniel Moore (Original text)
+* Alexandre Oliva <oliva@dcc.unicamp.br> (Substantial rewriting)
+* Murf (Corrections and additions)
+* Ralf Fassel (Corrections and additions)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_Tape_Changer_Support
+
+* James da Silva <jds@amanda.org> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+chg-scsi
+
+* Jason X (report real name to sgw@amanda.org) (Original version)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+RAIT_(Redundant_Array_of_Inexpensive_Tape)_Support
+
+* Marc Mengel (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Printing_of_Labels
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_on_Cygwin_HOWTO
+
+* Doug Kingston (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+How_to_use_the_AMANDA_file-driver
+
+* Stefan G. Weichinger <sgw@amanda.org> (Original text;XML-conversion;Updates)
+
+AFS_HOWTO
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Using_AMANDA
+
+* John R. Jackson <jrj@purdue.edu> (Original text)
+* Gavin Henry <ghenry@suretecsystems.com> (XML-conversion)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion, Updates)
+
+AMANDA_FAQ
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Collection_of_the_top_ten_AMANDA_questions._And_answers.
+
+* Stefan G. Weichinger <sgw@amanda.org> (Original text; Conversion to Docbook/
+  XML)
+
+AMANDA_WISHLIST
+
+* Jean-Louis Martineau <martinea@iro.umontreal.ca> (Additions and Updates)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion; Additions and Updates)
+
+AMANDA_Survey_Results
+
+* Jon LaBadie <jon@jgcomp.com> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+How_AMANDA_uses_UDP_and_TCP_ports
+
+* John R. Jackson <jrj@purdue.edu> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_dumper_API
+
+* Alexandre Oliva <oliva@dcc.unicamp.br> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_Internals
+
+* George Scott (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+AMANDA_Event_API
+
+* Mike Grupenhoff <kashmir@munge.com> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+AMANDA_Security_API
+
+* Mike Grupenhoff <kashmir@munge.com> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Virtual_Tape_API
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+Using_Kerberos_with_AMANDA
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Response_to_CPIO_Security_Notice_Issue_11:
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Upgrade_Issues
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+What_once_was_new
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion, Updates)
+
+Multitape_support_in_AMANDA_2.2
+
+* James da Silva <jds@amanda.org> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion;Updates)
+
+Thoughts_about_a_Strategy_API
+
+* Alexandre Oliva <oliva@dcc.unicamp.br> (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+Y2K_Compliancy
+
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion)
+
+Usage_of_floppy_tape_drives_on_Linux
+
+* Albrecht Gebhardt (Original text)
+* Stefan G. Weichinger <sgw@amanda.org> (XML-conversion,Updates)
+
+Web_Ressources
+
+* Stefan G. Weichinger <sgw@amanda.org> (Original text)
+
+-------------------------------------------------------------------------------
+
+Prev                    Up                   Next
+Copyright Information  Home  Part I. Installation
+
diff --git a/docs/rait.txt b/docs/rait.txt
new file mode 100644 (file)
index 0000000..7893fd0
--- /dev/null
@@ -0,0 +1,104 @@
+
+Chapter 10. RAIT (Redundant Array of Inexpensive Tape) Support
+Prev  Part II. About Tapes and Changers                   Next
+
+-------------------------------------------------------------------------------
+
+Chapter 10. RAIT (Redundant Array of Inexpensive Tape) Support
+
+
+Marc Mengel
+
+Original text<mengel@fnal.gov>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  What_is_a_RAIT?
+
+  Using_a_RAIT
+
+  Disaster_Recovery
+
+
+Note
+
+Refer to http://www.amanda.org/docs/rait.html for the current version of this
+document.
+Currently it is only integrated with the chg-manual changer script;
+collaboration on integrating it with the other tape changers is needed.
+
+ What is a RAIT?
+
+RAIT is an acronym for "Redundant Array of Inexpensive Tapes", where data is
+striped over several tape drives, with one drive writing an exclusive-or-sum of
+the others which can be used for error recovery. Any one of the data streams
+can be lost, and the data can still be recovered.
+This means that a 3-drive RAIT set will write 2 "data" streams and one "parity"
+stream, and give you twice the capacity, twice the throughput, and the square
+of the failure rate (i.e. a 1/100 failure rate becomes 1/10,000, since a
+double-tape failure is required to lose data).
+Similarly, a 5-drive RAIT set will give you 4 times the capacity, 4 times the
+throughput (with sufficient bus bandwidth), and the square of the failure rate.
+This means you can back up partitions as large as four times your tape size
+with AMANDA, with higher reliability and speed.
+
+ Using a RAIT
+
+If you have several tape devices on your system [currently either 3 or 5 drive
+sets are supported] you tell AMANDA to use them as a RAIT by listing them as a
+single tape device using /bin/csh curly-brace-and-comma notation, as in:
+
+       tapedev = "rait:/dev/rmt/tps0d{4,5,6}n"
+               
+
+which means that /dev/rmt/tps0d4n, /dev/rmt/tps0d5n, and /dev/rmt/tps0d6n are
+to be treated as a RAIT set. You can now mount three tapes, and label them with
+amlabel, etc.
+Also, you want to create a new tape-type entry, which lists an n-drive RAIT
+set, for this RAIT-set. So if you were using an entry like:
+
+       define tapetype EXB-8500 {
+           comment "Exabyte EXB-8500 drive on decent machine"
+           length 4200 mbytes
+           filemark 48 kbytes
+           speed 474 kbytes
+       }
+               
+
+You would want to make a new one like:
+
+
+       define tapetype EXB-8500x3 {
+           comment "Exabyte EXB-8500 3 drive stripe on decent machine"
+           length 8400 mbytes
+           filemark 200 kbytes
+           speed 948 kbytes
+       }
+               
+
+and change your tapetype entry to:
+
+       tapetype EXB-8500x3
+               
+
+to tell AMANDA about the multiple drive set.
+
+ Disaster Recovery
+
+To assist in disaster recovery (as well as changer scripts) the AMANDA package
+now also includes amdd, which is a simple dd(1) replacement which supports
+(only) the "if=xxx", "of=xxx", "bs=nnn[kMb]" "skip=nnn" and "count=nnn"
+options, but which can read and write RAIT tapesets.
+Using amdd and your usual AMANDA unpack instructions will suffice for disaster
+recovery from RAIT tape-sets.
+-------------------------------------------------------------------------------
+
+Prev                  Up                             Next
+Chapter 9. chg-scsi  Home  Chapter 11. Printing of Labels
+
diff --git a/docs/references.txt b/docs/references.txt
new file mode 100644 (file)
index 0000000..cfe07af
--- /dev/null
@@ -0,0 +1,22 @@
+
+Part VII. References
+Prev            Next
+
+-------------------------------------------------------------------------------
+
+
+References
+
+Table of Contents
+
+
+  34._Web_Ressources
+
+  35._The_AMANDA_Manual_Pages.
+
+-------------------------------------------------------------------------------
+
+Prev                                        Up                         Next
+Chapter 33. Usage of floppy tape drives on Home  Chapter 34. Web Ressources
+Linux 
+
diff --git a/docs/restore.txt b/docs/restore.txt
new file mode 100644 (file)
index 0000000..65290dd
--- /dev/null
@@ -0,0 +1,201 @@
+
+          Chapter 6. Restore
+Prev  Part I. Installation  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 6. Restore
+
+
+Daniel Moore
+
+Original text<dmoore@jeffco.k12.co.us>
+
+Alexandre Oliva
+
+Substantial rewriting
+AMANDA Core Team
+<oliva@dcc.unicamp.br>>
+
+Murf
+
+Corrections and additions<jam@philabs.research.philips.com>
+
+Ralf Fassel
+
+Corrections and additions<ralf@atg.venture.de>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/restore.html for the current version of
+this document.
+This document describes how to restore files backed up with AMANDA either with
+or without AMANDA tools.
+All these cases assume you're trying to restore a complete disk, that is,
+you've replaced the lost disk with a new one, or created a new filesystem on
+it. Tweaking with the arguments to restore (not amrestore), you will be able to
+restore individual files.
+Also, this text does not cover amrecover, a program that provides a text user
+interface similar to interactive restore (restore -i), but it allows you to
+select individual files to recover and automatically determines the tapes where
+they were stored. The backups must be performed with the `index' option enabled
+for this to work.
+I considered the following cases.
+The server machine (machine Aaron) runs solaris, the client machine (machine
+Barney) runs sunos.
+
+  1. Client machine fails, non-system critical.
+     Example: /home fails on Barney.
+     First, use amadmin to find the tapes most recently used to backup the
+     partition.
+
+       amadmin <config> info Barney '/home$'
+
+       Current info for Barney /home:
+         Stats: dump rates (kps), Full:   41.1,  33.1,  38.8
+                           Incremental:    9.5,   2.1,  24.7
+                 compressed size, Full:  63.1%, 54.0%, 52.9%
+                           Incremental:  43.7%, 15.5%, 47.8%
+         Dumps: lev datestmp  tape             file   origK   compK secs
+                 0  19971223  Barney01           16  329947  208032 5060
+                 1  19980108  Barney16            8    1977     864   91
+                 2  19971222  Barney06            7    1874     672   83
+                 3  19970926  Barney03           11   12273    3040  211
+
+     This tells us that we will need two tapes to do a full restore (Barney01,
+     Barney16). Note that, even if Barney06 and Barney03 are listed, they are
+     actually older than the full backup, so they should not be used to restore
+     any data.
+     Log into Barney. Cd to the /home directory. Insert the tape with the level
+     0 dump on it into the tape drive of Aaron.
+     Become super-user in the client host and run (replace <amanda> with the
+     username under which amanda runs):
+
+       rsh -n -l <amanda> Aaron amrestore -p /dev/rmt/0cn Barney '/home\$' |
+       restore -ivbf 2 -
+
+     This requires client root to have login access to <amanda>@Aaron, with a
+     .rhosts entry (.amandahosts won't do). If you use ssh, you may be able to
+     type a password in order to be authenticated. Another alternative is to
+     start the operation in the server, and rsh to the client. You should be
+     the amanda user or root in the tape server and run:
+
+       amrestore -p /dev/rmt/0cn Barney '/home$' |
+       rsh Barney -l root /usr/etc/restore -ivbf 2 -
+
+     If you don't want to use rsh at all, you may run:
+
+       amrestore /dev/rmt/0cn Barney '/home$'
+
+     This should create a file whose name contains the hostname, directory
+     name, dump level and dump date of the backup. Now you have to move this
+     file to the client somehow: you may use NFS, rcp, ftp, floppy disks :-),
+     whatever. Suppose you rename that file to `home.0'. Then, on the client,
+     you should become root and run:
+
+       restore -ivbf 2 home.0
+
+     Repeat one of these steps, incrementing the level of the dump, until there
+     are no more available backups.
+  2. Client machine fails, system critical disk.
+     Example: / fails on Barney.
+     First of all, boot off the CD, and reinstall the system critical
+     partition, restoring it to vendor supplied state. Then, go through all of
+     Scenario 1.
+  3. Server machine fails, non-system critical, non-AMANDA disk.
+     Proceed just as described in Scenario 1. However, you won't have to go
+     through the rsh process, because you can just use amrestore to replace the
+     lost data directly.
+  4. Server machine fails, system critical, non-AMANDA disk.
+     Example: / on Aaron
+     First of all, boot off the CD, and reinstall the system critical
+     partition, restoring it to vendor supplied state.
+     Then, follow steps in Scenario 3.
+  5. Server machine fails, non-system critical, AMANDA disk, with db.
+     Example: /opt on Aaron
+     If the disk that contains the AMANDA database is toast, then you need to
+     rebuild the database. The easiest way to do it is to take the text file
+     that you had mailed to you via the 'amadmin export' command, and import
+     via the 'amadmin import' command. Then you should be able to follow the
+     steps outlined in Scenario 4.
+     Note that AMANDA does not mail the exported database automatically; you
+     may add this to the crontab entry that runs amanda.
+     Maybe it's a good idea to print out the text files as well and store the
+     last 2 dumpcycles worth of paper (the disc text files might have got
+     toasted as well). From the paper you still are able to reconstruct where
+     your discs are.
+  6. Server machine fails, non-system critical, AMANDA disk, with binaries.
+     Example: /usr/local on Aaron
+     This is where things get hairy. If the disk with the amanda binaries on it
+     is toast, you have three options.
+
+       i. reinstall the AMANDA binaries from another tape, on which you have
+          conveniently backed up the binaries within the last couple of weeks
+          (not using AMANDA).
+      ii. recompile AMANDA, making sure not to overwrite your db files.
+     iii. use dd to read AMANDA formatted tapes. This is the option I am going
+          to explore most fully, because this seems the most likely to occur.
+
+            a. Find out the device name used by AMANDA, by looking in
+               amanda.conf. Turns out to be /dev/rmt/0cn for this system.
+               If amanda.conf isn't at hand: this must be a non-rewinding tape
+               device specifier (which I believe the trailing `n' stands for).
+            b. Look over the copy of the output of 'amadmin <config> export',
+               and find out which tapes /usr/local was backed up on.
+            c. Grab the tapes that /opt was backed up on, and stick the level 0
+               into the drive. cd to /usr/local.
+            d. Skip the first record, which is just the tape header, by using
+               the appropriate tape command.
+
+                 mt -f /dev/rmt/0cn fsf 1
+
+            e. Now you want to start looking for /usr/local on this tape.
+
+                 dd if=/dev/rmt/0cn bs=32k skip=1 | gzip -d | /usr/sbin/
+                 ufsrestore -ivf -
+
+               This command gives us an interactive restore of this record,
+               including telling us what partition, what host, and what level
+               the backup was. The gzip -d portion of the pipe can be omitted
+               if there was no compression.
+            f. If you don't find /usr/local on the first try, quit ufsrestore,
+               and move forward one record.
+
+                 mt -f /dev/rmt/0cn fsf 1
+
+               and try the dd/restore command shown above. Do this until you
+               find /opt on the disk.
+               Another possibility: quick and dirty tape index in case you
+               don't know which partition /usr/local was on: (from
+               <ralf@atg.venture.de>)
+
+                 #!/bin/sh
+                 TAPEDEV=/dev/nrtape
+                 while mt -f $TAPEDEV fsf 1 ; do
+                   dd if=$TAPEDEV bs=32k count=1 | head -1
+                   sleep 1
+                 done
+
+               Example output:
+
+                 AMANDA: FILE 19971220 uri /root-sun4 lev 1 comp .gz program
+                 DUMP
+                 AMANDA: FILE 19971220 uri /misc lev 1 comp .gz program DUMP
+                 AMANDA: FILE 19971220 uri / lev 1 comp .gz program DUMP
+
+            g. Restore the AMANDA binaries (what else do you need??), and then
+               bail out of ufsrestore. You can use amrestore, as in Scenario 3.
+
+
+
+-------------------------------------------------------------------------------
+
+Prev                                     Up                                Next
+Chapter 5. Backup PC hosts using Samba  Home  Part II. About Tapes and Changers
+
diff --git a/docs/samba.txt b/docs/samba.txt
new file mode 100644 (file)
index 0000000..16957c4
--- /dev/null
@@ -0,0 +1,188 @@
+
+Chapter 5. Backup PC hosts using Samba
+Prev  Part I. Installation        Next
+
+-------------------------------------------------------------------------------
+
+Chapter 5. Backup PC hosts using Samba
+
+
+Michael Zucchi
+
+Original text
+School of Computer and Information Science University of South Australia
+<M.Zucchi@CIS.UniSA.Edu.Au>
+
+John R. Jackson
+
+Updates
+AMANDA Core Team
+<jrj@purdue.edu>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Installation
+
+  Setup
+
+  Example
+
+  Bugs_and_notes
+
+
+Note
+
+Refer to http://www.amanda.org/docs/samba.html for the current version of this
+document.
+
+ Installation
+
+AMANDA is able to back up Microsoft Windows shared disks by using Samba, a
+package that implements a SMB client and server for Unix:
+http://www.samba.org
+
+Note
+
+This is old stuff and will be (re)moved soon:
+Releases from 1.9.18p5 up to 1.9.18p10 logged information in the tar files
+produced, making them unusable! If you really must use a release prior to Samba
+2.0.6, a patch that fixes the problem is available in the AMANDA patches page:
+http://www.amanda.org/patches/
+AMANDA no longer supports Samba releases prior to 1.9.18. If you're using Samba
+from 1.9.18 through 1.9.18p3, make sure you don't set a low logging/debugging
+level in smb.conf. This flag may prevent estimate sizes from printing correctly
+and AMANDA will report an estimate failure.
+This problem may also occur if you have large (>2GB) shares with Samba prior to
+2.0.4. In this case, apply samba2-largefs.patch from the AMANDA patches page
+(http://www.amanda.org/patches/).
+After building and installing Samba, AMANDA must be configured with support for
+smbclient. AMANDA will automatically find smbclient if it is in your PATH when
+you run configure, or you may add the following argument:
+
+  --with-smbclient=/full/path/to/smbclient
+
+
+ Setup
+
+Once AMANDA and Samba are installed, the only difference between a Unix client/
+disk and PC client/share is in how the backup disks are specified in the file
+disklist. For each PC share, the entry lists the 'samba server' host (where the
+patched Samba software is installed) and the disk field is the share name. The
+remaining fields are like any other DLE.
+A user must be created on the PC with full access rights (read/write) to the
+share. AMANDA, via the Samba server, will connect to the PC via this user. If
+the user does not have full access, incremental backups will not work and the
+whole share will be backed up every time (the archive bits are never reset).
+The file /etc/amandapass must be created by hand. It contains share name to
+user name, password and workgroup mapping. Each line consists of two or three
+fields, separated by whitespace:
+
+* Share name followed by optional directory.
+  You have to use forward slashes (/), not backslashes (\). This must match the
+  disklist entry exactly (case sensitive). This may be asterisk (*) to match
+  all remaining shares for this Samba server. The first match in the file is
+  used, so specific entries must be listed first. The directory is appended to
+  the share name as full MS network path. Like //thepc/c$/mydir. No blanks are
+  allowed in directory!
+* User name and password.
+  Separated by a percent sign (%). See the description of the -U option in the
+  manpage of smbclient. No whitespace is allowed in either the user name or
+  password.
+* Workgroup (optional).
+
+This file must be owned by the AMANDA-user, and disallow world access
+privileges. Blank lines are ignored. A "#" on a line at the start of a field
+(including start of line) causes the rest of the line to be ignored.
+
+ Example
+
+The AMANDA client software and (patched) Samba is installed on host "pcserver".
+A share to be backed up called "backupc" is on PC "thepc". The share will be
+accessed via PC user "bozo" and password "f00bar" and does not require a
+workgroup.
+The entry in the file disklist is:
+
+  pcserver     //thepc/backupc         nocomp-user-gnutar
+
+  ^ samba installed unix host
+                  ^ pc host and share name
+                                       ^ dumptype must include the tar option
+
+In /etc/amandapass on the machine 'pcserver':
+
+  //thepc/backupc              bozo%f00bar
+
+If smbclient requires a workgroup specification (-W), you may add it as a third
+argument in the line in the file /etc/amandapass :
+
+  //thepc/backupc              bozo%f00bar     NTGROUP
+
+This will cause smbclient to be invoked with -W NTGROUP.
+An example dumptype in amanda.conf would be:
+
+  define dumptype nocomp-user-gnutar {
+      program "GNUTAR"
+      comment "user partitions dumped with tar and no compression"
+      options no-compress
+      priority medium
+  }
+
+Essentially, the entry in disklist is a 'pseudo-disk' which contains all the
+relevant information needed by smbclient to backup the disk, but in a way that
+is compatible to AMANDA.
+amcheck does a quick check to see if smbclient exists and tries to connect to
+the PC clients. It also checks for the existence and permissions of /etc/
+amandapass.
+
+ Bugs and notes
+
+Samba will not back up open files (such as PAGEFILE.SYS and registry files) nor
+Access Control List data. Furthermore, at restore time, smbclient is unable to
+overwrite read-only files. Hence, AMANDA+Samba is not a perfect solution for
+backing up (restoring, actually) system disks.
+Samba does not use the Windows Backup API, so configuring the AMANDA backup
+user as a member of group backup on the Windows host is useless. You will
+probably have to configure it as an Administrator, and make sure it can read
+and change permission of all files in the share.
+It seems impossible to detect when a per-user based login fails, e.g. the
+username doesn't have sufficient access. It connects but cannot see any files
+(e.g. backups do nothing). The selfcheck code isn't particularly robust in this
+area either, so you may get no warnings when a disk isn't being backed up. Just
+check to see that level 0 dumps are bigger than 64K, otherwise it means the
+backup was empty.
+The estimate and totals are probably a bit off since tar pads to the nearest
+512 bytes after each file (I think). Not sure how much of a problem this is.
+smbclient only supports excluding a single file from the command line, not a
+file of patterns like GNU tar. So "exclude" is supported from a dumptype but
+not "exclude list".
+
+Note
+
+Also the new option "exclude append" is not yet supported with smbclient.
+
+Note
+
+Since Samba-3.0.2a smbclient supports multiple exclusion-patterns. It is one of
+the "Ongoing Projects" to make use of this in AMANDA. Refer to http://
+www.amanda.org/ongoing.php for details.
+The size estimate calculation does not use the same method as the dump, so it
+may be inaccurate. It also does not support any type of exclusion ("exclude" is
+ignored). Things are done this way because doing a simulated dump to /dev/null,
+like other dump programs, would take forever with current implementations of
+Samba.
+If you compile with support for smbclient, GNU-tar support is automatically
+enabled. If you aren't using the GNU-tar part, you may get warnings about the
+availability of /usr/local/bin/gtar (or whatever it was compiled with). These
+may safely be ignored, unless you enable index generation for those
+filesystems.
+-------------------------------------------------------------------------------
+
+Prev                              Up                 Next
+Chapter 4. Indexing with AMANDA  Home  Chapter 6. Restore
+
diff --git a/docs/security-api.txt b/docs/security-api.txt
new file mode 100644 (file)
index 0000000..8184b97
--- /dev/null
@@ -0,0 +1,447 @@
+
+      Chapter 24. AMANDA Security API
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 24. AMANDA Security API
+
+
+Mike Grupenhoff
+
+Original text
+AMANDA Core Team
+<kashmir@munge.com>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  The_Problem
+
+  The_API
+
+
+        protocol_packet_transmission_functions
+
+        stream_functions
+
+
+  Data_Types
+
+
+        security_driver_t
+
+        security_handle_t
+
+        security_stream_t
+
+        security_status_t
+
+
+  SECURITY_DRIVERS
+
+
+        name
+
+        connect
+
+        accept
+
+        close
+
+        sendpkt
+
+        recvpkt
+
+        recvpkt_cancel
+
+        stream_server
+
+        stream_accept
+
+        stream_client
+
+        stream_close
+
+        stream_auth
+
+        stream_id
+
+        stream_write
+
+        stream_read
+
+        stream_read_cancel
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/security-api.html for the current version
+of this document.
+
+ Introduction
+
+This is a document of the API for defining and utilizing multiple security and
+transport mechanisms for the AMANDA network protocol.
+The goal of this API is to allow several different forms of communication and
+authentication to exist between the AMANDA server and its clients.
+
+ The Problem
+
+There exist many potential ways that a user might wish to grant access to the
+AMANDA daemon. The two currently supported are BSD (reserved port) and Kerberos
+IV security. The current implementation of these two methods is not very
+general, and adding additional methods requires a large amount of code to be
+modified.
+Additionally, the current methods require the protocol and dump transport to be
+transmitted across the network using a pre-defined method. The AMANDA protocol
+currently must be sent using udp datagrams to a well-known port, and the dumps
+are transported using tcp connections between ports negotiated via the
+protocol.
+
+ The API
+
+The security API was designed to be a layer in between the core logic of AMANDA
+and the transport and authentication of the protocol and dumps.
+The component server and client programs now deal with abstract concepts
+instead of concrete udp and tcp handles.
+The prefix "security_" is reserved for use as the namespace of this API.
+
+ protocol packet transmission functions
+
+These functions exist for transmitting pkt_t's between the client and server.
+These functions operate on security_handle_t objects. These objects are
+described later.
+
+ security_getdriver
+
+const security_driver_t *security_getdriver(const char *drivername);
+Given a security type ("KRB4", "BSD", "SSH", etc), returns a pointer to that
+type's security_driver_t (section 4.1), or NULL if no driver exists.
+
+ security_connect
+
+void security_connect(const security_driver_t *h, const char *hostname, char *
+(*conf_fn)(char *arg, void *arg), void (*fn)(void *arg, security_handle_t *h,
+security_status_t s), void *arg);
+Given a security driver, and a hostname, calls back with a security_handle_t
+(section 4.2) that can be used to communicate with that host. The status arg to
+the callback is reflects the success of the request. Error messages can be had
+via security_geterror().
+This is expected to be the AMANDA server's interface for setting up connections
+to clients.
+conf_fn is used to determine configuration information. If NULL, no
+configuration information is available.
+
+ security_accept
+
+void security_accept(const security_driver_t *h, int in, int out, void
+(*callback)(security_handle_t *, pkt_t *));
+Given a security driver, an input file descriptor, and an output file
+descriptor, and a callback, when new connections are detected on the given file
+descriptors, the function is called with a newly created security handle and
+the initial packet received.
+This is expected to be the AMANDA daemon's interface for setting up incoming
+connections from the AMANDA server. The file descriptors are typically 0 and 1
+(stdin/stdout).
+This function uses the event interface, and only works properly when event_loop
+() is called later in the program.
+
+ security_close
+
+void security_close(security_handle_t *h);
+Closes a connection created by a security_connect() or security_accept().
+
+ security_sendpkt
+
+int security_sendpkt(security_handle_t *h, const pkt_t *pkt);
+Transmits a pkt_t over a security handle. Returns 0 on success, or negative on
+error. A descriptive error message can be obtained via security_geterror().
+
+ security_recvpkt
+
+int security_recvpkt(security_handle_t *h, void (*callback)(void *arg, pkt_t
+*pkt, security_status_t), void *arg, int timeout);
+Requests that when incoming packets arrive for this handle, the given function
+is called with the given argument, the received packet, and the status of the
+reception.
+If a packet does not arrive within the number of seconds specified in the
+'timeout' argument, RECV_TIMEOUT is passed in the status argument of the
+timeout.
+On receive error, the callback's status argument will be set to RECV_ERROR. An
+error message can be retrieved via security_geterror().
+On successful reception, RECV_OK will be passed in the status argument, and the
+pkt argument will point to a valid packet.
+This function uses the event interface. Callbacks will only be generated when
+event_loop() is called.
+
+ security_recvpkt_cancel
+
+int security_recvpkt_cancel(security_handle_t *h);
+Cancels a previous recvpkt request for this handle.
+
+ security_geterror
+
+const char *security_geterror(security_handle_t *h);
+Returns a descriptive error message for the last error condition on this
+handle.
+
+ security_seterror
+
+void security_seterror(security_handle_t *h, const char *msg, ...);
+Sets the string that security_geterror() returns.
+
+ security_handleinit
+
+void security_handleinit(security_handle_t *, const security_driver_t *);
+Initializes a security_handle_t. This is meant to be called only by security
+drivers to initialize the common part of a newly allocated security_handle_t.
+
+ stream functions
+
+These functions exist for transmitting random data over a stream-like
+connection.
+These functions operate on security_stream_t objects, which are described
+later.
+
+ security_stream_server
+
+security_stream_t *security_stream_server(security_handle_t *h);
+Creates the server end of a security stream, and will receive a connection from
+the host on the other end of the security handle passed.
+Returns a security_stream_t on success, and NULL on error. Error messages can
+be obtained by calling security_geterror() on the security handle associated
+with this stream.
+
+ security_stream_accept
+
+int security_stream_accept(security_stream_t *);
+Given a security stream created by security_stream_server, blocks until a
+connection is made from the remote end.
+Returns 0 on success, and -1 on error. Error messages can be obtained by
+calling security_stream_geterror().
+
+ security_stream_client
+
+security_stream_t *security_stream_client(security_handle_t *h, int id);
+Creates the client end of a security stream, and connects it to the machine on
+the other end of the security handle. The 'id' argument identifies which stream
+on the other end to connect to.
+Returns a security_stream_t on success, and NULL on error. Error messages can
+be obtained by calling security_geterror() on the security handle associated
+with this stream.
+
+ security_stream_close
+
+void security_stream_close(security_stream_t *s);
+Closes a security stream and frees up resources associated with it.
+
+ security_stream_auth
+
+int security_stream_auth(security_stream_t *s);
+Authenticate a connected security stream.
+Returns 0 on success, and -1 on error. Error messages can be obtained by
+calling security_stream_geterror().
+
+ security_stream_id
+
+int security_stream_id(security_stream_t *s);
+Returns an identifier which can be used to connect to this security stream with
+security_stream_client().
+Typical usage would be for one end of a connection to create a stream with
+security_stream_server(), and then transmit the id for that stream to the other
+side. The other side will then connect to that id with security_stream_client
+().
+
+ security_stream_write
+
+int security_stream_write(security_stream_t *s, const void *buf, size_t
+bufsize);
+Writes a chunk of data to the security stream. Returns 0 on success, or
+negative on error. Error messages can be obtained by calling
+security_stream_geterror().
+
+ security_stream_read
+
+void security_stream_read(security_stream_t *s, void (*callback)(void *arg,
+void *buf, int bufsize), void *arg);
+Requests that when data is ready to be read on this stream, the given function
+is called with the given arg, a buffer full of data, and the size of that
+buffer.
+On error, the bufsize will be negative. An error message can be retrieved by
+calling security_stream_geterror().
+This function uses the event interface. Callbacks will only be generated while
+in event_loop().
+
+ security_stream_read_cancel
+
+void security_stream_read_cancel(security_stream_t *s);
+Cancels a previous read request.
+
+ security_stream_geterror
+
+const char *security_stream_geterror(security_stream_t *h);
+Returns a descriptive error message for the last error condition on this
+stream.
+
+ security_stream_seterror
+
+void security_stream_seterror(security_stream_t *h, const char *msg, ...);
+Sets the string that security_stream_geterror() returns.
+
+ Data Types
+
+All visible data types are meant to be opaque to the caller. At no time should
+a caller have to access a member of any data type directly. The API should
+always be used instead.
+
+ security_driver_t
+
+This is a static object containing function vectors that implement the API for
+a particular security type.
+
+ security_handle_t
+
+This is an object that describes a protocol connection to a remote server.
+There is one security_handle_t per request, and there can be many to the same
+remote host.
+
+ security_stream_t
+
+This is an object that describes a data connection to a remote host. It is
+always associated and derived from a security_handle_t. Arbitrary data can be
+passed over a security stream.
+
+ security_status_t
+
+This is an enumerated type that is passed to the callback of security_recvpkt
+and security_connect. The possible values it can have are:
+S_OK - the pkt_t was received fine S_TIMEOUT - no pkt_t was received within the
+time specified in the timeout argument to security_recvpkt(). S_ERROR - an
+error occurred during reception. Call security_geterror() for more information.
+
+ SECURITY DRIVERS
+
+Each security type is defined by a struct of function vectors. These methods
+implement the details of this security type.
+This section will document each element of security_driver_t.
+
+ name
+
+const char *name;
+This is the name of the driver. This is used by security_getdriver() to
+associate a name with a driver type.
+
+ connect
+
+void (*connect)(const char *hostname, void (*fn)(void *, security_handle_t *,
+security_status_t), void *);
+This is the implementation of security_connect(). It actually sets up the
+connection, and then returns a structure describing the connection. The first
+element of this structure MUST be a security_handle_t, because it will be cast
+to that after it is passed up to the caller.
+The first argument is the host to connect to. The second argument is a function
+to call when a connection is made. The third argument is passed to the
+callback.
+The callback takes three arguments. The first is the caller supplied void
+pointer. The second is a newly allocated security handle. The third is a
+security_status_t flag indicating the success or failure of the operation.
+
+ accept
+
+void (*accept)(int in, int out, void (*callback)(security_handle_t *handle,
+pkt_t *pkt));
+This is the implementation of security_accept(). It is passed the input and
+output file descriptors and a callback. The callback takes a security handle
+argument and also an initial packet received for that handle.
+
+ close
+
+void (*close)(void *handle);
+The implementation of security_close().
+
+ sendpkt
+
+int (*sendpkt)(void *handle, pkt_t *pkt);
+The implementation of security_sendpkt(). Security information is usually added
+by the driver before transmission.
+
+ recvpkt
+
+void (*recvpkt)(void *handle, void (*callback)(void *arg, pkt_t *pkt,
+security_status_t), void *arg);
+The implementation of security_recvpkt(). It will typically be layered onto the
+event interface somehow. It can assume that a caller will eventually call
+event_loop().
+
+ recvpkt_cancel
+
+void (*recvpkt_cancel)(void *handle);
+The implementation of security_recvpkt_cancel(). Drivers should allow this to
+be run even if no recvpkt was scheduled, or if one was previously cancelled.
+
+ stream_server
+
+void *(*stream_server)(void *handle);
+Implementation of security_stream_server(). This function returns a object
+describing the stream. The first member of this object MUST be a
+security_stream_t, because it will be cast to that.
+
+ stream_accept
+
+int (*stream_accept)(void *stream);
+After calling stream_server, stream_accept must be called on the stream before
+it is fully connected.
+
+ stream_client
+
+void *(*stream_client)(void *handle, int id);
+Implementation of security_stream_client(). The id argument is something
+returned by security_stream_id(). Again, the handle is referenced counted.
+This function returns a object describing the stream. The first member of this
+object MUST be a security_stream_t, because it will be cast to that.
+
+ stream_close
+
+void (*stream_close)(void *stream);
+Close and free up resources for an open stream.
+
+ stream_auth
+
+int (*stream_auth)(void *stream);
+Authenticate a connected stream.
+
+ stream_id
+
+int (*stream_id)(void *stream);
+Return a unique id for this stream. This is to be used by stream_client() to
+connect to this stream.
+
+ stream_write
+
+int (*stream_write)(void *stream, const void *buf, size_t bufsize);
+Implementation of security_stream_write.
+
+ stream_read
+
+void (*stream_read)(void *stream, void (*callback)(void *arg, void *buf, int
+bufsize), void *arg);
+Implementation of security_stream_read.
+
+ stream_read_cancel
+
+void (*stream_read_cancel)(void *stream);
+Implementation of security_stream_read_cancel.
+-------------------------------------------------------------------------------
+
+Prev                           Up                           Next
+Chapter 23. AMANDA Event API  Home  Chapter 25. Virtual Tape API
+
diff --git a/docs/security.txt b/docs/security.txt
new file mode 100644 (file)
index 0000000..e3d5803
--- /dev/null
@@ -0,0 +1,79 @@
+
+Chapter 27. Response to CPIO Security Notice Issue 11:
+Prev  Part VI. Historical files                   Next
+
+-------------------------------------------------------------------------------
+
+Chapter 27. Response to CPIO Security Notice Issue 11:
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Affected_Versions
+
+  Workaround
+
+  Acknowledgements
+
+
+Note
+
+Refer to http://www.amanda.org/docs/security.html for the current version of
+this document.
+The AMANDA development team confirms the existence of the amrecover security
+hole in recent versions of AMANDA. We have made a new release, AMANDA 2.4.0b5,
+that fixes the amrecover problem and other potential security holes, and is the
+product of a security audit conducted in conjunction with the OpenBSD effort.
+The new version is available at:
+ftp://ftp.amanda.org/pub/amanda/amanda-2.4.0b5.tar.gz
+Here's some more information about the amrecover problem to supplement the
+information given in the CPIO Security Notice:
+
+ Affected Versions
+
+The AMANDA 2.3.0.x interim releases that introduced amrecover, and the 2.4.0
+beta releases by the AMANDA team are vulnerable.
+AMANDA 2.3.0 and earlier UMD releases are not affected by this particular bug,
+as amrecover was not part of those releases. However, earlier releases do have
+potential security problems and other bugs, so the AMANDA Team recommends
+upgrading to the new release as soon as practicable.
+
+ Workaround
+
+At an active site running AMANDA 2.3.0.x or 2.4.0 beta, amrecover/ amindexd can
+be disabled by:
+
+* removing amandaidx and amidxtape from /etc/inetd.conf
+
+
+* restarting /etc/inetd.conf (kill -HUP should do)
+
+This will avoid this particular vulnerability while continuing to run backups.
+However, other vulnerabilities might exist, so the AMANDA Team recommends
+upgrading to the new release as soon as practicable.
+
+ Acknowledgements
+
+This release (2.4.0) has addressed a number of security concerns with the
+assistance of Theo de Raadt, Ejovi Nuwere and David Sacerdote of the OpenBSD
+project. Thanks guys! Any problems that remain are our own fault, of course.
+The AMANDA Team would also like to thank the many other people who have
+contributed suggestions, patches, and new subsystems for AMANDA. We're grateful
+for any contribution that helps us achieve and sustain critical mass for
+improving AMANDA.
+-------------------------------------------------------------------------------
+
+Prev                        Up                         Next
+Part VI. Historical files  Home  Chapter 28. Upgrade Issues
+
diff --git a/docs/strategy-api.txt b/docs/strategy-api.txt
new file mode 100644 (file)
index 0000000..22bde26
--- /dev/null
@@ -0,0 +1,65 @@
+
+Chapter 31. Thoughts about a Strategy API
+Prev  Part VI. Historical files      Next
+
+-------------------------------------------------------------------------------
+
+Chapter 31. Thoughts about a Strategy API
+
+
+Alexandre Oliva
+
+Original text
+AMANDA Core Team
+<oliva@dcc.unicamp.br>>
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/strategy-api.html for the current version
+of this document.
+
+  Subject: STRATEGY API (was: Re: spelunking)
+  From: Alexandre Oliva <oliva@dcc.unicamp.br>
+  Date: 03 Oct 1998 02:44:47 -300
+
+  Doug Hughes <Doug.Hughes@Eng.Auburn.EDU> writes:
+
+  > I'm going to (try to) modify the amanda stuff such that there is a new
+  > parameter called dumplevel available in dumptype. That way I can fix
+  > the dump level at whatever I want (5 or 9 when I need to), without
+  > having to worry about whether it's going to try and skip a 0 and miss
+  > a dump, or try to do a 1, or whatever.
+
+  Now that you mention that, it comes to my mind that the current
+  mechanism to define backup strategies is too limited, and we could try
+  to improve it just like we are going to do with the DUMPER API.
+
+  We could define a STRATEGY API, that planner would use to:
+
+  1) define a set levels and/or dates for which estimates should be requested
+
+  2) select a subset of the estimate results that planner can choose
+
+  and driver would run to inform that a backup has succeeded, after
+  having updated the database.
+
+  I haven't fully analysed the implications of this choice, but it looks
+  quite feasible and very useful.  Opinions?  Requests of clarification?
+  Random flames? :-)
+
+  Anyone willing to pursue this issue?
+
+  --
+  Alexandre Oliva
+
+-------------------------------------------------------------------------------
+
+Prev                                          Up                         Next
+Chapter 30. Multitape support in AMANDA 2.2  Home  Chapter 32. Y2K Compliancy
+
diff --git a/docs/survey.txt b/docs/survey.txt
new file mode 100644 (file)
index 0000000..d362fa3
--- /dev/null
@@ -0,0 +1,623 @@
+
+     Chapter 19. AMANDA Survey Results
+Prev  Part IV. Various Information  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 19. AMANDA Survey Results
+
+
+Jon LaBadie
+
+Original text
+AMANDA Core Team
+<jon@jgcomp.com>
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/survey.html for the current version of this
+document.
+
+Note
+
+This chapter still needs much more formatting, there are many tables and lists,
+that need to get added. Volunteers welcome. sgw, April, 2005.
+
+Introduction
+
+AMANDA (Advanced Maryland Automatic Network Disk Archiver) is a backup system
+freely available available in source form. For more information about AMANDA
+visit the website http://www.amanda.org.
+Readers of the amanda-users mailing list (approximately 1100 subscribers) were
+asked in April of 2003 to describe their use of the backup system by filling
+out a survey questionnaire that was posted to the mailing list weekly. Seventy
+two (72) surveys were submitted during the month-long collection period.
+In several postings that follow, I will report summaries of the collected data.
+In some cases I've included comments (Surveyor's Notes) of my own reaction to
+the data.
+Later, I plan to recast these results in the form of questions and answers to
+add to the FOM (FAQ-O-Matic) at amanda.org. Should you have any thoughts on
+this please let me know via the list or personal email.
+Jon LaBadie
+<jon@jgcomp.com>
+
+Note
+
+[Surveyor's Note] While the number of submitted surveys neither surprised me,
+nor disappointed me, what did greatly disappoint me personally was this fact:
+Of the twenty five (25) individuals most active on the list (based on number of
+postings for 12 months), only seven (7) bothered to respond to the survey.
+
+Organizations
+
+What follows is a summarization of the responses describing the organizations
+using AMANDA.
+ _____________________________________________________________________________
+|Types_of_organizations_using_AMANDA|___|_____________________________________|
+|Category___________________________|Num|Type_________________________________|
+|University_Department______________|20_|_____________________________________|
+|Research_Organizations_____________|10_|medical,_scientific,_engineering,____|
+|___________________________________|___|oceanography,_statistical,_behavioral|
+|Internet_Service_Providers_________|5__|_____________________________________|
+|Data Processing Services           |11 |software, graphics, integration,     |
+|___________________________________|___|consulting___________________________|
+|Manufacturers (DP)                 |5  |computers, electronics,              |
+|___________________________________|___|semiconductors_______________________|
+|Manufacturers_(non-DP)_____________|4__|rubber,_chemical,_turbine,_video_____|
+|Government_Related_________________|3__|federal,_local,_public_defender______|
+|Service Organizations              |4  |publishing, power utility, forestry, |
+|___________________________________|___|money_management_____________________|
+|Small_Office/Home_Office___________|6__|_____________________________________|
+|Others                             |3  |natural history museum, education    |
+|___________________________________|___|charity,_national_opera_and_ballet.__|
+
+
+Note
+
+[Surveyor's Note] The `Categories' were my grouping, they were not on the
+survey. I expected more in the SOHO category.
+
+Note
+
+[Surveyor's Note] Extent of AMANDA usage was asked on the survey. Few indicated
+that their entire firm based their backups on AMANDA, and then only relatively
+small companies (like JG Computing :). Thus the category is `University
+Department' not `University'. Similarly, AMANDA is used by a groups within
+organizations like the chemical manufacturer or computer manufacturer or
+federal government noted above, not the entire entity. But AMANDA may have
+helped produce the tires you are riding on, the workstation you are typing on,
+or to collect the taxes you pay :))
+ _________________________________________________
+|Location_of_organizations_using_AMANDA___________|
+|1_Belgium|1_Japan_______________|2_Poland________|
+|1_Canada_|1_Mexico______________|2_Switzerland___|
+|1_Estonia|1_Norway______________|3_Sweden________|
+|1_Finland|1_Portugal____________|5_Germany_______|
+|1_France_|1_United_Arab_Emirates|5_United_Kingdom|
+|1_Italy__|2_The_Netherlands_____|45_United_States|
+
+
+Note
+
+[Surveyor's Note] The totals are greater than number of submitted surveys as
+some respondents described multi-national installations.
+
+Note
+
+[Surveyor's Note] Americans must be procrastinators. For a while, the number of
+non-US submitted surveys exceeded the ones from the US.
+ _________________________________________
+|Length_of_AMANDA_usage_at_organization|__|
+|0_-_1_years___________________________|25|
+|1_-_2_years___________________________|8_|
+|2_-_3_years___________________________|13|
+|3_-_4_years___________________________|10|
+|4_-_5_years___________________________|8_|
+|5_-_6_years___________________________|2_|
+|7_-_8_years___________________________|2_|
+|8_-_9_years___________________________|2_|
+|9+_years______________________________|1_|
+|10%_of_responders_>_5_years_use_______|__|
+|33%_of_responders_>_3_years_use_______|__|
+|50%_of_responders_>_2_years_use_______|__|
+|33%_of_responders_<_1_year_use________|__|
+
+Mean and Median are ~29 months (2.5 years)
+
+Note
+
+[Surveyor's Note] Some really long time users of AMANDA. It must do the job.
+
+Servers and Clients
+
+
+AMANDA servers
+
+ _________
+|Number|__|
+|1_____|53|
+|2_____|11|
+|3_____|5_|
+|5_____|1_|
+|6_____|1_|
+|7_____|1_|
+
+Table 19.1. Operating Systems Running on AMANDA Server Hosts
+ _____________________________________
+|FreeBSD:_______|Total_10,_including__|
+|2______________|4-STABLE_____________|
+|1______________|4.7__________________|
+|1______________|4x___________________|
+|HP-UX:_________|Total_2,_including___|
+|1______________|10.20________________|
+|1______________|11.00________________|
+|Irix:__________|Total_2,_including___|
+|1______________|6.5__________________|
+|SCO_Openserver:|Total_1,_including___|
+|1______________|5.0.6________________|
+|Solaris:_______|Total_14,_including__|
+|5______________|8____________________|
+|1______________|8_x86________________|
+|3______________|9____________________|
+|Tru64:_________|Total_4,_including___|
+|2______________|5.1__________________|
+|Linux:_________|Total_48,_including__|
+|13_____________|Debian_Total_________|
+|1______________|2.4__________________|
+|2______________|3.0__________________|
+|3______________|Woody________________|
+|14_____________|RedHat_Total_________|
+|1______________|6.2__________________|
+|2______________|7.1__________________|
+|1______________|7.2__________________|
+|6______________|7.3__________________|
+|3______________|8.0__________________|
+|1______________|8.0_with_RHNet_kernel|
+|1______________|Slackware_Total______|
+|1______________|7____________________|
+|3______________|SuSE_Total___________|
+|2______________|8.1__________________|
+
+
+AMANDA Versions Run on Server Hosts
+
+2.4.1: Total 2, including
+1 2.4.1p1
+2.4.2: Total 33, including
+1 2.4.2p1
+28 2.4.2p2
+2.4.3: Total 21, including
+1 2.4.3b2
+1 2.4.3b3
+2 2.4.3b4
+2.4.4: Total 21, including
+2 2.4.4-20030415
+1 2.4.4-20030426
+[Surveyor's Note] The percentage of older versions surprised me.
+Shouldn't have as I just upgraded 2 months ago. If it works why fix it?
+
+AMANDA CLIENTS
+
+
+Number of AMANDA Clients
+
+client num.
+hosts sites
+14
+25
+36
+46
+57
+a6-1012
+b11-2013
+21-3012
+31-505
+61-704
+
+Operating Systems Run on AMANDA Clients
+
+(mentions, not number of hosts)
+AIX, total 4, including Linux (all variants), 86 total including
+1 4 Debian, 17 total
+1 2.2
+Darwin, total 1 1 2.4
+2 3.0
+FreeBSD total 17, including 1 potato
+1 2.2.5 2 sarge
+1 3.2 1 sid
+1 3.3 1 stable
+1 3.4 2 woody
+2 4-STABLE Mandrake, 1 total
+1 4.1 1 8
+1 4.7 RedHat, 26 total
+1 5.0 1 5.0
+1 6.0
+HP-UX, 8 total, including 2 6.2
+1 10 1 6.2 Alpha
+2 10.20 2 6.2 Sparc
+3 11 3 7.1
+2 7.2
+Irix, 8 total, including 4 7.3
+3 6.5 5 8.0
+1 6.5 MIPS 1 9
+Slackware, 3 total
+MacOS X, 6 total, including 2 7.0
+1 10.1 PowerPC 1 8.1
+1 10.2 PowerPC SuSe, 4 total
+2 8.1
+NetBSD, 1 total, including Yellowdog, 1 total
+1 1.6 1 2.3 PowerPC
+OpenBSD, 1 total, including Tru64, 8 total, including
+1 3.2 1 4.0 Alpha
+1 5.1
+Snap, 1 total
+Windows, 22 total, including
+Solaris, 39 total, including 1 95
+2 2.5 2 98
+2 2.6 4 NT
+5 7 1 NT 4 server
+11 8 7 2000
+4 9 3 XP
+3 8 x86
+1 9 x86
+SunOS, 1 total, including
+1 SunOS 4.1.4
+
+AMANDA Versions of Run on Client Hosts
+
+2.4.1, 4 total, including
+3 2.4.1p1
+2.4.2, 42 total, including
+1 2.4.2p1
+33 2.4.2p2
+2.4.3, 30 total, including
+1 2.4.3b2
+1 2.4.3b3
+1 2.4.3b4
+2.4.4, 25 total, including
+2 2.4.4-20030415
+1 2.4.4-20030426
+1 2.4.4b1
+
+Installation Properties
+
+
+Total Disk Capacity of Clients
+
+smallest: 20 GB
+largest: 5000 GB
+13 20 to 100 GB
+22 101 to 200 GB
+16 201 to 500 GB
+12 501 to 1000 GB
+5 1001 to 2000 GB
+6 2001 to 5000 GB
+
+Total Data Currently Stored on Clients Disks
+
+smallest: 3 GB
+largest: 4000 GB
+22 3 to 50 GB
+14 51 to 100 GB
+15 101 to 200 GB
+10 201 to 500 GB
+7 501 to 1000 GB
+5 1001 to 4000 GB
+
+Average Size of a Single Backup
+
+smallest: 0.3 GB
+largest: 700 GB
+22 0.3 to 10 GB
+11 11 to 20 GB
+22 21 to 50 GB
+13 51 to 100 GB
+8 101 to 200 GB
+1 350 GB
+1 700 GB
+
+Backup Program Used
+
+72 use gnutar or some tar variant including:
+3 hfstar
+1 nttar
+1 smbtar
+50 use dump or some dump variant including:
+1 e2fsdump
+2 ext2dump
+12 ufsdump
+2 vdump
+1 vfsdump
+2 vxdump
+5 xfsdump
+
+Dumpcycle
+
+5 0 days
+3 1 days
+1 2 days
+6 3 days
+5 5 days
+34 7 days
+17 8 days - 2 weeks
+10 15 days - 4 weeks
+5 30 days - 75 days
+1 4 months
+1 6 months
+1 1 year
+1 1000 days
+
+Frequency of Backups
+
+6 1/week
+4 2/week
+4 3/week
+5 4/week
+36 5/week
+6 6/week
+31 7/week
+2 1/month
+
+Type of Compression Used
+
+1 gpg
+15 none
+17 hw
+31 sw - server
+46 sw - client
+
+Installed Hardware
+
+
+Brand and Model of Tape Drive Used at AMANDA Installations
+
+The number of mentions of each brand is shown
+followed by specific models where reported.
+3 Archive, including: 2 Qualstar TLS-4200
+Python 04106
+Python 06408 10 Quantum, including:
+DLT-VS80
+5 Compaq, including: DLT-4000
+AIT-2 DLT-7000
+DLT-90 DLT-8000
+MSL5126-S2
+SDLT320 10 Seagate, including:
+DAT
+1 Dell DLT-IV 12/24G
+20/40G
+5 Ecrix, including: CTL-96/4586N
+VXA-1 DDS4
+DDS3 Scorpion-24/STD124000N
+5 Exabyte, including: 13 Sony, including:
+8500 AIT-1
+Eliant 820 AIT-2
+VXA-2 AIT-3
+DLT-IV
+15 HP, including: DLT-9000
+A4845A SDX-500C
+C1533A Sony SDX-700C
+C1557
+C6280-7000 3 Sun, including:
+DDS-4 DDS3
+DLT vs80 7000
+ESL9595 Python
+SureStor DAT-24
+SureStor DAT-8 7 Tandberg, including:
+Surestore Ultrium 230e DLT vs80
+Ultrium 1 SDLT 220
+SDLT-320
+1 IBM DDS4 SLR5
+SLR7
+1 Mammoth
+2 Wang, including:
+3 None, backup to disk only DAT 3400DX
+2 Overland Data, including:
+Loaderexpress DLT8000
+
+Native Tape Capacity of the Above Drives
+
+7 4 GB 8 35 GB
+1 7 GB 13 40 GB
+2 10 GB 8 50 GB
+11 12 GB 1 60 GB
+1 15 GB 1 80 GB
+1 17 GB 7 100 GB
+10 20 GB 1 110 GB
+1 22 GB 3 160 GB
+4 25 GB 1 500 GB
+2 30 GB
+
+Preferred Brand of Tape
+
+2 Compaq
+1 Dell
+4 Exabyte
+3 Fujifilm
+5 HP
+1 Imation
+2 Maxell
+2 Quantum
+11 Sony
+1 Verbatim
+16 No Preference
+
+Tape Format
+
+1 4mm 1 EXA
+4 8mm 3 LTO
+2 AIT 1 Mammoth
+1 AIT-1 4 sDLT
+7 AIT-2 1 sDLT320
+3 AIT-3 1 SLR
+8 DDS-2 1 SLR25
+12 DDS-3 1 SLR7
+6 DDS-4 1 Travan-20
+15 DLT 1 VXA
+1 DLT-80 1 VXA V-23
+7 DLT-IV 1 VXA-2
+
+Tape Changers/Libraries Used at AMANDA Installations
+
+[Surveyor's Note] A total of 28 of 72 respondents reported having using
+tape changer or library. Several of those reported having more than one.
+Surprisingly, the 28 respondents reported 26 distinct models of changer/
+library.
+The table below shows the models reported by 28 respondents. Where multiple
+reports for the same model existed, only one entry is show. Where the
+multiple reports showed different configurations (eg. 1 drive vs 2 drive),
+only the larger configuration is shown.
+BRAND MODEL # of # of total
+drives tapes capacity
+ADIC ?? 1 4 200 GB
+ADIC FastStor DLT 1 7 245 GB
+Compaq MSL5126 1 25 4000 GB
+Compaq SSL2020 2 20 1000 GB
+Dell Powervault 122T 1 8 320 GB
+Hewlett-Packard A4845A 5 588 20000 GB
+Hewlett-Packard C1557A 1 6 72 GB
+Hewlett-Packard ESL9595 2 595 70000 GB
+Hewlett-Packard MSL5026S2 2 26 4160 GB
+Hewlett-Packard SureStore 6x40 1 6 120 GB
+Hewlett-Packard SureStore 6x24 1 6 72 GB
+Overland Data LXB 4120 1 10 150 GB
+Overland Data Library Pro 1 19 1900 GB
+Overland Data LoaderXpress 1 15 525 GB
+Qualstar 6220 2 20 700 GB
+Qualstar TLS-4200 2 20 2000 GB
+Quantum DLT7000 2560 1 8 320 GB
+Segate CTL-96/4586N 1 4 14 GB
+Sony TSL-9000 1 8 96 GB
+SpectraLogic Bullfrog 10000 3 40 10000 GB
+SpectraLogic Treefrog 2000 1 15 750 GB
+StorageTek Timberwolf 9730 2 30 1000 GB
+Straightline Harrier/830 2 30 1500 GB
+Sun L20 2 20 2000 GB
+Sun L40 2 40 1600 GB
+Sun Storedge L9 1 9 360 GB
+
+Special Feature Usage
+
+What follows is a summarization of the responses describing the
+use of two special features of recent versions of AMANDA, the
+"file:driver" to use a hard disk drive as a backup device and
+RAIT (Redundant Array of 'Inexpensive' Tapedrives) to allow
+mirroring or striping of backups across multiple drives.
+
+The file:driver
+
+Do you use the <file:driver>?
+53 no
+11 yes
+5 what is the <file:driver>
+If not, do you expect to?
+32 no
+14 yes
+8 maybe
+
+RAIT
+
+Do you use RAIT?
+68 no
+0 yes
+If not, do you expect to?
+40 no
+8 yes
+3 maybe
+[Surveyor's Note] I was mildly surprised, and amused, by the 5 "what is the
+<file:driver> responses. And considering those responses, but the lack of
+similar responses to the RAIT question.
+[Surveyor's Note] No respondent uses RAIT! Disappointing. I wonder if any
+site is currently using this feature.
+
+Non UNIX Clients
+
+What follows is a summarization of the responses describing the
+various methods to backup 'non-unix' clients, mostly PC's running
+versions of Windows.
+
+PC's Backed Up Using SAMBA Connections to AMANDA Clients
+
+A total of 22 survey respondents (of 72) report
+they use amanda and samba to backup PC clients.
+10 have 1 PC client
+10 have 2 - 5 PC clients
+1 has 15 PC clients
+1 has 40 PC clients
+[Surveyor's Note] From these results it seems to me that amanda/samba
+is seldom a first choice for backing up PC's. Instead it seems to be
+used when a site has an existing amanda installation and would like
+to implement some form of PC backup.
+The respondents mentioned the following Operating Systems
+were being run on the PC clients. The number is the number
+of mentions, not number of PC's.
+1 Windows 95 2 Windows 2000 Server
+1 Windows 98 5 Windows XP
+3 Windows NT 1 Windows XP Pro
+2 Windows NT 4 1 Snap Server
+9 Windows 2000
+[Surveyor's Note] Of interest to users running Lotus Domino:
+One respondent reported using "The Open File Manager"
+from http://www.stbernard.com to create online backups of
+their Lotus Domino database files which then could be
+backed up to their amanda host using samba.
+
+PC's Backed Up Using Cygwin/AMANDA Client Software
+
+A total of 4 survey respondents (of 72) report
+they use a cygwin/amanda client to backup PC clients.
+2 have 1 PC client
+1 has 3 PC clients
+1 has 15 PC clients
+The only PC operating systems mentioned were
+Windows 2000 and Windows 2000 Server.
+
+PC's Backed Up by AMANDA Using Other Techniques
+
+A variety of techniques, other than samba or cygwin,
+were described by respondents to backup PC's
+1. Two respondents installed an NFS server on Windows 2000
+and then NFS mounted the PC disks on the amanda host
+and backed them up as local file systems.
+2. Similarly, two respondents mounted PC shares of Windows 95,
+Windows NT, and Windows 2000 on the amanda host using 'smbmount'
+and backed them up as local 'smbfs' file systems.
+3. Several respondents reported they first backed up their PC's
+(Windows 98, Windows 2000, Windows XP, Windows 2000 Server)
+to disk files on the PC's and then backed that file up using
+amanda; presumably using samba or some file transfer technique.
+One mentioned that the backup stream was sent directly to a
+Linux host and backed up there as a local file.
+The backup programs the respondents mentioned included:
+'Windows backup program'
+'BackupPC', a Linux opensource program
+'Win2000 Backup Tool'
+'Backup Exec'
+4. One respondent noted their firewall was a PC running linux.
+That system was mirrored using rsync and the mirror was backed up.
+
+Other Backup Techniques Mentioned
+
+Five respondents described backing up systems using "non-traditional"
+methods. These methods were used to backup systems running either
+MacOS or Windows. They included:
+1. MacOS 9, mounted (NFS?) onto a Linux host and backing up the mounts as
+local filesystems.
+2. Backing up 37 MacOS 8 and MacOS 9 systems using the program Retrospect.
+The output of Retrospect was transferred to a Linux host using ftp and
+preserved with amanda.
+3. Build a native amanda client on MacOS X and use hfstar instead of gnutar.
+4. Backup 6 Windows XP hosts using a native windows amanda client.
+5. Backup 12 Windows 2000 Server hosts using a native windows amanda client.
+This respondent also noted their intention to switch to a cygwin/amanda
+client in the near future.
+-------------------------------------------------------------------------------
+
+Prev                          Up                           Next
+Chapter 18. AMANDA WISHLIST  Home  Part V. Technical Background
+
diff --git a/docs/systemnotes.txt b/docs/systemnotes.txt
new file mode 100644 (file)
index 0000000..bd3f678
--- /dev/null
@@ -0,0 +1,325 @@
+
+Chapter 1. AMANDA 2.4.x - System-Specific Installation Notes
+Prev  Part I. Installation                              Next
+
+-------------------------------------------------------------------------------
+
+Chapter 1. AMANDA 2.4.x - System-Specific Installation Notes
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Solaris_2.6
+
+  Trusted_Solaris
+
+  SunOS_4.x
+
+  Ultrix
+
+  HP/UX
+
+  Linux
+
+  Digital_Unix_4
+
+  Sinix_5.43_(Reliant_Unix)
+
+  IRIX_(all)
+
+  IRIX_6
+
+  IRIX_6.5.x
+
+  SCO
+
+  FreeBSD_3.0
+
+  FreeBSD_4.9
+
+  FreeBSD_5.1
+
+  AIX
+
+  Microsoft_Windows
+
+  Mac_OS_X
+
+
+Note
+
+Refer to http://www.amanda.org/docs/systemnotes.html for the current version of
+this document.
+Please read the notes that correspond to the architectures you are installing
+for. If you find additional gotchas, or anything incorrect in these notes,
+please send your updates to mailto://amanda-hackers@amanda.org after checking
+that they are not known/fixed problems in the AMANDA patches page: http://
+www.amanda.org/patches/.
+
+ Solaris 2.6
+
+You may have compilation errors on statfs.c if you're running, on a Solaris 2.6
+host, a gcc that was not build on a Solaris 2.6 host. This happens because gcc
+stores fixed copies of some Solaris header files on an internal directory. You
+must rebuild gcc if you get this kind of trouble. Note, however, that gcc
+2.7.2.3 does not support Solaris 2.6, you should upgrade to 2.8.0 or higher, or
+egcs.
+
+ Trusted Solaris
+
+According to Julian Stevens <julian.stevens@baedsl.co.uk>, the format of inetd
+on Trusted Solaris 1.2 is a bit different. Just before the user name, you
+should insert the word `untrusted':
+
+  amanda dgram udp wait untrusted amuser /usr/local/libexec/amandad amandad
+       
+
+The patch-system script is *NOT* aware of this detail; you must fix it
+yourself.
+
+ SunOS 4.x
+
+A bug in GNUtar 1.12 causes it to miscalculate (in fact, to misreport) the size
+of filesystems. A patch for GNUtar is available in the patches directory.
+
+ Ultrix
+
+The Ultrix dump program contains an explicit check that it is being run by
+root. This defeats the usual practice of a non-root "operator" userid for
+dumps. For this reason, the rundump program (a setuid-root wrapper for dump) is
+enabled by default. If you find rundump is not necessary for you, just run
+
+  configure --without-rundump
+
+The Ultrix restore program will fail if it is not connected to a tty. Since the
+restore program is invoked in the clients in order to create index files, and
+it the client is not connected to a tty, index creation will fail. Using GNUTAR
+instead of DUMP is an option. Thanks to Edwin Wiles
+<ewiles@mclean.sterling.com> for the investigation. Another alternative
+proposed by Martyn Johnson <Martyn.Johnson@cl.cam.ac.uk> is to use a modified
+restore program: use a binary program editor and replace `/dev/tty' with `/dev/
+nul', for instance, and link /dev/nul to /dev/null. Note that the chosen file
+name must be exactly 8 bytes long, otherwise you'll break the restore program.
+A nice one-liner perl script by Martyn Johnson will do the trick (make sure you
+preserve a copy of the original restore program, it will be rewritten by
+running this script!):
+
+  perl -pi -e 'BEGIN { $/ = "/dev/tty" } s-$/-/dev/nul-' restore
+       
+
+The Ultrix C compiler seems to be too broken to compile AMANDA. You are likely
+to need gcc or egcs.
+
+ HP/UX
+
+You may run into an internal /bin/sh limit when running the configure script.
+The error message is:
+
+  ./configure: sh internal 2K buffer overflow
+       
+
+Using /bin/posix/sh usually works around the problem. Another solution is to
+install GNU bash and use it instead of /bin/sh.
+If `configure' complains about not finding `lex', you'll have to get `flex'
+installed. Look for its URL in Amanda_Installation_Notes.
+If you use logical volumes, you may refer to mountpoints or full device
+pathnames instead of device names in the disk list file.
+According to Stan Brown <stanb@awod.com>, amverify won't work with HP/UX's
+stock mt. The work-around is to install GNU cpio, that contains an
+implementation of mt, and edit amverify so that MT points to GNU mt and MTOPT
+is `-f', or reconfigure and rebuild amanda from scratch, making sure it finds
+GNU mt before the stock mt in the PATH.
+If you have vxfs filesystems to back up, AMANDA will pick vxdump automatically.
+GNU tar 1.12 will incorrectly report the size of backups. There's a patch in
+the patches directory that fixes this problem.
+The use of `amhpfixdevs' is deprecated, since you can list mount-points or full
+device names in the disklist. The script may be removed in future releases of
+AMANDA.
+Sometimes you may get the error message `Link severed' from an HP/UX client.
+This is just a cute name the developers of HP/UX found for `Network error'.
+Reported by Michael Brehl <mbr@condor.de>
+
+ Linux
+
+Linux hosts intended to back up efs partitions with dump should install the
+dump package, as it is not installed by default on most Linux distributions. It
+is possible to find compiled versions of dump on most Linux sites and CD-ROMs.
+Note, however, that DUMP for Linux has been quite unreliable, sometimes being
+unable to perform backups, producing weird error messages such as `master/slave
+protocol botched', and sometimes creating unrestorable dump images, especially
+of active filesystems. The first problem can sometimes be fixed by cleaning up
+outdated entries in /etc/dumpdates, but your best bet is probably GNU tar.
+Make sure the user that runs configure has permission to run the dump program,
+otherwise configure may misdetect an ability of dump to accept a -E (for
+estimates) switch.
+GNUtar 1.11.8, distributed with some Linux versions, will cause index failures
+(Index returned -1). Upgrading to GNUtar 1.12 fixes this problem. This is not a
+Linux-specific problem, but it is quite common in this platform.
+AMANDA now supports the ftape driver version 3.04d. It adjusts the blocksize
+automatically to 32k and supports QIC volume tables. More details con be found
+in the file ZFTAPE in this directory.
+Some releases of dump for Linux, such as the one distributed with Debian 2.0,
+have modified dump so that it stores dumpdates in /var/lib. If this is your
+case, you should create a link to it in /etc. Suggested by David Wolfskill
+<dhw@whistle.com>
+
+ Digital Unix 4
+
+According to Michael Galloway <mgx@spruce.lsd.ornl.gov>, the stock DUX4 dump is
+broken. There is a patch available at ftp://ftp.service.digital.com/public/
+dunix/v4.0b/duv40bas00005-19970926.README
+When both dump and vdump are available, AMANDA will use vdump for backing up
+advfs filesystems only, and dump will be used for the rest. If you'd rather
+back up all filesystems with vdump, #undef DUMP in config/config.h after
+running configure.
+Unfortunately, the output of `dump -E' incorrectly matches a line of output
+from SAMBA, which gets AMANDA's estimate process confused. client-src/
+sendsize.c will refuse to compile if both HAVE_DUMP_ESTIMATE and SAMBA_CLIENT
+are defined in config/config.h. AMANDA will work correctly if you undefine
+HAVE_DUMP_ESTIMATE in config/config.h; if you prefer to have incorrect
+estimates for SAMBA backups, follow the instructions in client-src/sendsize.c
+on removing the compile-time error.
+According to Oren Laadan <orenl@cs.huji.ac.il>, DEC compiler version "DEC C
+V5.2-033 on Digital UNIX V4.0 (Rev. 564)" (obtained with "cc -V") does not
+build AMANDA properly, in particular, taper.c. Using gcc is OK.
+
+ Sinix 5.43 (Reliant Unix)
+
+The use of `amsinixfixdevs' is deprecated, since you can list mount-points or
+full device names in the disklist. The script may be removed in future releases
+of AMANDA.
+Sinix port originally by Michael Schmitz <mschmitz@iname.com>.
+
+ IRIX (all)
+
+When setting the tape device name in either amanda.conf or one of the changer
+configuration files, make sure you specify the "variable" device name, which
+has a 'v' on the end. If not, IRIX will write 4KByte blocks instead of the
+32KByte blocks AMANDA tells it to. This apparantly works OK unless you take the
+tape to a non-IRIX system, where amrestore will complain about a short (4096)
+read.
+If you do end up in this situation, the dd command to use to pipe into your
+system restore program is:
+
+  dd if=/dev/whatever bs=4k skip=8 | ...
+       
+
+Jean-Francois Malouin <Jean-Francois.Malouin@bic.mni.mcgill.ca> reports that,
+if you are going to use an IRIX host as the tape server, you *must* patch your
+system with *all* kernel and scsi rollup patches, otherwise you may end up with
+useless tapes, due to tape rewinding after short periods of inactivity. See
+http://www-viz.tamu.edu/~sgi-faq/ for more details.
+Some unpatched version of xfsdump are reported as not printing estimates. This
+causes estimates to take much longer than they had to, because backups are
+always performed twice. According to Mike Acar <mike@kentinfoworks.com>, patch
+2333 for IRIX 5.3 and 6.1 will fix this problem.
+
+ IRIX 6
+
+Seems like SGI make program is a bit broken, in a way that causes it to rebuild
+some files if doesn't have to if you happen to run make again. Using GNU make
+fixes this problem.
+If you have xfs filesystems to back up, AMANDA will pick xfsdump automatically.
+
+ IRIX 6.5.x
+
+Luc Lalonde <Luc.Lalonde@polymtl.ca> contributed the following notes:
+If you use a jukebox, you must set the ownership of the robot-changer device to
+the AMANDA operator:group in /etc/ioperms. Here's my configuration:
+
+  /etc/ioperms: /dev/scsi/sc8d6l0 0600 amanda backup
+
+Otherwise the ownership:group is changed to "root:sys" after each reboot. When
+you do upgrades, check the file /var/sysgen/master.d/scsi to see if it has
+changed. Otherwise your jukebox could be rendered unuseable. In particular,
+check if it has been replaced by a new version and renamed to "./scsi.O/.".
+If you use the AMANDA package provided by freeware.sgi.com, you are not
+affected by the first question since at compile time the AMANDA operator is
+"root:sys".
+
+ SCO
+
+Jens Krause <jens@transcom.de> has reported some problems with GNUtar 1.12 on
+SCO Release 5. Although the `sparse' files patch was applied, GNU tar would
+consistently crash. GNUtar had to be built linked with malloc-libraries, and
+the `--sparse' switches had to be removed from client-src/sendbackup-gnutar.c
+and client-src/sendsize.c.
+
+ FreeBSD 3.0
+
+chg-scsi was not updated to support the new camlib.h-dependent chio.h, so chg-
+scsi will be automatically disabled if camlib.h is found. You may use chg-chio
+instead.
+
+ FreeBSD 4.9
+
+Sep. 28th, 2004: Jason Miller <jwm@interlinc.net> reported problems with
+setting up the AMANDA-client on FreeBSD 4.9. He wrote:
+Due to the need for read permissions for AMANDA-client the default user and
+group for this on FreeBSD 4.9 is "operator:operator" which I found a write up
+on that as well. Just a note the port wanted to install it with these user
+permissions by default and I initially changed them to match my Redhat 9.0
+install. So just doing a
+make distclean uninstall install AMANDA_SERVER=servername
+fixed that for me. Then I just followed the below instructions and everything
+was good to go.
+Refer to this link for more details: http://www.freebsd.org/cgi/query-
+pr.cgi?pr=59302.
+
+ FreeBSD 5.1
+
+Nicolas Ecarnot <nicolas.ecarnot@accim.com> discovered that for FreeBSD 5.1
+(maybe earlier, and surely further), you have to set the net.inet.udp.maxdgram
+TCP/IP variable to 65535. The default is 9216, and this is a problem when
+trying to backup a large number of clients as indicated by errors in during
+amcheck or the estimate phase.
+You can just run the command:
+sysctl net.inet.udp.maxdgram=63535
+but this won't last until the next reboot.
+To make it permanent, just add this line:
+
+  net.inet.udp.maxdgram=65535
+       
+
+in the file /etc/sysctl.conf.
+
+ AIX
+
+sendsize is reported to coredump on AIX 4.3.3, this is a linking problem, try
+configuring AMANDA with the option "--disable-shared".
+
+ Microsoft Windows
+
+Although AMANDA won't run standalone on MS-Windows hosts, it is possible to use
+it to back up their disks, by using SAMBA. Please read Backup_PC_hosts_using
+Samba for more information.
+SAMBA may be unable to back up some files due to file locking restrictions.
+Particularly, paging and registry files usually present problems. Backing up
+page files is pointless, but registry files are quite important to back up. It
+is possible to create regular files that contain registry information by using
+the Regback utility, from the Windows NT Resource Kit. Unfortunately, it is not
+part of the Windows NT standard distribution, you have to purchase it
+separately. Thanks to Ernie Oporto <ernie_oporto@mentorg.com> for the tip.
+
+ Mac OS X
+
+For notes on how to setup AMANDA under Apple's OS X, please refer to http://
+web.brandeis.edu/pages/view/Bio/AmandaMacOSXCompileNotes, written by Steven
+Karel<karel@brandeis.edu>. Thanks to Jose L.Hales-Garcia <jose@stat.ucla.edu>
+for the tip.
+-------------------------------------------------------------------------------
+
+Prev                   Up                                   Next
+Part I. Installation  Home  Chapter 2. AMANDA Installation Notes
+
diff --git a/docs/tapechangers.txt b/docs/tapechangers.txt
new file mode 100644 (file)
index 0000000..b4fb9b1
--- /dev/null
@@ -0,0 +1,676 @@
+
+     Chapter 8. AMANDA Tape Changer Support
+Prev  Part II. About Tapes and Changers  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 8. AMANDA Tape Changer Support
+
+
+James da Silva
+
+Original text
+AMANDA Core Team
+<jds@amanda.org>
+
+Stefan G. Weichinger
+
+XML-conversion;Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Introduction
+
+  Specifying_a_tape_changer_in_amanda.conf
+
+  Device-specific_tapechanger_script
+
+  Slot_names_and_the_"current"_slot
+
+  Operator_interface
+
+  How_amdump_interacts_with_the_tape_changer
+
+  Builtin_tape-changers
+
+
+        chg-multi_(formerly_chg-generic)
+
+        chg-manual_(formerly_no-changer)
+
+        chg-mtx_(formerly_hp-changer)
+
+        chg-zd-mtx
+
+        chg-scsi-chio_(formerly_seagate-changer,_then_chg-chio)
+
+        chg-scsi_(new_interface,_try_to_drive_a_robot_with_direct_scsi
+        commands)
+
+        chg-chio
+
+        chg-chs
+
+        chg-rth
+
+        chg-juke
+
+        chg-rait
+
+        chg-disk
+
+        chg-iomega
+
+        chg-null
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/tapechangers.html for the current version
+of this document.
+
+ Introduction
+
+This document outlines the tape changer support design of AMANDA 2.2 and
+beyond. It defines a small interface for changer software to follow so that
+AMANDA can remain device-independent but still support the widest range of tape
+software and hardware possible.
+The interface is a bit simplistic and has only had complications added when
+there is a body of field experience.
+
+ Specifying a tape changer in amanda.conf
+
+All device-specifics are hidden by a glue program that the rest of AMANDA calls
+to interact with the tape changer.
+The name of this changer program is given by the "tpchanger" variable in the
+file amanda.conf. Example entry:
+
+  tpchanger "chg-multi"           # use multi-unit tape changer emulator
+       
+
+The tapedev parameter is ignored if a tpchanger program is specified, unless
+the changer program itself reads tapedev from amanda.conf. The chg-multi
+changer doesn't, as it reads all its configuration arguments from its own
+configuration file, specified as changerfile.
+If the tpchanger program does not begin with a '/', AMANDA expects it to reside
+in libexecdir, and possibly have the version suffix appended depending on how
+AMANDA was configured.
+Two other amanda.conf parameters are available for changer use, however their
+definition is left entirely up to the changer script itself. They are
+changerfile and changerdev. Typically changerfile will point to the
+configuration file specific to the changer, or be a base name of several
+related changer files. The changerdev variable may point to the /dev entry used
+to access the changer device.
+See the documentation with the specific changer you're interested in to see
+exaclty how these variables are used (if at all).
+
+ Device-specific tapechanger script
+
+The tape changer script/program is always from the directory with amanda.conf.
+It is never passed the configuration name it is running on behalf of, but since
+amgetconf works without a name from the current directory, that should be
+sufficient.
+The script/program must support the following commands:
+
+* <tpchanger> -slot <slot-specifier>
+
+If changer is loaded, unloads the current slot (if different than "slot-
+specifier") and puts that tape away, then loads the requested slot. See the
+next section for the list of valid slot requests.
+Outputs to stdout the slot name and name of the device file to access the tape
+on success, or a slot name and error text.
+Returns 0 on success.
+Returns 1 on positioning error (eg at bottom of gravity stacker or slot empty).
+Returns 2 any other fatal error. The slot name may be invalid, but must be
+present. Error message goes to stdout in place of device name.
+Examples:
+
+               % chg-multi -slot 0
+               0 /dev/nrst8                    # exitcode returned is 0
+
+               % chg-multi -slot 1
+               1 slot 1 is empty               # exitcode returned is 1
+
+               % chg-multi -slot bogus-slot
+               <none> no slot `bogus-slot'     # exitcode returned is 2
+
+
+* <tpchanger> -info
+
+Outputs to stdout three or more fields:
+The current slot string (required)
+The number of slots (required)
+Flag indicating whether the changer can go backwards
+(0 if it can't, 1 if it can). (required)
+Flag indicating whether the changer is searchable
+(optional). Shows whether the changer supports the -search and -label commands
+and is able to load a tape given only the AMANDA label string (0 or omitted if
+it can't, 1 if it can). (optional)
+Examples:
+
+               % chg-multi -info
+               0 10 1                          # exitcode returned is 0
+
+               % chg-zd-mtx -info
+               0 10 1 1
+
+
+* <tpchanger> -reset
+
+Resets the changer to known state and loads the first slot.
+Output and error handling are the same as
+"<tpchanger> -slot first"
+In the case of a gravity stacker that must be reset by hand, this could be run
+(via " amtape <conf> reset") to inform the software the stacker is positioned
+back at the top.
+Examples:
+
+               % chg-multi -reset
+               0 /dev/nrst8                    # exitcode returned is 0
+
+               % chg-multi -reset
+               0 slot 0 is empty               # exitcode returned is 1
+
+               % chg-multi -reset
+               0 tape-changer not responding   # exitcode returned is 2
+
+
+* <tpchanger> -eject
+
+Unloads the current slot (if loaded) and puts that tape away.
+Output and error handling are the same as the -slot command.
+Note that a tape may or may not be loaded when this command completes,
+depending on the hardware.
+Examples:
+
+               % chg-multi -eject
+               0 /dev/nrst8                    # exitcode returned is 0
+
+               % chg-multi -eject
+               0 drive was not loaded          # exitcode returned is 1
+
+The tape changer program MAY support the following commands:
+
+* <tpchanger> -search <labelstr>
+
+Loads an AMANDA tape by name (labelstr).
+Output and error handling are the same as the -slot command.
+taper, amcheck and amtape will use this command if the changer reports it is
+searchable.
+Example:
+
+               % chg-zd-mtx -search DailySet005
+               5 /dev/nrst8                    # exitcode returned is 0
+
+-<tpchanger> -label <labelstr> Associates the AMANDA label <labelstr> with the
+barcode of the currently loaded (in the tape drive) tape.
+Outputs to stdout the current slot and tape device. amlabel will use this
+command if your changer is searchable to build up the barcode database.
+Example:
+
+               % chg-zd-mtx -label DailySet006
+               6 /dev/nrst8                    # exitcode returned is 0
+
+For all the commands:
+An exit code of 0 implies that the operation was completely successful, and the
+output may be parsed by the AMANDA code as described above.
+For non-zero exit codes, the first field is still the slot name, but the actual
+error messages are not fixed. They are just displayed and/or logged as-is by
+the calling AMANDA program.
+An exit code of 1 implies the operation failed in a benign way, for example an
+empty slot or an attempt to go backwards in a gravity stacker. The calling
+AMANDA program will print the error message if appropriate and continue,
+perhaps requesting a different slot be loaded.
+Any other exit code is considered fatal and will cause AMANDA to stop
+attempting to talk to the tape changer.
+
+ Slot names and the "current" slot
+
+Some tape changers, such as carousels and gravity stackers, have a hardware
+notion of current position. Others have no current position when no tape is
+loaded: all tapes are in their slots and the changer arm is docked away from
+the slots.
+Nevertheless, AMANDA requires tape-changer scripts to maintain the notion of a
+"current" position. This is for performance reasons: as tapes tend to be loaded
+into the rack in order, and AMANDA uses them in order, the next tape to use can
+be found much quicker if the position of the current one is remembered. As an
+example, the chg-multi script maintains the current position in a chg-
+multi.state file (or any other file specified in a `statefile' line in the
+changer configuration file).
+AMANDA does not care how slots are available or how they are named. They could
+be numbered 0 to N-1, numbered 1 to N, or even designated by letter, A .. Z.
+The only requirement is that the names do not contain whitespace and that the
+names "current", "next", "prev", "first", "last" and "advance" retain their
+meaning as follows:
+current The position of the last loaded tape, as described above
+next The position after current, wrapping from the last slot to the first.
+prev The position before current, wrapping from the first slot to the last.
+first The first slot in the tape rack.
+last The last slot in the tape rack.
+advance The same as "next" except the next tape may not be loaded if the
+changer supports advancing to the next slot without putting that tape in the
+drive.
+The current position must be updated even if there is a positioning error (such
+as "empty slot"). This allows amanda to step through the entire tape rack by
+issuing successive "slot next" positioning commands.
+
+ Operator interface
+
+The amtape program is the main operator interface to AMANDA's tape changer
+support. The commands supported include:
+amtape <conf> slot <slot-specifier> Load the tape from the specified slot into
+the drive
+amtape <conf> eject Send an eject command to the tape-changer. Effect is
+changer specific.
+amtape <conf> reset Send a reset command to the tape-changer. Effect is changer
+specific.
+amtape <conf> show Go through the entire tape rack, showing the labels of all
+amanda tapes encountered.
+amtape <conf> label <label> Find and load the tape with the specified label
+amtape <conf> taper Perform taper's scan algorithm (see below), loading the
+tape which would be picked for the next amdump run.
+amtape <conf> clean If a cleaning tape is defined by the changer, load it in
+the drive and put it away when done.
+amtape <conf> device Output the current tape device name.
+amtape <conf> current Display the contents of the current slot.
+amtape <conf> update Scan the entire tape rack and update the barcode database.
+See the amtape(8) man page for more details.
+In addition to amtape, amlabel has been modified to allow optionally specifying
+a slot:
+amlabel <conf> <label> [slot <slot-specifier>]
+amcheck looks for the next tape in the rack the same way the taper does. If
+multiple tapes are used in one night, amcheck attempts to find all the needed
+tapes in turn if the tape-changer is random access. On a one-way gravity
+stacker, amcheck only finds the first tape, since finding the subsequent ones
+would put the first one out of reach of that night's amdump run.
+amrestore and amrecover do not yet include any tape changer support directly,
+as amrestore knows nothing about the amanda.conf files or server-side
+databases. This is a deliberate decision to keep amrestore independent, so it
+can be run from any host with a tape drive, even if the original tape server
+host is down. To use amrestore in a tape-changer environment, use amtape to
+find the right tape, then run amrestore giving the resulting tape device name.
+
+ How amdump interacts with the tape changer
+
+AMANDA does not require a particular tape label for a run. Any label that
+matches the labelstr regex and is determined to be "inactive" according to the
+tapelist database, may be written to. However, there is a preferred 'next'
+tape, the one that is next in the cycle implied by the current tapelist.
+amdump uses two algorithms, depending on whether the tape changer can go
+backwards in the rack or not. If multiple tapes are needed in a single run,
+this algorithm is repeated in turn whenever a new tape is required.
+Normal tape changers (those that can go backwards):
+With a full-access tape changer, amdump searches the entire rack for the
+preferred tape label. This tape will usually be found at the current or next
+position, but might be located anywhere. If the tape is found, it is used. If
+it is not found, the first tape encountered that matches the labelstr and is
+not active is picked.
+Gravity stackers (anything that can not go backwards):
+To avoid going all the way to the bottom of the stacker only to find that the
+preferred tape isn't present and nothing can be done, AMANDA picks the first
+tape (starting at the current position) that matches the labelstr and is not
+active, regardless of whether it is the preferred tape.
+
+ Builtin tape-changers
+
+
+ chg-multi (formerly chg-generic)
+
+This tape changer script supports several common configurations:
+
+* Using multiple tape drives in a single host to emulate a tape changer. This
+  can also be used with a single physical drive to write several tapes in an
+  AMANDA run.
+
+
+* Using a gravity stacker or a real changer configured to sequentially load the
+  next tape when the current one is ejected. Also supports a changer which
+  cycles to the first tape after loading the last one.
+
+
+* Using a changer accessed through several "virtual" tape devices which
+  determine which slot actually gets loaded in the tape drive.
+
+The advantage of this changer script is that you do not need to get into the
+complexity of dealing with a real changer interface. All the action goes
+through the tape device interface with standard mt commands, which eases many
+portability issues. Many common tape jukeboxes can be configured in a
+sequential or cycle mode.
+chg-multi ignores `tapedev' and `changerdev' because `changerfile' may specify
+several tape devices to be used. A sample configuration file may be found in
+example/chg-multi.conf.
+
+ chg-manual (formerly no-changer)
+
+This is a poor man's tape changer that requires the backup operator to change
+tapes manually. It expects `tapedev' in amanda.conf to point to a valid tape
+device, and stores some status data in files whose names start with the
+`changerfile'. `changerdev' is ignored.
+
+ chg-mtx (formerly hp-changer)
+
+An mtx-based tape changer script. `changerdev' must specify the tape device
+controlled by the mtx program, and `tapedev' must point to the no-rewind tape
+device to be used. More than likely, both `changerdev' and `tapedev' will
+reference the same device file. `changerfile' must specify a prefix for status
+files maintained by this script. It will maintain files named `changerfile'/
+changer-clean and `changerfile'/changer-access. You may have to edit the script
+to specify which slot contains a cleaning tape (cleanslot).
+The mtx program must support commands such as `-s', `-l' and `-u'. If the one
+you've got requires `status', `load' and `unload', you should use chg-zd-mtx
+instead (see below).
+
+ chg-zd-mtx
+
+Based on chg-mtx, but modified in order to support the Zubkoff/Dandelion
+version of mtx. Eric DOUTRELEAU <Eric.Doutreleau@int-evry.fr>, who contributed
+this script, reported that it works on a Solaris/sparc box with a HP 1557A
+stacker.
+In addition to the `changerfile'-clean and the `changerfile'-access files, it
+maintains a `changerfile'-slot file that indicates the currently loaded slot.
+There are lots of comments at the start of the script describing how to set it
+up.
+
+ chg-scsi-chio (formerly seagate-changer, then chg-chio)
+
+A C program that relies on scsi tape-changer interfaces. It may either use the
+tape changer interface specified in chio.h (Gerd Knor's SCSI media changer
+driver, a Linux kernel loadable module), or it may use built-in tape changer
+interfaces available on HPUX, Solaris 2.5, IRIX and possibly others, but only
+the chio and HPUX interfaces are currently implemented . `tapedev' specifies
+the tape device to be used; `changer_dev' is the device used to talk to the
+kernel module (for chio, usually /dev/ch0), and `changerfile' specifies a
+filename in which the current slot number will be stored.
+Now there is another way, to get the chg-scsi a little bit more flexible. If
+you use only one digit in the `tapedev' parameter, the chg-scsi expects that
+changerfile points to a real configuration file, not only a counting file. In
+this configuration file you may specify that the tapedrive needs an eject
+command and an optional waittime, necessary after inserting the tape into the
+drive. You are also able to configure a range of slots which should be used by
+your configuration. The idea behind this is, that you don't want AMANDA to
+cycle all the tapes if AMANDA searches exactly one tape. If you have a library
+which supports more than one drive you can also specify which drive to use. For
+each configuration (there should be at least one) you have to specify a file,
+where AMANDA remembers which tape is actually in the drive. For future use
+there is also some stuff for cleaning the drives.
+In amanda.conf:
+
+  tapedev "x"       with x between 0 and 9, selects the configuration to use
+  changerfile "filename"            specifies the changer configuration file
+       
+
+In the changer-config-file the following could be set:
+
+  number_configs x
+  #    x between 0 and 9       number of configurations defined. This should be the
+  first parameter in the config-file.
+  eject        x
+  #    x 0 or 1                1 means that the drives need an eject command, before the robot
+  can handle the tape.
+  sleep        x
+  #    x between 0 and MAX_INT specifies the seconds to wait before the drive
+  could be used after inserting a tape. 5 should be OK.
+  cleanmax x   
+  #    x some positive int     How many cleanings does a cleaning tape survive
+  changerdev  <device>
+  #                            The device for the robot
+       
+
+And then there come some configuration sections, separated by the word `config`
+followed by the ordinal of that configuration (0 to 9). In each configuration
+section you should specify:
+
+  drivenum x           x between 0 and the number of drives in the library
+  This one specifies the drive to
+  use with this configuration
+  dev  <device>                                The device for the tapedrive
+  startuse    x                x between 0 and maximum slotnumber of your library
+  Starting here we may use the tapes
+  enduse        x              x between start and maximum slotnumber
+  This is the last tape we may use
+  in this configuration. If we reach
+  this one the next will be start..
+  statfile <filename>                          Here we remember the last used
+  slot for this configuration
+  cleancart    x       x between 0 and maximum slotnumber
+  In this slot we find the
+  cleaning tape
+  cleanfile <filename>                         Here we will remember how
+  often we used the cleaning tape
+  usagecount <filename>                                This points to a file which is
+  deleted after cleaning the drive
+  e.g. the usagetime of the drive
+       
+
+Comments begin with an '#' until end of line. Allowed separators are TAB and
+SPACE.
+
+ chg-scsi (new interface, try to drive a robot with direct scsi commands)
+
+The config and the syntax is the same as for chg-scsi-chio. New is the config
+type
+emubarcode 1
+With this option and the option labelfile chg-scsi will try to create an
+inventory. With this inventory it should be possible to use the search feature
+for loading tapes.
+debuglevel x:y
+This option will set the debug level and select for which part debug messages
+should be sent to the debug file. In case of problems you should set it to 9:0
+havebarcode 1
+This will force the program to read the barcodes, and don not try to figure out
+if there is an barcode reader available.
+scsitapedev <devicename>
+This device is used to control the tape, read status infos etc.
+tapestatus <filename>
+If this option is given on every eject/move the log pages of the tape device
+will be dumped in this file. There are 2 log pages were you can see how many
+read/write errors (corrected) are processed by the tape
+labelfile <filename>
+This file is used for the mapping from barcode labels to AMANDA volume labels.
+It is used if the changer has a barcode reader. To initialize run amtape show,
+this will add the mapping for the tapes in the magazine.
+eject > 1
+Use the mtio ioctl to eject the tape, use only if the standard (1) does not
+work, and send the debug output (/tmp/amanda/chg-scsi.debug) to th@ant.han.de
+changerident <ident>
+With this it is possible to specify which internal driver to use for
+controlling/error handling of the robot
+tapeident <ident>
+Some as above but for the tape.
+New command line option: -status
+[all|types|robot|sense|ModeSenseRobot|ModeSenseTape|fd]
+<all> will show the result form all options. <types> will list the known driver
+types. <robot> will show the status of all elements (tape/robot/slots..)
+<sense> will show the result from a request sense <ModeSenseRobot> will show
+the sense page from the robot <ModeSenseTape> will show the sense page from the
+tape <fd> will show the devices which are open, and some info about it.
+At the moment changer with tape and robot on the same SCSI id ( but on
+different luns) will run on the following platforms:
+- HP_UX 10.20 - IRIX 6.x - Solaris - Linux - AIX - FreeBSD 3.0/4.0
+Tape and robot on different IDs run native on - Linux - HP-UX 10.20 - Irix 6.x
+- FreeBSD
+Tape and robot on different IDs with special modules run on: Solaris with sst
+kernel module, which is not any longer needed in solaris 2.8. See in the
+contrib/sst directory The configuration on solaris 2.8 with the sgen driver is
+done by creating the file /kernel/drv/sgen.conf
+This file should contain at the beginning the following device-type-config-
+list="changer","sequential"
+This will force the driver to attach only to the devices with type either
+changer (the robot) and sequential (the tape). Next you must tell the driver on
+which id it should check for devices (tape on id 5, robot on id 6 in this
+example),
+name="sgen" class="scsi" target=5 lun=0; name="sgen" class="scsi" target=6
+lun=0;
+This will create the 2 device files /dev/scsi/sequential/c0t5d0 (scsitapedev
+option in chg-scsi.conf) /dev/scsi/changer/c0t6d0 (changer option in chg-
+scsi.conf)
+So the complete sgen.conf looks like: device-type-config-
+list="changer","sequential name="sgen" class="scsi" target=5 lun=0; name="sgen"
+class="scsi" target=6 lun=0;
+For HP you have to create the special device files for the pass throu
+interface. Check if the ctl driver is installed. Example:
+
+  # lsdev -C ctl
+      Character     Block       Driver          Class
+        203          -1         sctl            ctl
+
+Next check on which bus your drives are connected. (ioscan) with the Character
+device num form the lsdev and the card instance from ioscan create the special
+file. Example:
+
+  mknod /dev/scsi/1 c 203 0x001000
+                            ||||
+                            ||| LUN of device
+                            ||SCSI ID of the device
+                            2 digit instance number from ioscan
+
+On FreeBSD 4.0 the syntax for the device files has changed. Now you have to
+tell chg-scsi the bus:target:lun combination. If you for example on your scsi
+bus 0 target 3 an robot the syntax is changerdev 0:3:0 To get this info you can
+use the camcontrol command, <camcontrl devlist> will give you a list of known
+devices. Don't specify dev and scsitapedev in your chg-scsi.conf !!, this will
+not work.
+On Linux you need either sg (generic scsi) as module or it must be compiled
+into the kernel. If the sg driver doses not work try to use the ioctl
+interface. For that you have to undef the LINUX_CHG define in changer-src/scsi-
+linux.c Also you have to change the NORMAL_TIMEOUT in /usr/src/linux/drivers/
+scsi/scsi_ioctl.c from (10 * HZ) to (5 * 60 * HZ). On linux it does not run if
+you are using an aha1542 SCSI controller. The driver can not handle the
+extended request sense.
+On IRIX you find the SCSI pass through interfaces for every device in /dev/
+scsi.
+chg-scsi has been tested/run with the following devices: Exabyte 10h and eliant
+tape HP-Surestore 1200e and C1553A tape BreeceHill Q2.15 (EXB-120) and DLT7000
+tape Powerstor L200 and DLT7000 ARCHIVE Python 28849-XXX TANDBERG TDS 1420 ADIC
+VLS DLT Library
+It is now possible with a changer that has barcode reader to load tapes faster.
+Also amdump will find tapes faster. Every time a tape is labeled the
+information in the labelfile will be updated. To initialize the label mapping
+you can also do an amtape config show. This will put the mapping for all tapes
+in the magazine into the mapping file.
+For all problems please contact th@ant.han.de. Please include in your mail the
+debug file. (/tmp/amanda/chg-scsi.debug)
+
+chg-chio
+
+(new perl script that replaces the original chg-chio written in C) This script
+is based on the FreeBSD version of chio, a program to communicate with the
+jukebox. This script has for the moment only been test with FreeBSD and is
+likely not to work on any other system. Let me know if this is the case and
+send me the output of the chio program for your version of chio. It does not
+restrict the number of tapes, except that if there is only one tape in the
+juke, it is supposed to be in max_slot and not in slot 1. [This is the first
+version of the changer script and I would appreciate all comments on it, at
+nick.hibma@jrc.it. It has been tested only with FreeBSD 2.2.5 and the
+accompanying chio program.]
+
+chg-chs
+
+(formerly chs-changer) A tape changer script very similar to chg-multi, that
+uses the `chs' program to change tapes. As in chg-multi, `tapedev' is ignored.
+`changerfile' names its configuration file, similar to chg-multi.conf.
+`changerdev' will be passed to CHS in a -f command-line switch, unless it is
+set to an empty string or "/dev/null" (watch out for default values!)
+
+chg-rth
+
+(formerly rth-changer) A perl5 script that controls an HPc1553 tape drive via a
+Peripheral Vision Inc. SCSI control subsystem that interprets commands sent on
+the SCSI bus. It expects `tapedev' to specify the tape device to be used.
+`changerfile' and `changerdev' are ignored.
+
+chg-juke
+
+A shell script that uses the Fermilab "juke" software (see http://www.fnal.gov/
+fermitools/, the "juke" link) to control tape chagners. It supports mounting
+multiple tapes for RAIT tapedrive sets, both multiple jukeboxes, or one jukebox
+with multiple tape drives, or combinations. 'juke' must be configured to know
+tape drives by the same name AMANDA calls them. It uses 'changerfile' to track
+AMANDA's current tape state, 'tapedev' must be the tape drive (or RAIT set)
+name, and 'changerdev' is the juke software's name for the changer, or a csh-
+glob that expands to several jukebox names (i.e. "changer{a,b,c}").
+
+chg-rait
+
+A shell script that runs other changers in tandem, and returns a rait:
+{dev1,dev2,...} tape device based on the results of each other changer. So if
+you wanted to have 2 stackers striped with no parity, and you have chg-mtx
+support for your stackers, you would use the follwing changerfile:
+
+
+     nchangers=3
+     tpchanger_1="chg-mtx"
+     changerdev_1="/dev/mtx1"
+     changerfile_1="/some/file1"
+     tapedev_1="/some/dev"
+     tpchanger_2="chg-mtx"
+     changerdev_2="/dev/mtx2"
+     changerfile_2="/some/file2"
+     tapedev_2="/some/dev"
+     tpchanger_3="chg-null"
+     changerdev_3="/dev/null"
+     changerfile_3="/some/file3"
+     tapedev_3="/some/dev"
+
+The third uses the null changer. The tapedev_n entries are only needed if the
+changerfile in question uses them.
+
+chg-disk
+
+Clone of the chg-zd-mtx, but modified to be applied on local directories
+instead of tapes. This changer emulates a robotic that uses virtual tapes
+instead of real ones, where the virtual tapes are real directories on a hard
+disk.
+The directory tree should be:
+
+  slot_root_dir -|
+                 |- info
+                 |- data -> slot1/
+                 |- slot1/
+                 |- slot2/
+                 |- ...
+                 |- slotn/
+
+Where "slot_root_dir" is the tapedev "file:xxx" parameter and "n" the tapecycle
+parameter.
+Please refer to How_to_use_the_AMANDA_file-driver for details of usage.
+
+chg-iomega
+
+This changer script is designed for IOMEGA or JAZZ disks of various sizes as
+well as any other removable disk media. This is a PURELY MANUAL changer. It
+requests insertion of disk media via messages on /dev/tty. So it cannot be used
+via crontab. Make sure you comply with any of the following. - Add statements
+
+          tpchanger "chg-iomega"
+          tapedev "file:<mount_point_of_removable_disk>"
+          (e.g. tapedev "file:/mnt/iomega" )
+          tapetype IOMEGA
+
+
+          define tapetype IOMEGA {
+              comment "IOMega 250 MB floppys"
+              length 250 mbytes
+              filemark 100 kbytes
+              speed 1 mbytes
+          }
+
+to your amanda.conf. - Add entry to /etc/fstab to specify mount point of
+removable disk and make this disk mountable by any user. - Format all disks,
+add a "data" sub directory and label all disks by using amlabel. - Be aware
+that as of version 2.4.4p1, AMANDA can't handle backups that are larger than
+the size of the removable disk media. So make sure /etc/amanda/<backup_set>/
+disklist specifies chunks smaller than the disk size.
+
+chg-null
+
+A trivial changer which loads/unloads on a null: device. Useful with chg-rait
+to throw away a parity stripe by puttin on a null jukebox, or for testing.
+-------------------------------------------------------------------------------
+
+Prev                   Up                  Next
+Chapter 7. Tapetypes  Home  Chapter 9. chg-scsi
+
diff --git a/docs/tapesnchangers.txt b/docs/tapesnchangers.txt
new file mode 100644 (file)
index 0000000..8e8dd6b
--- /dev/null
@@ -0,0 +1,112 @@
+
+Part II. About Tapes and Changers
+Prev                         Next
+
+-------------------------------------------------------------------------------
+
+
+About Tapes and Changers
+
+
+
+Tape-Drives and Tape-Changers
+
+AMANDA is able to use a wide range of Tape-Drives and Tape-Changers. This
+section contains information on the concept of the tapetypes as well as
+information on how to make use of your tape-changer by using the appropriate
+changer-scripts.
+Table of Contents
+
+
+  7._Tapetypes
+
+  8._AMANDA_Tape_Changer_Support
+
+
+        Introduction
+
+        Specifying_a_tape_changer_in_amanda.conf
+
+        Device-specific_tapechanger_script
+
+        Slot_names_and_the_"current"_slot
+
+        Operator_interface
+
+        How_amdump_interacts_with_the_tape_changer
+
+        Builtin_tape-changers
+
+
+              chg-multi_(formerly_chg-generic)
+
+              chg-manual_(formerly_no-changer)
+
+              chg-mtx_(formerly_hp-changer)
+
+              chg-zd-mtx
+
+              chg-scsi-chio_(formerly_seagate-changer,_then_chg-chio)
+
+              chg-scsi_(new_interface,_try_to_drive_a_robot_with_direct_scsi
+              commands)
+
+              chg-chio
+
+              chg-chs
+
+              chg-rth
+
+              chg-juke
+
+              chg-rait
+
+              chg-disk
+
+              chg-iomega
+
+              chg-null
+
+
+
+  9._chg-scsi
+
+
+        Command_line_options
+
+        Notes_about_changer.conf
+
+        AMANDA's_actual_usage_of_chg-scsi
+
+        Configuration_notes
+
+        Hacking_notes
+
+
+  10._RAIT_(Redundant_Array_of_Inexpensive_Tape)_Support
+
+
+        What_is_a_RAIT?
+
+        Using_a_RAIT
+
+        Disaster_Recovery
+
+
+  11._Printing_of_Labels
+
+
+        The_New_Feature
+
+        Labels_provided
+
+        History
+
+        How_it_works
+
+
+-------------------------------------------------------------------------------
+
+Prev                 Up                   Next
+Chapter 6. Restore  Home  Chapter 7. Tapetypes
+
diff --git a/docs/tapetypes.txt b/docs/tapetypes.txt
new file mode 100644 (file)
index 0000000..8f2e4ae
--- /dev/null
@@ -0,0 +1,48 @@
+
+                  Chapter 7. Tapetypes
+Prev  Part II. About Tapes and Changers  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 7. Tapetypes
+
+
+Note
+
+Refer to http://www.amanda.org/docs/tapetypes.html for the current version of
+this document.
+Several tapetype definitions are available in example/amanda.conf They inform
+AMANDA how much it is supposed to be able to store in a tape (length), how much
+space is wasted at the end of a dump image with the EOF mark (filemark) and how
+fast the tape unit is (speed).
+The most inportant parameter is length, since AMANDA may decide to delay a
+backup if length is too small, but, if it is too large, AMANDA may end up
+leaving dumps in the holding disk or having to abort some dump.
+Filemark is important if you have many disks, particularly with small
+incremental backups. The space wasted by so many filemarks may add up and
+considerably modify the available tape space.
+The speed is currently unused.
+If none of the sample tapetype entries match your needs, you may search the
+mailing list archives or look up the on-line list of tapetype entries. Just
+follow the links from http://www.amanda.org.
+AMANDA provides the amtapetype utility to calculate the size of a tape, to
+generate a "tapetype" entry for your amanda.conf.
+Specifying the appropriate tape device, but beware that it may take many hours
+to run (it fills the tape twice ...). Make sure you do not use hardware
+compression, even if you plan to use hardware compression in the future.
+amtapetype writes random data to tape, and random data will expand instead of
+compressing, therefore you'll get an estimate that's smaller than expected.
+
+Note
+
+Please note that amtapetype in releases up to snapshot 20040915 expects to be
+given a tape that can be overwritten without causing harm.
+It does NOT warn you if the tape contains a label or data. amtapetype will
+OVERWRITE the tape so be cautious. You have been warned.
+Snapshot 20040915 introduces a warning and the flag -o to overwrite a labelled
+tape.
+-------------------------------------------------------------------------------
+
+Prev                                Up                                     Next
+Part II. About Tapes and Changers  Home  Chapter 8. AMANDA Tape Changer Support
+
diff --git a/docs/technical.txt b/docs/technical.txt
new file mode 100644 (file)
index 0000000..bc64588
--- /dev/null
@@ -0,0 +1,217 @@
+
+Part V. Technical Background
+Prev                    Next
+
+-------------------------------------------------------------------------------
+
+
+Technical Background
+
+
+
+How AMANDA really works ...
+
+This section contains some papers which describe the technical concepts behind
+AMANDA. You find descriptions of the various APIs as well as a basic draft of
+the internals of AMANDA.
+Table of Contents
+
+
+  20._How_AMANDA_uses_UDP_and_TCP_ports
+
+
+        TCP_port_allocation
+
+        User_TCP_port_range_(--with-tcpportrange)_summary
+
+        UDP_port_allocation
+
+        User_UDP_port_range_(--with-udpportrange)_summary
+
+        Firewalls_and_NAT
+
+
+  21._AMANDA_dumper_API
+
+
+        Introduction
+
+        The_Problem
+
+        Overview_of_the_API
+
+
+              The_`support'_command
+
+
+        The_`selfcheck'_command
+
+        The_`estimate'_and_`estimate-parse'_commands
+
+        The_`backup'_and_`backup-parse'_commands
+
+        The_`index-from-output'_and_`index-from-image'_commands
+
+        The_`restore'_command
+
+        The_`print-command'_command
+
+        Conclusion
+
+
+  22._AMANDA_Internals
+
+
+        Protocols
+
+        server_and_amandad_on_client
+
+        planner_and_driver
+
+        driver_and_dumper
+
+        taper(read)_and_taper(write)
+
+
+  23._AMANDA_Event_API
+
+
+        Introduction
+
+        The_API
+
+
+              event_register
+
+              event_release
+
+              event_loop
+
+              event_wakeup
+
+
+        Data_types
+
+
+              event_handle_t
+
+              event_id_t
+
+              event_type_t
+
+              event_fn_t
+
+
+        Event_Types
+
+
+              EV_READFD
+
+              EV_WRITEFD
+
+              EV_SIG
+
+              EV_TIME
+
+              EV_WAIT
+
+
+
+  24._AMANDA_Security_API
+
+
+        Introduction
+
+        The_Problem
+
+        The_API
+
+
+              protocol_packet_transmission_functions
+
+              stream_functions
+
+
+        Data_Types
+
+
+              security_driver_t
+
+              security_handle_t
+
+              security_stream_t
+
+              security_status_t
+
+
+        SECURITY_DRIVERS
+
+
+              name
+
+              connect
+
+              accept
+
+              close
+
+              sendpkt
+
+              recvpkt
+
+              recvpkt_cancel
+
+              stream_server
+
+              stream_accept
+
+              stream_client
+
+              stream_close
+
+              stream_auth
+
+              stream_id
+
+              stream_write
+
+              stream_read
+
+              stream_read_cancel
+
+
+
+  25._Virtual_Tape_API
+
+  26._Using_Kerberos_with_AMANDA
+
+
+        AMANDA_2.5.0_-_KERBEROS_v4_SUPPORT_NOTES
+
+
+              Configuration
+
+              Installation
+
+              conf_file
+
+
+        AMANDA_2.5.0_-_KERBEROS_v5_SUPPORT_NOTES
+
+
+              Building
+
+              Installation
+
+              conf_file
+
+              Destination_Host_Permissions_file
+
+
+
+-------------------------------------------------------------------------------
+
+Prev                                Up                                  Next
+Chapter 19. AMANDA Survey Results  Home  Chapter 20. How AMANDA uses UDP and
+                                                                   TCP ports
+
diff --git a/docs/topten.txt b/docs/topten.txt
new file mode 100644 (file)
index 0000000..de92e3e
--- /dev/null
@@ -0,0 +1,431 @@
+
+Chapter 17. Collection of the top ten AMANDA questions. And answers.
+Prev  Part IV. Various Information                              Next
+
+-------------------------------------------------------------------------------
+
+Chapter 17. Collection of the top ten AMANDA questions. And answers.
+
+
+Stefan G. Weichinger
+
+Original text; Conversion to Docbook/XML
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  Reason_for_starting_this_list.
+
+  the_DLE-question
+
+  the_localhost-question
+
+  the_friday-tape-question
+
+  the_multiple-dumps-question
+
+  the_mailing-list-question
+
+  the_distro-question
+
+  the_index-question
+
+  the_tapetype-questions
+
+  the_size-question
+
+  the_GUI-question
+
+  the_holding-disk_question
+
+  ...
+
+
+Note
+
+Refer to http://www.amanda.org/docs/topten.html for the current version of this
+document.
+
+ Reason for starting this list.
+
+Jon LaBadie once wrote to me:
+" I think a good "what is AMANDA", "how is it different", "can I use it in my
+setup", "why is it so different" kinda document is needed to stop the constant
+"how do I put 10 dumps on one tape", or "how do I make AMANDA do full backups
+on saturday and incrementals ..." queries off the list :)) "
+Stefan G. Weichinger
+
+ the DLE-question
+
+A posting from the amanda-users mailing-list (mailto://amanda-users@amanda.org)
+asked:
+"What, please, is a "DLE"? May it mean: Down Loadable Entity ??? Stupid. Do
+Less Errors ??? Stupid again. Hmmmm ..."
+People consulting the amanda-users-mailinglist for the first time often get
+confused by the use of the abbreviation DLE.
+It has become very common for regular mailinglist-participants to use the
+abbreviation DLE, which means in its long form
+DiskList Entry
+A DLE refers to one entry in the disklist of an AMANDA-configuration. General
+usage was to describe them as partitions, or file systems. But in fact they do
+not have to be either. They can be directory trees, or multiple trees, or trees
+with some branches cut off. So the more generic term DLE was coined.
+
+ the localhost-question
+
+People get something like:
+
+  >Amanda Backup Client Hosts Check
+  >--------------------------------
+  >ERROR: localhost: [access as amanda not allowed from
+  >amanda@localhost.localdomain] amandahostsauth failed
+
+and ask "Why?"
+SHORT ANSWER:
+DO NOT USE "localhost" as host entry in your disklist entries (aka DLEs). Use
+the FQDN (Fully Qualified Domain Name) instead.
+In AMANDA-releases newer than 2004-03-22 there is a WARNING issued when you use
+something like "localhost" or localhost.localdomain.net in your disklist.
+Example (applies to Linux, syntax may be different on other systems):
+
+  $ hostname --fqdn
+  oops1.oops.co.at
+
+  $ cat disklist
+  oops1.oops.co.at /root root-tar # do it like this
+  localhost        /root root-tar # DON'T DO IT LIKE THIS
+
+GOOD ANSWER (provided by John R. Jackson):
+There are (at least) two things going on here and they should have their own
+question/answer.
+Completely independent of the "localhost" vs. FQDN issue are the people who get
+this message because of any number of problems. Let me reword the error and
+then give some typical goofs:
+
+  ERROR: some.amanda.client: access as amanda not allowed from
+  amanda@some.amanda.server
+  amandahostsauth failed
+
+(error message reformatted here ...)
+The first thing to understand is how to read this message. When it says "access
+as amanda ..." it is telling you the client side ( amandad) is running as user
+"amanda". The "... from amanda@some.amanda.server" part tells you the server
+trying to connect is "some.amanda.server" and the AMANDA command (e.g. amcheck
+or amdump) is running as user "amanda".
+The user names are typically the same on both client and server, but some
+situations use different names and it is important to understand which is
+which. For instance, amrecover connects as root ("... from
+root@some.amanda.server") regardless of what the usual AMANDA user is.
+Potential problems:
+
+* "some.server" is not spelled exactly that way in ~amanda/.amandahosts. A
+  typical error is to not use a fully qualified name (although simple typos
+  happen as well). For instance, this line:
+
+
+  some amanda
+
+does not match "some.amanda.server" even though both names may be equivalent.
+When AMANDA looks up the host name in .amandahosts, it uses the exact name it
+lists in the message. It does not try to look up abbreviations.
+The only exception to this is that the lookup is case insensitive.
+
+* The user name listed in ~amanda/.amandahosts is not the one trying to connect
+  from the server. In particular, watch out for the "root" case listed above
+  for amrecover. The AMANDA server typically needs lines like this in its
+  .amandahosts file:
+
+
+  some.amanda.client   root
+
+
+* There are permission problems on the client preventing user "amanda" from
+  reading its own .amandahosts file. Make sure the file itself is readable to
+  the user "amanda" and all the parent directories down to it can be traversed.
+  A simple test is:
+
+
+  su - amanda -c "cat ~amanda/.amandahosts"
+
+Now, back to the localhost issue. This:
+Do NOT USE "localhost" as host entry in your disklist entries (aka DLEs). Use
+the FQDN (Fully Qualified Domain Name) instead.
+is not really an answer, more of a command :-).
+There are a couple of reasons to NOT use "localhost". First is amrecover will
+not work as expected. When it connects to the server (even though they are the
+same machine), the server will look for the matching DLE's using the real host
+name, not "localhost". The sethost command inside amrecover can "fix" this, but
+why not just set it up right in the first place?
+Another reason to not use "localhost" is because it helps with future changes.
+As the AMANDA configuration grows, it's not at all unusual to take a server and
+make it a client of a new, larger, server. But now "localhost" does not point
+to the same machine it used to. If the FQDN of the machine had been used all
+along, this upgrade would have been much easier.
+There is also no performance reason (any more) to use "localhost" instead of
+the FQDN. Modern OS network stacks know to shortstop packets destined for the
+local machine and never let them hit the wire. Yes, I'm old enough to remember
+when they didn't :-).
+
+ the friday-tape-question
+
+"How do I make AMANDA do full backups on Saturday and incrementals ... ?"
+"My backup screwed up on tuesday and now it keeps asking for the tuesday tape
+even though it is wednesday!"
+ANSWER:
+The short answer is: You can't.
+The longer answer is: You can. But you should not.
+The reason: AMANDA is designed to schedule your backups. Let "her" do it.
+When you want to make the best use of AMANDA, you have to let go the classic
+schedule where one used to have one tape dedicated to each day of the week, and
+one for the friday.
+The main difference in concept is this:
+In the classic backup scheme you said:
+"I want to have incremental backups from Mo-Th and a full backup on Fr."
+Using AMANDA you say:
+"I want to have at least one full backup in 5 days."
+So you don't have to specify exactly WHEN the full backup should happen. You
+just tell AMANDA some goals it should reach and let it work out the details.
+There are several advantages in this:
+Imagine that you have your classic backup-schedule running fine. Everything is
+calculated and designed well, so your tape gets filled well each night.
+Now one user generates an unforeseen huge amount of data. For example, he
+duplicates one big data-directory by mistake.
+So the size of the directory raises within one day, maybe for multiple GBs.
+Would your classic backup-scheme catch that? Or would it run out of tape,
+simply because it was not calculated to have that filesystem with that size?
+AMANDA would try to catch it (and most of the time succeed ...).
+As there is the estimate-phase before actually dumping something, AMANDA can
+look at the DLEs and determine the actual size at the time. It also determines
+the size of an incremental backup so it can test for the Plan B to just run a
+level-1 if it does not work out to do a level-0 for that DLE.
+If the size of the DLE is much bigger than it has been the run before, AMANDA
+still tries to meet your goals. It just reschedules stuff, combining full and
+incremental backups to meet the goals as good as possible.
+So you can think of it as some algorithm which lets AMANDA adapt to your data.
+If you set the goals in a reasonable way, AMANDA will just do the rest.
+
+ the multiple-dumps-question
+
+"How do I put 10 dumps on one tape?"
+ANSWER (provided by Jon LaBadie):
+Use another backup scheduler.
+This question is most often asked by individual computer users as a cost
+consideration.
+AMANDA was developed at the University of Maryland Computing Center for use in
+moderately sized computer centers. That it can be used by users of small
+computers is a testament to its designers and maintainers.
+While it may seem cost effective to put as many dumps as possible on a single
+tape, in a computing center that would be considered a very risky decision. The
+loss of, or damage to, a single tape would be the loss of many days worth of
+dumps. That is too much to chance.
+Thus, AMANDA was designed to never overwrite a non-AMANDA tape, nor an AMANDA
+tape from a different configuration, nor an AMANDA tape from the current
+configuration that is still "active", i.e. has backups on the tape more recent
+than the dumpcycle length.
+If you still feel you want AMANDA to put multiple dumps on a single tape, there
+is a crude way to accomplish your goal.
+But first ask yourself, "If my data is worth so little that I can not afford a
+few more tapes, why am I backing it up?"
+
+Note
+
+Most of the time it won't be YOU paying for the tapes as you may be working for
+some company. If your boss tries to force you into doing this multiple-dumps-
+on-one-tape thing, be sure to point him at this risk. Business people tend to
+understand the price-difference between some tapes and a major data-loss.
+Stefan G. Weichinger
+A common way to put multiple dumps on a single tape is to let them accumulate
+on the holding disk and use the amflush command when you want to put them on
+tape. I.e. if you want a weeks' worth of backups on a single tape, leave the
+tape out for a week. Then stick it in and run amflush.
+(Better make sure you have sufficient disk space on your holding disk.)
+Note, a slight variant of this is to have the parameter autoflush in
+amanda.conf set to "yes". (Users of older AMANDA-releases should check out if
+their version already supports that parameter.)
+Then after several dumps have collected in the holding disk, put the tape in
+before that day's amdump is scheduled. amdump will both flush the holding disk
+to tape and add the regularly scheduled dump.
+
+ the mailing-list-question
+
+"How do i get off this damn mailing list?"
+ANSWER:
+Frequent users of the AMANDA-users-mailing-list get mails like containing
+"unsubscribe"
+as people are trying desperately to get off the list.
+Everyone that subscribes to AMANDA-users gets a mail in which the following is
+contained:
+>Welcome to the amanda-users mailing list!
+>Please save this message for future reference. Thank you.
+>If you ever want to remove yourself from this mailing list, >you can send mail
+to <Majordomo@amanda.org> with the following >command in the body of your email
+message:
+> unsubscribe amanda-users
+Did you see that? You have to send your mail to <Majordomo@amanda.org>, and NOT
+to <amanda-users@amanda.org> !
+
+ the distro-question
+
+"Where can i get binary distributions of AMANDA?"
+ANSWER:
+It is well known that various distributions of Linux contain precompiled
+packages of AMANDA-servers and -clients.
+Due to the design of the AMANDA source code, in which MANY features can be
+configured at compile-time, it is heavily and heartily recommended to take the
+effort and roll your own special flavour.
+Thinking about these things before actually doing backups with AMANDA will help
+you in many ways. And you get the benefits of compiling your own paths/devices/
+configurations right into your AMANDA-binaries. You also get the benefit of a
+much more improved understanding of the way AMANDA does backups.
+
+ the index-question
+
+"Why does amrecover say there are no index files?"
+ANSWER:
+It is very likely that AMANDA is right about that. Check your dumptypes and
+make sure they include the line:
+
+  index yes
+
+If this is the case and you still get that message, recheck the installation of
+your amindexd-binary.
+Is the line in your (x)inetd-configuration pointing to the proper binary? Is
+this line active (= uncommented)? Did (x)inetd reread that configuration since
+that line was edited?
+
+ the tapetype-questions
+
+" amtapetype has been running for 9 days, is this normal?"
+"Will AMANDA work with my frozboz tape drive/library?"
+"Which device is my changer?"
+" amtapetype is broken, it says my 200GB tape only holds 65GB."
+"My file marks are HUGE, 1.3MB (on a 200GB tape, i.e. about 0.05% of the total
+capacity, or expressed another way, maybe 2 mm of a 125000 mm tape ...)"
+ANSWER:
+It is crucial to tell AMANDA the truth about the tape-device(s) you want to
+use. Given the wrong values, AMANDA can't calculate proper dumpsizes, free
+tape-space or make valuable use of compression.
+Before you consider running amtapetype, think twice. Twice.
+As tapedrives tend to be produced by not-so-small companies and as those not-
+so-small companies tend to produce more than one unit to maximize profits, it
+is very likely that someone else has the same device you have or at least one
+that uses the same technology.
+Many people have already run amtapetype to determine the proper values to fill
+in their amanda.conf-files. Browse the example amanda.conf in your AMANDA-
+tarball for various tapetypes. Browse the AMANDA-FAQ on http://www.amanda.org.
+Chances are high that you find just your device described.
+As in every other topic discussed in internet mailing lists, please try finding
+an answer there before asking on the AMANDA-users list.
+If your device is so exotic that even the AMANDA-users can't help you, you
+still have your copy of amtapetype.
+Before you start running it, note this:
+
+* DISABLE hardware compression on your drive.
+
+A common mistake is to have hw-compression enabled. amtapetype uses random data
+to test for the size and speed of your drive. Random data is pretty bad at
+getting compressed. In fact it gets even bigger so the results given back are
+useless. Disable it even if you are planning to use your drive with enabled hw-
+compression.
+
+* Expect it running long.
+
+As you can read in the man page, amtapetype writes the full tape twice, which
+can be a lot of data for modern drives (approaching a TByte). It also writes
+tape marks every 10 MBytes (by default) which forces the drive to flush its
+internal buffers and slows the process down. You can shorten this by giving
+amtapetype a better estimate of the expected capacity:
+$ amtapetype -e 100g -f /dev/nst0
+This "prepares" amtapetype to expect a tape with 100 GB capacity.
+If amtapetype really runs for 9 days, you can be pretty sure there is something
+wrong with your approach.
+And for the filemark-size: Just read the question again.
+
+ the size-question
+
+"How do I back up a partition that won't fit on a tape?"
+aka
+"Can AMANDA span one file over multiple tapes?"
+ANSWER:
+There are two basic rules when it comes to these things:
+
+* AMANDA supports using more than one tape in a single run of amdump
+* AMANDA does not support splitting a dump image across tapes
+
+The first rule lets you make use of two or more tapes for a single amdump when
+using a tapechanger-robot or a tape-library. You could even use multiple tapes
+with the chg-manual-script, waiting patiently for one tape to be filled, then
+change tapes manually.
+No matter how many tapes you can put in your robot or how long you can stay
+awake to change tapes you can NOT split the backup image of one of your
+disklist entries (aka DLEs) across multiple tapes. No way.
+So you may ask the first question listed above. As the size of harddisk- drives
+grows steadily it is not uncommon to have multiple hundreds of gigabytes of
+harddrive capacity in one system. Compared to the size of your maybe not-so-
+shiny-anymore tapedrive this seems (and maybe is) huge.
+What to do?
+Don't split your dump image (it can't be done), split your DLEs.
+You have to use GNU-tar in your dumptypes for this.
+Try to redefine your disklist as in the following example:
+
+  fatboy  /bigmama_BIGDIR  /bigmama {     # a big subdirectory
+  comp-user-tar
+  include "./bigdir"
+  }
+  fatboy  /bigmama_FILES01 /bigmama {     # all files beginning with...
+  nocomp-user-tar
+  include "./file[01]*"
+  }
+  fatboy  /bigmama_FILES23 /bigmama {
+  nocomp-user-tar
+  include "./file[23]*"
+  }
+  ...
+  fatboy  /bigmama_REST /bigmama {        # Catch-all
+  nocomp-user-tar
+  exclude "./file[0-9]*"
+  exclude append "./bigdir"
+  }
+
+(example taken from a mail by Paul Bijnens on the AMANDA-users-list)
+The trick is to form several chunks of data of which each fits on tape. In the
+example above the chunks are formed by regular expressions matching files named
+like file00, file123 and file9999. You have to look at your DLEs to find the
+patterns describing your chunks.
+As this technique forms data-chunks that fit on your tape it also helps AMANDA
+to schedule your backups more flexible. Having more and smaller DLEs, the
+planner has more variations to possibly schedule your backups, so this will
+help getting nice output from amadmin <conf> balance, too.
+
+Note
+
+DLE-spanning might be supported by AMANDA in a future release.
+
+ the GUI-question
+
+"Is anyone working on a GUI for AMANDA?"
+ANSWER:
+Actually there are people working on GUIs for AMANDA. Aside from that the
+question really is: "Does anyone need a GUI for AMANDA?"
+Given the fact that backups tend to be run at night while people tend to sleep,
+who would need a fancy GUI showing 3D-backup-diagrams via X11? The only part of
+backups where GUIs maybe could add some comfort is recovery for unexperienced
+users.
+
+ the holding-disk question
+
+"Why does it say "Some dumps may have been left in the holding disk." and there
+is nothing in the holding disk?"
+ANSWER:
+The third word in the message. Some dumps MAY have been left.
+
+ ...
+
+Please feel free to suggest additions and corrections. Write to the amanda-
+users-mailinglist at mailto://amanda-users@amanda.org.
+-------------------------------------------------------------------------------
+
+Prev                     Up                          Next
+Chapter 16. AMANDA FAQ  Home  Chapter 18. AMANDA WISHLIST
+
diff --git a/docs/upgrade.txt b/docs/upgrade.txt
new file mode 100644 (file)
index 0000000..81db04e
--- /dev/null
@@ -0,0 +1,68 @@
+
+        Chapter 28. Upgrade Issues
+Prev  Part VI. Historical files  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 28. Upgrade Issues
+
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/upgrade.html for the current version of
+this document.
+AMANDA 2.4.0 has introduced a major incompatibility in the AMANDA protocol.
+This means that pre-2.4.0 clients won't interoperate with a 2.4.0 server, nor
+will 2.4.0 clients interoperate with pre-2.4.0 servers. You have to upgrade
+them all at the same time.
+To ease the upgrade process AMANDA has, from release 2.4.0 on, a configure flag
+(--with-testing) that will cause AMANDA to use alternate service names (AMANDA-
+test) instead of the standard ones. This allows you to keep using your old
+version of AMANDA while you test the new one.
+Depending upon the version of AMANDA you are upgrading from, AMANDA may use a
+different database library to store the backup information, and the new AMANDA
+may not be able to read the old AMANDA database files. In this case, you will
+want to do something like the following:
+Before the upgrade (using the old version of amadmin):
+
+       # cd /var/AMANDA/CONFIG
+       # amadmin CONFIG export > zzz
+       # mkdir backup
+       # mv curinfo* backup
+       
+
+and after the upgrade (using the new version of amadmin):
+
+       # cd /var/AMANDA/CONFIG
+       # amadmin CONFIG import < zzz
+       
+
+and a month :-) after you are happy with the new version:
+
+       # cd /var/AMANDA/CONFIG
+       # rm -rf backup
+       
+
+After 2.4.0, the structure of the directory holding the index files was changed
+to have three levels instead of being flat. This greatly reduces the number of
+files in a given directory, which was a problem for some systems.
+The new layout is:
+[indexdir]/hostname/filesystem/YYYYMMDD_L.gz
+where hostname and filesystem are "sanitized" versions of the names from
+disklist, i.e. '/' characters are converted to '_' and so on. This new naming
+convention matches the one used for the text formatted database.
+A script is available to convert the flat directory structure to the new
+layout:
+http://www.amanda.org/2.4-conv/msg00428.html
+-------------------------------------------------------------------------------
+
+Prev                                   Up                            Next
+Chapter 27. Response to CPIO Security Home  Chapter 29. What once was new
+Notice Issue 11: 
+
diff --git a/docs/using.txt b/docs/using.txt
new file mode 100644 (file)
index 0000000..48e9555
--- /dev/null
@@ -0,0 +1,1983 @@
+
+            Chapter 15. Using AMANDA
+Prev  Part IV. Various Information  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 15. Using AMANDA
+
+
+John R. Jackson
+
+Original text
+AMANDA Core Team
+<jrj@purdue.edu>
+
+Gavin Henry
+
+XML-conversion
+Suretec Systems Ltd.
+<ghenry@suretecsystems.com>
+
+Stefan G. Weichinger
+
+XML-conversion, Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  An_Introduction
+
+  AMANDA_Features
+
+  Future_Capabilities_of_AMANDA
+
+  AMANDA_Resources
+
+  Installing_AMANDA
+
+
+        Install_Related_Packages
+
+        Perform_Preliminary_Setup
+
+        Configure_the_AMANDA_Build
+
+        Build_and_Install_AMANDA
+
+        Configuring_AMANDA
+
+        Decide_on_a_Tape_Server
+
+        Decide_Which_Tape_Devices_to_Use
+
+        Decide_Whether_to_Use_Compression
+
+        Decide_Where_the_Holding_Space_Will_Be
+
+        Compute_Your_Dump_Cycle
+
+        Copy_and_Edit_the_Default_Configuration_File
+
+        Configure_the_Holding_Disk
+
+        Configure_Tape_Devices_and_Label_Tapes
+
+        Configure_Backup_Clients
+
+        Test_and_Debug_Setup
+
+
+  Operating_Amanda
+
+
+        Run_amdump
+
+        Read_AMANDA's_Reports
+
+        Monitor_Tape_and_Holding_Disk_Status
+
+        Adding_Tapes_at_a_Particular_Position_in_the_Cycle
+
+        Miscellanous_Operational_Notes
+
+
+  Advanced_AMANDA_Configuration
+
+
+        Adjust_the_Backup_Cycle
+
+        Adjust_Parallelism
+
+        Monitor_for_Possible_Improvements
+
+        Excluding_Files
+
+
+  Restoring_with_AMANDA
+
+
+        Configuring_and_Using_amrecover
+
+        Using_amrestore
+
+        Restoring_Without_AMANDA
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/using.html for the current version of this
+document.
+
+An Introduction
+
+
+Note
+
+This chapter was written by John R. Jackson with input from Alexandre Oliva. It
+is part of the O'Reilly book "Unix Backup & Recovery" by W. Curtis Preston and
+has been provided online at http://www.backupcentral.com/amanda.html since the
+first edition of this book.
+During the Docbook-conversion of the AMANDA-docs we asked for permission to
+include this chapter in the Official AMANDA documentation and W. Curtis Preston
+allowed to us to include the now converted version. There will be some updates
+to this chapter in the next few months to reflect various changes and
+enhancements.
+You can find online versions of this chapter at http://www.amanda.org/docs/
+using.html and at http://www.backupcentral.com/amanda.html.
+AMANDA, the Advanced Maryland Automated Network Disk Archiver, is a public
+domain utility developed at the University of Maryland. It is as advanced as a
+free backup utility gets, and has quite a large user community. AMANDA allows
+you to set up a single master backup server to back up multiple hosts to a
+single backup drive. (It also works with a number of stackers.) AMANDA uses
+native dump and/or GNU-tar, and can back up a large number of workstations
+running multiple versions of Unix. Recent versions can also use SAMBA to back
+up Microsoft Windows (95/98/NT/2000)-based hosts. More information about AMANDA
+can be found at http://www.amanda.org
+AMANDA was written primarily by James da Silva at the Department of Computer
+Science of the University of Maryland around 1992. The goal was to be able to
+back up large numbers of client workstations to a single backup server machine.
+AMANDA was driven by the introduction of large capacity tape drives, such as
+ExaByte 8mm and DAT 4mm. With these drives, and the increased number of
+personal workstations, it no longer made sense to back up individual machines
+to separate media. Coordinating access and providing tape hardware was
+prohibitive in effort and cost. A typical solution to this problem reaches out
+to each client from the tape host and dumps areas one by one across the
+network. But this usually cannot feed the tape drive fast enough to keep it in
+streaming mode, causing a severe performance penalty.
+
+Note
+
+Since AMANDA is optimized to take advantage of tape drives, we will use the
+word tape throughout this section. However, that doesn't mean that you couldn\19t
+use it with an optical or CD-R drive.
+The AMANDA approach is to use a "holding disk" on the tape server machine, do
+several dumps in parallel into files in the holding disk, and have an
+independent process take data out of the holding disk. Because most dumps are
+small partials, even a modest amount of holding disk space can provide an
+almost optimal flow of dump images onto tape.
+AMANDA also has a unique approach to scheduling dumps. A "dump cycle" is
+defined for each area to control the maximum time between full dumps. AMANDA
+takes that information, statistics about past dump performance, and estimates
+on the size of dumps for this run to decide which backup level to do. This gets
+away from the traditional static "it's Friday so do a full dump of /usr on
+client A" approach and frees AMANDA to balance the dumps so the total run time
+is roughly constant from day to day.
+AMANDA is freely-available software maintained by the AMANDA Users Group. Based
+on membership of AMANDA-related mailing lists, there are probably well over
+1500 sites using it. This chapter is based on AMANDA version 2.4.2. Updated
+versions of this section will be available with the AMANDA source code.
+
+AMANDA Features
+
+AMANDA is designed to handle large numbers of clients and data, yet is
+reasonably simple to install and maintain. It scales well, so small
+configurations, even a single host, are possible. The code is portable to a
+large number of Unix platforms. It calls standard backup software, such as
+vendor provided dump or GNU-tar, to perform actual client dumping. There is
+also support for backing up Windows-based hosts via SAMBA. There is no
+Macintosh support yet.
+AMANDA provides its own network protocols on top of TCP and UDP. It does not,
+for instance, use rsh or rdump/rmt. Each client backup program is instructed to
+write to standard output, which AMANDA collects and transmits to the tape
+server host. This allows AMANDA to insert compression and encryption and also
+gather a catalogue of the image for recovery. Multiple clients are typically
+backed up in parallel to files in one or more holding disk areas. A separate
+tape writing process strives to keep the tape device streaming at maximum
+throughput. AMANDA can run direct to tape without holding disks, but with
+reduced performance.
+AMANDA supports using more than one tape in a single run, but does not yet
+split a dump image across tapes. This also means it does not support dump
+images larger than a single tape. AMANDA currently starts a new tape for each
+run and does not provide a mechanism to append a new run to the same tape as a
+previous run, which might be an issue for small configurations.
+AMANDA supports a wide range of tape storage devices. It uses basic operations
+through the normal operating system I/O subsystem and a simple definition of
+characteristics. New devices are usually trivial to add. Several tape changers,
+stackers, and robots are supported to provide truly hands-off operation. The
+changer interface is external to AMANDA and well-documented, so unsupported
+changers can be added without a lot of effort.
+Either the client or tape server may do software compression, or hardware
+compression may be used. On the client side, software compression reduces
+network traffic. On the server side, it reduces client CPU load. Software
+compression may be selected on an image-by-image basis. If Kerberos is
+available, clients may use it for authentication and dump images may be
+encrypted. Without Kerberos, .amandahosts authentication (similar to .rhosts)
+is used, or AMANDA may be configured to use .rhosts (although rsh/rlogin/rexec
+are not themselves used). AMANDA works well with security tools like TCP
+Wrappers (ftp://info.cert.org/pub/network_tools) and firewalls.
+Since standard software is used for generating dump images and software
+compression, only normal Unix tools such as mt, dd, and gunzip/uncompress are
+needed to recover a dump image from tape if AMANDA is not available. When
+AMANDA software is available, it locates which tapes are needed and finds
+images on the tapes.
+AMANDA is meant to run unattended, such as from a nightly cron job. Client
+hosts that are down or hung are noted and bypassed. Tape errors cause AMANDA to
+fall back to ?degraded? mode where backups are still performed but only to the
+holding disks. They may be flushed to tape by hand after the problem is
+resolved.
+AMANDA has configuration options for controlling almost all aspects of the
+backup operation and provides several scheduling methods. A typical
+configuration does periodic full dumps with partial dumps in between. There is
+also support for:
+
+* Periodic archival backup, such as taking full dumps to a vault away from the
+  primary site.
+* Incremental-only backups where full dumps are done outside of AMANDA, such as
+  very active areas that must be taken offline, or no full dumps at all for
+  areas that can easily be recovered from vendor media.
+* Always doing full dumps, such as database areas that change completely
+  between each run or critical areas that are easier to deal with during an
+  emergency if they are a single-restore operation.
+
+It's easy to support multiple configurations on the same tape server machine,
+such as a periodic archival configuration along side a normal daily
+configuration. Multiple configurations can run simultaneously on the same tape
+server if there are multiple tape drives.
+Scheduling of full dumps is typically left up to AMANDA. They are scattered
+throughout the dump cycle to balance the amount of data backed up each run.
+It's important to keep logs of where backup images are for each area (which
+AMANDA does for you), since they are not on a specific, predictable, tape
+(e.g., the Friday tape will not always have a full dump of /usr for client A).
+The partial backup level is also left to AMANDA. History information about
+previous levels is kept and the backup level automatically increases when
+sufficient dump size savings will be realized.
+AMANDA uses a simple tape management system and protects itself from
+overwriting tapes that still have valid dump images and from tapes not
+allocated to the configuration. Images may be overwritten when a client is down
+for an extended period or if not enough tapes are allocated, but only after
+AMANDA has issued several warnings. AMANDA can also be told to not reuse
+specific tapes.
+A validation program may be used before each run to note potential problems
+during normal working hours when they are easier to correct. An activity report
+is sent via e-mail after each run. AMANDA can also send a report to a printer
+and even generate sticky tape labels.
+There is no graphical interface. For administration, there is usually only a
+single simple text file to edit, so this is not much of an issue. For security
+reasons, AMANDA does not support user controlled file recovery. There is an
+ftp-like restore utility for administrators to make searching online dump
+catalogues easier when recovering individual files.
+
+Future Capabilities of AMANDA
+
+In addition to the usual enhancements and fixes constantly being added by the
+AMANDA Core Development Team, three main changes are in various stages of
+development.
+
+* A new internal security framework will make it easier for developers to add
+  other security methods, such as SSH (ftp://ftp.cs.hut.fi/pub/ssh/) and SSL
+  (Secure Socket Layer).
+* Another major project is a redesign of how AMANDA runs the client dump
+  program. This is currently hardcoded for a vendor dump program, GNU-tar or
+  SAMBA tar. The new mechanism will allow arbitrary programs such as cpio,
+  star, and possibly other backup systems. It will also add optional pre-dump
+  and post-dump steps that can be used for locking and unlocking, and snapshots
+  of rapidly changing data such as databases or the Windows registry.
+* The third major project is a redesign of the output subsystem to support non-
+  tape media such as CD-ROM, local files, remote files via tools like rcp and
+  ftp, remote tapes, etc. It will also be able to split dump images across
+  media, handle multiple simultaneous media of different types such as writing
+  to multiple tapes or a tape and a CD-ROM, and handle writing copies of images
+  to multiple media such as a tape to keep on site and a CD-ROM or duplicate
+  tape for archiving.
+* In addition, the output format will be enhanced to include a file-1 and a
+  file-n. The idea is to put site-defined emergency recovery tools in file-1
+  (the first file on the output) that can be retrieved easily with standard
+  non-AMANDA programs like tar, then use those tools to retrieve the rest of
+  the data. The file-n area is the last file on the output and can contain
+  items such as the AMANDA database, which would be complete and up to date by
+  the time file-n is written.
+
+
+AMANDA Resources
+
+AMANDA may be obtained via the http://www.amanda.org web page or with anonymous
+ftp at ftp://ftp.amanda.org/pub/amanda.A typical release is a gzip compressed
+tar file with a name like amanda-2.4.1.tar.gz, which means it is major version
+2.4 and minor version 1. There are occasional patch releases that have a name
+like amanda-2.4.1p1.tar.gz (release 2.4.1 plus patch set 1). Beta test pre-
+releases have a names like amanda-2.5.0b3.tar.gz (third beta test pre-release
+of 2.5.0).
+Some operating system distributions provide pre-compiled versions of AMANDA,
+but because AMANDA hardcodes some values into the programs, they may not match
+the configuration. Work is being done to move these values to run-time
+configuration files, but for now AMANDA should be built from source.
+The AMANDA web page contains useful information about patches not yet part of a
+release, how to subscribe to related mailing lists, and pointers to mailing
+list archives. Subscribe to at least amanda-announce to get new release
+announcements or amanda-users to get announcements plus see problems and
+resolutions from other AMANDA users. The amanda-users mailing list is a
+particularly good resource for help with initial setup as well as problems.
+When posting to it, be sure to include the following information:
+
+* AMANDA version
+* OS version on the server and client(s)
+* Exact symptoms seen, such as error messages, relevant sections of e-mail
+  reports, debugging and log files
+* Anything unusual or recent changes to the environment
+* A valid return e-mail address
+
+Finally, the docs directory in the release contains several files with helpful
+information, such as a FAQ.
+
+Installing AMANDA
+
+After downloading and unpacking the AMANDA release, read the README, docs/
+INSTALL, and docs/SYSTEM.NOTES files. They contain important and up-to-date
+information about how to set up AMANDA.
+
+Install Related Packages
+
+Several other packages may be required to complete an AMANDA install. Before
+continuing, you should locate and install packages your environment will need.
+In particular, consider the following:
+
+
+  GNU-tar 1.12 or later \14 www.gnu.org
+      The GNU version of the standard tar program with enhancements to do
+      partial backups and omit selected files. It is one of the client backup
+      programs AMANDA knows how to use.
+
+  Samba 1.9.18p10 or later \14 www.samba.org
+      SAMBA is an implementation of the System Message Block (SMB) protocol
+      used by Windows-based systems for file access. It contains a tool,
+      smbclient, that AMANDA can use to back them up.
+
+  Perl 5.004 or later \14 www.perl.org
+      Perl is a scripting programming language oriented toward systems
+      programming and text manipulation. It is used for a few optional AMANDA
+      reporting tools and by some tape changers.
+
+  GNU readline 2.2.1 or later \14 www.gnu.org
+      The GNU readline library may be incorporated into interactive programs to
+      provide command-line history and editing. It is built into the AMANDA
+      amrecover restoration tool, if available.
+
+  GNU awk 3.0.3 or later \14 www.gnu.org
+      The GNU version of the awk programming language contains a common version
+      across platforms and some additional features. It is used for the
+      optional AMANDA amplot statistics tool.
+
+  Gnuplot 3.5 or later \14 ftp://ftp.dartmouth.edu/pub/gnuplot/
+      This gnuplot library (which has nothing to do with the GNU tools, see the
+      accompanying README) is a graph plotting package. It is used for the
+      optional AMANDA amplot statistics tool.
+
+Be sure to look in the AMANDA patches directory and the patches section on the
+web page for updates to these packages. SAMBA versions before 2.0.3, in
+particular, must have patches applied to make them work properly with Amanda.
+Without the patches, backups appear to work but the resulting images are
+corrupt.
+When AMANDA is configured, locations of additional software used on the
+clients, such as GNU-tar and SAMBA, get built into the AMANDA programs, so
+additional software must be installed in the same place on the AMANDA build
+machine and all the clients.
+
+Perform Preliminary Setup
+
+A typical AMANDA configuration runs as a user other than root, such as backup
+or amanda, given just enough permissions to do backups. Often, direct login as
+the user is disallowed. To use the vendor dump program instead of GNU-tar, the
+AMANDA user must be in a group with read access to the raw disk devices.
+Membership in this group should be tightly controlled since it opens up every
+file on the client for viewing.
+There are two ways to link AMANDA and the raw device group membership. Either
+put the AMANDA user in the group that currently owns the raw devices, as the
+primary group or as a secondary, or pick a new group for AMANDA and change the
+group ownership of the devices. AMANDA (actually, the vendor dump program)
+needs only read access, so turn off group write permission. Turn off all
+"world" access.
+To use GNU-tar, AMANDA runs it under a setuid-root program that grants the
+needed permissions. The GNU version of tar must be used with AMANDA. Vendor
+supplied versions (unless they originated from GNU and are at least version
+1.12) do not work because AMANDA depends on additional features.
+
+Configure the AMANDA Build
+
+Use the AMANDA user and group for the --with-user and --with-group options to
+./configure. For instance, to use amanda for the user and backup as the group:
+./configure --with-user=amanda --with-group=backup ...
+No other options are required for ./configure, but all the possibilities may be
+seen with ./configure --help. Don't get carried away changing options. The
+defaults are usually suitable and some require experience with AMANDA to fully
+understand. Leave --with-debugging enabled so debug log files are created on
+the clients. They take very little space but are often necessary for tracking
+down problems.
+The normal build creates both tape server and client software. The tape server
+host is often backed up by AMANDA and needs the client parts. However, the
+clients usually do not need the tape server parts. A little disk space and
+build time may be saved by adding --without-server to the ./configure arguments
+when building for them.
+The default security mechanism uses a file formatted just like .rhosts but
+called .amandahosts. This keeps AMANDA operations separate from normal rsh/rcp
+work that might use the same user. It is not recommended, but .rhosts and
+hosts.equiv may be used by adding --without-amandahosts to the ./configure
+arguments.
+The TCP ports used for data transfer may be restricted with --with-portrange to
+use AMANDA between hosts separated by a firewall. A typical entry would be: ./
+configure --with-portrange=50000,50100 ... This does not affect the initial UDP
+requests made from the tape server to the clients. The amanda UDP port
+(typically 10080) must be allowed through the firewall.
+If more than just a few ./configure options are used, they may be put in /usr/
+local/share/config.site or /usr/local/etc/config.site to keep them the same
+from build to build. An example is in example/config.site.
+
+Build and Install AMANDA
+
+After ./configure is done, run make to build AMANDA, then make install to
+install it. The make install step must be done as root because some AMANDA
+programs require system privileges. Unless the base location is changed, AMANDA
+installs into these areas:
+
+
+  /usr/local/sbin
+      Programs administrators run.
+
+  /usr/local/lib
+      Libraries.
+
+  /usr/local/libexec
+      Private programs only AMANDA uses.
+
+  /usr/local/man
+      Documentation.
+
+Now is a good time to read the main AMANDA man page. It provides an overview of
+AMANDA, a description of each program, and detailed configuration information.
+The following programs must be setuid-root (which make install as root does).
+The first group (amcheck,dumper, and planner) run on the tape server machine
+and need a privileged network port for secure communication with the clients.
+The others are utility routines optionally used on the clients, depending on
+the dump program used and operating system type.
+
+
+  sbin/amcheck
+      AMANDA sanity checker program
+
+  libexec/dumper
+      Client communication program
+
+  libexec/planner
+      Estimate gathering program
+
+  libexec/killpgrp
+      Used to kill vendor dump programs that run as root
+
+  libexec/rundump
+      Setuid wrapper for systems that need to run the vendor dump program as
+      root
+
+  libexec/runtar
+      Setuid wrapper to run GNU-tar as root
+
+All these programs are installed with world access disabled and group access
+set to the AMANDA group from --with-group. Be sure all members of that group
+are trustworthy since rundump and runtar in particular give access to every
+file on the system. If AMANDA software is made available via NFS, be sure the
+mount options allow setuid programs. Also, if GNU-tar is used, root needs write
+access to /usr/local/var/amanda/gnutar-lists (or the --with-gnutar-list value
+to ./configure) to store information about each partial level.
+If the build has trouble or AMANDA needs to be rebuilt, especially with
+different ./configure options, the following sequence makes sure everything is
+cleaned up from the previous build: make distclean ./configure ... make make
+install (as root) Problems with the ./configure step can sometimes be diagnosed
+by looking at the config.log file. It contains detailed output of tests ./
+configure runs. Note that it is normal for many of the tests to "fail" as part
+of ./configure determining how to access various features on the system.
+A common problem when using the GNU C compiler is not re-installing it after
+the underlying operating system version changes. Gcc is particularly sensitive
+to system header files and must be re-installed or have its fixincludes step
+rerun (see the gcc release installation notes) if the operating system is
+upgraded. Running gcc --verbose shows where gcc gets its information, and
+contains an indication of the operating system version expected.
+AMANDA needs changes to the network services and inetd configuration files. The
+client-src/patch-system script should be able to set up systems in most cases.
+It does not currently handle systems that deliver service entries via YP/NIS.
+If the script does not work, add the following entries to the services file
+(e.g., /etc/services) or YP/NIS map: Amanda 10080/udp Amandaidx 10082/tcp
+Amidxtape 10083/tcp
+Each client needs an entry in the inetd configuration file (e.g., /etc/
+inetd.conf) like this, substituting the AMANDA user for Amanda and the full
+path to the AMANDA libexec directory for PATH: amanda dgram udp wait Amanda /
+PATH/libexec/amandad amandad
+The amanda service is used by all AMANDA controlling programs to perform
+functions on the clients.
+The tape server host needs entries like these if the amrecover tool is to be
+used: amandaidx stream tcp nowait Amanda /PATH/libexec/amindexd amindexd
+amidxtape stream tcp nowait Amanda /PATH/libexec/amidxtaped amidxtaped
+The amandaidx service provides access to the catalogues, while amidxtape
+provides remote access to a tape device. After every inetd configuration file
+change, send a HUP signal to the inetd process and check the system logs for
+errors.
+
+Configuring AMANDA
+
+Once installed, AMANDA must be configured to your environment.
+
+Decide on a Tape Server
+
+The first thing to decide is what machine will be the AMANDA tape server.
+AMANDA can be CPU-intensive if configured to do server compression, and almost
+certainly network and I/O-intensive. It does not typically use much real
+memory. It needs direct access to a tape device that supports media with enough
+capacity to handle the expected load.
+To get a rough idea of the backup sizes, take total disk usage (not capacity),
+Usage, and divide it by how often full dumps will be done, Runs. Pick an
+estimated run-to-run change rate, Change. Each AMANDA run, on average, does a
+full dump of Usage/Runs. Another Usage/Runs*Change is done of areas that got a
+full dump the previous run, Usage/Runs*Change* is done of areas that got a full
+dump two runs ago, and so on.
+For example, with 100 GB of space in use, a full dump every seven runs (e.g.,
+days) and estimated run-to-run changes (new or altered files) of 5 percent:
+
+         100 GBytes / 7              = 14.3 GB
+         100 GBytes / 7 * 5%         =  0.7 GB
+         100 GBytes / 7 * 5% * 2     =  1.4 GB
+         100 GBytes / 7 * 5% * 3     =  2.1 GB
+         100 GBytes / 7 * 5% * 4     =  2.9 GB
+         100 GBytes / 7 * 5% * 5     =  3.6 GB
+         100 GBytes / 7 * 5% * 6     =  4.3 GB
+                                     = 29.3 GB
+       
+
+If 50 percent compression is expected, the actual amount of tape capacity
+needed for each run, which might be on more than one tape, would be 14.7 GB.
+This is very simplistic, and could be improved with greater knowledge of actual
+usage, but should be close enough to start with. It also gives an estimate of
+how long each run will take by dividing expected capacity by drive speed.
+
+Decide Which Tape Devices to Use
+
+Unix operating systems typically incorporate device characteristics into the
+file name used to access a tape device. The two to be concerned with are
+"rewind" and "compression." AMANDA must be configured with the non-rewinding
+tape device, so called because when the device is opened and closed it stays at
+the same position and does not automatically rewind. This is typically a name
+with an n in it, such as /dev/rmt/0n or /dev/nst0. On AIX, it is a name with a
+.1 or .5 suffix.
+Put the AMANDA user in the group that currently owns the tape device, either as
+the primary group or as a secondary, or pick a new group for AMANDA and change
+the group ownership of the device. AMANDA needs both read and write access.
+Turn off all "world" access.
+
+Decide Whether to Use Compression
+
+Dump images may optionally be compressed on the client, the tape server, or the
+tape device hardware. Software compression allows AMANDA to track usage and
+make better estimates of image sizes, but hardware compression is more
+efficient of CPU resources. Turn off hardware compression when using software
+compression on the client or server. See the operating system documentation for
+how hardware compression is controlled; on many systems it is done via the
+device file name just like the non-rewinding flag. AIX uses the chdev command.
+
+Decide Where the Holding Space Will Be
+
+If at all possible, allocate some holding disk space for AMANDA on the tape
+server. Holding disk space can significantly reduce backup time by allowing
+several dumps to be done at once while the tape is being written. Also, for
+streaming tape devices, AMANDA keeps the device going at speed, and that may
+increase capacity. AMANDA may be configured to limit disk use to a specific
+value so it can share with other applications, but a better approach is to
+allocate one or more inexpensive disks entirely to AMANDA.
+Ideally, there should be enough holding disk space for the two largest backup
+images simultaneously, so one image can be coming into the holding disk while
+the other is being written to tape. If that is not practical, any amount that
+holds at least a few of the smaller images helps. The AMANDA report for each
+run shows the size of the dump image after software compression (if enabled).
+That, in addition to the amplot and amstatus tools, may be used to tune the
+space allocated.
+
+Compute Your Dump Cycle
+
+ Decide how often AMANDA should do full dumps. This is the "dump cycle." Short
+periods make restores easier because there are fewer partials, but use more
+tape and time. Longer periods let AMANDA spread the load better but may require
+more steps during a restore.
+Large amounts of data to back up or small capacity tape devices also affect the
+dump cycle. Choose a period long enough that AMANDA can do a full dump of every
+area during the dump cycle and still have room in each run for the partials.
+Typical dump cycles are one or two weeks. Remember that the dump cycle is an
+upper limit on how often full dumps are done, not a strict value. AMANDA runs
+them more often and at various times during the cycle as it balances the backup
+load. It violates the limit only if a dump fails repeatedly, and issues
+warnings in the e-mail report if that is about to happen.
+By default, AMANDA assumes it is run every day. If that is not the case, set
+"runs per cycle" (described below) to a different value. For instance, a dump
+cycle of seven days and runs per cycle of five would be used if runs are done
+only on weekdays.
+Normally, AMANDA uses one tape per run. With a tape changer (even the chg-
+manual one), the number of tapes per run may be set higher for extra capacity.
+This is an upper limit on the number of tapes. AMANDA uses only as much tape as
+it needs. AMANDA does not yet do overflow from one tape to another. If it hits
+end of tape (or any other error) while writing an image, that tape is
+unmounted, the next one is loaded, and the image starts over from the
+beginning. This sequence continues if the image cannot fit on a tape.
+Runs per cycle and tapes per run determine the minimum number of tapes needed,
+called the "tape cycle." To ensure the current run is not overwriting the last
+full dump, one more run should be included. For instance, a dump cycle of two
+weeks, with default runs per cycle of 14 (every day) and default tapes per run
+of one, needs at least 15 tapes (14+1 runs * one tape/run). Using two tapes per
+run needs 30 tapes (14+1 runs * two tapes/run). Doing backups just on weekdays
+with a dump cycle of two weeks, runs per cycle of 10, and two tapes per run
+needs 22 tapes (10+1 runs * two tapes/run).
+More tapes than the minimum should be allocated to handle error situations.
+Allocating at least two times the minimum allows the previous full dump to be
+used if the most recent full dump cannot be read. Allocating more tapes than
+needed also goes back further in time to recover lost files. AMANDA does not
+have a limit on the number of tapes in the tape cycle.
+
+Copy and Edit the Default Configuration File
+
+Pick a name for the configuration (the name Daily will be used for the rest of
+this section). Create a directory on the tape server machine to hold the
+configuration files, typically /usr/local/etc/amanda/Daily. Access to this
+directory (or perhaps its parent) should be restricted to the AMANDA group or
+even just the AMANDA user.
+Each tape assigned to a configuration needs a unique label. For this example,
+we'll use the configuration name, a dash, and a three-digit suffix, Daily-000
+through Daily-999. Do not use blanks, tabs, slashes (/), shell wildcards, or
+non-printable characters.
+AMANDA limits network usage so backups do not take all the capacity. This limit
+is imposed when AMANDA is deciding whether to perform a dump by estimating the
+throughput and adding that to dumps that are already running. If the value
+exceeds the bandwidth allocated to AMANDA, the dump is deferred until enough
+others complete. Once a dump starts, AMANDA lets underlying network components
+do any throttling.
+Copy the template example/amanda.conf file to the configuration directory and
+edit it. Full documentation is in the amanda man page. There are many
+parameters, but probably only a few need to be changed. Start with the
+following (some of which are described later):
+
+
+  org
+      This string will be in the Subject line of AMANDA e-mail reports.
+
+  mailto
+      Target address for AMANDA e-mail reports.
+
+  dumpuser
+      Same as --with-user from ./configure.
+
+  dumpcycle
+      The dump cycle.
+
+  runspercycle
+      The runs per cycle.
+
+  tapecycle
+      The tape cycle.
+
+  runtapes
+      Number of tapes to use per run.
+
+  tapedev
+      The no-rewind tape device if a changer is not being used, or if the
+      manual changer is being used.
+
+  tapetype
+      Type of tape media.
+
+  netusage
+      Network bandwidth allocated to AMANDA.
+
+  labelstr
+      A regular expression (grep pattern) used to make sure each tape is
+      allocated to this AMANDA configuration. Our example might use Daily-[0-9]
+      [0-9][0-9].
+
+The following parameters probably do not need to be changed, but look at their
+values to know where AMANDA expects to find things:
+
+
+  infofile
+      Location of AMANDA history database. Older versions of AMANDA used this
+      as the base name of a database file. Newer versions use this as a
+      directory name.
+
+  logdir
+      Directory where AMANDA logs are stored.
+
+  indexdir
+      Location of optional AMANDA catalogue database.
+
+
+Configure the Holding Disk
+
+Define each holding disk in an amanda.conf holdingdisk section. If partitions
+are dedicated to AMANDA, set the use value to a small negative number, such as
+-10 MB. This tells AMANDA to use all but that amount of space. If space is
+shared with other applications, set the value to the amount AMANDA may use,
+create the directory and set the permissions so only the AMANDA user can access
+it.
+Set a chunksize value for each holding disk. Negative numbers cause AMANDA to
+write dumps larger than the absolute value directly to tape, bypassing the
+holding disk. Positive numbers split dumps in the holding disk into chunks no
+larger than the chunksize value. Even though the images are split in the
+holding disk, they are written to tape as a single image. At the moment, all
+chunks for a given image go to the same holding disk.
+Older operating systems that do not support individual files larger than 2GB
+need a chunk size slightly smaller, such as 2000 MB, so the holding disk can
+still be used for very large dump images. Systems that support individual files
+larger than 2 GB should have a very large value, such as 2000 GBytes.
+
+Configure Tape Devices and Label Tapes
+
+AMANDA needs to know some characteristics of the tape media. This is set in a
+tapetype section. The example amanda.conf, web page, and amanda-users mailing
+list archives have entries for most common media. Currently, all tapes should
+have the same characteristics. For instance, do not use both 60-meter and 90-
+meter DAT tapes since AMANDA must be told the smaller value, and larger tapes
+may be underutilized.
+If the media type is not listed and there are no references to it in the
+mailing list archives, go to the tape-src directory, make tapetype, mount a
+scratch tape in the drive and run ./tapetype NAME DEV where NAME is a text name
+for the media and DEV is the no-rewind tape device with hardware compression
+disabled. This program rewinds the tape, writes random data until it fills the
+tape, rewinds, and then writes random data and tape marks until it fills the
+tape again. This can take a very long time (hours or days). When finished, it
+generates a new tapetype section to standard output suitable for adding to the
+amanda.conf file. Post the results to the amanda-users mailing list so others
+may benefit from your effort.
+When using hardware compression, change the length value based on the estimated
+compression rate. This typically means multiplying by something between 1.5 and
+2.0.
+The length and filemark values are used by AMANDA only to plan the backup
+schedule. Once dumps start, AMANDA ignores the values and writes until it gets
+an error. It does not stop writing just because it reaches the tapetype length.
+AMANDA does not currently use the tapetype speed parameter.
+Once the tapetype definition is in amanda.conf, set the tapetype parameter to
+reference it.
+Without special hardware to mount tapes, such as a robot or stacker, either set
+the tapedev parameter to the no-rewind device name or set up the AMANDA chg-
+manual changer. The manual changer script prompts for tape mounts as needed.
+The prompts normally go to the terminal of the person running AMANDA, but the
+changer may be configured to send requests via e-mail or to some other system
+logging mechanism.
+To configure the manual changer, set tapedev to the no-rewind tape device and
+set tpchanger to chg-manual. To send tape mount prompts someplace other than
+the terminal, which is necessary if AMANDA is run from a cron job, see the
+request shell function comments in changer-src/chg-manual.sh.in.
+Another common tape changer is chg-multi. This script can drive stackers that
+advance to the next tape when the drive is unloaded or it can use multiple tape
+drives on the tape sever machine to emulate a changer. The chg-multi script has
+a configuration file and a state file. Put the path to the configuration file
+in the amanda.conf changerfile parameter. There is a sample in example/chg-
+multi.conf. It has the following keyword/value pairs separated by whitespace:
+
+
+  firstslot
+      Number of the first slot in the device.
+
+  lastslot
+      Number of the last slot in the device.
+
+  gravity
+      Set to 1 if the device is gravity fed and cannot go backwards, otherwise
+      set to 0.
+
+  needeject
+      Set to 1 if the tape needs to be ejected to advance to a new tape,
+      otherwise set to 0.
+
+  multieject
+      Set to 1 if sending multiple ejects causes the changer to advance through
+      the tapes, otherwise set to 0. If set to 1, gravity must also be set to 1
+      because the script currently does not handle carousels that wrap back
+      around to the first tape after the last one. Also, needeject must be set
+      to 0.
+
+  ejectdelay
+      Set to a number of seconds of extra delay after ejecting a tape if it
+      takes a while before the next tape is ready.
+
+  statefile
+      Set to the path to a file chg-multi builds and maintains with the current
+      state of the changer.
+
+  slot
+      Repeat as needed to define all the slots and corresponding tape devices.
+      The first field after slot is the slot number. The next field is the no-
+      rewind tape device name. For changers that have a single tape device,
+      repeat the device name for each slot. To emulate a changer by using
+      multiple tape devices, list a different no-rewind tape device for each
+      slot.
+
+chg-multi may also be used as a framework to write a new changer. Look for XXX
+comments in the script and insert calls to commands appropriate for the device.
+Make any source changes to the changer-src/chg-multi.sh.in file. That file is
+processed by ./configure to generate chg-multi.sh, which turns into chg-multi
+with make. If chg-multi.sh or chg-multi is altered, the changes will be lost
+the next time AMANDA is rebuilt.
+A third popular changer is chg-scsi. It can drive devices that have their own
+SCSI interface. An operating system kernel module may need to be installed to
+control such devices, like sst for Solaris, which is released with AMANDA, or
+chio, available for various systems. As with chg-multi, set the amanda.conf
+changerfile parameter to the changer configuration file path. There is a sample
+in example/chg-scsi.conf. The initial section has parameters common to the
+entire changer:
+
+
+  number_configs
+      Set to the number of tape drives connected to this changer. The default
+      is 1.
+
+  eject
+      Set to 1 if tape drives need an explicit eject command before advancing
+      to the next tape, otherwise set to 0.
+
+  sleep
+      Set to the number of seconds to wait for a tape drive to become ready.
+
+  changerdev
+      Set to the device path of the changer. This may be set in the amanda.conf
+      file instead of here if preferred. Following the common parameters is a
+      section for each tape device:
+
+  config
+      Set to the configuration number, starting with 0.
+
+  drivenum
+      Set to the tape drive number, usually the same as the configuration
+      number.
+
+  dev
+      Set to the no-rewind device name of the tape drive.
+
+  startuse
+      Set to the number of the first slot served by this drive.
+
+  enduse
+      Set to the number of the last slot served by this drive.
+
+  statfile
+      Set to the path to a file chg-scsi will build and maintain with the
+      current state of this drive.
+
+Test any changer setup with the amtape command. Make sure it can load a
+specific tape with the slot NNN suboption, eject the current tape with eject
+and advance to the next slot with slot next.
+Tapes must be pre-labeled with amlabel so AMANDA can verify the tape is one it
+should use. Run amlabel as the AMANDA user, not root. For instance:
+
+       
+           # su amanda -c "amlabel Daily Daily-123 slot 123"
+       
+       
+
+
+Configure Backup Clients
+
+After tapes are labeled, pick the first client, often the tape server host
+itself, and the filesystems or directories to back up. For each area to back
+up, choose either the vendor dump program or GNU-tar. Vendor dump programs tend
+to be more efficient and do not disturb files being dumped, but are usually not
+portable between different operating systems. GNU-tar is portable and has some
+additional features, like the ability to exclude patterns of files, but alters
+the last access time for every file backed up and may not be as efficient. GNU-
+tar may also deal with active filesystems better than vendor dump programs, and
+is able to handle very large filesystems by breaking them up by subdirectories.
+Choose the type of compression for each area, if any. Consider turning off
+compression of critical areas needed to bring a machine back from the dead in
+case the decompression program is not available. Client compression spreads the
+load to multiple machines and reduces network traffic, but may not be
+appropriate for slow or busy clients. Server compression increases the load on
+the tape server machine, possibly by several times since multiple dumps are
+done at once. For either, if GNU GNU-zip is used, compression may be set to
+fast for faster but less aggressive compression or best for slower but more
+aggressive compression. Set compression to none to disable software compression
+or use hardware compression.
+Pick or alter an existing dumptype that matches the desired options, or create
+a new one. Each dumptype should reference the global dumptype. It is used to
+set options for all other dumptypes. For instance, to use the indexing
+facility, enable it in the global dumptype and all other dumptypes will inherit
+that value.
+The indexing facility generates a compressed catalogue of each dump image.
+These are useful for finding lost files and are the basis of the amrecover
+program. Long dump cycles or areas with many or very active files can cause the
+catalogues to use a lot of disk space. AMANDA automatically removes catalogues
+for images that are no longer on tape.
+Create a file named disklist in the same directory as amanda.conf and either
+copy the file from example/disklist or start a new one. Make sure it is
+readable by the AMANDA user. Each line in disklist defines an area to be backed
+up. The first field is the client host name (fully qualified names are
+recommended), the second is the area to be backed up on the client and the
+third is the dumptype. The area may be entered as a disk name, (sd0a), a device
+name, (/dev/rsd0)a, or a logical name, (/usr). Logical names make it easier to
+remember what is being backed up and to deal with disk reconfiguration.
+To set up a Windows client, set the host name to the name of the Unix machine
+running SAMBA and the area to the Windows share name, such as //some-pc/C$.
+Note that Unix-style forward slashes are used instead of Windows-style backward
+slashes.
+Enable AMANDA access to the client from the tape server host (even if the
+client is the tape server host itself) by editing .amandahosts (or .rhosts,
+depending on what was set with ./configure) in the AMANDA user home directory
+on the client. Enter the fully qualified tape server host name and AMANDA user,
+separated by a blank or tab. Make sure the file is owned by the AMANDA user and
+does not allow access to anyone other than the owner (e.g. mode 0600 or 0400).
+For Windows clients, put the share password in /etc/amandapass on the SAMBA
+host. The first field is the Windows share name, the second is the clear text
+password and the optional third field is the domain. Because this file contains
+clear text passwords, it should be carefully protected, owned by the AMANDA
+user and only allow user access. By default, AMANDA uses SAMBA user backup.
+This can be changed with --with-samba-user to ./configure.
+
+Test and Debug Setup
+
+Test the setup with amcheck. As with all AMANDA commands, run it as the AMANDA
+user, not root:
+
+       
+           # su amanda -c "amcheck Daily"
+       
+       
+
+Many errors reported by amcheck are described in docs/FAQ or the amcheck man
+page. The most common error reported to the AMANDA mailing lists is selfcheck
+request timed out, meaning amcheck was not able to talk to amandad on the
+client. In addition to the ideas in docs/FAQ, here are some other things to
+try:
+
+* Are the AMANDA services listed properly in /etc/services or a YP/NIS map? The
+  C program in Figure 4-1 uses the same system call as AMANDA to look up
+  entries:
+
+Example 15.1. A C Program to Check the AMANDA Service Numbers
+
+       
+           #include <stdio.h>
+           #include <string.h>
+           #include <netdb.h>
+
+           main (
+               int argc,
+               char **argv)
+           {
+               char *pn;
+               char *service;
+               char *protocol = "tcp";
+               struct servent *s;
+               
+               if ((pn = strrchr (*argv, '/')) == NULL) {
+                   pn = *argv;
+               } else {
+                   pn++;
+               } if (argc < 2) {
+                     fprintf (stderr, "usage: %s service [protocol]\n", pn);
+                     return 1;
+               }
+               service = *++argv;
+               if (argc > 2) {
+               protocol = *++argv;
+               }
+               if ((s = getservbyname (service, protocol)) == NULL) {
+                   fprintf (stderr, "%s: %s/%s lookup failed\n", pn,
+                     service, protocol);
+                   return 1;
+               }
+               printf ("%s/%s: %d\n", service, protocol,
+                 (int) ntohs (s->s_port));
+               return 0;
+           }
+       
+       
+
+Run it on both the tape server and client and make sure the port numbers match:
+
+       
+           $ cc check-service.c -lnsl -lsocket (Solaris)
+           $ a.out amanda udp
+             amanda/udp: 10080
+           $ a.out amandaidx
+             amandaidx/tcp: 10082
+           $ a.out amidxtape
+             amidxtape/tcp: 10083
+       
+       
+
+
+* Is there a line in the inetd configuration file on the client to start
+  amandad?
+* Was inetd sent a HUP signal after the configuration file was changed?
+* Are there system log messages from inetd about amanda or amandad? For
+  instance, inetd complains if it cannot look up the AMANDA services.
+* Is /tmp/amanda/amandad/debug being updated?
+* Is the access time on the amandad executable (ls -lu) being updated? If not,
+  inetd is probably not able to run it, possibly because of an error in the
+  inetd configuration file or a permission problem.
+* Run the amandad program by hand as the AMANDA user on the client. It should
+  sit for about 30 seconds, then terminate. Enter the full path exactly as it
+  was given to inetd, perhaps by using copy/paste.
+
+Do not proceed until amcheck is happy with the configuration.
+For initial testing, set the record option to no in the global dumptype, but
+remember to set it back to yes when AMANDA goes into normal production. This
+parameter controls whether the dump program on the client updates its own
+database, such as /etc/dumpdates for vendor dump.
+To forget about an individual test run, use amrmtape to remove references to
+the tapes used, then use amlabel to relabel them. To completely start over,
+remove the files or directories named in the infofile and indexdir parameters,
+the tapelist file named in the tapelist parameter, all amdump.* files in the
+configuration directory and all log.* files in the directory named by the
+logdir parameter. These files contain history information AMANDA needs between
+runs and also what is needed to find particular dump images for restores and
+should be protected when AMANDA goes into production.
+
+Operating Amanda
+
+Once configured, you will need to setup the automated use of AMANDA.
+
+Run amdump
+
+The amdump script controls a normal AMANDA backup run. However, it's common to
+do site-specific things as well with a wrapper shell script around amdump.
+amdump is meant to run unattended from cron. See the operating system
+documentation for how to set up a cron task. Be sure it runs as the AMANDA
+user, not root or the installer.
+The amdump script does the following:
+
+* If a file named hold is in the configuration directory, amdump pauses until
+  it goes away. This may be created and removed by hand to temporarily delay
+  AMANDA runs without having to change the cron task.
+* If it looks like another copy of amdump is running, or a previous run
+  aborted, amdump logs an error and terminates. If an earlier run aborted,
+  amcleanup must be run. An amcleanup step should be added to the tape server
+  system boot sequence to handle crashes. No backups can be performed after an
+  abort or crash until amcleanup is run.
+* The AMANDA planner program decides what areas to back up and at what level.
+  It does this by connecting to each client and getting estimated sizes of a
+  full dump, the same partial level that was done on the previous run and
+  possibly the next partial level. All clients are done in parallel, but it can
+  take a while to gather all this information.
+* The schedule is then passed to the driver program that controls actual
+  dumping. It, in turn, starts up several dumper processes (based on the
+  inparallel amanda.conf parameter) and a single taper process. The taper
+  process splits into two parts, a reader and a writer, to keep streaming tape
+  drives busy.
+* driver commands dumpers to start backups, telling each its client, area,
+  options such as compression and whether the result should go to the holding
+  disk or direct to tape. Each dumper connects to amandad on the client and
+  sends a request describing the dump program to run and options such as
+  whether to do compression or indexing. The image comes back to the dumper who
+  writes it, possibly via the server compression program, into the holding disk
+  or directly to a taper connection. If enabled, dumper also collects catalogue
+  information generated on the client and compresses it into the indexdir area.
+  The driver also commands taper to write files from the holding disk to tape
+  or to prepare to receive an image directly from a dumper.
+* After backups are done, amreport is run to generate the e-mail report. It
+  also renames the log file for the run to a unique log.YYYYMMDD.N name.
+* Old amdump.NN debug log files are rolled so only enough to match the tape
+  cycle are retained.
+* The amtrmidx program is run to remove old catalogues if indexing has been
+  used.
+
+There are several ways to determine which tapes AMANDA will need for a run. One
+is to look at the AMANDA e-mail report from the previous run. The tapes used
+during that run and those expected for the next run are listed. Another is to
+run amcheck during normal working hours. In addition to showing which tapes are
+needed, it makes sure things are set up properly so problems can be fixed
+before the real AMANDA run. A third is to use the tape suboption of amadmin.
+Without a tape changer, AMANDA expects the first tape to be mounted in the
+drive when it starts. Automated tape changers should be able to locate the
+tapes. The chg-manual changer prompts for the tapes.
+
+Read AMANDA's Reports
+
+An AMANDA report has several sections:
+
+       
+
+
+           These dumps were to tape Daily-009, Daily-010
+           Tonight's dumps should go onto 2 tapes: Daily-011, Daily-012.
+       
+
+       
+This shows which tapes were used during the run and which tapes are needed
+next.
+
+       
+           FAILURE AND STRANGE DUMP SUMMARY:
+             gurgi.cc.p /var lev 0 FAILED [Request to gurgi.cc.purdue.edu timed
+  out.]
+             gurgi.cc.p / lev 0 FAILED [Request to gurgi.cc.purdue.edu timed out.]
+             pete.cc.pu /var/mail lev 0 FAILED ["data write: Broken pipe"]
+             samba.cc.p //nt-test.cc.purdue.edu/F$ lev 1 STRANGE
+             mace.cc.pu /master lev 0 FAILED [dumps too big, but cannot incremental
+  dump new
+             disk]
+       
+       
+
+Problems found during the run are summarized in this section. In this example:
+
+* gurgi.cc.purdue.edu was down, so all its backups failed.
+* The /var/mail problem on pete.cc.purdue.edu and F$ problem on nt-
+  test.cc.purdue.edu are detailed later.
+* The /master area on mace.cc.purdue.edu is new to AMANDA so a full dump is
+  required, but it would not fit in the available tape space for this run.
+
+
+       
+           STATISTICS:
+                                        Total            Full         Daily
+                                        --------        --------      --------
+             Dump Time (hrs:min)         5:03            3:23          0:33   (0:14
+  start, 0:53 idle)
+             Output Size (meg)        20434.4         17960.0        2474.4
+             Original Size (meg)      20434.4         17960.0        2474.4
+             Avg Compressed Size (%)      --              --            --
+             Tape Used (%)              137.4           120.0          17.4
+  (level:#disks ...)
+             Filesystems Dumped            90              21            69    (1:
+  64 2:2 3:3)
+             Avg Dump Rate (k/s)       1036.5          1304.3         416.2
+             Avg Tp Write Rate (k/s)   1477.6          1511.2        1271.9
+       
+       
+
+This summarizes the entire run. It took just over five hours, almost 3.5 hours
+writing full dumps and about half an hour for partials. It took 14 minutes to
+get started, mostly in the planner step getting the estimates, and taper was
+idle almost one hour waiting on dumps to come into the holding disk.
+In this example, hardware compression was used so Avg Compressed Size is not
+applicable and Output Size written to tape matches Original Size from the
+clients. About 137% of the length of the tape as defined in the tapetype was
+used (remember that two tapes were written), 120% for full dumps and 17% for
+partials. The Rate lines give the dump speed from client to tape server and
+tape writing speed, all in KBytes per second. The Filesystems Dumped line says
+90 areas were processed, 21 full dumps and 69 partials. Of the partials, 64
+were level 1, two were level 2 and three were level 3.
+
+       
+           FAILED AND STRANGE DUMP DETAILS:
+       
+                /-- pete.cc.pu /var/mail lev 0 FAILED ["data write: Broken
+  pipe"]
+             sendbackup: start [pete.cc.purdue.edu:/var/mail level 0]
+             sendbackup: info BACKUP=/usr/sbin/ufsdump
+             sendbackup: info RECOVER_CMD=/usr/sbin/ufsrestore -f... -
+             sendbackup: info end
+             | DUMP: Writing 32 Kilobyte records
+             | DUMP: Date of this level 0 dump: Sat Jan 02 02:03:22 1999
+             | DUMP: Date of last level 0 dump: the epoch
+             | DUMP: Dumping /dev/md/rdsk/d5 (pete.cc.purdue.edu:/var/mail) to
+  standard output.
+             | DUMP: Mapping (Pass I) [regular files]
+             | DUMP: Mapping (Pass II) [directories]
+             | DUMP: Estimated 13057170 blocks (6375.57MB) on 0.09 tapes.
+             | DUMP: Dumping (Pass III) [directories]
+             | DUMP: Dumping (Pass IV) [regular files]
+             | DUMP: 13.99% done, finished in 1:02
+             | DUMP: 27.82% done, finished in 0:52
+             | DUMP: 41.22% done, finished in 0:42
+       
+             /-- samba.cc.p //nt-test.cc.purdue.edu/F$ lev 1 STRANGE
+             sendbackup: start [samba.cc.purdue.edu://nt-test/F$ level 1]
+             sendbackup: info BACKUP=/usr/local/bin/smbclient
+             sendbackup: info RECOVER_CMD=/usr/local/bin/smbclient -f... -
+             sendbackup: info end
+             ? Can't load /usr/local/samba-2.0.2/lib/smb.conf - run testparm to
+  debug it
+             | session request to NT-TEST.CC.PURD failed
+             |                 directory \top\
+             |                 directory \top\Division\
+             |        238 (    2.7 kb/s) \top\Division\contract.txt
+             |      19456 ( 169.6 kb/s)  \top\Division\stuff.doc
+           ...
+       
+       
+
+Failures and unexpected results are detailed here. The dump of /var/mail would
+not fit on the first tape so was aborted and rerun on the next tape, as
+described further in the next section.
+The dump of F$ on nt-test.cc.purdue.edu failed due to a problem with the SAMBA
+configuration file. It's marked STRANGE because the line with a question mark
+does not match any of the regular expressions built into AMANDA. When dumping
+Windows clients via SAMBA, it's normal to get errors about busy files, such as
+PAGEFILE.SYS and the registry. Other arrangements should be made to get these
+safely backed up, such as a periodic task on the PC that creates a copy that
+will not be busy at the time AMANDA runs.
+
+       
+           NOTES:
+             planner: Adding new disk j.cc.purdue.edu:/var.
+             planner: Adding new disk mace.cc.purdue.edu:/master.
+             planner: Last full dump of mace.cc.purdue.edu:/src on tape Daily-012
+  overwritten
+                      in 2 runs.
+             planner: Full dump of loader.cc.purdue.edu:/var promoted from 2 days
+  ahead.
+             planner: Incremental of sage.cc.purdue.edu:/var bumped to level 2.
+             taper: tape Daily-009 kb 19567680 fm 90 writing file: short write
+             taper: retrying pete.cc.purdue.edu:/var/mail.0 on new tape: [writing
+  file: short
+                    write]
+             driver: pete.cc.purdue.edu /var/mail 0 [dump to tape failed, will try
+  again]
+             taper: tape Daily-010 kb 6201216 fm 1 [OK]
+       
+       
+
+Informational notes about the run are listed here. The messages from planner
+say:
+
+* There are new disklist entries for j.cc.purdue.edu and mace.cc.purdue.edu.
+* Tape Daily-012 is due to be overwritten in two more runs and contains the
+  most recent full dump of /src from mace.cc.purdue.edu, so the tape cycle may
+  not be large enough.
+* The next scheduled full dump of /var on loader.cc.purdue.edu was moved up two
+  days to improve the load balance.
+* The partial dump of /var on sage.cc.purdue.edu was bumped from level 1 to
+  level 2 because the higher level was estimated to save enough space to make
+  it worthwhile.
+
+The rest of the notes say taper was not able to write as much data as it
+wanted, probably because of hitting end of tape. Up to that point, it had
+written 19567680 KBytes in 90 files on tape Daily-009. Another attempt at the
+full dump of /var/mail from pete.cc.purdue.edu was made on the next tape
+(Daily-010) and it succeeded, writing 6201216 KBytes in one file.
+
+       
+           DUMP SUMMARY:
+       
+                                            DUMPER STATS                   TAPER
+  STATS
+        HOSTNAME  DISK           L   ORIG-KB   OUT-KB COMP%   MMM:SS   KB/
+  s  MMM:SS   KB/s
+        --------------------------- --------------------------------------- ---
+  -----------
+        boiler.cc /              1      2624     2624   --      0:13  200.1
+  0:02 1076.0
+        boiler.cc /home/boiler/a 1       192      192   --      0:07   26.7
+  0:02  118.5
+        boiler.cc /usr           1       992      992   --      0:41   24.2
+  0:02  514.7
+        boiler.cc /usr/local     1       288      288   --      0:09   31.2
+  0:04   86.3
+        boiler.cc /var           1       425     4256   --      0:21  205.9
+  0:04 1104.3
+        egbert.cc /              1     41952    41952   --      1:26  487.3
+  0:37 1149.4
+        egbert.cc /opt           1       224      224   --      0:06   37.5
+  0:02  136.0
+        egbert.cc -laris/install 1        64       64   --      0:11    5.8
+  0:02   49.5
+        gurgi.cc. /              0    FAILED ----------------------------------
+  -----------
+        gurgi.cc. /var           0    FAILED ----------------------------------
+  -----------
+        pete.cc.p /              1     13408    13408   --      0:41  328.2
+  0:08 1600.5
+        pete.cc.p /opt           1      3936     3936   --      1:04   61.2
+  0:03 1382.6
+        pete.cc.p /usr           1      1952     1952   --      0:29   67.0
+  0:03  584.3
+        pete.cc.p /var           1    300768   300768   --      2:33 1963.8
+  2:50 1768.8
+        pete.cc.p /var/mail      0   6201184  6201184   --     73:45 1401.3
+  73:47 1400.8
+
+       ...
+       (brought to you by Amanda version 2.4.1p1)
+       
+       
+
+This section (which has been abbreviated) reports each area dumped showing
+client, area, backup level, sizes, time to dump and time to write to tape.
+Entries are in alphabetic order by client and then by area. This is not the
+same as the tape order. Tape order can be determined with the find or info
+suboption of the amadmin command, amtoc can generate a tape table of contents
+after a run, or amreport can generate a printed listing. By default, client
+names are truncated on the right, area names on the left, to keep the report
+width under 80 character. This typically leaves the unique portions of both.
+Two log files are created during an AMANDA run. One is named amdump.NN, where
+NN is a sequence number (1 is most recent, 2 is next most recent, etc), and is
+in the same directory as amanda.conf. The file contains detailed step by step
+information about the run and is used for statistics by amplot and amstatus,
+and for debugging. The other file is named log.YYYYMMDD.N where YYYYMMDD is the
+date of the AMANDA run and N is a sequence number in case more than one run is
+made on the same day (0 for the first run, 1 for the second, etc). This file is
+in the directory specified by the logdir amanda.conf parameter. It contains a
+summary of the run and is the basis for the e-mail report. In fact, amreport
+may be run by hand and given an old file to regenerate a report.
+Old amdump.NN files are removed by the amdump script. Old log.YYYYMMDD.N files
+are not automatically removed and should be cleared out periodically by hand.
+Keeping a full tape cycle is a good idea. If the tape cycle is 40 and AMANDA is
+run once a day, the following command would do the job:
+
+       
+           #find log.????????.* -mtime +40 -print | xargs rm
+       
+       
+
+If --with-pid-debug-files was used on ./configure, clients accumulate debug
+files in /tmp/amanda (or whatever --with-debug was set to) and should be
+cleaned out periodically. Without this option, client debug files have fixed
+names and are reused from run to run.
+
+Monitor Tape and Holding Disk Status
+
+While amdump is running, amstatus can track how far along it is. amstatus may
+also be used afterward to generate statistics on how many dumpers were used,
+what held things up and so on.
+When a tape error happens on the last tape allowed in a run (as set by
+runtapes), AMANDA continues to do backups into the holding disks. This is
+called degraded mode. By default, full dumps are not done and any that were
+scheduled have a partial done instead. A portion of the holding disk area may
+be allocated to do full dumps during degraded mode by reducing the value of the
+parameter reserve in amanda.conf below 100%.
+A tape server crash may also leave images in the holding disks. Run amflush, as
+the AMANDA user, to flush images in the holding disk to the next tape after
+correcting any problems. It goes through the same tape request mechanism as
+amdump. If more than one set of dumps are in the holding disk area, amflush
+prompts to choose one to write or to write them all. amflush generates an e-
+mail report just like amdump.
+Operating systems vary in how they report end of tape to programs. A no space
+or short write error probably means end of tape. For I/O error, look at the
+report to see how much was written. If it is close to the expected tape
+capacity, it probably means end of tape, otherwise it means a real tape error
+happened and the tape may need to be replaced the next time through the tape
+cycle.
+To swap out a partially bad tape, wait until it is about to be used again so
+any valid images can still be retrieved. Then swap the tapes, run amrmtape on
+the old tape and run amlabel on the replacement so it has a proper AMANDA
+label.
+If a tape is marked to not be reused with the no-reuse suboption of amadmin,
+such as one that has been removed or is failing, AMANDA may want a freshly
+labeled tape on the next run to get the number of tapes back up to the full
+tape cycle.
+If a tape goes completely bad, use amrmtape to make AMANDA forget about it. As
+with marking a tape no-reuse, this may reduce the number of tapes AMANDA has in
+use below the tape cycle and it may request a newly labeled tape on the next
+run.
+
+Adding Tapes at a Particular Position in the Cycle
+
+
+* Run amlabel on the new tapes.
+* Edit the tapelist file by hand and move the new tapes before the tape to be
+  used just ahead of them. For instance, move Daily-100 before Daily-099.
+* Set the date stamp on the new tapes to the same as the previous tape, e.g.
+  make them the same for Daily-099 and Daily-100.
+* Update the tapecycle amanda.conf parameter if new tapes are being added.
+
+These steps let AMANDA know about all tapes, including those that do not have
+data yet. When the cycle gets to the last old tape (Daily-099), the next tape
+used will be the first new one (Daily-100). A new option is planned for amlabel
+to do these steps automatically.
+
+Miscellanous Operational Notes
+
+Multiple amdump runs may be made in the same day, although catalogues are
+currently stored without a timestamp so amrecover may not show all restore
+possibilities. To redo a few areas that failed during the normal run, edit the
+disklist file by hand to comment out all the other entries, run amdump, then
+restore the disklist file.
+Use the force suboption of amadmin to schedule a full dump of an area on the
+next run. Run this as the AMANDA user, not root. AMANDA automatically detects
+new disklist entries and schedules an initial full dump. But for areas that go
+through a major change, such as an operating system upgrade or full restore,
+force AMANDA to do a full dump to get things back into sync.
+AMANDA does not automatically notice new client areas, so keep the disklist in
+sync by hand. AMANDA usually notices areas that are removed and reports an
+error as a reminder to remove the entry from the disklist. Use the delete
+suboption of amadmin (as the AMANDA user) to make AMANDA completely forget
+about an area, but wait until the information is not needed for restores. This
+does not remove the entry from the disklist file \14 that must be done by hand.
+Non\14AMANDA backups may still be done with AMANDA installed, but do not let the
+client dump program update its database. For vendor dump programs, this usually
+means not using the u flag, or saving and restoring /etc/dumpdates. For GNU-tar
+it means the --listed-incremental flag (if used) should not point to the same
+file AMANDA uses.
+As with all backup systems, verify the resulting tapes, if not each one then at
+least periodically or by random sample. The amverify script does a reasonably
+good job of making sure tapes are readable and images are valid. For GNU-tar
+images, the test is very good. For vendor dump images of the same operating
+system type as the tape server machine, the test is OK but does not really
+check the whole image due to the limited way the catalogue option works. For
+vendor dump images from other operating systems, amverify can tell if the image
+is readable from tape but not whether it is valid.
+Tape drives are notorious for being able to read only what they wrote, so run
+amverify on another machine with a different drive, if possible, so an
+alternate is available if the primary drive fails. Make a copy of the AMANDA
+configuration directory on the other machine to be able to run amverify. This
+copy is also a good way to have a backup of the AMANDA configuration and
+database in case the tape server machine needs to be recovered.
+
+Advanced AMANDA Configuration
+
+Once you have AMANDA running for a while, you may choose to do some additional
+advanced configuration.
+
+Adjust the Backup Cycle
+
+Several dumptype parameters control the backup level AMANDA picks for a run:
+
+
+  dumpcycle
+      Maximum days between full dumps.
+
+  strategy nofull
+      Never schedule (or run) a full dump.
+
+  strategy incronly
+      Only schedule non-full dumps.
+
+Note that dumpcycle is both a general amanda.conf parameter and a specific
+dumptype parameter. The value in a specific dumptype takes precedence. To
+handle areas that change significantly between each run and should get a full
+dump each time (such as the mail spool on a busy e-mail server or a database
+area), create a dumptype based on another dumptype with attributes changed as
+desired (client dump program, compression, etc) and set dumpcycle in the new
+dumptype to 0:
+
+       
+
+
+           define mail-spool {
+               comp-user-tar
+               dumpcycle 0
+           }
+       
+
+       
+To run full dumps by hand outside of AMANDA (perhaps they are too large for the
+normal tape capacity, or need special processing), create a new dumptype and
+set strategy to incronly:
+
+       
+           define full-too-big {
+               comp-user-tar
+               strategy incronly
+           }
+       
+       
+
+Tell AMANDA when a full dump of the area has been done with the force suboption
+of amadmin. Take care to do full dumps often enough that the tape cycle does
+not wrap around and overwrite the last good non-full backups.
+To never do full dumps (such as an area easily regenerated from vendor media),
+create a new dumptype and set strategy to nofull:
+
+       
+           define man-pages {
+               comp-user-tar
+               strategy nofull
+           }
+       
+       
+
+Only level 1 backups of such areas are done, so wrapping around the tape cycle
+is not a problem.
+To do periodic archival full dumps, create a new AMANDA configuration with its
+own set of tapes but the same disklist as the normal configuration (e.g.
+symlink them together). Copy amanda.conf, setting all dumpcycle values to 0 and
+record to no, e.g. in the global dumptype. If a changer is used, set runtapes
+very high so tape capacity is not a planning restriction. Disable the normal
+AMANDA run, or set the hold file as described in "Operating AMANDA", so AMANDA
+does not try to process the same client from two configurations at the same
+time.
+
+Adjust Parallelism
+
+AMANDA starts several dumper processes and keeps as many as possible running at
+once. The following options control their activity:
+
+
+  inparallel
+      Total number of dumpers.
+
+  maxdumps
+      Maximum dumpers for a single client.
+
+The default maxdumps is one, meaning only one dumper is assigned to a client at
+a time. If a client can support the load, increase maxdumps so more than one
+dump on that client is running at once. Note that maxdumps is both a general
+amanda.conf parameter and a specific dumptype parameter. The value in a
+specific dumptype takes precedence.
+Field four of the disklist file is a "spindle number". Areas with the same non-
+negative spindle number are not backed up at the same time if maxdumps is
+greater than one. This prevents thrashing on an individual physical disk. Set
+spindle number to -1 (which is the default) for independent areas that can be
+done in conjunction with any other area, such as a whole physical disk. If the
+tape server has multiple network connections, an amanda.conf interface section
+may be set up for each one and clients allocated to a particular interface with
+field five of the disklist. Individual interfaces take precedence over the
+general netusage bandwidth limit and follow the same guidelines described above
+in "Configuring AMANDA": the limit is imposed when deciding whether to start a
+dump, but once a dump starts, AMANDA lets underlying network components do any
+throttling.
+Individual AMANDA interface definitions do not control which physical
+connection is used. That is left up to the operating system network software.
+While it's common to give an AMANDA interface definition the same name as a
+physical connection, e.g. le0, it might be better to use logical names such as
+back-door-atm to avoid confusion.
+The starttime dumptype parameter delays a backup some amount of time after
+AMANDA is started. The value is entered as HHMM, so 230, for instance, would
+wait 2.5 hours. This may be used to delay backups of some areas until they are
+known to be idle.
+
+Monitor for Possible Improvements
+
+amstatus may be used to get a summary of dumper activity:
+
+       
+       # su amanda -c "amstatus Daily --file amdump.1 --summary"
+       ...
+        dumper0  busy  :  5:52:01  ( 98.03%)
+        dumper1  busy  :  0:23:09  (  6.45%)
+        dumper2  busy  :  0:13:27  (  3.75%)
+        dumper3  busy  :  0:16:13  (  4.52%)
+        dumper4  busy  :  0:06:40  (  1.86%)
+        dumper5  busy  :  0:03:39  (  1.02%)
+          taper  busy  :  3:54:20  ( 65.26%)
+          0 dumpers busy  :  0:03:21  (  0.93%)            file-too-large:  0:03:21
+  (100.00%)
+       1 dumper  busy  :  4:03:22  ( 67.78%)         no-diskspace:  3:40:55
+  (    90.77%)
+                                                   file-too-large:  0:21:13  ( 
+  8.72%)
+                                                     no-bandwidth:  0:01:13  (  0.50%)
+       2 dumpers busy  :  0:17:33  (  4.89%)         no-bandwidth:  0:17:33
+  (100.00%)
+       3 dumpers busy  :  0:07:42  (  2.14%)         no-bandwidth:  0:07:42
+  (100.00%)
+       4 dumpers busy  :  0:02:05  (  0.58%)         no-bandwidth:  0:02:05
+  (100.00%)
+       5 dumpers busy  :  0:00:40  (  0.19%)         no-bandwidth:  0:00:40
+  (100.00%)
+       6 dumpers busy  :  0:03:33  (  0.99%)             not-idle:  0:01:53
+  (    53.10%)
+                                                       no-dumpers:  0:01:40
+  ( 46.90%)
+       
+       
+
+This says:
+
+* dumper 0 was busy almost all the time.
+* dumper 1 (and above) were not used very much.
+* taper was busy about 2/3 of the total run time.
+* All dumpers were idle less than 1% of the total runtime.
+* One dumper was busy 67.78% of the total run time and the reason two dumpers
+  were not started when one was busy was not enough holding disk space (no-
+  diskspace) 90.77% of that time, the next image to dump was too large to fit
+  in the holding disk at all (file-too-large) 8.72% of that time and network
+  bandwidth was exhausted (no-bandwidth) 0.50% of that time
+
+This configuration would benefit from additional holding disk space, which
+would allow more dumpers to run at once and probably keep taper busy more of
+the time.
+Other common status indicators are:
+
+
+  not-idle
+      Everything is running that can be.
+
+  no-dumpers
+      All dumpers are busy and there are other dumps that could be started.
+
+  client-constrained
+      The maximum number of dumpers for remaining clients are already running,
+      or all spindles are already in use.
+
+  start-wait
+      All remaining dumps are delayed until a specific time of day.
+
+If the tape server machine has multiple tape drives, more than one AMANDA
+configuration may run at the same time. Clients and holding disks should be
+assigned to only one configuration, however.
+AMANDA waits a fixed amount of time for a client to respond with dump size
+estimates. The default is five minutes per area on the client. For instance, if
+a client has four areas to back up (entries in disklist), AMANDA waits at most
+20 minutes for the estimates. During dumping, AMANDA aborts a dump if the
+client stops sending data for 30 minutes. Various conditions, such as slow
+clients, which dump program is used and characteristics of the area, may cause
+timeouts. The values may be changed with the amanda.conf etimeout parameter for
+estimates and dtimeout for data. Positive etimeout values are multiplied by the
+number of areas. The absolute value of a negative number is used for the whole
+client regardless of the number of areas.
+
+Excluding Files
+
+GNU-tar can exclude items from the dump image based on file name patterns
+controlled by the dumptype exclude parameter. A single pattern may be put on
+the exclude line itself or multiple patterns may be put in a file on the
+client. The dumptype exclude line in that case includes a list keyword and the
+path to the file.
+Exclusion entries are shell-style wildcard expressions except * matches through
+any number of / characters. If a matched item is a directory, it and all its
+contents are omitted. For instance:
+
+
+  ./usr
+      Omit the usr directory at the top level of the area and everything under
+      it.
+
+  core
+      Omit all items named core.
+
+  */core*
+      Omit all items starting with core, e.g. core, core19970114, corespondent,
+      or corexx/somefile (probably not a good idea).
+
+  */test*.c
+      Omit all items starting with test and ending with .c, e.g. test.c,
+      testing.c or testdir/pgm/main.c (probably not a good idea).
+
+  *.o
+      Omit all items ending with .o.
+
+  */OLD/*
+      Omit all items within directories named OLD, including subdirectories and
+      their contents, but dump the OLD directory entry itself.
+
+
+Restoring with AMANDA
+
+Remember that no one cares if you can back up ?only if you can restore.
+
+Configuring and Using amrecover
+
+One way to restore items with AMANDA is with amrecover on the client. Before
+amrecover can work, AMANDA must run with the dumptype index parameter set to
+yes and the amindexd and amidxtaped services must be installed and enabled to
+inetd, usually on the tape server machine (the default build sequence installs
+them). Also, add the client to .amandahosts (or .rhosts) for the AMANDA user on
+the server machine. Since amrecover must run as root on the client, the entry
+must list root as the remote user, not the AMANDA user. amrecover should not be
+made setuid-root because it would open up catalogues of the entire system to
+everyone.
+For this example, user jj has requested two files, both named molecule.dat, in
+subdirectories named work/sample-21 and work/sample-22 and said they want the
+versions last modified on the 13th of January. Become root on the client, cd to
+the area and start amrecover:
+
+       
+         $ su
+         Password:
+         # cd ~jj
+         # amrecover Daily
+         AMRECOVER Version 2.4.1p1.
+         Contacting server on amanda.cc.purdue.edu ...
+         220 amanda AMANDA index server (2.4.1p1) ready.
+         200 Access OK
+         Setting restore date to       today (1999-01-18)
+         200 Working date set to 1999-01-18.
+         200 Config set to Daily.
+         200 Dump host set to pete.cc.purdue.edu.
+         $CWD '/home/pete/u66/jj' is on disk '/home/pete/u66' mounted at '/home/
+  pete/u66'.
+         200 Disk set to /home/pete/u66.
+         amrecover>
+       
+       
+
+At this point, a command line interface allows browsing the image catalogues.
+Move around with the cd command, see what is available with ls, change date
+with setdate, add files and directories to the extraction list with add and so
+on. The extract command starts actual recovery:
+
+       
+             amrecover> setdate ---14
+             200 Working date set to 1999-01-14.
+             amrecover> cd work/sample-21
+             /home/pete/u66/jj/work/sample-21
+             amrecover> add molecule.dat
+             Added /jj/work/sample-21/molecule.dat
+             amrecover> cd ../sample-22
+             /home/pete/u66/jj/work/sample-22
+             amrecover> add molecule.dat
+             Added /jj/work/sample-22/molecule.dat
+             amrecover> extract
+             Extracting files using tape drive /dev/rmt/0mn on host
+  amanda.cc.purdue.edu.
+             The following tapes are needed: Daily-034
+
+             Restoring files into directory /home/pete/u66
+             Continue? [Y/n]: y
+
+             Load tape Daily-034 now
+             Continue? [Y/n]: y
+             Warning: ./jj: File exists
+             Warning: ./work: File exists
+             Warning: ./work/sample-21: File exists
+             Warning: ./work/sample-22: File exists
+             set owner/mode for '.'? [yn] n
+             amrecover> quit
+       
+       
+
+amrecover finds which tapes contain the images, prompts through mounting them
+in the proper order, searches the tape for the image, optionally decompresses
+it, brings it across the network to the client and pipes it into the
+appropriate restore program with the arguments needed to extract the requested
+items. amrecover does not know how to run every client restore program. See the
+amrecover manpage for current information. amrecover should not be used to do
+full filesystem recovery with vendor restore tools, but does work with GNU-tar.
+Vendor tools should be run with the r flag for a full recovery and amrecover is
+oriented toward extracting individual items with the x flag. Full filesystem
+recovery with vendor restore should be done with amrestore. amrecover (actually
+the amidxtaped server) does not know about tape changers, so mount the tapes by
+hand or use amtape if a changer is available.
+
+Using amrestore
+
+The amrestore command retrieves whole images from tape. First, find which tapes
+have the desired images. The find suboption of amadmin generates output like
+this (abbreviated):
+
+       
+           # su amanda -c "amadmin Daily find pete u66"
+           Scanning /amanda...
+
+           date       host                 disk              lv tape or file   file
+  status
+           ...
+           1999-01-12 pete.cc.purdue.edu   /home/pete/u66    1  Daily-032        14
+  OK
+           1999-01-13 pete.cc.purdue.edu   /home/pete/u66    1  Daily-033        26
+  OK
+           1999-01-14 pete.cc.purdue.edu   /home/pete/u66    1  Daily-034        40
+  OK
+           1999-01-15 pete.cc.purdue.edu   /home/pete/u66    1  Daily-000        34
+  OK
+           1999-01-16 pete.cc.purdue.edu   /home/pete/u66    1  Daily-001        31
+  OK
+           1999-01-17 pete.cc.purdue.edu   /home/pete/u66    0  Daily-002        50
+  OK
+           1999-01-18 pete.cc.purdue.edu   /home/pete/u66    1  Daily-003        20
+  OK
+       
+       
+
+The Scanning /amanda... message says amadmin looked in the holding disk (/
+amanda) for any images left there. It then lists all tapes or files in the
+holding disk that contain the requested area.
+The info suboption to amadmin shows tapes with the most recent images:
+
+       
+           # su amanda -c "amadmin Daily info pete u66"
+           Current info for pete.cc.purdue.edu /home/pete/u66:
+           Stats: dump rates (kps), Full:  652.0, 648.0, 631.0
+                             Incremental:  106.0, 258.0, 235.0
+                   compressed size, Full: -100.0%,-100.0%,-100.0%
+                             Incremental: -100.0%,-100.0%,-100.0%
+           Dumps: lev datestmp  tape             file   origK   compK secs
+                   0  19990117  Daily-002          50  582239  582272  892
+                   1  19990118  Daily-003          20    3263    3296   31
+                   2  19981214  Daily-032          21    7039    7072   37
+       
+       
+
+Old information may appear, such as 19981214 (14-Dec-1998) in this example.
+While it's true this was the last level 2 dump of this area, it is of little
+interest because at least one full and level 1 dump have been done since then.
+The compressed size values here may be ignored because this particular
+configuration uses hardware compression so no software compression data are
+available.
+A third way to know what tape has an image is to generate a tape table of
+contents with amtoc after each AMANDA run:
+
+       
+           #  partition                        lvl  size[Kb]  method
+           0  Daily-002                          -         -  19990117
+           1  boiler.cc.purdue.edu:/usr/local    1        31  normal
+           2  egbert.cc.purdue.edu:/opt          1       127  normal
+           3  boiler.cc.purdue.edu:/usr          1        95  normal
+          ...
+          50 pete.cc.purdue.edu:/home/pete/u66   0    582239  normal
+          ...
+       
+       
+
+A printed report similar to the amtoc output may be automatically generated by
+amreport for each run with the lbl-templ tapetype parameter in amanda.conf
+using the example/3hole.ps template.
+The find and info suboptions to amadmin need the AMANDA log files and database.
+These are not usually large amounts of information and a copy should be pushed
+after each amdump run to an alternate machine that also has the AMANDA tape
+server software installed so they are available if the primary tape server
+machine dies. Tools like rdist (ftp://usc.edu/pub/rdist/) or rsync (ftp://
+samba.anu.edu.au/pub/rsync/) are useful.
+If AMANDA was built using --with-db=text (the default), the database is stored
+in a set of text files under the directory listed in the infofile amanda.conf
+parameter. Here is the file that matches the above info amadmin output:
+
+       
+           # cd /usr/local/etc/amanda/Daily/curinfo
+           # cat pete.cc.purdue.edu/_home_pete_u66/info
+           version: 0
+           command: 0
+           full-rate: 652.000000 648.000000 631.000000
+           full-comp:
+           incr-rate: 106.000000 258.000000 235.000000
+           incr-comp:
+           stats: 0 582239 582272 892 916549924 50 Daily-002
+           stats: 1 3263 3296 31 916637269 20 Daily-003
+           stats: 2 7039 7072 37 913614357 21 Daily-032
+           //
+       
+       
+
+The first field of each stats line is the dump level. The last field is the VSN
+and the field just before it is the tape file number. The field with the large
+number just before that is a Unix epoch time value, which may be converted to
+text with this Perl script:
+
+       
+           $ cat epoch.pl
+           #!/usr/local/bin/perl
+           use warnings;
+           use strict;
+           require 'ctime.pl';
+           foreach (@ARGV) {
+             s/,//;
+             if (m/[a-fA-FxX]/) {
+               unless (m/^0[xX]/) {
+                 $_ = '0x' . $_;
+               }
+               $_ = oct;
+             }
+             print &ctime ($_);
+           }
+           exit (0);
+           $ epoch.pl 916549924
+           Sun Jan 17 0:12:04 US/East-Indiana 1999
+       
+       
+
+Prepositioning the tape to the image with mt fsf may significantly reduce the
+time needed to do a restore. Some media contain an index for very fast file
+searching compared to the one file at a time scanning done by amrestore. Each
+tape location method listed above also shows the tape file. Use that number
+with mt fsf after a rewind to position to a particular image.
+amrestore takes client, area and date stamp patterns as optional arguments to
+search for matching images. Each argument is a grep-style regular expression,
+so multiple images may match. This also means an image may need a specific
+pattern. For instance:
+
+       
+           # amrestore $TAPE pete /
+       
+       
+
+finds not just the root area for the pete client, but images for any client
+with pete someplace in the hostname and a slash anywhere in the area name.
+Assuming only one client matches pete, the following gets just the root area:
+
+       
+           # amrestore $TAPE pete '^/$'
+       
+       
+
+The up arrow (caret) at the beginning says the pattern must start with this
+string. The dollar sign at the end says it must end there. The quote marks
+around the pattern protect the special characters from shell expansion.
+Without flags, amrestore finds every matching image, uncompresses it if needed
+and creates a disk file in the current working directory with a name made up of
+the client, area and dump level. These images may be used directly by the
+client restore program.
+amrestore may be used to generate a tape table of contents by giving it a host
+pattern that cannot match:
+
+       
+           # mt rewind
+           # amrestore $TAPE no.such.host
+       
+       
+
+As it searches in vain for no.such.host it reports images that are skipped:
+
+       
+           amrestore: 0: skipping start of tape: date 19990117 label Daily-002
+           amrestore: 1: skipping boiler.cc.purdue.edu._.19990117.1
+           amrestore: 2: skipping egbert.cc.purdue.edu._opt.19990117.1
+           amrestore: 3: skipping boiler.cc.purdue.edu._.19990117.1
+           ...
+       
+       
+
+For large images, the p flag writes the first match to standard output, which
+may then be piped into the client restore program. This flag is also useful for
+moving an image across the network. For instance, here is one way to restore a
+file directly from the tape server (amanda.cc.purdue.edu) while logged in to
+the client:
+
+       
+           # rsh -n amanda.cc.purdue.edu amrestore -p $TAPE pete
+       ?'^/$? ' \ | gtar xf - ./the-file
+       
+       
+
+Tell vendor restore programs to use a small blocking factor to handle the
+arbitrary size chunks of data available through a pipeline:
+
+       
+           # rsh -n amanda.cc.purdue.edu amrestore -p $TAPE pete u66 \ |
+           ufsrestore -ivbf 2 -
+       
+       
+
+
+Restoring Without AMANDA
+
+The AMANDA tape format is deliberately simple and restoring data can be done
+without any AMANDA tools if necessary. The first tape file is a volume label
+with the tape VSN and date it was written. It is not in ANSI VOL1 format, but
+is plain text. Each file after that contains one image using 32 KByte blocks.
+The first block is an AMANDA header with client, area and options used to
+create the image. As with the volume label, the header is not in ANSI format,
+but is plain text. The image follows, starting at the next tape block, until
+end of file.
+To retrieve an image with standard Unix utilities if amrestore is not
+available, position the tape to the image, then use dd to read it:
+
+       
+           # mt rewind
+           # mt fsf NN
+           # dd if=$TAPE bs=32k skip=1 of=dump_image
+       
+       
+
+The skip=1 option tells dd to skip over the AMANDA file header. Without the of=
+option, dd writes the image to standard output, which can be piped to the
+decompression program, if needed, and then to the client restore program.
+Since the image header is text, it may be viewed with:
+
+       
+           # mt rewind
+           # mt fsf NN
+           # dd if=$TAPE bs=32k count=1
+       
+       
+
+In addition to describing the image, it contains text showing the commands
+needed to do a restore. Here's a typical entry for the root filesystem on
+pete.cc.purdue.edu. It is a level 1 dump done without compression using the
+vendor ufsdump program:
+
+       
+       
+             AMANDA: FILE 19981206 pete.cc.purdue.edu / lev 1
+             comp N program /usr/sbin/ufsdump
+       
+       
+       
+
+To restore, position the tape at start of file and run:
+
+       
+           # dd if=$TAPE bs=32k skip=1 | /usr/sbin/ufsrestore -f... -
+       
+       
+
+As with any backup system, test these procedures while in normal production so
+the principles and techniques are familiar when disaster strikes.
+-------------------------------------------------------------------------------
+
+Prev                           Up                     Next
+Part IV. Various Information  Home  Chapter 16. AMANDA FAQ
+
diff --git a/docs/various.txt b/docs/various.txt
new file mode 100644 (file)
index 0000000..16f4705
--- /dev/null
@@ -0,0 +1,209 @@
+
+Part IV. Various Information
+Prev                    Next
+
+-------------------------------------------------------------------------------
+
+
+Various Information
+
+
+
+Additional information about AMANDA
+
+Here you find various other documents like the AMANDA FAQ, the Top Ten
+Questions and the AMANDA-Wishlist. You can also find the last AMANDA-Survey in
+here (although it still needs formatting ... sorry, Jon ...). The latest
+addition is the "famous" AMANDA-chapter by John R. Jackson.
+Table of Contents
+
+
+  15._Using_AMANDA
+
+
+        An_Introduction
+
+        AMANDA_Features
+
+        Future_Capabilities_of_AMANDA
+
+        AMANDA_Resources
+
+        Installing_AMANDA
+
+
+              Install_Related_Packages
+
+              Perform_Preliminary_Setup
+
+              Configure_the_AMANDA_Build
+
+              Build_and_Install_AMANDA
+
+              Configuring_AMANDA
+
+              Decide_on_a_Tape_Server
+
+              Decide_Which_Tape_Devices_to_Use
+
+              Decide_Whether_to_Use_Compression
+
+              Decide_Where_the_Holding_Space_Will_Be
+
+              Compute_Your_Dump_Cycle
+
+              Copy_and_Edit_the_Default_Configuration_File
+
+              Configure_the_Holding_Disk
+
+              Configure_Tape_Devices_and_Label_Tapes
+
+              Configure_Backup_Clients
+
+              Test_and_Debug_Setup
+
+
+        Operating_Amanda
+
+
+              Run_amdump
+
+              Read_AMANDA's_Reports
+
+              Monitor_Tape_and_Holding_Disk_Status
+
+              Adding_Tapes_at_a_Particular_Position_in_the_Cycle
+
+              Miscellanous_Operational_Notes
+
+
+        Advanced_AMANDA_Configuration
+
+
+              Adjust_the_Backup_Cycle
+
+              Adjust_Parallelism
+
+              Monitor_for_Possible_Improvements
+
+              Excluding_Files
+
+
+        Restoring_with_AMANDA
+
+
+              Configuring_and_Using_amrecover
+
+              Using_amrestore
+
+              Restoring_Without_AMANDA
+
+
+
+  16._AMANDA_FAQ
+
+
+        QUESTION:_Why_does_AMANDA_fail_to_build_on_my_system?
+
+        QUESTION:_Why_does_amdump_report_that_all_disks_failed?
+
+        QUESTION:_Why_does_amcheck_say_"port_NNN_is_not_secure"?
+
+        QUESTION:_Why_does_amcheck_claim_that_the_tape_is_"not_an_amanda_tape"?
+
+        QUESTION:_Why_does_amcheck_report_"selfcheck_request_timed_out"?
+
+        QUESTION:_Why_does_amandad.debug_contain_"error_receiving_message"?
+
+        QUESTION:_Why_does_amcheck_say_"access_as_<username>_not_allowed..."?
+
+        QUESTION:_Why_does_amcheck_report_"ip_address_#.#.#.#"_is_not_in_the_ip
+        list_list_for_<hostname>'?
+
+        QUESTION:_Why_does_amcheck_say_"cannot_overwrite_active_tape"?
+
+        QUESTION:_Why_does_amcheck_tell_me_"DUMP_program_not_available"?
+
+        QUESTION:_Which_tape_changer_configuration_should_I_use_in_amanda.conf?
+
+        QUESTION:_Should_I_use_software_or_hardware_compression?
+
+        QUESTION:_How_can_I_configure_AMANDA_so_that_it_performs_full_backups
+        on_the_week-end_and_incrementals_on_weekdays?
+
+        QUESTION:_What_if_my_tape_unit_uses_expensive_tapes,_and_I_don't_want
+        to_use_one_tape_per_day?_Can't_AMANDA_append_to_tapes?
+
+        QUESTION:_How_can_I_configure_AMANDA_for_long-term_archiving?
+
+        QUESTION:_Can_I_backup_separate_disks_of_the_same_host_in_different
+        configurations?
+
+        QUESTION:_Can_AMANDA_span_large_filesystems_across_multiple_tapes?
+
+        QUESTION:_What's_the_difference_between_option_"skip-full"_and
+        "strategy_nofull"?
+
+        QUESTION:_Why_does_amdump_report_"results_missing"?
+
+        QUESTION:_Why_does_amdump_report_"disk_offline"?
+
+        QUESTION:_What_if_amdump_reports_"dumps_way_too_big,_must_skip
+        incremental_dumps"?
+
+        QUESTION:_amdump_reported_"infofile_update_failed"._What_should_I_do?
+
+        QUESTION:_Why_does_AMANDA_sometimes_promote_full_dumps?
+
+        QUESTION:_Why_does_amrecover_report_"no_index_records"_or_"disk_not
+        found"?
+
+        QUESTION:_Ok,_I'm_done_with_testing_AMANDA,_now_I_want_to_put_it_in
+        production._How_can_I_reset_its_databases_so_as_to_start_from_scratch?
+
+        QUESTION:_The_man-page_of_dump_says_that_active_filesystems_may_be
+        backed_up_inconsistently._What_does_AMANDA_do_to_prevent_inconsistent
+        backups?
+
+        QUESTION:_Which_version_of_GNU-tar_should_I_use?
+
+
+  17._Collection_of_the_top_ten_AMANDA_questions._And_answers.
+
+
+        Reason_for_starting_this_list.
+
+        the_DLE-question
+
+        the_localhost-question
+
+        the_friday-tape-question
+
+        the_multiple-dumps-question
+
+        the_mailing-list-question
+
+        the_distro-question
+
+        the_index-question
+
+        the_tapetype-questions
+
+        the_size-question
+
+        the_GUI-question
+
+        the_holding-disk_question
+
+        ...
+
+
+  18._AMANDA_WISHLIST
+
+  19._AMANDA_Survey_Results
+
+-------------------------------------------------------------------------------
+
+Prev                    Up                       Next
+Chapter 14. AFS HOWTO  Home  Chapter 15. Using AMANDA
+
diff --git a/docs/vtape-api.txt b/docs/vtape-api.txt
new file mode 100644 (file)
index 0000000..e1637f4
--- /dev/null
@@ -0,0 +1,65 @@
+
+         Chapter 25. Virtual Tape API
+Prev  Part V. Technical Background  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 25. Virtual Tape API
+
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/vtape-api.html for the current version of
+this document.
+The upper level AMANDA code (including some of the other tape_xxx routines)
+calls the following routines which implement a virtual tape table:
+
+* int tape_access(filename, mode) Acts like access(2) on possibly virtual
+  devices
+* int tape_open(filename, mode) Acts like open(2) on possibly virtual devices
+* int tape_stat(filename, buf) Acts like stat(2) on possibly virtual devices
+* int tapefd_close(tapefd) Acts like close(2) on possibly virtual devices
+* int tapefd_fsf(tapefd, count) Forward skips the (possibly virtual) device.
+* int tapefd_read(tapefd, buffer, count) Reads a block from the (possibly
+  virtual) device.
+* int tapefd_rewind(tapefd) Reads a block from a (possibly virtual) device.
+* void tapefd_resetofs(tapefd) Uses lseek() tricks to reset the write/read
+  offset counter on a virtual tape device.
+* int tapefd_unload(tapefd) Unloads the media from a (possibly virtual) device.
+* int tapefd_status(tapefd) pr- ints status of the (possibly virtual) device to
+  standard output.
+* int tapefd_weof(tapefd, count) writes a filemark/moves to the next file on a
+  device for writing.
+* int tapefd_write(tapefd, buffer, count) writes a block of data to a (possibly
+  virtual) device.
+
+For a tape type xxx, the following routines must be provided, and entered -
+into the table "vtable" in tape-src/tapeio.c:
+
+* int xxx_tape_access(filename, mode)
+* int xxx_tape_open(filename, mode)
+* int xxx_tape_stat(filename, buf)
+* int xxx_tapefd_close(xxx_tapefd)
+* int xxx_tapefd_fsf(xxx_tapefd, count)
+* int xxx_tapefd_read(xxx_tapefd, buffer, count)
+* int xxx_tapefd_rewind(xxx_tapefd)
+* void xxx_tapefd_resetofs(xxx_tapefd)
+* int xxx_tapefd_unload(xxx_tapefd)
+* int xxx_tapefd_status(xxx_tapefd)
+* int xxx_tapefd_weof(xxx_tapefd, count)
+* int xxx_tapefd_write(xxx_tapefd, buffer, count)
+
+Along with a prefix string which will identify the type. The initial vtape
+layer has two types "plain" and "rait" (Redundant Array of Inexpensive Tapes)
+but we hope to add a "rmt" (remote tape client), and possibly "dvd" types soon.
+-------------------------------------------------------------------------------
+
+Prev                              Up                                     Next
+Chapter 24. AMANDA Security API  Home  Chapter 26. Using Kerberos with AMANDA
+
diff --git a/docs/whatwasnew.txt b/docs/whatwasnew.txt
new file mode 100644 (file)
index 0000000..936edbc
--- /dev/null
@@ -0,0 +1,468 @@
+
+      Chapter 29. What once was new
+Prev  Part VI. Historical files  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 29. What once was new
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion, Updates
+AMANDA Core Team
+<sgw@amanda.org>
+Table of Contents
+
+
+  What's_new_in_AMANDA_2.3
+
+
+        Indexing_backups_for_easier_restore
+
+        Samba_Support
+
+        GnuTar_Support
+
+        Multiple_backups_in_parallel_from_one_client_host
+
+        Multiple_tapes_in_one_run
+
+        Bottleneck_determination
+
+        2_Gb_limit_removed
+
+        amadmin_import/export
+
+
+  What's_new_in_AMANDA_2.2
+
+
+        Client_side_setup_has_changed
+
+        Version_suffixes_on_executables
+
+        Kerberos
+
+        Multiple_holding_disks
+
+        Remote_self-checks
+
+        mmap_support
+
+        gzip_support
+
+        Mount_point_names_in_disklist
+
+        Initial_tape-changer_support_included
+
+        Generic_tape_changer_wrapper_script
+
+        New_command_amtape
+
+        Changer_support_added_to_command_amlabel
+
+        Tape_changer_support_improved
+
+        A_few_words_about_multi-tape_runs
+
+        Big_planner_changes
+
+        Level-0_dumps_allowed_with_no_tape
+
+
+
+Note
+
+Refer to http://www.amanda.org/docs/whatwasnew.html for the current version of
+this document.
+
+ What's new in AMANDA 2.3
+
+This document contains notes on new features in AMANDA 2.3 that may not yet be
+fully documented elsewhere.
+
+ Indexing backups for easier restore
+
+Read more about this in the file named Indexing_with_AMANDA.
+
+ Samba Support
+
+Read more about this in the file named Backup_PC_hosts_using_Samba.
+
+ GnuTar Support
+
+AMANDA now supports dumps made via GnuTAR. To use this, set your dumptypes set
+the program name to "GNUTAR":
+
+  dumptype tar-client {
+  ....
+  program "GNUTAR"
+  }
+       
+
+Since Gnu TAR does not maintain a dumpdates file itself, nor give an estimate
+of backup size, those need to be done within AMANDA. AMANDA maintains an /etc/
+amandates file to track the backup dates analogously to how dump does it.
+NOTE: if your /etc directory is not writable by your dumpuser, you'll have to
+create the empty file initially by hand, and make it writable by your dumpuser
+ala /etc/dumpdates.
+NOTE: Since tar traverses the directory hierarchy and reads files as a regular
+user would, it must run as root. The two new AMANDA programs calcsize and
+runtar therefore must be installed setuid root. I've made them as simple as
+possible to to avoid potential security holes.
+
+ Multiple backups in parallel from one client host
+
+A new "maxdumps" parameter for the conf file gives the default value for the
+amount of parallelism per client:
+
+  maxdumps 2 # default max num. dumps to do in parallel per client
+       
+
+If this default parameter is not specified, the default for the default :-0 is
+1. Then, you can override the parameter per client through the dumptype, eg:
+
+  dumptype fast-client {
+  ....
+  maxdumps 4
+  }
+       
+
+If the "maxdumps" parameter isn't given in the dumptypes, the default is used.
+The idea is that maxdumps is set roughly proportional to the speed of the
+client host. You probably wont get much benefit from setting it very high, but
+all but the slowest hosts should be able to handle a maxdumps of at least 2.
+AMANDA doesn't really have any per-host parameters, just per-disk, so the per-
+client-host maxdumps is taken from the last disk listed for that host.
+Just to make things more complicated, I've added the ability to specify a
+"spindle number" for each filesystem in the disklist file. For example:
+
+          wiggum /        fast-comp-user  0
+          wiggum /usr     fast-comp-user  0
+          wiggum /larry   fast-comp-user  1
+          wiggum /curly   fast-comp-user  1
+          wiggum /moe     fast-comp-user  1
+          wiggum /itchy   fast-comp-user  2
+          wiggum /scratchy fast-comp-user 3
+       
+
+The spindle number represents the disk number, eg every filesystem on sd0 can
+get a spindle number of 0, everything on sd1 gets spindle 1, etc (but there's
+no enforced requirement that there be a match with the underlying hardware
+situation). Now, even with a high maxdumps, AMANDA will refrain from scheduling
+two disks on the same spindle at the same time, which would just slow them both
+down by adding a lot of seeks.
+The default spindle if you don't specify one is -1, which is defined to be a
+spindle that doesn't interfere with itself. That is if you don't specify any
+spindle numbers, any and all filesystems on the host can be scheduled
+concurrently up to the maxdumps.
+Just to be clear, there's no relation between spindle numbers and maxdumps:
+number the spindles by the disks that you have, even if that's more than
+maxdumps.
+Also, I'm not sure that putting spindle numbers everywhere is of much value:
+their purpose is to prevent multiple big dumps from being run at the same time
+on two partitions on the same disk, on the theory that the extra seeking
+between the partitions would cause the dumps to run slower than they would if
+they ran sequentially. But, given the client-side compression and network
+output that must occur between blocks read from the disk, there may be enough
+slack time at the disk to support the seeks and have a little parallelism left
+over to do some good.
+
+ Multiple tapes in one run
+
+I've rewritten the taper - it now supports one run spanning multiple tapes if
+you have a tape-changer. The necessary changes in support of this have also
+been made to driver and reporter - planner already had support. There are a
+couple other places that should probably be updated, like amcheck. Dumps are
+not split across tapes - when taper runs into the end of a tape, it loads the
+next tape and tells driver to try sending the dump again.
+If you are feeling brave, set "runtapes" to something other than 1.
+The new taper also keeps the tape open the entire time it is writing the files
+out - no more having amchecks or other accesses/rewinds in the middle of the
+run screw you royally if they hit when the tape is closed for writing a
+filemark.
+
+ Bottleneck determination
+
+I've made some experimental changes to driver to determine what the bottleneck
+is at any time. Since AMANDA tries to do many things at once, it's hard to
+pinpoint a single bottleneck, but I "think" I've got it down well enough to say
+something useful. For now it just outputs the current bottleneck as part of its
+"driver: state" line in the debug output, but once I'm comfortable with its
+conclusions, I'll output it to the log file and have the reporter generate a
+nice table. The current choices are:
+
+* not-idle - if there were dumps to do, they got done
+* no-dumpers - there were dumps to do but no dumpers free
+* no-hold - there were dumps to do and dumpers free but the dumps
+* couldn't go to the holding disks (no-hold conf flag)
+* no-diskspace - no diskspace on holding disks
+* no-bandwidth - ran out of bandwidth
+* client-constrained - couldn't start any dumps because the clients were busy
+
+
+ 2 Gb limit removed
+
+I've fixed the 2-gig limits by representing sizes in Kbytes instead of bytes
+everywhere. This gives us a new 2 TB dump-file size limit (on 32bit machines),
+which should last us a couple more years. This seemed preferable to me than
+going to long-long or some other non-portable type for the size.
+
+ amadmin import/export
+
+amadmin now has "import" and "export" commands, to convert the curinfo database
+to/from text format, for: moving an AMANDA server to a different arch,
+compressing the database after deleting lots of hosts, or editing one or all
+entries in batch form or via a script.
+
+ What's new in AMANDA 2.2
+
+
+Note
+
+Here's the old 2.2.x stuff from this file. I'm pretty sure most of this is in
+the mainline documentation already.
+This document contains notes on new features in AMANDA 2.2 that may not yet be
+fully documented elsewhere.
+
+ Client side setup has changed
+
+The new /etc/services lines are:
+
+  amanda       10080/udp               # bsd security AMANDA daemon
+  kamanda      10081/udp               # krb4 security AMANDA daemon
+
+The new /etc/inetd.conf lines are:
+
+  amanda  dgram udp wait /usr/local/libexec/amanda/amandad amandad
+  kamanda dgram udp wait /usr/local/libexec/amanda/amandad amandad -krb4
+
+(you don't need the vanilla AMANDA lines if you are using kerberos for
+everything, and vice-versa)
+
+ Version suffixes on executables
+
+The new USE_VERSION_SUFFIXES define in options.h controls whether to install
+the AMANDA executables with the version number attached to the name, eg
+"amdump-2.2.1". I recommend that you leave this defined, since this allows
+multiple versions to co-exist - particularly important while AMANDA 2.2 is
+under development. You can always symlink the names without the version suffix
+to the version you want to be your "production" version.
+
+ Kerberos
+
+Read the comments in Using_Kerberos_with_AMANDA for how to configure the
+kerberos version. With KRB4_SECURITY defined, there are two new dumptype
+options:
+
+*
+    krb4-auth  # use krb4 auth for this host
+               # (you can mingle krb hosts & bsd .rhosts in one conf)
+       
+
+*
+    kencrypt   # encrypt this filesystem over the net using the krb4
+               # session key.  About 2x slower.  Good for those root
+               # partitions containing your keyfiles.  Don't want to
+               # give away the keys to an ethernet sniffer!
+       
+
+
+
+ Multiple holding disks
+
+You can have more than one holding disk for those really big installations.
+Just add extra diskdir and disksize lines to your amanda.conf:
+
+Note
+
+sgw: This is OLD syntax now ...
+
+       diskdir "/AMANDA2/AMANDA/work"  # where the holding disk is
+       disksize 880 MB                 # how much space can we use on it
+
+       diskdir "/dumps/AMANDA/work"    # a second holding disk!
+       disksize 1500 MB
+       
+
+AMANDA will load-balance between the two disks as long as there is space.
+AMANDA now also actually stats files to get a more accurate view of available
+and used disk space while running.
+
+ Remote self-checks
+
+amcheck will now cause self-checks to run on the client hosts, quickly
+detecting which hosts are up and communicating, which have permissions
+problems, etc. This is amazingly fast for what it does: here it checks more
+than 130 hosts in less than a minute. My favorite gee-whiz new feature! The new
+-s and -c options control whether server-only or client-only checks are done.
+
+ mmap support
+
+System V shared memory primitives are no longer required on the server side, if
+your system has a version of mmap() that will allocate anonymous memory. BSD
+4.4 systems (and OSF/1) have an explicitly anonymous mmap() type, but others
+(like SunOS) support the trick of mmap'ing /dev/zero for the same effect.
+AMANDA should work with both varieties.
+Defined HAVE_SYSVSHM or HAVE_MMAP (or both) in config.h. If you have both,
+SYSVSHM is selected (simply because this code in AMANDA is more mature, not
+because the sysv stuff is better).
+
+ gzip support
+
+This was most requested feature #1; I've finally slipped it in. Define
+HAVE_GZIP in options.h. See options.h-vanilla for details. There are two new
+amanda.conf dumptype options "compress-fast" and "compress-best". The default
+is "compress-fast". With gzip, compress-fast seems to always do better than the
+old lzw compress (in particular it will never expand the file), and runs faster
+too. Gzip's compress-best does very good compression, but is about twice as
+slow as the old lzw compress, so you don't want to use it for filesystems that
+take a long time to full-dump anyway.
+
+ Mount point names in disklist
+
+Most requested feature #2: You can specify mount names in the disklist instead
+of dev names. The rule is, if the filesystem name starts with a slash, it is a
+mount point name, if it doesn't, it is a dev name, and has DEVDIR prepended.
+For example:
+
+       obelix  sd0a            # dev-name: /dev/sd0a
+       obelix  /obelix         # mount name: /obelix, aka /dev/sd0g
+       
+
+
+ Initial tape-changer support included
+
+A new amanda.conf parameter, tpchanger, controls whether AMANDA communicates
+with a tape changer program to load tapes rather than just opening the tapedev
+itself. The tpchanger parameter is a string which specifies the name of a
+program that follows the API specified in AMANDA_Tape_Changer_Support. Read
+that for more information.
+
+ Generic tape changer wrapper script
+
+An initial tape-changer glue script, chg-generic.sh, implements the AMANDA
+changer API using an array of tape devices to simulate a tape changer, with the
+device names specified via a conf file. This script can be quickly customized
+by inserting calls tape-changer-specific programs at appropriate places, making
+support for new changers painless. If you know what command to execute to get
+your changer to put a particular tape in the drive, you can get AMANDA to
+support your changer.
+The generic script works as-is for sites that want to cascade between two or
+more tape drives hooked directly up to the tape server host. It also should
+work as-is with tape-changer drivers that use separate device names to specify
+the slot to be loaded, wheres simply opening the slot device causes the tape
+from that slot to be loaded.
+chg-generic has its own small conf file. See example/chg-generic.conf for a
+documented sample.
+
+ New command amtape
+
+amtape is the user front-end to the AMANDA tape changer support facilities. The
+operators can use amtape to load tapes for restores, position the changer, see
+what AMANDA tapes are loaded in the tape rack, and see which tape would be
+picked by taper for the next amdump run.
+No man page yet, but running amtape with no arguments gives a detailed usage
+statement. See AMANDA_Tape_Changer_Support for more info.
+
+Note
+
+sgw: The manpage exists now.
+
+ Changer support added to command amlabel
+
+The amlabel command now takes an optional slot argument for labeling particular
+tapes in the tape rack. See AMANDA_Tape_Changer_Support for more info.
+
+ Tape changer support improved
+
+The specs in AMANDA_Tape_Changer_Support have been updated, and the code
+changed to match. The major difference is that AMANDA no longer assumes slots
+in the tape rack are numbered from 0 to N-1. They can be numbered or labeled in
+any manner that suits your tape-changer, AMANDA doesn't care what the actual
+slot names are. Also added "first" and "last" slot specifiers, and an -eject
+command.
+The chg-generic.sh tape changer script now has new "firstslot", "lastslot", and
+"needeject" parameters for the chg-generic.conf file. It now keeps track of
+whether the current slot is loaded into the drive, so that it can issue an
+explicit eject command for those tape changers that need one. See example/chg-
+generic.conf for more info.
+
+ A few words about multi-tape runs
+
+I'm still holding back on support for multiple tapes in one run. I'm not yet
+completely happy with how AMANDA should handle splitting dumps across tapes (eg
+when end-of-tape is encountered in the middle of a long dump). For example,
+this creates issues for amrestore, which currently doesn't know about
+configurations or tape changers --- on purpose, so that you can do restores on
+any machine with a tape drive, not just the server, and so that you can recover
+with no online databases present.
+However, because the current snapshot DOES support tape changers, and multiple
+runs in one day, some of the benefit of multi-tape runs can be had by simply
+running AMANDA several times in a row. Eg, to fill three tapes per night, you
+can put
+
+  amdump <conf>; amdump <conf>; amdump <conf>
+
+in you crontab. On the down side, this will generate three reports instead of
+one, will do more incremental dumps than necessary, and will run slower. Not
+very satisfying, but if you need to fill more than one tape per day NOW, it
+should work.
+
+ Big planner changes
+
+The support for writing to multiple tapes in one run is almost finished now.
+See Multitape_support_in_AMANDA_2.2 for an outline of the design. The planner
+support for this is included in this snapshot, but the taper part is not.
+There is a new amanda.conf variable "runtapes" which specifies the number of
+tapes to use on each amdump run. For now this should stay at 1, the default.
+Also, the old "mincycle" and "maxcycle" amanda.conf variables are deprecated,
+but still work for now. "maxcycle" was never used, and "mincycle" is now called
+"dumpcycle".
+There are two visible differences in the new planner: First, planner now thinks
+in real-time, rather than by the number of tapes as before. That is, a
+filesystem is due for a full backup once every <dumpcycle> days, regardless of
+how many times AMANDA is run in that interval. As a consequence, you need to
+make sure the dumpcycle variable marks real time instead of the number of days.
+For example, previously "mincycle 10" worked for a two week cycle if you ran
+amdump only on weekdays (for 10 runs in a cycle). Now a two week cycle must be
+specified as "dumpcycle 14" or "dumpcycle 2 weeks". The "2 weeks" specifier
+works with both the old and new versions of planner, because previously "weeks"
+multiplied by 5, and now it multiplies by 7.
+Second, planner now warns about impending overwrites of full backups. If a
+filesystem's last full backup is on a tape that is due to be overwritten in the
+next 5 runs, planner will give you a heads-up about it, so that you can restore
+the filesystem somewhere, or switch that tape out of rotation (substitute a new
+tape with the same label). This situation often occurs after a hardware failure
+brings a machine or disk down for some days.
+
+ Level-0 dumps allowed with no tape
+
+If there is no tape present (or the tape drive fails during dumping), AMANDA
+switches to degraded mode. In degraded mode, level-0 dumps are not allowed.
+This can be a pain for unattended sites over the weekend (especially when there
+is a large holding disk that can hold any necessary dumps). AMANDA now supports
+a new configuration file directive, "reserve". This tells AMANDA to reserve
+that percentage of total holding disk space for degraded mode dumps. Example:
+your total holding disk space adds up to 8.4GB. If you specify a reserve of 50,
+4.2GB (50%) of the holding disk space will be allowed to be used for regular
+dumps, but if that limit is hit, AMANDA will switch to degraded dumps. For
+backward compatibility, if no 'reserve' keyword is present, 100 will be assumed
+(e.g. never do full dumps if degraded mode is in effect).
+
+Note
+
+This percentage applies from run to run, so, as in the previous example, when
+AMANDA runs the next day, if there is 3.8GB left on the holding disk, 1.9GB
+will be reserved for degraded mode dumps (e.g. the percentage keeps sliding).
+-------------------------------------------------------------------------------
+
+Prev                         Up                                          Next
+Chapter 28. Upgrade Issues  Home  Chapter 30. Multitape support in AMANDA 2.2
+
diff --git a/docs/wishlist.txt b/docs/wishlist.txt
new file mode 100644 (file)
index 0000000..7112a97
--- /dev/null
@@ -0,0 +1,274 @@
+
+         Chapter 18. AMANDA WISHLIST
+Prev  Part IV. Various Information  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 18. AMANDA WISHLIST
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Jean-Louis Martineau
+
+Additions and Updates
+AMANDA Core Team
+<martinea@iro.umontreal.ca>
+
+Stefan G. Weichinger
+
+XML-conversion; Additions and Updates
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/wishlist.html for the current version of
+this document.
+This is a major update.
+These are items that we are planning to address, OR which we would like to see
+happen sometime in the future.
+They appear in random order.
+Of course, we aren't promising to deliver anything.
+This document can be found at http://www.amanda.org/docs/wishlist.html.
+You may find more up-to-date information at http://www.amanda.org/ongoing.php.
+If you have any ideas about any of the following, please send an e-mail note to
+mailto://amanda-users@amanda.org or mailto://amanda-hackers@amanda.org.
+Jean-Louis Martineau, Stefan G. Weichinger,
+AMANDA Core Team
+Oct. 2004.
+
+* Samba: Ports to non-Unix platforms, specifically Macs and PCs. The hooks are
+  in the AMANDA protocol to support non-dump backup programs, but no-one has
+  volunteered to implement the client side. sgw: Mac OS X is able to run the
+  client, so only the PC is left, and I suggest that we should go the SAMBA-
+  way, I think. Samba is working well, is documented and developed further, so
+  I think this will be a stable path to go and support. And people don't need
+  to compile/install anything on their Win-boxes, just add a user and shares
+  ... opinions welcome.
+
+
+* Samba: Samba should be treated as a different backup program, not as GNUTAR,
+  because it cannot handle dump-style incrementals.
+
+
+* Samba: multiple exclusion-patterns. Since Samba 3.0.3 smbclient supports the
+  usage of multiple exclude-patterns. This would enable AMANDA to exclude more
+  than one pattern per SMB-share, allowing to exclude pagefile.sys AND the
+  registry-files, for example.
+
+
+* Instead of hard-coding the interface with tape devices in AMANDA, there
+  should be a higher level interface that allowed different storage devices to
+  be used. AMANDA should also be able to retain backups in disk, even after
+  they are taped, for faster restore of recently backed up data. It should also
+  be possible to store a single backup in multiple tapes, for redundancy.
+
+
+* We need a better protocol between the driver and dumpers. setup terminated
+  (to not start to dump on the same host at the same time). driver should ask
+  periodicaly if the dumper is still alive (in case the dumper hang).
+
+
+* image span / multiple tape. John Stange <building@nap.edu> is working on it.
+  His patch will very likely go into a development-branch.
+
+
+* retry failed backups in a single run. If backup fails because of active
+  filesystems or lack of memory, AMANDA could throw the failed backup away and
+  run it again, instead of trying it again in the next run only.
+
+
+* Support for client-initiated backups might be interesting, but the server
+  would have to keep listening for clients backup requests for a configurable
+  period of time. This could be used to back up secure hosts, for instance.
+
+
+* Backups to remote tape devices (i.e., not in the main AMANDA server), as well
+  as to remote filesystems should be supported.
+
+
+* multi-tape : AMANDA should be able to write to many tape at the same time.
+  Need some criteria to select which dump should go on which tape? By level,
+  host name, ???
+
+
+* A way to tell if some dump must be done before/after some other. (eg. DLE X
+  must be started after DLE Y is started/dumped/taped).
+
+
+* Write to tape and holding disk in parallel (For dump to tape), the dump to
+  tape could be started first, while doing some dump to holding disk.
+
+
+* Autoflush to tape while doing estimate.
+
+
+* Keep files on holding disk after taped, that will permit faster recovery
+  because they will be from holding disk, these dump will be erase when the
+  same is needed for newer dump.
+
+
+* Append to tape
+
+
+* chg-disk
+  This script writes to disks which can be accessed in a parallel way (contrary
+  to the serial access to tapes). This could enable AMANDA to do writes and
+  reads to several vtapes in parallel (e.g. doing an amrestore while the
+  regular amdump is running).
+  It would be helpful to have a script which generates the needed directory-
+  structure for a given chg-disk configuration. This script should test for
+  valid settings (using amgetconf to get the values out of amanda.conf), create
+  the necessary slot-directories and label the new vtapes by using amlabel.
+  (there are drafts available already)
+
+
+* amrecover should be able to set and "rewind" the correct vtape. Currently it
+  is necessary to do this manually in another tty.
+
+
+* It should be possible to re-generate databases and indexes from tapes.
+
+
+* AMANDA could append meta-data like databases and indexes to tape, so that
+  each tape contains its own current indexes and everything to rebuild the
+  server-config.
+
+
+* AMANDA should install man-pages for installed programs only.
+
+
+* We should provide for client-side configuration files, to specify default
+  tape server, index server, and perhaps even pathnames to some programs.
+
+
+* It should be possible to configure whether amidxtaped should decompress the
+  dump stream or not (so amrecover could decompress it locally).
+
+
+* amstatus:
+  It should read degraded schedule and write which are delayed.
+  It should print number of byte written to tape for the current flush.
+  The taper should write a file with a byte count for the current files (every
+  GB) and amstatus could read it.
+  It could report the expected time before the dump finishes.
+
+
+* amverify/ amverifyrun:
+  It should look at the log file and compare the result.
+
+
+* amrecover:
+  should cd, add, remove, ... with a path with glob or regex (cd o*/linux)
+  find [file] # where is that file in the current DLE? (I don't know the path)
+  when [file] # when was this file dumped?
+  parsing accept '\': cd HP890\ Color
+  our own completion
+
+
+* amkill:
+  A new script to kill all process on client and server
+
+
+* Convert datestamp to timestamp everywhere, that will permit many run a day,
+  and be able to recover them easily. it's already done for holding disk.
+  (That's a big job, AMANDA use the datestamp sometimes as INT, sometime as
+  CHAR*, converting every thing to CHAR* is probably not very difficult, what
+  will be difficult will be to stay compatible with the old datestamp.)
+
+
+* Enhance the protocol between client-server to allow white-space and any
+  character in DLE/exclude/include.
+
+
+* More tools in amadmin. The administrator should be able to look at the
+  database in various ways. Adding / deleting / moving disks and hosts should
+  be done through amadmin instead of editing the disklist directly. This will
+  allow AMANDA to do some sanity checks for the operators, to make sure
+  permissions are set up right, etc.
+  Suggested by Chris Jones <cjones@honors.montana.edu>.
+
+
+* You should be able to force full dumps for nights other than tonight. Rather
+  than one command at a time on the command line, amadmin could be a little
+  shell with a help facility (ala ckermit or gnuplot, if you've seen those).
+
+
+* A tape-verify pass after the AMANDA run (we already have one, but it doesn't
+  work with dump as well as it does with GNU tar). Perhaps taper could
+  calculate a CRC for each file and store that in the database, to be checked
+  by the verifier.
+
+
+* More sophisticated tape management. Should AMANDA track tapes globally,
+  counting the number of times tapes were used, and recommending retirement for
+  tapes at the appropriate time?
+
+
+* Automatically notice that external dumps have been done. Sendsize could also
+  notice if a filesystem was dumped externally from AMANDA. Right now the
+  planner assumes that the incrementals it is doing are relative to the full
+  dumps it is doing. If someone does a full dump of one of its filesystems (and
+  writes /etc/dumpdates) outside of AMANDA, data could be lost. Sun's Backup-
+  Copilot handles this well. We should too.
+
+
+* What if we made the "length" in a tapetype definition always be the "no
+  compression" value? Then change the dumptype "compress" option to accept
+  "hardware" as another type (ala "client" and "server") and let planner do its
+  normal thing with that information (including "comprate", which at the
+  current default of 50% is the usual first guess for hardware compression).
+  This would make setting the tape length value less confusing, and make the
+  amtapetype program easier to run. You could even get more accurate planning
+  than what is currently available by setting the comprate to what you know the
+  data is like on a dumptype by dumptype basis. Suggested by John R. Jackson
+  <jrj@gandalf.cc.purdue.edu>.
+
+
+* The way to specify the schedule should be redesigned, all those strategy
+  (standard, nofull, noinc, incronly, force-full) and options (skip-full, skip-
+  incr) are confusing.
+  We should have two options, one for full dump and one for incrementals.
+  full [AUTOMATIC | SKIP | NOTIFY | FORCE | FIXED]
+  incr [NONE | BUMP | NOBUMP]
+  with the following values:
+  AUTOMATIC: follow AMANDA scheduling (allow promoted and delayed)
+  SKIP : full dump are done externally on an fixed schedule, dump nothing when
+  a full is due (like skip-full).
+  NOTIFY : full dumps are done externally, but are notified with the NOTIFY
+  command ( amadmin <conf> notify <host> <disk>).
+  FORCE : full dumps are done only with the FORCE_FULL command.
+  FIXED : do full dumps on a fixed schedule (like skip-incr).
+  NONE : don't do incremental dumps.
+  BUMP : allow incremental dumps to bump.
+  NOBUMP : do not allow incremental dumps to bump.
+
+
+* Remove all compiled options that can be moved to a (the?) configuration file.
+  (eg. GNU tar path, if configure can't find it, AMANDA should be able to use
+  GNU tar if the path is specified on a client config file) Many people would
+  like this, it would maybe also bring us closer to the possibility of working
+  and usable rpms?
+
+
+* Documentation:
+  There is pretty much going on with the AMANDA-docs. The docs have been
+  converted to Docbook/XML and form the new module xml-docs in the AMANDA-CVS-
+  repository.
+  The FAQ-O-Matic could be replaced by a Wiki. Suggested by Harlan Stenn
+  <Harlan.Stenn@pfcs.com>.
+  The xml-docs need more formatting and reviewing.
+  The tapetypes from the FOM should go into the XML-docs.
+  The docs would benefit from adding some illustrations.
+
+The WISHLIST should get shortened.
+-------------------------------------------------------------------------------
+
+Prev                                   Up                                Next
+Chapter 17. Collection of the top ten Home  Chapter 19. AMANDA Survey Results
+AMANDA questions. And answers. 
+
diff --git a/docs/y2k.txt b/docs/y2k.txt
new file mode 100644 (file)
index 0000000..c532497
--- /dev/null
@@ -0,0 +1,34 @@
+
+        Chapter 32. Y2K Compliancy
+Prev  Part VI. Historical files  Next
+
+-------------------------------------------------------------------------------
+
+Chapter 32. Y2K Compliancy
+
+
+AMANDA Core Team
+
+Original text
+AMANDA Core Team
+
+Stefan G. Weichinger
+
+XML-conversion
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/y2k.html for the current version of this
+document.
+The AMANDA developers believe AMANDA is Y2K-compliant, as long as the
+underlying operating system and C library are. The only date manipulations
+performed by AMANDA use C-language time manipulation functions and/or strings
+where years are represented with the century-included notation.
+-------------------------------------------------------------------------------
+
+Prev                                   Up                               Next
+Chapter 31. Thoughts about a Strategy Home  Chapter 33. Usage of floppy tape
+API                                                          drives on Linux
+
diff --git a/docs/zftape.txt b/docs/zftape.txt
new file mode 100644 (file)
index 0000000..cdcbf2b
--- /dev/null
@@ -0,0 +1,109 @@
+
+Chapter 33. Usage of floppy tape drives on Linux
+Prev  Part VI. Historical files             Next
+
+-------------------------------------------------------------------------------
+
+Chapter 33. Usage of floppy tape drives on Linux
+
+
+Albrecht Gebhardt
+
+Original text<albrecht.gebhardt@uni-klu.ac.at>
+
+Stefan G. Weichinger
+
+XML-conversion,Updates
+AMANDA Core Team
+<sgw@amanda.org>
+
+Note
+
+Refer to http://www.amanda.org/docs/zftape.html for the current version of this
+document.
+AMANDA now supports the ftape driver version 3.04d (see http://www-
+math.math.rwth-aachen.de/~LBFM/claus/ftape ). It adjusts the blocksize
+automatically to 32k and supports QIC volume tables.
+It uses only one open() call for writing backups to one tape, so the "busy"-
+lamp of the drive will be on all the time. (With normal AMANDA code it would be
+off in pauses between two files written to tape.)
+For volume table support you have to get libvtblc first (available at ftp://
+pc02-stat.sci.uni-klu.ac.at/pub/Linux/libvtblc.) This library contains the
+functions and subroutines from the vtblc utility, distributed with ftape.
+(Maybe this library will be part of a future ftape package).
+You have to set the raw tape device for volume table operations, usually /dev/
+rawft0, either via configure --with-ftape-rawdevice= or with rawtapedev in
+amanda.conf (configure checks for /dev/rawft[0-3], to get a guess for this
+value). Dont forget to make this device read/writeable for your backup user.
+For compilation you need the header files from ftape 3.04d in your include
+tree.
+The volumetable of a tape "amlabeled" TEST-VOL2 with 4 backups on it would look
+like (listed with vtblc utility from ftape):
+
+  prompt: vtblc
+
+   Nr  Id          Label                   Date           Start      End
+  Space
+
+    0 VTBL TEST-VOL2               23:08:06 03/15/98        3        4    0.00
+  %
+    1 VTBL gamma //beta/C 0        00:00:00 03/15/98        5      374    0.68
+  %
+    2 VTBL gamma sda2 0            00:00:00 03/15/98      375     1029    1.21
+  %
+    3 VTBL alpha sda2 0            00:00:00 03/15/98     1030     1906    1.62
+  %
+    4 VTBL alpha sda6 0            00:00:00 03/15/98     1907     8092   11.45
+  %
+    5 VTBL AMANDA Tape End         01:45:15 03/16/98     8093     8094    0.00
+  %
+
+With lvtblc, currently available with the libvtblc library, you can list the
+complete label strings (44 characters, not only the first 22 characters as with
+vtblc):
+
+
+  prompt: lvtblc -l
+
+   Nr  Id          Label                                         Date
+
+    0 VTBL TEST-VOL2                                     23:08:06 03/15/98
+    1 VTBL gamma //beta/C 0                              00:00:00 03/15/98
+    2 VTBL gamma sda2 0                                  00:00:00 03/15/98
+    3 VTBL alpha sda2 0                                  00:00:00 03/15/98
+    4 VTBL alpha sda6 0                                  00:00:00 03/15/98
+    5 VTBL AMANDA Tape End                               01:45:15 03/16/98
+
+Note on datestamps: volume 0 (AMANDA label): reflects the time of starting the
+backup volume i (backup files): AMANDA datestamps of the backup files last
+volume (end marker) : reflects the time of finishing the backup
+I tested this on a Linux machine (P90 / 96Mb RAM / 256 Mb swap) with two other
+clients (Linux / WfW) using
+
+* Linux Kernel 2.0.33,
+* ftape 3.04d,
+* AMANDA 2.4.0b6p4
+
+with an internal Iomega Ditto 3200 (TR-3) drive attached to an Iomega Ditto
+Dash controller (at 2000 Kbps). My tapetype follows:
+
+  define tapetype DITTO-TR3 {
+      comment "Iomega DITTO 3200 Travan 3 tape drives"
+      length 1500 mbytes          #
+      filemark 29 kbytes          # ???
+      speed 256 kbytes            # = 2000 Kbit/s ?
+  }
+       
+
+
+Note
+
+Filemarks are not written to the tape (they are written to the header segment
+and use there 128 byte), so their size could even be 0. But a tape segment
+takes at least 29 kb (+3 kb ecc-code = 32 kb), so in the worst case an eof will
+waste 29 kb.
+-------------------------------------------------------------------------------
+
+Prev                         Up                   Next
+Chapter 32. Y2K Compliancy  Home  Part VII. References
+
index 1f37605f594e5c637afcd87d19c2656b9c9111d3..ee458a03c5bf3423c703e96060e9b7aaf6aa8e19 100644 (file)
@@ -16,6 +16,8 @@
 %% John R. Jackson, Technical Software Specialist, jrj@purdue.edu
 %%%%
 
+/pageSave save def
+
 %%%
 % If you are printing duplex, change the 0 to a 1 in the following line:
 %%%
@@ -982,6 +984,13 @@ MessString5 DrawMess
                HavePage 1 eq {
                        *showpage               % dump the last page
                } if
+
+               % Clean up.  Ideally this would be in the page epilog,
+               % but reporter.c only emits the "showpage".
+               end                             % end the dict in which this
+                                               % showpage redefinition lives
+               pageSave restore                % free up memory
+               
        } def
 %%%
 % Normally there would be an "end" here to match the "begin" for our
index 01948fb37ec555012c57f7260099a6476b6e926a..807f8bb9ba4c044b3fe68077d8af52075ac9fdfb 100644 (file)
@@ -32,6 +32,25 @@ dumporder "sssS"     # specify the priority order of each dumper
                        #   B -> biggest bandwitdh
                        # try "BTBTBTBTBTBT" if you are not holding
                        # disk constrained
+
+taperalgo first                # The algorithm used to choose which dump image to send
+                       # to the taper.
+
+                       # Possible values: [first|firstfit|largest|largestfit|smallest|last]
+                       # Default: first. 
+
+                       # first         First in - first out.
+                       # firstfit      The first dump image that will fit on the current tape.
+                       # largest       The largest dump image.
+                       # largestfit    The largest dump image that will fit on the current tape.
+                       # smallest      The smallest dump image.
+                       # last          Last in - first out.
+
+displayunit "k"                # Possible values: "k|m|g|t"
+                       # Default: k. 
+                       # The unit used to print many numbers.
+                       # k=kilo, m=mega, g=giga, t=tera
+                       
 netusage  600 Kbps     # maximum net bandwidth for Amanda, in KB per sec
 
 dumpcycle 4 weeks      # the number of days in the normal dump cycle
@@ -43,11 +62,9 @@ tapecycle 25 tapes   # the number of tapes in rotation
                        # need amflush and so we do not overwrite the full
                        # backups performed at the beginning of the previous
                        # cycle
-### ### ###
-# WARNING: don't use `inf' for tapecycle, it's broken!
-### ### ###
 
 bumpsize 20 Mb         # minimum savings (threshold) to bump level 1 -> 2
+bumppercent 20         # minimum savings (threshold) to bump level 1 -> 2
 bumpdays 1             # minimum days at each level
 bumpmult 4             # threshold = bumpsize * bumpmult^(level-1)
 
index 539b21982e84a4413f394c9f98e406787fc9edb3..5212169c703dd4a04cb52f130e8725f1ad9052fa 100644 (file)
@@ -39,7 +39,7 @@ RESTORE_MAN_PAGES = amrestore.8
 endif
 
 # not autoconf-generated:
-EXTRA_DIST = amplot.8 amrestore.8 amtape.8 amdd.8 ammt.8
+EXTRA_DIST = amadmin.8 amanda.8 amcheck.8 amcheckdb.8 amcleanup.8 amdd.8 amdump.8 amflush.8 amgetconf.8 amlabel.8 ammt.8 amoverview.8 amplot.8 amreport.8 amrecover.8 amrestore.8 amrmtape.8 amstatus.8 amtape.8 amtapetype.8 amtoc.8 amverify.8 amverifyrun.8
 
 man_MANS = $(AMPLOT_MAN_PAGES) \
           $(COMMON_MAN_PAGES) \
index d413d438a0ad5d3e8a25043af7cf999850a4ea82..81f391d08efbf2742f6455684d1e8b699743b6fe 100644 (file)
@@ -36,16 +36,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 host_triplet = @host@
 subdir = man
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/amadmin.8.in $(srcdir)/amanda.8.in \
-       $(srcdir)/amcheck.8.in $(srcdir)/amcheckdb.8.in \
-       $(srcdir)/amcleanup.8.in $(srcdir)/amdump.8.in \
-       $(srcdir)/amflush.8.in $(srcdir)/amgetconf.8.in \
-       $(srcdir)/amlabel.8.in $(srcdir)/amoverview.8.in \
-       $(srcdir)/amrecover.8.in $(srcdir)/amreport.8.in \
-       $(srcdir)/amrmtape.8.in $(srcdir)/amstatus.8.in \
-       $(srcdir)/amtapetype.8.in $(srcdir)/amtoc.8.in \
-       $(srcdir)/amverify.8.in $(srcdir)/amverifyrun.8.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
        $(top_srcdir)/configure.in
@@ -53,10 +44,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config/config.h
-CONFIG_CLEAN_FILES = amadmin.8 amanda.8 amcheck.8 amcheckdb.8 \
-       amcleanup.8 amdump.8 amflush.8 amlabel.8 amoverview.8 \
-       amrecover.8 amrmtape.8 amtoc.8 amverify.8 amstatus.8 \
-       amreport.8 amgetconf.8 amverifyrun.8 amtapetype.8
+CONFIG_CLEAN_FILES =
 SOURCES =
 DIST_SOURCES =
 man8dir = $(mandir)/man8
@@ -279,7 +267,7 @@ COMMON_MAN_PAGES = amanda.8
 @WANT_RESTORE_TRUE@RESTORE_MAN_PAGES = amrestore.8
 
 # not autoconf-generated:
-EXTRA_DIST = amplot.8 amrestore.8 amtape.8 amdd.8 ammt.8
+EXTRA_DIST = amadmin.8 amanda.8 amcheck.8 amcheckdb.8 amcleanup.8 amdd.8 amdump.8 amflush.8 amgetconf.8 amlabel.8 ammt.8 amoverview.8 amplot.8 amreport.8 amrecover.8 amrestore.8 amrmtape.8 amstatus.8 amtape.8 amtapetype.8 amtoc.8 amverify.8 amverifyrun.8
 man_MANS = $(AMPLOT_MAN_PAGES) \
           $(COMMON_MAN_PAGES) \
           $(SERVER_MAN_PAGES) \
@@ -318,42 +306,6 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-amadmin.8: $(top_builddir)/config.status $(srcdir)/amadmin.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amanda.8: $(top_builddir)/config.status $(srcdir)/amanda.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amcheck.8: $(top_builddir)/config.status $(srcdir)/amcheck.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amcheckdb.8: $(top_builddir)/config.status $(srcdir)/amcheckdb.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amcleanup.8: $(top_builddir)/config.status $(srcdir)/amcleanup.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amdump.8: $(top_builddir)/config.status $(srcdir)/amdump.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amflush.8: $(top_builddir)/config.status $(srcdir)/amflush.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amlabel.8: $(top_builddir)/config.status $(srcdir)/amlabel.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amoverview.8: $(top_builddir)/config.status $(srcdir)/amoverview.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amrecover.8: $(top_builddir)/config.status $(srcdir)/amrecover.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amrmtape.8: $(top_builddir)/config.status $(srcdir)/amrmtape.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amtoc.8: $(top_builddir)/config.status $(srcdir)/amtoc.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amverify.8: $(top_builddir)/config.status $(srcdir)/amverify.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amstatus.8: $(top_builddir)/config.status $(srcdir)/amstatus.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amreport.8: $(top_builddir)/config.status $(srcdir)/amreport.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amgetconf.8: $(top_builddir)/config.status $(srcdir)/amgetconf.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amverifyrun.8: $(top_builddir)/config.status $(srcdir)/amverifyrun.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-amtapetype.8: $(top_builddir)/config.status $(srcdir)/amtapetype.8.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
        -rm -f *.lo
diff --git a/man/amadmin.8 b/man/amadmin.8
new file mode 100644 (file)
index 0000000..edad718
--- /dev/null
@@ -0,0 +1,239 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMADMIN" 8 "" "" ""
+.SH NAME
+amadmin \- administrative interface to control AMANDA backups
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 8
+\fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIcommand\fR\ \fIoptions\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmadmin\fR performs various administrative tasks on the \fBconfig\fR  \fBAMANDA\fR configuration\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "COMMANDS"
+
+.PP
+Commands that take a \fBhostname\fR [ \fBdisks\fR ] parameter pair operate on all disks in the \fBdisklist\fR for that \fBhostname\fR if no disks are specified\&. Where \fBhostname\fR is also marked as being optional, the command operates on all hosts and disks in the \fBdisklist\fR\&. Both \fBhostname\fR and \fBdisks\fR are special expressions, see the ``\fBHOST & DISK EXPRESSION\fR'' section of \fBamanda\fR(8) for a description\&.
+
+.TP
+\fBversion\fR
+Show the current version and some compile time and runtime parameters\&. The \fBconfig\fR parameter must be present but is ignored\&.
+
+.TP
+\fBforce\-bump\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Force the \fBdisks\fR on \fBhostname\fR to bump to a new incremental level during the next \fBAMANDA\fR run\&.
+
+.TP
+\fBforce\-no\-bump\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Force the \fBdisks\fR on \fBhostname\fR to not bump to a new incremental level during the next \fBAMANDA\fR run\&.
+
+.TP
+\fBunforce\-bump\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Undo a previous \fBforce\-bump\fR or \fBforce\-no\-bump\fR command\&.
+
+.TP
+\fBforce\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Force the \fBdisks\fR on \fBhostname\fR to do a full (level 0) backup during the next \fBAMANDA\fR run\&.
+
+.TP
+\fBunforce\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Undo a previous \fBforce\fR command\&.
+
+.TP
+\fBreuse\fR \fBtapelabel\fR [ \&.\&.\&. ]
+The tapes listed will be available for reuse at their point in the tape cycle\&.
+
+.TP
+\fBno\-reuse\fR \fBtapelabel\fR [ \&.\&.\&. ]
+The tapes listed will not be reused when their turn comes up again in the tape cycle\&. Note that if this causes the number of reusable tapes to drop below the \fBamanda\&.conf\fR  \fBtapecycle\fR value, \fBAMANDA\fR will request new tapes until the count is satisfied again\&.
+
+.TP
+\fBdue\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]*
+Show when the next full dump is due\&.
+
+.TP
+\fBfind\fR [ \fB\-\-sort\fR \fIhkdlb\fR ]\fB\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]*
+Display all backups currently on tape or in the holding disk\&. The tape label or holding disk filename, file number, and status are displayed\&.
+
+The \fB\-\-sort\fR option changes the sort order using the following flags:
+
+\fBh\fRhost name \fBk\fRdisk name \fBd\fRdump date \fBl\fRbackup level \fBb\fRtape label
+
+An uppercase letter reverses the sort order for that key\&. The default sort order is \fBhkdlb\fR\&.
+
+.TP
+\fBdelete\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]+
+Delete the specified \fBdisks\fR on \fBhostname\fR from the \fBAMANDA\fR database\&.
+
+.RS
+.Sh "Note"
+If you do not also remove the disk from the
+\fBdisklist\fR
+file, \fBAMANDA\fR will treat it as a new disk during the next run\&.
+.RE
+
+.TP
+\fBtape\fR
+Display the tape(s) \fBAMANDA\fR expects to write to during the next run\&. See also \fBamcheck\fR(8)\&.
+
+.TP
+\fBbumpsize\fR
+Display the current bump threshold parameters, calculated for all backup levels\&.
+
+.TP
+\fBbalance\fR [ \fB\-\-days\fR \fI<num>\fR ]\fB\fR \fB\fR \fB\fR
+Display the distribution of full backups throughout the dump schedule\&.
+
+.TP
+\fBexport\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]*
+Convert records from the \fBAMANDA\fR database to a text format that may be transmitted to another \fBAMANDA\fR machine and \fBimport\fRed\&.
+
+.TP
+\fBimport\fR
+Convert \fBexport\fRed records read from standard input to a form \fBAMANDA\fR uses and insert them into the database on this machine\&.
+
+.TP
+\fBdisklist\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]*
+Display the \fBdisklist\fR information for each of the \fBdisks\fR on \fBhostname\fR (or all hosts)\&. Mostly used for debugging\&.
+
+.TP
+\fBinfo\fR [ \fBhostname\fR [ \fBdisks\fR ]* ]*
+Display the database record for each of the \fBdisks\fR on \fBhostname\fR (or all hosts)\&. Mostly used for debugging\&.
+
+.SH "EXAMPLES"
+
+.PP
+Request three specific file systems on \fBmachine\-a\fR get a full level 0 backup during the next \fBAMANDA\fR run\&.
+.nf
+
+$ amadmin daily force machine\-a / /var /usr
+amadmin: machine\-a:/ is set to a forced level 0 tonight\&.
+amadmin: machine\-a:/var is set to a forced level 0 tonight\&.
+amadmin: machine\-a:/usr is set to a forced level 0 tonight\&.
+.fi
+
+.PP
+Request all file systems on \fBmachine\-b\fR get a full level 0 backup during the next \fBAMANDA\fR run\&.
+.nf
+
+$ amadmin daily force machine\-b
+amadmin: machine\-b:/ is set to a forced level 0 tonight\&.
+amadmin: machine\-b:/var is set to a forced level 0 tonight\&.
+amadmin: machine\-b:/usr is set to a forced level 0 tonight\&.
+amadmin: machine\-b:/home is set to a forced level 0 tonight\&.
+.fi
+
+.PP
+Undo the previous \fBforce\fR request for \fI/home\fR on \fBmachine\-b\fR\&. The other file systems will still get a full level 0 backup\&.
+.nf
+
+$ amadmin daily unforce machine\-b /home
+amadmin: force command for machine\-b:/home cleared\&.
+.fi
+
+.PP
+Locate backup images of \fI/var\fR from \fBmachine\-c\fR\&. The \fBtape or file\fR column displays either a tape label or a filename depending on whether the image is on tape or is still in the holding disk\&. If the image is on tape, the \fBfile\fR column tells you which file on the tape has the image (file number zero is a tape label)\&. This column shows zero and is not meaningful if the image is still in the holding disk\&. The \fBstatus\fR column tells you whether the backup was successful or had some type of error\&.
+.nf
+
+$ amadmin daily find machine\-c /var
+date        host      disk lv tape or file                    file status
+2000\-11\-09  machine\-c /var  0 000110                             9 OK
+2000\-11\-08  machine\-c /var  2 000109                             2 OK
+2000\-11\-07  machine\-c /var  2 /amanda/20001107/machine\-c\&._var\&.2  0 OK
+2000\-11\-06  machine\-c /var  2 000107                             2 OK
+2000\-11\-05  machine\-c /var  2 000106                             3 OK
+2000\-11\-04  machine\-c /var  2 000105                             2 OK
+2000\-11\-03  machine\-c /var  2 000104                             2 OK
+2000\-11\-02  machine\-c /var  2 000103                             2 OK
+2000\-11\-01  machine\-c /var  1 000102                             5 OK
+2000\-10\-31  machine\-c /var  1 000101                             3 OK
+.fi
+
+.PP
+Forget about the \fI/workspace\fR disk on \fBmachine\-d\fR\&. If you do not also remove the disk from the \fBdisklist\fR file, \fBAMANDA\fR will treat it as a new disk during the next run\&.
+.nf
+
+$ amadmin daily delete machine\-d /workspace
+amadmin: machine\-d:/workspace deleted from database\&.
+amadmin: NOTE: you'll have to remove these from the disklist yourself\&.
+.fi
+
+.PP
+Find the next tape \fBAMANDA\fR will use (in this case, 123456)\&.
+.nf
+
+$ amadmin daily tape
+The next \fBAMANDA\fR run should go onto tape 123456 or a new tape\&.
+.fi
+
+.PP
+Show how well full backups are balanced across the dump cycle\&. The \fBdue\-date\fR column is the day the backups are due for a full backup\&. \fB#fs\fR shows the number of filesystems doing full backups that night, and \fBorig KB\fR and \fBout KB\fR show the estimated total size of the backups before and after any compression, respectively\&.
+
+.PP
+The \fBbalance\fR column shows how far off that night's backups are from the average size (shown at the bottom of the balance column)\&. \fBAMANDA\fR tries to keep the backups within +/\- 5%, but since the amount of data on each filesystem is always changing, and \fBAMANDA\fR will never delay backups just to rebalance the schedule, it is common for the schedule to fluctuate by larger percentages\&. In particular, in the case of a tape or backup failure, a bump will occur the following night, which will not be smoothed out until the next pass through the schedule\&.
+
+.PP
+The last line also shows an estimate of how many \fBAMANDA\fR runs will be made between full backups for a file system\&. In the example, a file system will probably have a full backup done every eight times \fBAMANDA\fR is run (e\&.g\&. every eight days)\&.
+.nf
+
+$ amadmin daily balance
+ due\-date  #fs   orig KB    out KB  balance
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+11/10 Mon   21    930389    768753    +5\&.1%
+11/11 Tue   29   1236272    733211    +0\&.2%
+11/12 Wed   31   1552381    735796    +0\&.6%
+11/13 Thu   23   1368447    684552    \-6\&.4%
+11/14 Fri   32   1065603    758155    +3\&.6%
+11/15 Sat   14   1300535    738430    +0\&.9%
+11/16 Sun   31   1362696    740365    +1\&.2%
+11/17 Mon   30   1427936    773397    +5\&.7%
+11/18 Tue   11   1059191    721786    \-1\&.3%
+11/19 Wed   19   1108737    661867    \-9\&.5%
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
+.fi
+
+.SH "FILES"
+
+.PP
+/usr/local/etc/amanda/\fBconfig\fR/amanda\&.conf
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamcheck\fR(8), \fBamdump\fR(8), \fBamrestore\fR(8)
+
diff --git a/man/amadmin.8.in b/man/amadmin.8.in
deleted file mode 100644 (file)
index 180bcf8..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.de P1
-\fB\\$1\fP \\$2 \fI\\$3\fP \\$4 \fI\\$5\fP \\$6 \\$7
-..
-.de P2
-\fB\\$1\fP \fI\\$2\fP \\$3 \\$4 \\$5
-..
-.de P3
-\fB\\$1\fP \\$2 \fI\\$3\fP \\$4 \fI\\$5\fP \\$6 \\$7
-..
-.TH AMADMIN 8
-.SH NAME
-amadmin \- administrative interface to control Amanda backups
-.SH SYNOPSIS
-.B amadmin
-.I config
-.I command
-[
-.I command options
-]
-.SH DESCRIPTION
-.B Amadmin
-performs various administrative tasks on the
-.I config
-Amanda configuration.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH COMMANDS
-Commands that take a
-.I hostname
-[
-.I disks
-]
-parameter pair operate on all disks in the
-.I disklist
-for that
-.I hostname
-if no disks are specified.
-Where
-.I hostname
-is also marked as being optional,
-the command operates on all hosts and disks in the
-.IR disklist .
-Both
-.I hostnames
-and
-.I disk
-are special expression, see the "HOST & DISK EXPRESSION" section
-of 
-.IR amanda (8)
-for a description.
-.LP
-.TP
-.B version
-Show the current version and some compile time and runtime parameters.
-The
-.I config
-parameter must be present but is ignored.
-.TP
-.P1 force-bump [ hostname [ disks ]* ]+
-Force the
-.I disks
-on
-.I hostname
-to bump to a new incremental level during the next Amanda run.
-.TP
-.P1 force-no-bump [ hostname [ disks ]* ]+
-Force the
-.I disks
-on
-.I hostname
-to not bump to a new incremental level during the next Amanda run.
-.TP
-.P1 unforce-bump [ hostname [ disks ]* ]+
-Undo a previous
-.B force-bump
-or
-.B force-no-bump
-command.
-.TP
-.P1 force [ hostname [ disks ]* ]+
-Force the
-.I disks
-on
-.I hostname
-to do a full (level 0) backup during the next Amanda run.
-.TP
-.P1 unforce [ hostname [ disks ]* ]+
-Undo a previous
-.B force
-command.
-.TP
-.P2 reuse tapelabel [ ... ]
-The tapes listed
-will be available for reuse at their point in the tape cycle.
-.TP
-.P2 no-reuse tapelabel [ ... ]
-The tapes listed
-will not be reused when their turn comes up again in the tape cycle.
-Note that if this causes the number of reusable tapes to drop below the
-.B amanda.conf
-.I tapecycle
-value, Amanda will request new tapes until the count is satisfied again.
-.TP
-.P1 due [ hostname [ disks ]* ]*
-Show when the next full dump is due.
-.TP
-.P3 "find\fP [ \fB--sort\fP \fBhkdlb\fP ]\fB" [ hostname [ disks ]* ]*
-Display all backups currently on tape or in the holding disk.
-The tape label or holding disk filename,
-file number,
-and status are displayed.
-.IP
-The
-.B --sort
-option changes the sort order using the following flags:
-.RS
-.LP
-.de SO
-\fB\\$1\fP     \\$2
-.br
-..
-.SO h "host name"
-.SO k "disk name"
-.SO d "dump date"
-.SO l "backup level"
-.SO b "tape label"
-.RE
-.IP
-An uppercase letter reverses the sort order for that key.
-The default sort order is
-.BR hkdlb .
-.TP
-.P1 delete [ hostname [ disks ]* ]+
-Delete the specified
-.I disks
-on
-.I hostname
-from the Amanda
-database.
-.IP
-Note: if you do not also remove the disk from the
-.I disklist
-file, Amanda will treat it as a new disk during the next run.
-.TP
-.B tape
-Display the tape(s) Amanda expects to write to during the next run.
-See also
-.IR amcheck (8).
-.TP
-.B bumpsize
-Display the current bump threshold parameters, calculated for all backup
-levels.
-.TP
-.P3 "balance\fP [ \fB--days\fP \fB<num>\fP ]\fB"
-Display the distribution of full backups throughout the dump schedule.
-.TP
-.P1 export [ hostname [ disks ]* ]*
-Convert records from the Amanda database
-to a text format that may be transmitted to another Amanda
-machine and
-.BR import ed.
-.TP
-.B import
-Convert
-.BR export ed
-records read from standard input to a form Amanda uses
-and insert them into the database on this machine.
-.TP
-.P1 disklist [ hostname [ disks ]* ]*
-Display the
-.I disklist
-information for each of the
-.I disks
-on
-.I hostname
-(or all hosts).
-Mostly used for debugging.
-.TP
-.P1 info [ hostname [ disks ]* ]*
-Display the
-database record for each of the
-.I disks
-on
-.IR hostname
-(or all hosts).
-Mostly used for debugging.
-.SH EXAMPLES
-Request three specific file systems on
-.I machine-a
-get a full level 0 backup during the next Amanda run.
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ force machine-a / /var /usr
-amadmin: machine-a:/ is set to a forced level 0 tonight.
-amadmin: machine-a:/var is set to a forced level 0 tonight.
-amadmin: machine-a:/usr is set to a forced level 0 tonight.
-.EE
-.RE
-.LP
-Request all file systems on
-.I machine-b
-get a full level 0 backup during the next Amanda run.
-.RE
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ force machine-b
-amadmin: machine-b:/ is set to a forced level 0 tonight.
-amadmin: machine-b:/var is set to a forced level 0 tonight.
-amadmin: machine-b:/usr is set to a forced level 0 tonight.
-amadmin: machine-b:/home is set to a forced level 0 tonight.
-.EE
-.RE
-.LP
-Undo the previous
-.B force
-request for
-.I /home
-on
-.IR machine-b .
-The other file systems will still get a full level 0 backup.
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ unforce machine-b /home
-amadmin: force command for machine-b:/home cleared.
-.EE
-.RE
-.LP
-Locate backup images of
-.I /var
-from
-.IR machine-c .
-The
-.I tape or file
-column displays either a tape label or a filename depending on whether
-the image is on tape or is still in the holding disk.
-If the image is on tape, the
-.I file
-column tells you which file on the tape has the image
-(file number zero is a tape label).
-This column shows zero and is not meaningful if the image
-is still in the holding disk.
-The
-.I status
-column tells you whether the backup was successful or had
-some type of error.
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ find machine-c /var
-date        host      disk lv tape or file                    file status
-2000-11-09  machine-c /var  0 000110                             9 OK
-2000-11-08  machine-c /var  2 000109                             2 OK
-2000-11-07  machine-c /var  2 /amanda/20001107/machine-c._var.2  0 OK
-2000-11-06  machine-c /var  2 000107                             2 OK
-2000-11-05  machine-c /var  2 000106                             3 OK
-2000-11-04  machine-c /var  2 000105                             2 OK
-2000-11-03  machine-c /var  2 000104                             2 OK
-2000-11-02  machine-c /var  2 000103                             2 OK
-2000-11-01  machine-c /var  1 000102                             5 OK
-2000-10-31  machine-c /var  1 000101                             3 OK
-.EE
-.RE
-.LP
-Forget about the
-.I /workspace
-disk on
-.IR machine-d .
-If you do not also remove the disk from the
-.I disklist
-file, Amanda will treat it as a new disk during the next run.
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ delete machine-d /workspace
-amadmin: machine-d:/workspace deleted from database.
-amadmin: NOTE: you'll have to remove these from the disklist yourself.
-.EE
-.RE
-.LP
-Find the next tape Amanda will use
-(in this case, 
-.IR 123456 ).
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ tape
-The next Amanda run should go onto tape 123456 or a new tape.
-.EE
-.RE
-.LP
-Show how well full backups are balanced across the dump cycle.
-The
-.I due-date
-column is the day the backups are due for a full backup.
-.I #fs
-shows the number of filesystems doing full backups that night, and
-.I orig KB
-and
-.I out KB
-show the estimated total size of the backups
-before and after any compression, respectively.
-.LP
-The
-.I balance
-column shows how far off that night's backups are from the average size
-(shown at the bottom of the balance column).
-Amanda tries to keep the backups within +/- 5%,
-but since the amount of data on each filesystem is always changing,
-and Amanda will never delay backups just to rebalance the schedule,
-it is common for the schedule to fluctuate by larger percentages.
-In particular,
-in the case of a tape or backup failure,
-a bump will occur the following night,
-which will not be smoothed out until the next pass through the schedule.
-.LP
-The last line also shows an estimate of how many Amanda runs will be
-made between full backups for a file system.
-In the example, a file system will probably have a full backup done
-every eight times Amanda is run (e.g. every eight days).
-.LP
-.RS
-.EX
-$ amadmin @DEFAULT_CONFIG@ balance
- due-date  #fs   orig KB    out KB  balance
--------------------------------------------
-11/10 Mon   21    930389    768753    +5.1%
-11/11 Tue   29   1236272    733211    +0.2%
-11/12 Wed   31   1552381    735796    +0.6%
-11/13 Thu   23   1368447    684552    -6.4%
-11/14 Fri   32   1065603    758155    +3.6%
-11/15 Sat   14   1300535    738430    +0.9%
-11/16 Sun   31   1362696    740365    +1.2%
-11/17 Mon   30   1427936    773397    +5.7%
-11/18 Tue   11   1059191    721786    -1.3%
-11/19 Wed   19   1108737    661867    -9.5%
--------------------------------------------
-TOTAL      241  12412187   7316312   731631  (estimated 8 runs per dumpcycle)
-.EE
-.SH FILES
-@CONFIG_DIR@/\fIconfig\fP/amanda.conf
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8),
-amcheck(8),
-amdump(8),
-amrestore(8)
diff --git a/man/amanda.8 b/man/amanda.8
new file mode 100644 (file)
index 0000000..f8e5c4d
--- /dev/null
@@ -0,0 +1,1204 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMANDA" 8 "" "" ""
+.SH NAME
+amanda \- Advanced Maryland Automatic Network Disk Archiver
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 7
+\fBamdump\fR \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 8
+\fBamflush\fR [\-f] \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 10
+\fBamcleanup\fR \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 10
+\fBamrecover\fR [\fIconfig\fR] [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 10
+\fBamrestore\fR [\fIoptions\fR] \fItapedevice\fR [\fIhostname\fR\ [\fIdiskname\fR]]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 8
+\fBamlabel\fR \fIconfig\fR \fIlabel\fR [\fIslot\fR\ \fIslot\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 8
+\fBamcheck\fR [\fIoptions\fR] \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 8
+\fBamadmin\fR \fIconfig\fR \fIcommand\fR [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 7
+\fBamtape\fR \fIconfig\fR \fIcommand\fR [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 9
+\fBamverify\fR \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 9
+\fBamrmtape\fR [\fIoptions\fR] \fIconfig\fR \fIlabel\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 9
+\fBamstatus\fR \fIconfig\fR [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 11
+\fBamoverview\fR \fIconfig\fR [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 7
+\fBamplot\fR [\fIoptions\fR] \fIamdump\-files\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 9
+\fBamreport\fR [\fIconfig\fR] [\fIoptions\fR]
+.ad
+.hy
+.ad l
+.hy 0
+.HP 6
+\fBamtoc\fR [\fIoptions\fR] \fIlogfile\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 10
+\fBamcheckdb\fR \fIconfig\fR
+.ad
+.hy
+.ad l
+.hy 0
+.HP 10
+\fBamgetconf\fR [\fIconfig\fR] \fIparameter\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAMANDA\fR is the ``\fBAdvanced Maryland Automatic Network Disk Archiver\fR''\&. This manual page gives an overview of the \fBAMANDA\fR commands and configuration files for quick reference\&.
+
+.PP
+Here are all the \fBAMANDA\fR commands\&. Each one has its own manual page\&. See them for all the gory details\&.
+
+.TP
+\fBamdump\fR
+Take care of automatic \fBAMANDA\fR backups\&. This is normally executed by \fBcron\fR on a computer called the \fBtape server host\fR and requests backups of file systems located on \fBbackup\fR  \fBclients\fR\&. \fBAmdump\fR backs up all disks in the \fBdisklist\fR file (discussed below) to tape or, if there is a problem, to a special \fBholding\fR  \fBdisk\fR\&. After all backups are done, \fBamdump\fR sends mail reporting failures and successes\&.
+
+.TP
+\fBamflush\fR
+Flush backups from the holding disk to tape\&. \fBAmflush\fR is used after \fBamdump\fR has reported it could not write backups to tape for some reason\&. When this happens, backups stay in the holding disk\&. Run \fBamflush\fR after the tape problem is corrected to write backups from the holding disk to tape\&.
+
+.TP
+\fBamcleanup\fR
+Clean up after an interrupted \fBamdump\fR\&. This command is only needed if \fBamdump\fR was unable to complete for some reason, usually because the tape server host crashed while \fBamdump\fR was running\&.
+
+.TP
+\fBamrecover\fR
+Provides an interactive interface to browse the \fBAMANDA\fR index files (backup image catalogues) and select which tapes to recover files from\&. It can also run \fBamrestore\fR and a restore program (e\&.g\&. \fBtar\fR) to actually recover the files\&.
+
+.TP
+\fBamrestore\fR
+Read an \fBAMANDA\fR tape, searching for requested backups\&. \fBAmrestore\fR is suitable for everything from interactive restores of single files to a full restore of all partitions on a failed disk\&.
+
+.TP
+\fBamlabel\fR
+Write an \fBAMANDA\fR format label onto a tape\&. All \fBAMANDA\fR tapes must be labeled with \fBamlabel\fR\&. \fBAmdump\fR and \fBamflush\fR will not write to an unlabeled tape (see TAPE MANAGEMENT below)\&.
+
+.TP
+\fBamcheck\fR
+Verify the correct tape is mounted and all file systems on all backup client systems are ready to be backed up\&. Often run by \fBcron\fR before \fBamdump\fR to generate a mail warning that backups might fail unless corrective action is taken\&.
+
+.TP
+\fBamadmin\fR
+Take care of administrative tasks like finding out which tapes are needed to restore a filesystem, forcing hosts to do full backups of selected disks and looking at schedule balance information\&.
+
+.TP
+\fBamtape\fR
+Take care of tape changer control operations like loading particular tapes, ejecting tapes and scanning the tape storage slots\&.
+
+.TP
+\fBamverify\fR
+Check \fBAMANDA\fR backup tapes for errors\&.
+
+.TP
+\fBamrmtape\fR
+Delete a tape from the \fBAMANDA\fR databases\&.
+
+.TP
+\fBamstatus\fR
+Report the status of a running or completed \fBamdump\fR\&.
+
+.TP
+\fBamoverview\fR
+Display a chart of hosts and file systems backed up every run\&.
+
+.TP
+\fBamplot\fR
+Generate utilization plots of \fBAMANDA\fR runs for performance tuning\&.
+
+.TP
+\fBamreport\fR
+Generate an \fBAMANDA\fR summary E\-mail report\&.
+
+.TP
+\fBamtoc\fR
+Generate table of content files for \fBAMANDA\fR tapes\&.
+
+.TP
+\fBamcheckdb\fR
+Verify every tape \fBAMANDA\fR knows about is consistent in the database\&.
+
+.TP
+\fBamgetconf\fR
+Look up parameters in the \fBAMANDA\fR configuration file\&.
+
+.SH "CONFIGURATION"
+
+.PP
+There are three user\-editable files that control the behavior of \fBAMANDA\fR\&. The first is \fBamanda\&.conf\fR, the main configuration file\&. It contains parameters to customize \fBAMANDA\fR for the site\&. Second is the \fBdisklist\fR file, which lists hosts and disk partitions to back up\&. Third is the \fBtapelist\fR file, which lists tapes that are currently active\&. These files are described in more detail in the following sections\&.
+
+.PP
+All files are stored in individual configuration directories under \fI/usr/local/etc/amanda/\fR\&. A site will often have more than one configuration\&. For example, it might have a \fBnormal\fR configuration for everyday backups and an \fBarchive\fR configuration for infrequent full archival backups\&. The configuration files would be stored under directories \fI/usr/local/etc/amanda/normal/\fR and \fI/usr/local/etc/amanda/archive/\fR, respectively\&. Part of the job of an \fBAMANDA\fR administrator is to create, populate and maintain these directories\&.
+
+.PP
+All log and database files generated by \fBAMANDA\fR go in corresponding directories somewhere\&. The exact location is controlled by entries in \fBamanda\&.conf\fR\&. A typical location would be under \fI/var/adm/amanda\fR\&. For the above example, the files might go in \fI/var/adm/amanda/normal/\fR and \fI/var/adm/amanda/archive/\fR\&.
+
+.PP
+As log files are no longer needed (no longer contain relevant information), \fBAMANDA\fR cycles them out in various ways, depending on the type of file\&.
+
+.PP
+Detailed information about \fBamdump\fR runs are stored in files named \fBamdump\&.\fR\fBNN\fR where \fBNN\fR is a sequence number, with 1 being the most recent file\&. \fBAmdump\fR rotates these files each run, keeping roughly the last \fBtapecycle\fR (see below) worth of them\&.
+
+.PP
+The file used by \fBamreport\fR to generate the mail summary is named \fBlog\&.\fR\fBYYYYMMDD\&.NN\fR where \fBYYYYMMDD\fR is the datestamp of the start of the \fBamdump\fR run and \fBNN\fR is a sequence number started at 0\&. At the end of each \fBamdump\fR run, log files for runs whose tapes have been reused are renamed into a subdirectory of the main log directory (see the \fBlogdir\fR parameter below) named \fBoldlog\fR\&. It is up to the \fBAMANDA\fR administrator to remove them from this directory when desired\&.
+
+.PP
+Index (backup image catalogue) files older than the full dump matching the oldest backup image for a given client and disk are removed by \fBamdump\fR at the end of each run\&.
+
+.SH "CONFIG FILE PARAMETERS"
+
+.PP
+There are a number of configuration parameters that control the behavior of the \fBAMANDA\fR programs\&. All have default values, so you need not specify the parameter in \fBamanda\&.conf\fR if the default is suitable\&.
+
+.PP
+Lines starting with # are ignored, as are blank lines\&. Comments may be placed on a line with a directive by starting the comment with a #\&. The remainder of the line is ignored\&.
+
+.PP
+Keywords are case insensitive, i\&.e\&. \fBmailto\fR and \fBMailTo\fR are treated the same\&.
+
+.PP
+Integer arguments may have one of the following (case insensitive) suffixes, some of which have a multiplier effect:
+
+.TP
+\fBb byte bytes\fR
+Some number of bytes\&.
+
+.TP
+\fBbps\fR
+Some number of bytes per second\&.
+
+.TP
+\fBk kb kbyte kbytes kilobyte kilobytes\fR
+Some number of kilobytes (bytes*1024)\&.
+
+.TP
+\fBkps kbps\fR
+Some number of kilobytes per second (bytes*1024)\&.
+
+.TP
+\fBm mb meg mbyte mbytes megabyte megabytes\fR
+Some number of megabytes (bytes*1024*1024)\&.
+
+.TP
+\fBmps mbps\fR
+Some number of megabytes per second (bytes*1024*1024)\&.
+
+.TP
+\fBg gb gbyte gbytes gigabyte gigabytes\fR
+Some number of gigabytes (bytes*1024*1024*1024)\&.
+
+.TP
+\fBtape tapes\fR
+Some number of tapes\&.
+
+.TP
+\fBday days\fR
+Some number of days\&.
+
+.TP
+\fBweek weeks\fR
+Some number of weeks (days*7)\&.
+
+ .RS .Sh "Note" The value \fBinf\fR may be used in most places where an integer is expected to mean an infinite amount\&. Boolean arguments may have any of the values \fBy\fR, \fByes\fR, \fBt\fR, \fBtrue\fR or \fBon\fR to indicate a true state, or \fBn\fR, \fBno\fR, \fBf\fR, \fBfalse\fR or \fBoff\fR to indicate a false state\&. If no argument is given, \fBtrue\fR is assumed\&. .RE 
+
+.TP
+\fBorg\fR \fB string\fR
+Default: \fBdaily\fR\&. A descriptive name for the configuration\&. This string appears in the Subject line of mail reports\&. Each \fBAMANDA\fR configuration should have a different string to keep mail reports distinct\&.
+
+.TP
+\fBmailto\fR \fB string\fR
+Default: \fBoperators\fR\&. A space separated list of recipients for mail reports\&.
+
+.TP
+\fBdumpcycle\fR \fB int\fR
+Default: \fB10 days\fR\&. The number of days in the backup cycle\&. Each disk will get a full backup at least this often\&. Setting this to zero tries to do a full backup each run\&.
+
+ .RS .Sh "Note" This parameter may also be set in a specific \fBdumptype\fR (see below)\&. This value sets the default for all \fBdumptype\fRs so must appear in \fBamanda\&.conf\fR before any \fBdumptype\fRs are defined\&. .RE 
+
+.TP
+\fBrunspercycle\fR \fB int\fR
+Default: \fBsame as dumpcycle\fR\&. The number of amdump runs in \fBdumpcycle\fR days\&. A value of 0 means the same value as \fBdumpcycle\fR\&. A value of \-1 means guess the number of runs from the \fBtapelist\fR file, which is the number of tapes used in the last \fBdumpcycle\fR days / \fBruntapes\fR\&.
+
+.TP
+\fBtapecycle\fR \fB int\fR
+Default: \fB15 tapes\fR\&. Typically tapes are used by \fBAMANDA\fR in an ordered rotation\&. The \fBtapecycle\fR parameter defines the size of that rotation\&. The number of tapes in rotation must be larger than the number of tapes required for a complete dump cycle (see the \fBdumpcycle\fR parameter)\&.
+
+This is calculated by multiplying the number of \fBamdump\fR runs per dump cycle (\fBrunspercycle\fR parameter) times the number of tapes used per run (\fBruntapes\fR parameter)\&. Typically two to four times this calculated number of tapes are in rotation\&. While \fBAMANDA\fR is always willing to use a new tape in its rotation, it refuses to reuse a tape until at least '\fBtapecycle\fR \-1' number of other tapes have been used\&.
+
+It is considered good administrative practice to set the \fBtapecycle\fR parameter slightly lower than the actual number of tapes in rotation\&. This allows the administrator to more easily cope with damaged or misplaced tapes or schedule adjustments that call for slight adjustments in the rotation order\&.
+
+.TP
+\fBdumpuser\fR \fB string\fR
+Default: \fBamanda\fR\&. The login name \fBAMANDA\fR uses to run the backups\&. The backup client hosts must allow access from the tape server host as this user via \&.rhosts or \&.amandahosts, depending on how the \fBAMANDA\fR software was built\&.
+
+.TP
+\fBprinter\fR string
+Printer to use when doing tape labels\&. See the \fBlbl\-templ\fR  \fBtapetype\fR option\&.
+
+.TP
+\fBtapedev\fR string
+Default: \fI/dev/nst0\fR\&. The path name of the non\-rewinding tape device\&. Non\-rewinding tape device names often have an 'n' in the name, e\&.g\&. \fI/dev/rmt/0mn\fR, however this is operating system specific and you should consult that documentation for detailed naming information\&.
+
+If a tape changer is configured (see the \fBtpchanger\fR option), this option might not be used\&.
+
+If the \fBnull\fR output driver is selected (see the OUTPUT DRIVERS section later for more information), programs such as \fBamdump\fR will run normally but all images will be thrown away\&. This should only be used for debugging and testing, and probably only with the \fBrecord\fR option set to \fBno\fR\&.
+
+.TP
+\fBrawtapedev\fR string
+Default: \fI/dev/null\fR\&. The path name of the raw tape device\&. This is only used if \fBAMANDA\fR is compiled for Linux machines with floppy tapes and is needed for QIC volume table operations\&.
+
+.TP
+\fBtpchanger\fR string
+Default: \fBnone\fR\&. The name of the tape changer\&. If a tape changer is not configured, this option is not used and should be commented out of the configuration file\&.
+
+If a tape changer is configured, choose one of the changer scripts (e\&.g\&. \fBchg\-scsi\fR) and enter that here\&.
+
+.TP
+\fBchangerdev\fR string
+Default: \fI/dev/null\fR\&. A tape changer configuration parameter\&. Usage depends on the particular changer defined with the \fBtpchanger\fR option\&.
+
+.TP
+\fBchangerfile\fR string
+Default: \fI/usr/adm/amanda/log/changer\-status\fR\&. A tape changer configuration parameter\&. Usage depends on the particular changer defined with the \fBtpchanger\fR option\&.
+
+.TP
+\fBruntapes\fR int
+Default: 1\&. The maximum number of tapes used in a single run\&. If a tape changer is not configured, this option is not used and should be commented out of the configuration file\&.
+
+If a tape changer is configured, this may be set larger than one to let \fBAMANDA\fR write to more than one tape\&.
+
+Note that this is an upper bound on the number of tapes, and \fBAMANDA\fR may use less\&.
+
+Also note that as of this release, \fBAMANDA\fR does not support true tape overflow\&. When it reaches the end of one tape, the backup image \fBAMANDA\fR was processing starts over again on the next tape\&.
+
+.TP
+\fBmaxdumpsize\fR int
+Default: \fBruntapes\fR*\fBtape_length\fR\&. Maximum number of bytes the planner will schedule for a run\&.
+
+.TP
+\fBtaperalgo\fR [first|firstfit|largest|largestfit|smallest|last]
+Default: \fBfirst\fR\&. The algorithm used to choose which dump image to send to the taper\&.
+
+.RS
+
+.TP
+\fBfirst\fR
+First in, first out\&.
+
+.TP
+\fBfirstfit\fR
+The first dump image that will fit on the current tape\&.
+
+.TP
+\fBlargest\fR
+The largest dump image\&.
+
+.TP
+\fBlargestfit\fR
+The largest dump image that will fit on the current tape\&.
+
+.TP
+\fBsmallest\fR
+The smallest dump image\&.
+
+.TP
+\fBlast\fR
+Last in, first out\&.
+
+.RE
+.IP
+
+.TP
+\fBlabelstr\fR \fB string\fR
+Default: \fB\&.*\fR\&. The tape label constraint regular expression\&. All tape labels generated (see \fBamlabel(8)\fR) and used by this configuration must match the regular expression\&. If multiple configurations are run from the same tape server host, it is helpful to set their labels to different strings (for example, ``\fBDAILY[0\-9][0\-9]*\fR'' vs\&. ``\fBARCHIVE[0\-9][0\-9]*\fR'') to avoid overwriting each other's tapes\&.
+
+.TP
+\fBtapetype\fR \fB string\fR
+Default: \fBEXABYTE\fR\&. The type of tape drive associated with \fBtapedev\fR or \fBtpchanger\fR\&. This refers to one of the defined \fBtapetype\fRs in the config file (see below), which specify various tape parameters, like the \fBlength\fR, \fBfilemark\fR size, and \fBspeed\fR of the tape media and device\&.
+
+.TP
+\fBctimeout\fR int
+Default: \fB30 seconds\fR\&. Maximum amount of time that \fBamcheck\fR will wait for each client host\&.
+
+.TP
+\fBdtimeout\fR int
+Default: \fB1800 seconds\fR\&. Amount of idle time per disk on a given client that a \fBdumper\fR running from within \fBamdump\fR will wait before it fails with a data timeout error\&.
+
+.TP
+\fBetimeout\fR int
+Default: \fB300 seconds\fR\&. Amount of time per disk on a given client that the \fBplanner\fR step of \fBamdump\fR will wait to get the dump size estimates\&. For instance, with the default of 300 seconds and four disks on client A, \fBplanner\fR will wait up to 20 minutes for that machine\&. A negative value will be interpreted as a total amount of time to wait per client instead of per disk\&.
+
+.TP
+\fBnetusage\fR int
+Default: \fB300 Kbps\fR\&. The maximum network bandwidth allocated to \fBAMANDA\fR, in Kbytes per second\&. See also the \fBinterface\fR section\&.
+
+.TP
+\fBinparallel\fR int
+Default: 10\&. The maximum number of backups that \fBAMANDA\fR will attempt to run in parallel\&. \fBAMANDA\fR will stay within the constraints of network bandwidth and holding disk space available, so it doesn't hurt to set this number a bit high\&. Some contention can occur with larger numbers of backups, but this effect is relatively small on most systems\&.
+
+.TP
+\fBdisplayunit\fR "k|m|g|t"
+Default: "k"\&. The unit used to print many numbers, k=kilo, m=mega, g=giga, t=tera\&.
+
+.TP
+\fBdumporder\fR string
+Default: \fBtttTTTTTTT\fR\&. The priority order of each dumper:
+
+.RS
+.TP 3
+\(bu
+s: smallest size
+.TP
+\(bu
+S: largest size
+.TP
+\(bu
+t: smallest time
+.TP
+\(bu
+T: largest time
+.TP
+\(bu
+b: smallest bandwidth
+.TP
+\(bu
+B: largest bandwidth
+.LP
+.RE
+.IP
+
+.TP
+\fBmaxdumps\fR int
+Default: 1\&. The maximum number of backups from a single host that \fBAMANDA\fR will attempt to run in parallel\&. See also the \fBinparallel\fR option\&.
+
+Note that this parameter may also be set in a specific \fBdumptype\fR (see below)\&. This value sets the default for all \fBdumptype\fRs so must appear in \fBamanda\&.conf\fR before any \fBdumptype\fRs are defined\&.
+
+.TP
+\fBbumpsize\fR int
+Default: \fB10 Mbytes\fR\&. The minimum savings required to trigger an automatic bump from one incremental level to the next\&. If \fBAMANDA\fR determines that the next higher backup level will be this much smaller than the current level, it will do the next level\&. See also the \fBbumpmult\fR option\&.
+
+.TP
+\fBbumpmult\fR \fB float\fR
+Default: 1\&.5\&. The bump size multiplier\&. \fBAMANDA\fR multiplies \fBbumpsize\fR by this factor for each level\&. This prevents active filesystems from bumping too much by making it harder to bump to the next level\&. For example, with the default \fBbumpsize\fR and \fBbumpmult\fR set to 2\&.0, the bump threshold will be 10 Mbytes for level one, 20 Mbytes for level two, 40 Mbytes for level three, and so on\&.
+
+.TP
+\fBbumpdays\fR \fB int\fR
+Default: \fB2 days\fR\&. To insure redundancy in the dumps, \fBAMANDA\fR keeps filesystems at the same incremental level for at least \fBbumpdays\fR days, even if the other bump threshold criteria are met\&.
+
+.TP
+\fBdiskfile\fR \fB string\fR
+Default: \fBdisklist\fR\&. The file name for the \fBdisklist\fR file holding client hosts, disks and other client dumping information\&.
+
+.TP
+\fBinfofile\fR \fB string\fR
+Default: \fI/usr/adm/amanda/curinfo\fR\&. The file or directory name for the historical information database\&. If \fBAMANDA\fR was configured to use DBM databases, this is the base file name for them\&. If it was configured to use text formated databases (the default), this is the base directory and within here will be a directory per client, then a directory per disk, then a text file of data\&.
+
+.TP
+\fBlogdir\fR \fB string\fR
+Default: \fI/usr/adm/amanda\fR\&. The directory for the \fBamdump\fR and \fBlog\fR files\&.
+
+.TP
+\fBindexdir\fR \fB string\fR
+Default \fI/usr/adm/amanda/index\fR\&. The directory where index files (backup image catalogues) are stored\&. Index files are only generated for filesystems whose \fBdumptype\fR has the \fBindex\fR option enabled\&.
+
+.TP
+\fBtapelist\fR \fB string\fR
+Default: \fBtapelist\fR\&. The file name for the active \fBtapelist\fR file\&. \fBAMANDA\fR maintains this file with information about the active set of tapes\&.
+
+.TP
+\fBtapebufs\fR \fB int\fR
+Default: 20\&. The number of buffers used by the \fBtaper\fR process run by \fBamdump\fR and \fBamflush\fR to hold data as it is read from the network or disk before it is written to tape\&. Each buffer is a little larger than 32 KBytes and is held in a shared memory region\&.
+
+.TP
+\fBreserve\fR \fB number\fR
+Default: 100\&. The part of holding\-disk space that should be reserved for incremental backups if no tape is available, expressed as a percentage of the available holding\-disk space (0\-100)\&. By default, when there is no tape to write to, degraded mode (incremental) backups will be performed to the holding disk\&. If full backups should also be allowed in this case, the amount of holding disk space reserved for incrementals should be lowered\&.
+
+.TP
+\fBautoflush\fR \fB bool\fR
+Default: \fBoff\fR\&. Whether an amdump run will flush the dump already on holding disk to tape\&.
+
+.TP
+\fBamrecover_do_fsf\fR \fB bool\fR
+Default: \fBoff\fR\&. Amrecover will call amrestore with the \-f flag for faster positioning of the tape\&.
+
+.TP
+\fBamrecover_check_label\fR \fB bool\fR
+Default: \fBoff\fR\&. Amrecover will call amrestore with the \-l flag to check the label\&.
+
+.TP
+\fBamrecover_changer\fR \fB string\fR
+Default: ''\&. Amrecover will use the changer if you use 'settape <string>' and that string is the same as the amrecover_changer setting\&.
+
+.TP
+\fBcolumnspec\fR \fB string\fR
+Defines the width of columns \fBamreport\fR should use\&. \fBString\fR is a comma (',') separated list of triples\&. Each triple consists of three parts which are separated by a equal sign ('=') and a colon (':') (see the example)\&. These three parts specify:
+
+
+.RS
+.TP 3
+\(bu
+the name of the column, which may be:
+
+.RS
+.TP 3
+\(bu
+Compress (compression ratio)
+.TP
+\(bu
+Disk (client disk name)
+.TP
+\(bu
+DumpRate (dump rate in KBytes/sec)
+.TP
+\(bu
+DumpTime (total dump time in hours:minutes)
+.TP
+\(bu
+HostName (client host name)
+.TP
+\(bu
+Level (dump level)
+.TP
+\(bu
+OrigKB (original image size in KBytes)
+.TP
+\(bu
+OutKB (output image size in KBytes)
+.TP
+\(bu
+TapeRate (tape writing rate in KBytes/sec)
+.TP
+\(bu
+TapeTime (total tape time in hours:minutes)
+.LP
+.RE
+.IP
+.TP
+\(bu
+the amount of space to display before the column (used to get whitespace between columns)\&.
+.TP
+\(bu
+the width of the column itself\&. If set to a negative value, the width will be calculated on demand to fit the largest entry in this column\&.
+.LP
+.RE
+.IP
+Here is an example:
+
+.nf
+
+columnspec "Disk=1:18,HostName=0:10,OutKB=1:7"
+.fi
+The above will display the disk information in 18 characters and put one space before it\&. The hostname column will be 10 characters wide with no space to the left\&. The output KBytes column is seven characters wide with one space before it\&.
+
+.TP
+\fBincludefile\fR \fB string\fR
+Default: \fBnone\fR\&. The name of an \fBAMANDA\fR configuration file to include within the current file\&. Useful for sharing dumptypes, tapetypes and interface definitions among several configurations\&.
+
+.SH "HOLDINGDISK SECTION"
+
+.PP
+The \fBamanda\&.conf\fR file may define one or more holding disks used as buffers to hold backup images before they are written to tape\&. The syntax is:
+.nf
+
+holdingdisk \fBname\fR {
+    \fBholdingdisk\-option\fR \fBholdingdisk\-value\fR
+    \&.\&.\&.
+}
+.fi
+
+.PP
+\fBName\fR is a logical name for this holding disk\&.
+
+.PP
+The options and values are:
+
+.TP
+\fBcomment\fR \fB string\fR
+Default: \fBnone\fR\&. A comment string describing this holding disk\&.
+
+.TP
+\fBdirectory\fR \fB disk\fR
+Default: \fI/dumps/amanda\fR\&. The path to this holding area\&.
+
+.TP
+\fBuse\fR \fB int\fR
+Default: \fB0 Gb\fR\&. Amount of space that can be used in this holding disk area\&. If the value is zero, all available space on the file system is used\&. If the value is negative, \fBAMANDA\fR will use all available space minus that value\&.
+
+.TP
+\fBchunksize\fR \fB int\fR
+Default: \fB1 Gb\fR\&. Holding disk chunk size\&. Dumps larger than the specified size will be stored in multiple holding disk files\&. The size of each chunk will not exceed the specified value\&. However, even though dump images are split in the holding disk, they are concatenated as they are written to tape, so each dump image still corresponds to a single continuous tape section\&.
+
+If 0 is specified, \fBAMANDA\fR will create holding disk chunks as large as ((INT_MAX/1024)\-64) Kbytes\&.
+
+Each holding disk chunk includes a 32 Kbyte header, so the minimum chunk size is 64 Kbytes (but that would be really silly)\&.
+
+Operating systems that are limited to a maximum file size of 2 Gbytes actually cannot handle files that large\&. They must be at least one byte less than 2 Gbytes\&. Since \fBAMANDA\fR works with 32 Kbyte blocks, and to handle the final read at the end of the chunk, the chunk size should be at least 64 Kbytes (2 * 32 Kbytes) smaller than the maximum file size, e\&.g\&. 2047 Mbytes\&.
+
+.SH "DUMPTYPE SECTION"
+
+.PP
+The \fBamanda\&.conf\fR file may define multiple sets of backup options and refer to them by name from the \fBdisklist\fR file\&. For instance, one set of options might be defined for file systems that can benefit from high compression, another set that does not compress well, another set for file systems that should always get a full backup and so on\&.
+
+.PP
+A set of backup options are entered in a \fBdumptype\fR section, which looks like this:
+.nf
+
+define dumptype \fBname\fR {
+    \fBdumptype\-option\fR \fBdumptype\-value\fR
+    \&.\&.\&.
+}
+.fi
+
+.PP
+\fBName\fR is the name of this set of backup options\&. It is referenced from the \fBdisklist\fR file\&.
+
+.PP
+Some of the options in a \fBdumptype\fR section are the same as those in the main part of \fBamanda\&.conf\fR\&. The main option value is used to set the default for all \fBdumptype\fR sections\&. For instance, setting \fBdumpcycle\fR to 50 in the main part of the config file causes all following \fBdumptype\fR sections to start with that value, but the value may be changed on a section by section basis\&. Changes to variables in the main part of the config file must be done before (earlier in the file) any \fBdumptype\fRs are defined\&.
+
+.PP
+The dumptype options and values are:
+
+.TP
+\fBauth\fR \fB string\fR
+Default: \fBbsd\fR\&. Type of authorization to perform between tape server and backup client hosts\&. May be \fBkrb4\fR to use Kerberos\-IV authorization\&.
+
+.TP
+\fBcomment\fR \fB string\fR
+Default: \fBnone\fR\&. A comment string describing this set of backup options\&.
+
+.TP
+\fBcomprate\fR \fBfloat\fR [, \fBfloat\fR ]
+Default: 0\&.50, 0\&.50\&. The expected full and incremental compression factor for dumps\&. It is only used if \fBAMANDA\fR does not have any history information on compression rates for a filesystem, so should not usually need to be set\&. However, it may be useful for the first time a very large filesystem that compresses very little is backed up\&.
+
+.TP
+\fBcompress [client|server]\fR \fB string\fR
+Default: \fBclient fast\fR\&. If \fBAMANDA\fR does compression of the backup images, it can do so either on the backup client host before it crosses the network or on the tape server host as it goes from the network into the holding disk or to tape\&. Which place to do compression (if at all) depends on how well the dump image usually compresses, the speed and load on the client or server, network capacity, holding disk capacity, availability of tape hardware compression, etc\&.
+
+For either type of compression, \fBAMANDA\fR also allows the selection of two styles of compression\&. \fBBest\fR is the best compression available, often at the expense of CPU overhead\&. \fBFast\fR is often not as good a compression as \fBbest\fR, but usually less CPU overhead\&.
+
+So the \fBcompress\fR options line may be one of:
+
+
+.RS
+.TP 3
+\(bu
+compress none
+.TP
+\(bu
+compress [client] fast
+.TP
+\(bu
+compress [client] best
+.TP
+\(bu
+compress server fast
+.TP
+\(bu
+compress server best
+.LP
+.RE
+.IP
+Note that some tape devices do compression and this option has nothing to do with whether that is used\&. If hardware compression is used (usually via a particular tape device name or \fBmt\fR option), \fBAMANDA\fR (software) compression should be disabled\&.
+
+.TP
+\fBdumpcycle\fR \fB int\fR
+Default: \fB10 days\fR\&. The number of days in the backup cycle\&. Each disk using this set of options will get a full backup at least this often\&. Setting this to zero tries to do a full backup each run\&.
+
+.TP
+\fBexclude\fR [ \fBlist|file\fR ][[optional][ \fBappend\fR ][ \fB string\fR ]+]
+Default: \fBfile\fR\&. There are two exclude lists, \fBexclude file\fR and \fBexclude list\&.\fR With \fBexclude file\fR , the \fBstring\fR is a \fBGNU\-tar\fR exclude expression\&. With \fBexclude list\fR , the \fBstring\fR is a file name on the client containing \fBGNU\-tar\fR exclude expressions\&.
+
+All exclude expressions are concatenated in one file and passed to \fBGNU\-tar\fR as an \fB\-\-exclude\-from\fR argument\&.
+
+With the \fBappend\fR keyword, the \fBstring\fR is appended to the current list, without it, the \fBstring\fR overwrites the list\&.
+
+If \fBoptional\fR is specified for \fBexclude list\fR, then amcheck will not complain if the file doesn't exist or is not readable\&.
+
+For \fBexclude list\fR, if the file name is relative, the disk name being backed up is prepended\&. So if this is entered:
+
+.nf
+
+    exclude list ``\fB\&.amanda\&.excludes\fR''
+.fi
+the actual file used would be \fI/var/\&.amanda\&.excludes\fR for a backup of \fI/var\fR, \fI/usr/local/\&.amanda\&.excludes\fR for a backup of \fI/usr/local\fR, and so on\&.
+
+.TP
+\fBholdingdisk\fR \fB boolean\fR
+Default: \fByes\fR\&. Whether a holding disk should be used for these backups or whether they should go directly to tape\&. If the holding disk is a portion of another file system that \fBAMANDA\fR is backing up, that file system should refer to a dumptype with \fBholdingdisk\fR set to \fBno\fR to avoid backing up the holding disk into itself\&.
+
+.TP
+\fBignore\fR \fB boolean\fR
+Default: \fBno\fR\&. Whether disks associated with this backup type should be backed up or not\&. This option is useful when the \fBdisklist\fR file is shared among several configurations, some of which should not back up all the listed file systems\&.
+
+.TP
+\fBinclude\fR [ \fBlist|file\fR ][[optional][ \fBappend\fR ][ \fB string\fR ]+]
+Default: \fBfile\fR "\&."\&. There are two include lists, \fBinclude file\fR and \fBinclude list\&.\fR With \fBinclude file\fR , the \fBstring\fR is a glob expression\&. With \fBinclude list\fR , the \fBstring\fR is a file name on the client containing glob expressions\&.
+
+All include expressions are expanded by \fBAMANDA\fR, concatenated in one file and passed to \fBGNU\-tar\fR as a \fB\-\-files\-from\fR argument\&. They must start with "\&./" and contain no other "/"\&.
+
+With the \fBappend\fR keyword, the \fBstring\fR is appended to the current list, without it, the \fBstring\fR overwrites the list\&.
+
+If \fBoptional\fR is specified for \fBinclude list,\fR then amcheck will not complain if the file doesn't exist or is not readable\&.
+
+For \fBinclude list\fR, If the file name is relative, the disk name being backed up is prepended\&.
+
+.TP
+\fBindex\fR \fB boolean\fR
+Default: \fBno\fR\&. Whether an index (catalogue) of the backup should be generated and saved in \fBindexdir\fR\&. These catalogues are used by the \fBamrecover\fR utility\&.
+
+.TP
+\fBkencrypt\fR \fB boolean\fR
+Default: \fBno\fR\&. Whether the backup image should be encrypted by Kerberos as it is sent across the network from the backup client host to the tape server host\&.
+
+.TP
+\fBmaxdumps\fR \fB int\fR
+Default: 1\&. The maximum number of backups from a single host that \fBAMANDA\fR will attempt to run in parallel\&. See also the main section parameter \fBinparallel\fR\&.
+
+.TP
+\fBmaxpromoteday\fR \fB int\fR
+Default: 10000\&. The maximum number of day for a promotion, set it 0 if you don't want promotion, set it to 1 or 2 if your disks get overpromoted\&.
+
+.TP
+\fBpriority\fR \fB string\fR
+Default: \fBmedium\fR\&. When there is no tape to write to, \fBAMANDA\fR will do incremental backups in priority order to the holding disk\&. The priority may be high (2)\&. medium (1), low (0) or a number of your choice\&.
+
+.TP
+\fBprogram\fR \fB string\fR
+Default: \fBDUMP\fR\&. The type of backup to perform\&. Valid values are \fBDUMP\fR for the native operating system backup program, and \fBGNUTAR\fR to use \fBGNU\-tar\fR or to do PC backups using Samba\&.
+
+.TP
+\fBrecord\fR \fB boolean\fR
+Default: \fByes\fR\&. Whether to ask the backup program to update its database (e\&.g\&. \fI/etc/dumpdates\fR for DUMP or \fI/usr/local/var/amanda/gnutar\-lists\fR for GNUTAR) of time stamps\&. This is normally enabled for daily backups and turned off for periodic archival runs\&.
+
+.TP
+\fBskip\-full\fR \fB boolean\fR
+Default: \fBno\fR\&. If \fBtrue\fR and \fBplanner\fR has scheduled a full backup, these disks will be skipped, and full backups should be run off\-line on these days\&. It was reported that \fBAMANDA\fR only schedules level 1 incrementals in this configuration; this is probably a bug\&.
+
+.TP
+\fBskip\-incr\fR \fB boolean\fR
+Default: \fBno\fR\&. If \fBtrue\fR and \fBplanner\fR has scheduled an incremental backup, these disks will be skipped\&.
+
+.TP
+\fBstarttime\fR \fB int\fR
+Default: \fBnone\fR\&. Backups will not start until after this time of day\&. The value should be hh*100+mm, e\&.g\&. 6:30PM (18:30) would be entered as 1830\&.
+
+.TP
+\fBstrategy\fR \fB string\fR
+Default: \fBstandard\fR\&. Strategy to use when planning what level of backup to run next\&. Values are:
+
+.TP
+\fBstandard\fR
+The standard \fBAMANDA\fR schedule\&.
+
+.TP
+\fBnofull\fR
+Never do full backups, only level 1 incrementals\&.
+
+.TP
+\fBnoinc\fR
+Never do incremental backups, only full dumps\&.
+
+.TP
+\fBskip\fR
+Never do backups (useful when sharing the \fBdisklist\fR file)\&.
+
+.TP
+\fBincronly\fR
+Only do incremental dumps\&. \fBamadmin force\fR should be used to tell \fBAMANDA\fR that a full dump has been performed off\-line, so that it resets to level 1\&. It is similar to skip\-full, but with incronly full dumps may be scheduled manually\&. Unfortunately, it appears that \fBAMANDA\fR will perform full backups with this configuration, which is probably a bug\&.
+
+.PP
+The following \fBdumptype\fR entries are predefined by \fBAMANDA\fR:
+.nf
+
+define dumptype no\-compress {
+    compress none
+}
+define dumptype compress\-fast {
+    compress client fast
+}
+define dumptype compress\-best {
+    compress client best
+}
+define dumptype srvcompress {
+    compress server fast
+}
+define dumptype bsd\-auth {
+    auth bsd
+}
+define dumptype krb4\-auth {
+    auth krb4
+}
+define dumptype no\-record {
+    record no
+}
+define dumptype no\-hold {
+    holdingdisk no
+}
+define dumptype no\-full {
+    skip\-full yes
+} 
+.fi
+
+.PP
+In addition to options in a \fBdumptype\fR section, one or more other \fBdumptype\fR names may be entered, which make this \fBdumptype\fR inherit options from other previously defined \fBdumptype\fRs\&. For instance, two sections might be the same except for the \fBrecord\fR option:
+.nf
+
+define dumptype normal {
+    comment "Normal backup, no compression, do indexing"
+    no\-compress
+    index yes
+    maxdumps 2
+}
+define dumptype testing {
+    comment "Test backup, no compression, do indexing, no recording"
+    normal
+    record no
+}
+.fi
+
+.PP
+\fBAMANDA\fR provides a \fBdumptype\fR named \fBglobal\fR in the sample \fBamanda\&.conf\fR file that all \fBdumptype\fRs should reference\&. This provides an easy place to make changes that will affect every \fBdumptype\fR\&.
+
+.SH "TAPETYPE SECTION"
+
+.PP
+The \fBamanda\&.conf\fR file may define multiple types of tape media and devices\&. The information is entered in a \fBtapetype\fR section, which looks like this in the config file:
+.nf
+
+define tapetype \fBname\fR {
+    \fBtapetype\-option\fR \fBtapetype\-value\fR
+    \&.\&.\&.
+}
+.fi
+
+.PP
+\fBName\fR is the name of this type of tape medium/device\&. It is referenced from the \fBtapetype\fR option in the main part of the config file\&.
+
+.PP
+The tapetype options and values are:
+
+.TP
+\fBcomment\fR \fB string\fR
+Default: \fBnone\fR\&. A comment string describing this set of tape information\&.
+
+.TP
+\fBfilemark\fR \fB int\fR
+Default: \fB1000 bytes\fR\&. How large a file mark (tape mark) is, measured in bytes\&. If the size is only known in some linear measurement (e\&.g\&. inches), convert it to bytes using the device density\&.
+
+.TP
+\fBlength\fR \fB int\fR
+Default: \fB2000 kbytes\fR\&. How much data will fit on a tape\&.
+
+Note that this value is only used by \fBAMANDA\fR to schedule which backups will be run\&. Once the backups start, \fBAMANDA\fR will continue to write to a tape until it gets an error, regardless of what value is entered for \fBlength\fR (but see the OUTPUT DRIVERS section later for exceptions)\&.
+
+.TP
+\fBblocksize\fR \fB int\fR
+Default: \fB32\fR\&. How much data will be written in each tape record expressed in KiloBytes\&. The tape record size (= blocksize) can not be reduced below the default 32 KBytes\&. The parameter blocksize can only be raised if \fBAMANDA\fR was compiled with the configure option \-\-with\-maxtapeblocksize=N set with "N" greater than 32 during \fBconfigure\fR\&.
+
+.TP
+\fBfile\-pad\fR \fB boolean\fR
+Default: \fBtrue\fR\&. If true, every record, including the last one in the file, will have the same length\&. This matches the way \fBAMANDA\fR wrote tapes prior to the availability of this parameter\&. It may also be useful on devices that only support a fixed blocksize\&.
+
+Note that the last record on the tape probably includes trailing null byte padding, which will be passed back to \fBgzip\fR, \fBcompress\fR or the restore program\&. Most programs just ignore this (although possibly with a warning)\&.
+
+If this parameter is false, the last record in a file may be shorter than the block size\&. The file will contain the same amount of data the dump program generated, without trailing null byte padding\&. When read, the same amount of data that was written will be returned\&.
+
+.TP
+\fBspeed\fR \fB int\fR
+Default: \fB200 bps\fR\&. How fast the drive will accept data, in bytes per second\&. This parameter is NOT currently used by \fBAMANDA\fR\&.
+
+.TP
+\fBlbl\-templ\fR \fB string\fR
+A PostScript template file used by \fBamreport\fR to generate labels\&. Several sample files are provided with the \fBAMANDA\fR sources in the \fBexample\fR directory\&. See the \fBamreport\fR(8) man page for more information\&.
+
+.PP
+In addition to options, another \fBtapetype\fR name may be entered, which makes this \fBtapetype\fR inherit options from another \fBtapetype\fR\&. For instance, the only difference between a DLT4000 tape drive using Compact\-III tapes and one using Compact\-IV tapes is the length of the tape\&. So they could be entered as:
+.nf
+
+define tapetype DLT4000\-III {
+    comment "DLT4000 tape drives with Compact\-III tapes"
+    length 12500 mbytes         # 10 Gig tapes with some compression
+    filemark 2000 kbytes
+    speed 1536 kps
+}
+define tapetype DLT4000\-IV {
+    DLT4000\-III
+    comment "DLT4000 tape drives with Compact\-IV tapes"
+    length 25000 mbytes         # 20 Gig tapes with some compression
+}
+.fi
+
+.SH "INTERFACE SECTION"
+
+.PP
+The \fBamanda\&.conf\fR file may define multiple types of network interfaces\&. The information is entered in an \fBinterface\fR section, which looks like this:
+.nf
+
+define interface \fBname\fR {
+    \fBinterface\-option\fR \fBinterface\-value\fR
+    \&.\&.\&.
+}
+.fi
+
+.PP
+\fBname\fR is the name of this type of network interface\&. It is referenced from the \fBdisklist\fR file\&.
+
+.PP
+Note that these sections define network interface characteristics, not the actual interface that will be used\&. Nor do they impose limits on the bandwidth that will actually be taken up by \fBAMANDA\fR\&. \fBAMANDA\fR computes the estimated bandwidth each file system backup will take based on the estimated size and time, then compares that plus any other running backups with the limit as another of the criteria when deciding whether to start the backup\&. Once a backup starts, \fBAMANDA\fR will use as much of the network as it can leaving throttling up to the operating system and network hardware\&.
+
+.PP
+The interface options and values are:
+
+.TP
+\fBcomment\fR \fB string\fR
+Default: \fBnone\fR\&. A comment string describing this set of network information\&.
+
+.TP
+\fBuse\fR \fB int\fR
+Default: \fB300 Kbps\fR\&. The speed of the interface in Kbytes per second\&.
+
+.PP
+In addition to options, another \fBinterface\fR name may be entered, which makes this \fBinterface\fR inherit options from another \fBinterface\fR\&. At the moment, this is of little use\&.
+
+.SH "DISKLIST FILE"
+
+.PP
+The \fBdisklist\fR file determines which disks will be backed up by \fBAMANDA\fR\&. The file usually contains one line per disk:
+.nf
+
+\fBhostname diskname\fR [\fBdiskdevice\fR] \fBdumptype\fR [\fBspindle\fR [\fBinterface\fR] ]
+.fi
+
+.PP
+All pairs [ \fBhostname diskname\fR ] must be unique\&.
+
+.PP
+Lines starting with # are ignored, as are blank lines\&. The fields have the following meanings:
+
+.TP
+\fBhostname\fR
+The name of the host to be backed up\&. If \fBdiskdevice\fR refers to a PC share, this is the host \fBAMANDA\fR will run the Samba \fBsmbclient\fR program on to back up the share\&.
+
+.TP
+\fBdiskname\fR
+The name of the disk (a label)\&. In most case, you set your \fBdiskname\fR to the \fBdiskdevice\fR and you don't set the \fBdiskdevice\&.\fR If you want multiple entries with the same \fBdiskdevice\fR, you must set a different \fBdiskname\fR for each entry\&. It's the \fBdiskname\fR that you use on the commandline for any \fBAMANDA\fR command\&. Look at the example/disklist file for example\&.
+
+.TP
+\fBdiskdevice\fR
+Default: same as diskname\&. The name of the disk device to be backed up\&. It may be a full device name, a device name without the \fI/dev/\fR prefix, e\&.g\&. \fBsd0a\fR, or a mount point such as \fI/usr\fR\&.
+
+It may also refer to a PC share by starting the name with two (forward) slashes, e\&.g\&. \fI//some\-pc/home\fR\&. In this case, the \fBprogram\fR option in the associated \fBdumptype\fR must be entered as \fBGNUTAR\fR\&. It is the combination of the double slash disk name and \fBprogram GNUTAR\fR in the \fBdumptype\fR that triggers the use of Samba\&.
+
+.TP
+\fBdumptype\fR
+Refers to a \fBdumptype\fR defined in the \fBamanda\&.conf\fR file\&. \fBDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in \fI/etc/dumpdates\fR, the disk's relative priority, etc\&.
+
+.TP
+\fBspindle\fR
+Default: \fB\-1\fR\&. A number used to balance backup load on a host\&. \fBAMANDA\fR will not run multiple backups at the same time on the same spindle, unless the spindle number is \-1, which means there is no spindle restriction\&.
+
+.TP
+\fBinterface\fR
+Default: \fBlocal\fR\&. The name of a network interface definition in the \fBamanda\&.conf\fR file, used to balance network load\&.
+
+.PP
+Instead of naming a \fBdumptype\fR, it is possible to define one in\-line, enclosing \fBdumptype\fR options within curly braces, one per line, just like a \fBdumptype\fR definition in \fBamanda\&.conf\fR\&. Since pre\-existing \fBdumptype\fRs are valid option names, this syntax may be used to customize \fBdumptype\fRs for particular disks\&.
+
+.PP
+A line break \fBmust\fR follow the left curly bracket\&.
+
+.PP
+For instance, if a \fBdumptype\fR named \fBnormal\fR is used for most disks, but use of the holding disk needs to be disabled for the file system that holds it, this would work instead of defining a new dumptype:
+.nf
+
+\fBhostname diskname\fR [ \fBdiskdevice\fR ] {
+  normal
+  holdingdisk no
+} [ \fBspindle\fR [ \fBinterface\fR ] ]
+.fi
+
+.SH "TAPE MANAGEMENT"
+
+.PP
+The \fBtapelist\fR file contains the list of tapes in active use\&. This file is maintained entirely by \fBAMANDA\fR and should not be created or edited during normal operation\&. It contains lines of the form:
+
+.PP
+
+.nf
+YYYYMMDD label flags
+.fi
+
+
+.PP
+Where \fBYYYYMMDD\fR is the date the tape was written, \fBlabel\fR is a label for the tape as written by \fBamlabel\fR and \fBflags\fR tell \fBAMANDA\fR whether the tape may be reused, etc (see the \fBreuse\fR options of \fBamadmin\fR)\&.
+
+.PP
+\fBAmdump\fR and \fBamflush\fR will refuse to write to an unlabeled tape, or to a labeled tape that is considered active\&. There must be more tapes in active rotation (see the \fBtapecycle\fR option) than there are runs in the backup cycle (see the \fBdumpcycle\fR option) to prevent overwriting a backup image that would be needed to do a full recovery\&.
+
+.SH "OUTPUT DRIVERS"
+
+.PP
+The normal value for the \fBtapedev\fR parameter, or for what a tape changer returns, is a full path name to a non\-rewinding tape device, such as \fI/dev/nst0\fR or \fI/dev/rmt/0mn\fR or \fI/dev/nst0\&.1\fR or whatever conventions the operating system uses\&. \fBAMANDA\fR provides additional application level drivers that support non\-traditional tape\-simulations or features\&. To access a specific output driver, set \fBtapedev\fR (or configure your changer to return) a string of the form \fBdriver\fR:\fBdriver\-info\fR where \fBdriver\fR is one of the supported drivers and \fBdriver\-info\fR is optional additional information needed by the driver\&.
+
+.PP
+The supported drivers are:
+
+.TP
+\fBtape\fR
+This is the default driver\&. The \fBdriver\-info\fR is the tape device name\&. Entering 
+.nf
+tapedev /dev/rmt/0mn
+.fi
+ is really a short hand for 
+.nf
+tapedev tape:/dev/rmt/0mn
+.fi
+\&.
+
+.TP
+\fBnull\fR
+This driver throws away anything written to it and returns EOF for any reads except a special case is made for reading a label, in which case a ``\fBfake\fR'' value is returned that \fBAMANDA\fR checks for and allows through regardless of what you have set in \fBlabelstr\fR\&. The \fBdriver\-info\fR field is not used and may be left blank:
+
+
+.nf
+tapedev null:
+.fi
+
+
+The \fBlength\fR value from the associated \fBtapetype\fR is used to limit the amount of data written\&. When the limit is reached, the driver will simulate end of tape\&.
+
+.RS
+.Sh "Note"
+This driver should only be used for debugging and testing,
+and probably only with the
+\fBrecord\fR
+option set to
+\fBno\fR\&.
+.RE
+
+.TP
+\fBrait\fR
+\fBR\fRedundant \fBA\fRrray of \fBI\fRnexpensive (?) \fBT\fRapes\&. Reads and writes tapes mounted on multiple drives by spreading the data across N\-1 drives and using the last drive for a checksum\&. See docs/RAIT for more information\&.
+
+The \fBdriver\-info\fR field describes the devices to use\&. Curly braces indicate multiple replacements in the string\&. For instance:
+
+
+.nf
+tapedev rait:/dev/rmt/tps0d{4,5,6}n
+.fi
+
+
+would use the following devices:
+
+\fI/dev/rmt/tps0d4n\fR  \fI/dev/rmt/tps0d5n\fR  \fI/dev/rmt/tps0d6n\fR 
+
+.TP
+\fBfile\fR
+This driver emulates a tape device with a set of files in a directory\&. The \fBdriver\-info\fR field must be the name of an existing directory\&. The driver will test for a subdirectory of that named \fBdata\fR and return \fBoffline\fR until it is present\&. When present, the driver uses two files in the \fBdata\fR subdirectory for each tape file\&. One contains the actual data\&. The other contains record length information\&.
+
+The driver uses a file named \fBstatus\fR in the \fBfile\fR device directory to hold driver status information, such as tape position\&. If not present, the driver will create it as though the device is rewound\&.
+
+The \fBlength\fR value from the associated \fBtapetype\fR is used to limit the amount of data written\&. When the limit is reached, the driver will simulate end of tape\&.
+
+One way to use this driver with a real device such as a CD\-writer is to create a directory for the \fBfile\fR device and one or more other directories for the actual data\&. Create a symlink named \fBdata\fR in the \fBfile\fR directory to one of the data directories\&. Set the \fBtapetype\fR length to whatever the medium will hold\&.
+
+When \fBAMANDA\fR fills the \fBfile\fR device, remove the symlink and (optionally) create a new symlink to another data area\&. Use a CD writer software package to burn the image from the first data area\&.
+
+To read the CD, mount it and create the \fBdata\fR symlink in the \fBfile\fR device directory\&.
+
+.SH "AUTHORIZATION"
+
+.PP
+\fBAMANDA\fR processes on the tape server host run as the \fBdumpuser\fR user listed in \fBamanda\&.conf\fR\&. When they connect to a backup client, they do so with an \fBAMANDA\fR\-specific protocol\&. They do not, for instance, use \fBrsh\fR or \fBssh\fR directly\&.
+
+.PP
+On the client side, the \fBamandad\fR daemon validates the connection using one of several methods, depending on how it was compiled and on options it is passed:
+
+.TP
+\&.rhosts
+Even though \fBAMANDA\fR does not use \fBrsh\fR, it can use \&.rhosts\-style authentication and a \&.rhosts file\&.
+
+.TP
+\&.amandahosts
+This is essentially the same as \&.rhosts authentication except a different file, with almost the same format, is used\&. This is the default mechanism built into \fBAMANDA\fR\&.
+
+The format of the \fI\&.amandahosts\fR file is:
+
+\fBhostname\fR [ \fBusername\fR ]
+
+If \fBusername\fR is ommitted, it defaults to the user running \fBamandad\fR, i\&.e\&. the user listed in the \fBinetd\fR or \fBxinetd\fR configuration file\&.
+
+.TP
+Kerberos
+\fBAMANDA\fR may use the Kerberos authentication system\&. Further information is in the \fBdocs/KERBEROS\fR   file that comes with an \fBAMANDA\fR distribution\&.
+
+For Samba access, \fBAMANDA\fR needs a file on the Samba server (which may or may not also be the tape server) named \fI/etc/amandapass\fR with share names, (clear text) passwords and (optional) domain names, in that order, one per line, whitespace separated\&. By default, the user used to connect to the PC is the same for all PC's and is compiled into \fBAMANDA\fR\&. It may be changed on a host by host basis by listing it first in the password field followed by a percent sign and then the password\&. For instance:
+
+.nf
+
+  //some\-pc/home normalpw
+  //another\-pc/disk otheruser%otherpw
+  .fi
+With clear text passwords, this file should obviously be tightly protected\&. It only needs to be readable by the \fBAMANDA\fR\-user on the Samba server\&.
+
+You can find further information in the \fBdocs/SAMBA\fR   file that comes with an \fBAMANDA\fR distribution\&.
+
+.SH "HOST & DISK EXPRESSION"
+
+.PP
+All host and disk arguments to programs are special expressions\&. The command applies to all disks that match your arguments\&. This section describes the matcher\&.
+
+.PP
+The matcher matches by word, each word is a glob expression, words are separated by the separator '\&.' for host and '/' for disk\&. You can anchor the expression at left with a '^'\&. You can anchor the expression at right with a '$'\&. The matcher is case insensitive for host but is case sensitive for disk\&. A match succeeds if all words in your expression match contiguous words in the host or disk\&.
+.nf
+
+ \&.   word separator for a host
+ /   word separator for a disk
+ ^   anchor at left
+ $   anchor at right
+ ?   match exactly one character except the separator
+ *   match zero or more characters except the separator
+ **  match zero or more characters including the separator
+.fi
+
+.PP
+Some examples:
+.nf
+
+  EXPRESSION      WILL MATCH              WILL NOT MATCH
+  hosta           hosta                   hostb
+                  hoSTA\&.dOMAIna\&.ORG
+                  foo\&.hosta\&.org
+  host            host                    hosta
+  host?           hosta                   host
+                  hostb
+  ho*na           hoina                   ho\&.aina\&.org
+  ho**na          hoina
+                  ho\&.aina\&.org
+  ^hosta          hosta                   foo\&.hosta\&.org
+  sda*            /dev/sda1
+                  /dev/sda12
+  /opt/           opt (disk)              opt (host)
+  \&.opt\&.           opt (host)              opt (disk)
+  /               /                       any other disk
+  /usr            /usr
+                  /usr/opt
+  /usr$           /usr                    /usr/opt 
+.fi
+
+.SH "DATESTAMP EXPRESSION"
+
+.PP
+A \fBdatestamp\fR expression is a range expression where we only match the prefix\&. Leading ^ is removed\&. Trailing $ forces an exact match\&.
+.nf
+
+  20001212\-14  match all dates beginning with 20001212, 20001213 or 20001214
+  20001212\-4   same as previous
+  20001212\-24  match all dates between 20001212 and 20001224
+  2000121      match all dates that start with 2000121 (20001210\-20001219)
+  2            match all dates that start with 2 (20000101\-29991231)
+  2000\-10      match all dates between 20000101\-20101231
+  200010$      match only 200010 
+.fi
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion,major update
+
+.SH "SEE ALSO"
+
+.PP
+\fBamadmin\fR(8), \fBamcheck\fR(8), \fBamcheckdb\fR(8), \fBamcleanup\fR(8), \fBamdd\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), \fBamgetconf\fR(8), \fBamlabel\fR(8), \fBammt\fR(8), \fBamoverview\fR(8), \fBamplot\fR(8), \fBamrecover\fR(8), \fBamreport\fR(8), \fBamrestore\fR(8), \fBamrmtape\fR(8), \fBamstatus\fR(8), \fBamtape\fR(8), \fBamtoc\fR(8), \fBamverify\fR(8), \fBamverifyrun\fR(8)
+
diff --git a/man/amanda.8.in b/man/amanda.8.in
deleted file mode 100644 (file)
index 1e618f9..0000000
+++ /dev/null
@@ -1,2131 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.de P1
-\fB\\$1\fP \\$2 \fI\\$3\fP \\$4 \fI\\$5\fP \\$6 "\fI\\$7\fP" \\$8
-..
-.TH AMANDA 8
-.SH NAME
-amanda \- Advanced Maryland Automatic Network Disk Archiver
-.SH SYNOPSIS
-.B amdump
-.I config
-.br
-.B amflush
-[
-.B \-f
-]
-.I config
-.br
-.B amcleanup
-.I config
-.br
-.B amrecover
-[
-.I config
-] [
-.I options
-]
-.br
-.B amrestore
-[
-.I options
-]
-.I tapedevice
-[
-.I hostname
-[
-.I diskname
-]]
-.br
-.B amlabel
-.I config label
-[
-.B slot
-.I slot
-]
-.br
-.B amcheck
-[
-.I options
-]
-.I config
-.br
-.B amadmin
-.I config
-.I command
-[
-.I options
-]
-.br
-.B amtape
-.I config
-.I command
-[
-.I options
-]
-.br
-.B amverify
-.I config
-.br
-.B amrmtape
-[
-.I options
-]
-.I config label
-.br
-.B amstatus
-.I config
-[
-.I options
-]
-.br
-.B amoverview
-.I config
-[
-.I options
-]
-.br
-.B amplot
-[
-.I options
-]
-.I amdump-files
-.br
-.B amreport
-[
-.I config
-]
-[
-.I options
-]
-.br
-.B amtoc
-[
-.I options
-]
-.I logfile
-.br
-.B amcheckdb
-.I config
-.br
-.B amgetconf
-[
-.I config
-]
-.I parameter
-.br
-.SH DESCRIPTION
-Amanda is the "Advanced Maryland Automatic Network Disk Archiver".
-This manual page gives an overview of the Amanda commands and
-configuration files for quick reference.
-.LP
-Here are all the Amanda commands.
-Each one has its own manual page.
-See them for all the gory details.
-.TP
-.B amdump
-Take care of automatic Amanda backups.
-This is normally executed by
-.B cron
-on a computer called the
-.I tape server host
-and requests backups of file systems located on
-.I backup
-.IR clients .
-.B Amdump
-backs up all disks in the
-.I disklist
-file (discussed below) to tape or, if there is a problem, to a special
-.I holding
-.IR disk .
-After all backups are done,
-.B amdump
-sends mail reporting failures and successes.
-.TP
-.B amflush
-Flush backups from the holding disk to tape.
-.B Amflush
-is used after
-.B amdump
-has reported it could not write backups to tape for some reason.
-When this happens, backups stay in the holding disk.
-Run
-.B amflush
-after the tape problem is corrected
-to write backups from the holding disk to tape.
-.TP
-.B amcleanup
-Clean up after an interrupted
-.BR amdump .
-This command is only needed if
-.B amdump
-was unable to complete for some reason, usually because the
-tape server host crashed while
-.B amdump
-was running.
-.TP
-.B amrecover
-Provides an interactive interface to browse the Amanda index files
-(backup image catalogues)
-and select which tapes to recover files from.
-It can also run
-.B amrestore
-and a restore program (e.g.\&
-.BR tar )
-to actually recover the files.
-.TP
-.B amrestore
-Read an Amanda tape, searching for requested backups.
-.B Amrestore
-is suitable for everything from interactive restores of single files
-to a full restore of all partitions on a failed disk.
-.TP
-.B amlabel
-Write an Amanda format label onto a tape.
-All Amanda tapes must be labeled with
-.BR amlabel .
-.B Amdump
-and
-.B amflush
-will not write to an unlabeled tape (see TAPE MANAGEMENT below).
-.TP
-.B amcheck
-Verify the correct tape is mounted
-and all file systems on all backup client systems
-are ready to be backed up.
-Often run by
-.B cron
-before
-.B amdump
-to generate a mail warning that backups might fail
-unless corrective action is taken.
-.TP
-.B amadmin
-Take care of administrative tasks like finding out which
-tapes are needed to restore a filesystem,
-forcing hosts to do full backups of selected disks
-and looking at schedule balance information.
-.TP
-.B amtape
-Take care of tape changer control operations like loading particular tapes,
-ejecting tapes
-and scanning the tape storage slots.
-.TP
-.B amverify
-Check Amanda backup tapes for errors.
-.TP
-.B amrmtape
-Delete a tape from the Amanda databases.
-.TP
-.B amstatus
-Report the status of a running or completed
-.BR amdump .
-.TP
-.B amoverview
-Display a chart of hosts and file systems backed up every run.
-.TP
-.B amplot
-Generate utilization plots of Amanda runs for performance tuning.
-.TP
-.B amreport
-Generate an Amanda summary E-mail report.
-.TP
-.B amtoc
-Generate table of content files for Amanda tapes.
-.TP
-.B amcheckdb
-Verify every tape Amanda knows about is consistent in the database.
-.TP
-.B amgetconf
-Look up parameters in the Amanda configuration file.
-.SH CONFIGURATION
-There are three user\-editable files that control the behavior of Amanda.
-The first is
-.B amanda.conf,
-the main configuration file.
-It contains parameters to customize Amanda for the site.
-Second is the
-.I disklist
-file, which lists hosts and disk partitions to back up.
-Third is the
-.I tapelist
-file, which lists tapes that are currently active.
-These files are described in more detail in the following sections.
-.LP
-All files are stored in individual configuration
-directories under @CONFIG_DIR@.
-A site will often have more than
-one configuration.
-For example, it might have a
-.I normal
-configuration for everyday backups and an
-.I archive
-configuration for infrequent full archival backups.
-The configuration files would be stored under directories
-@CONFIG_DIR@/normal/ and
-@CONFIG_DIR@/archive/, respectively.
-Part of the job of an Amanda administrator is to create,
-populate and maintain these directories.
-.LP
-All log and database files generated by Amanda go in corresponding
-directories somewhere.
-The exact location is controlled by entries in
-.BR amanda.conf .
-A typical location would be under /var/adm/amanda.
-For the above example, the files might go in
-/var/adm/amanda/normal/ and /var/adm/amanda/archive/.
-.LP
-As log files are no longer needed (no longer contain relevant information),
-Amanda cycles them out in various ways, depending on the type of file.
-.LP
-Detailed information about
-.B amdump
-runs are stored in files named
-.BI amdump. NN
-where
-.I NN
-is a sequence number, with 1 being the most recent file.
-.B Amdump
-rotates these files each run, keeping roughly the last
-.B tapecycle
-(see below)
-worth of them.
-.LP
-The file used by
-.B amreport
-to generate the mail summary is named
-.BI log. YYYYMMDD.NN
-where
-.I YYYYMMDD
-is the datestamp of the start of the
-.B amdump
-run and
-.I NN
-is a sequence number started at 0.
-At the end of each
-.B amdump
-run,
-log files for runs whose tapes have been reused are renamed
-into a subdirectory of the main log directory (see the
-.B logdir
-parameter below)
-named
-.BR oldlog .
-It is up to the Amanda administrator to remove them from this
-directory when desired.
-.LP
-Index (backup image catalogue) files older than the full dump
-matching the oldest backup image for a given client and disk
-are removed by
-.B amdump
-at the end of each run.
-.SH CONFIG FILE PARAMETERS
-.de BS
-\fB\\$1\fP\ \fI"\\$2"\fP
-..
-.de BN
-\fB\\$1\fP\ \fI\\$2\fP
-..
-There are a number of configuration parameters that control the
-behavior of the Amanda programs.
-All have default values,
-so you need not specify the parameter in
-.B amanda.conf
-if the default is suitable.
-.LP
-Lines starting with # are ignored, as are blank lines.
-Comments may be placed on a line with a directive by starting
-the comment with a #.
-The remainder of the line is ignored.
-.LP
-Keywords are case insensitive, i.e.\&
-.B mailto
-and
-.B MailTo
-are treated the same.
-.LP
-Integer arguments may have one of the following (case insensitive) suffixes,
-some of which have a multiplier effect:
-.RS
-.TP
-.B "b byte bytes"
-Some number of bytes.
-.TP
-.B "bps"
-Some number of bytes per second.
-.TP
-.B "k kb kbyte kbytes kilobyte kilobytes"
-Some number of kilobytes (bytes*1024).
-.TP
-.B "kps kbps"
-Some number of kilobytes per second (bytes*1024).
-.TP
-.B "m mb meg mbyte mbytes megabyte megabytes"
-Some number of megabytes (bytes*1024*1024).
-.TP
-.B "mps mbps"
-Some number of megabytes per second (bytes*1024*1024).
-.TP
-.B "g gb gbyte gbytes gigabyte gigabytes"
-Some number of gigabytes (bytes*1024*1024*1024).
-.TP
-.B "tape tapes"
-Some number of tapes.
-.TP
-.B "day days"
-Some number of days.
-.TP
-.B "week weeks"
-Some number of weeks (days*7).
-.RE
-.LP
-The value
-.B inf
-may be used in most places where an integer is expected
-to mean an infinite amount.
-.LP
-Boolean arguments may have any of the values
-.BR y ,
-.BR yes ,
-.BR t ,
-.B true
-or
-.B on
-to indicate a true state, or
-.BR n ,
-.BR no ,
-.BR f ,
-.BR false
-or
-.B off
-to indicate a false state.
-If no argument is given,
-.B true
-is assumed.
-.LP
-.TP
-.BS org string
-Default:
-.IR @DEFAULT_CONFIG@ .
-A descriptive name for the configuration.
-This string appears in the Subject line of mail reports.
-Each Amanda configuration should have a different string to keep
-mail reports distinct.
-.TP
-.BS mailto string
-Default:
-.IR operators .
-A space separated list of recipients for mail reports.
-.TP
-.BN dumpcycle int
-Default:
-.IR "10 days" .
-The number of days in the backup cycle.
-Each disk will get a full backup at least this often.
-Setting this to zero tries to do a full backup each run.
-.IP
-Note that this parameter may also be set in a specific
-.B dumptype
-(see below).
-This value sets the default for all
-.BR dumptype s
-so must appear in
-.B amanda.conf
-before any
-.BR dumptype s
-are defined.
-.TP
-.BN runspercycle int
-Default:
-.IR "same as dumpcycle" .
-The number of amdump runs in 
-.B dumpcycle
-days.
-A value of 0 means the same value as 
-.BR dumpcycle .
-A value of -1 means guess the number of runs from the
-.I tapelist
-file, 
-which is the number of tapes used in the last 
-.B dumpcycle
-days / 
-.BR runtapes .
-.TP
-.BN tapecycle int
-Default:
-.IR "15 tapes" .
-The mininum number of tapes in the active tape cycle.
-You can have more tapes in your active tape cycle.
-It means that you must write at least
-.B tapecycle
-tape before a tape
-is overwritten.
-A tape marked as 
-.B no-reuse
-is not in the active tape cycle.
-.IP
-Amanda will accept any tape for writting if it is not in the last
-.B tapecycle
-tapes used.
-.IP
-This must be at least one larger than the
-number of Amanda runs done during a dump cycle
-(see the
-.B dumpcycle
-parameter)
-times the number of tapes used per run
-(see the
-.B runtapes
-parameter).
-.IP
-For instance, if
-.B dumpcycle
-is set to 14 days,
-one Amanda run is done every day (Sunday through Saturday),
-and
-.B runtapes
-is set to one,
-then
-.B tapecycle
-must be at least 15 (14 days * one run/day * one tape/run + one tape).
-.IP
-In practice, there should be several extra tapes
-to allow for schedule adjustments or disaster recovery.
-.TP
-.BS dumpuser string
-Default:
-.IR @CLIENT_LOGIN@ .
-The login name Amanda uses to run the backups.
-The backup client hosts must allow access
-from the tape server host as this user via
-.I .rhosts
-or
-.IR .amandahosts ,
-depending on how the Amanda software was built.
-.TP
-.BS printer string
-Printer to use when doing tape labels.
-See the
-.B lbl-templ
-.B tapetype
-option.
-.TP
-.BS tapedev string
-Default:
-.IR @DEFAULT_TAPE_DEVICE@ .
-The path name of the non-rewinding tape device.
-Non-rewinding tape device names often have an 'n' in the name,
-e.g.
-.IR /dev/rmt/0mn ,
-however this is operating system specific and you should consult
-that documentation for detailed naming information.
-.IP
-If a tape changer is configured
-(see the
-.B tpchanger
-option), this option might not be used.
-.IP
-If the
-.B null
-output driver is selected
-(see the
-.B OUTPUT DRIVERS
-section later for more information),
-programs such as
-.B amdump
-will run normally but all images will be thrown away.
-This should only be used for debugging and testing,
-and probably only with the
-.B record
-option set to
-.IR no .
-.TP
-.BS rawtapedev string
-Default:
-.IR @DEFAULT_RAW_TAPE_DEVICE@ .
-The path name of the raw tape device.
-This is only used if Amanda is compiled for Linux machines with floppy tapes
-and is needed for QIC volume table operations.
-.TP
-.BS tpchanger string
-Default:
-.IR none .
-The name of the tape changer.
-If a tape changer is not configured, this option is not used
-and should be commented out of the configuration file.
-.IP
-If a tape changer is configured, choose one of the changer scripts
-(e.g.\&
-.BR chg-scsi )
-and enter that here.
-.TP
-.BS changerdev string
-Default:
-.IR @DEFAULT_CHANGER_DEVICE@ .
-A tape changer configuration parameter.
-Usage depends on the particular changer defined with the
-.B tpchanger
-option.
-.TP
-.BS changerfile string
-Default:
-.IR /usr/adm/amanda/log/changer\-status .
-A tape changer configuration parameter.
-Usage depends on the particular changer defined with the
-.B tpchanger
-option.
-.TP
-.BN runtapes int
-Default:
-.IR 1 .
-The maximum number of tapes used in a single run.
-If a tape changer is not configured, this option is not used
-and should be commented out of the configuration file.
-.IP
-If a tape changer is configured, this may be set larger than one to
-let Amanda write to more than one tape.
-.IP
-Note that this is an upper bound on the number of tapes,
-and Amanda may use less.
-.IP
-Also note that as of this release, Amanda does not support true tape overflow.
-When it reaches the end of one tape,
-the backup image Amanda was processing starts over again on the next tape.
-.TP
-.BN maxdumpsize int
-Default:
-.IR runtapes * tape_length .
-Maximum number of bytes the planner will schedule for a run.
-.TP
-.BN taperalgo [first|firstfit|largest|largestfit|smallest|last]
-Default:
-.IR first .
-The algorithm use to choose which dump image to send to the taper.
-.RS
-.TP
-.B first
-First in first out.
-.TP
-.B firstfit
-The first dump image that will fit on the current tape.
-.TP
-.B largest
-The largest dump image.
-.TP
-.B largestfit
-The largest dump image that will fit on the current tape.
-.TP
-.B smallest
-The smallest dump image.
-.TP
-.B last
-Last in first out.
-.RE
-.LP
-.BS labelstr string
-Default:
-.IR .* .
-The tape label constraint regular expression.
-All tape labels
-generated (see
-.BR amlabel(8) )
-and used by this configuration must match the regular expression.
-If multiple configurations are run from the same tape server host,
-it is helpful to set their labels to different strings
-(for example, "DAILY[0\-9][0\-9]*" vs.\& "ARCHIVE[0\-9][0\-9]*")
-to avoid overwriting each other's tapes.
-.TP
-.BS tapetype string
-Default:
-.IR EXABYTE .
-The type of tape drive associated with
-.B tapedev
-or
-.BR tpchanger .
-This refers to one of the defined
-.BR tapetype s
-in the config file (see below),
-which specify various tape parameters,
-like the
-.BR length ,
-.B filemark
-size, and
-.B speed
-of the tape media and device.
-.TP
-.BN ctimeout int
-Default:
-.IR "30 seconds" .
-Maximum amount of time that
-.B amcheck 
-will wait for each client host.
-.TP
-.BN dtimeout int
-Default:
-.IR "1800 seconds" .
-Amount of idle time per disk on a given client that a
-.B dumper
-running from within
-.B amdump
-will wait before it fails with a data timeout error.
-.TP
-.BN etimeout int
-Default:
-.IR "300 seconds" .
-Amount of time per disk on a given client that the
-.B planner
-step of
-.B amdump
-will wait to get the dump size estimates.
-For instance, with the default of 300 seconds and four disks on client A, 
-.B planner
-will wait up to 20 minutes for that machine.
-A negative value will be interpreted as a total amount of time to wait
-per client instead of per disk.
-.TP
-.BN netusage int
-Default:
-.IR "300 Kbps" .
-The maximum network bandwidth allocated to Amanda, in Kbytes per second.
-See also the
-.B interface
-section.
-.TP
-.BN inparallel int
-Default:
-.IR 10 .
-The maximum number of backups that Amanda will attempt to run in parallel.
-Amanda will stay within the constraints of network bandwidth and
-holding disk space available, so it doesn't hurt to set
-this number a bit high.
-Some contention can occur with larger numbers
-of backups, but this effect is relatively small on most systems.
-.TP
-.BS dumporder string
-Default:
-.IR "tttTTTTTTT" .
-The priority order of each dumper:
-.RS
-.RS
-.nf
-s: smallest size
-S: largest size
-t: smallest time
-T: largest time
-b: smallest bandwidth
-B: largest bandwidth
-.fi
-.RE
-.RE
-.TP
-.BN maxdumps int
-Default:
-.IR 1 .
-The maximum number of backups from a single host that Amanda will
-attempt to run in parallel.
-See also the
-.B inparallel
-option.
-.IP
-Note that this parameter may also be set in a specific
-.B dumptype
-(see below).
-This value sets the default for all
-.BR dumptype s
-so must appear in
-.B amanda.conf
-before any
-.BR dumptype s
-are defined.
-.TP
-.BN bumpsize int
-Default:
-.IR "10 Mbytes" .
-The minimum savings required to trigger an automatic
-bump from one incremental level to the next.
-If Amanda determines that the next higher backup level
-will be this much smaller than the current level,
-it will do the next level.
-See also the
-.B bumpmult
-option.
-.TP
-.BN bumpmult float
-Default:
-.IR 1.5 .
-The bump size multiplier.
-Amanda multiplies
-.B bumpsize
-by this factor for each level.
-This prevents active filesystems from
-bumping too much by making it harder to bump to the next level.
-For example, with the default
-.B bumpsize
-and
-.BR bumpmult
-set to 2.0, the bump threshold will be 10 Mbytes for level one, 20
-Mbytes for level two, 40 Mbytes for level three, and so on.
-.TP
-.BN bumpdays int
-Default:
-.IR "2 days" .
-To insure redundancy in the dumps, Amanda keeps filesystems at the
-same incremental level for at least
-.B bumpdays
-days, even if the other bump threshold criteria are met.
-.TP
-.BS diskfile string
-Default:
-.IR disklist .
-The file name for the
-.I disklist
-file holding client hosts, disks and other client dumping information.
-.TP
-.BS infofile string
-Default:
-.IR /usr/adm/amanda/curinfo .
-The file or directory name for the historical information database.
-If Amanda was configured to use DBM databases, this is the base file
-name for them.
-If it was configured to use text formated databases (the default),
-this is the base directory and within here will be a directory per
-client, then a directory per disk, then a text file of data.
-.TP
-.BS logdir string
-Default:
-.IR /usr/adm/amanda .
-The directory for the
-.B amdump
-and
-.B log
-files.
-.TP
-.BS indexdir string
-Default
-.IR /usr/adm/amanda/index .
-The directory where index files (backup image catalogues) are stored.
-Index files are
-only generated for filesystems whose
-.B dumptype
-has the
-.B index
-option enabled.
-.TP
-.BS tapelist string
-Default:
-.IR tapelist .
-The file name for the active
-.I tapelist
-file.
-Amanda maintains this file with information about the active set of tapes.
-.TP
-.BN tapebufs int
-Default:
-.IR 20 .
-The number of buffers used by the
-.B taper
-process run by
-.B amdump
-and
-.B amflush
-to hold data as it
-is read from the network or disk before it is written to tape.
-Each buffer is a little larger than 32 KBytes and is held in
-a shared memory region.
-.TP
-.BN reserve number
-Default:
-.IR 100 (percent).
-The amount of holding-disk space that should not be used for full
-backups if no tape is available.
-By default, when there is no tape to write to,
-degraded mode (incremental) backups will be performed to the holding disk.
-If full backups should also be allowed in this case,
-the amount of holding disk space reserved for incrementals should be lowered.
-.TP
-.BN autoflush bool
-Default:
-.IR off .
-Whether an amdump run will flush the dump already on holding disk to tape.
-.TP
-.BN amrecover_do_fsf bool
-Default:
-.IR off .
-Amrecover will call amrestore with the -f flag for faster positioning of the tape.
-.TP
-.BN amrecover_check_label bool
-Default:
-.IR off .
-Amrecover will call amrestore with the -l flag to check the label.
-.TP
-.BS amrecover_changer string
-Default: ''.
-Amrecover will use the changer if you use 'settape <STRING>' and that string
-is the same as the amrecover_changer setting.
-.TP
-.BS columnspec string
-Defines the width of columns
-.B amreport
-should use.
-.I String
-is a comma (',') separated list of triples.
-Each triple consists
-of three parts which are separated by a equal sign ('=') and a colon
-(':') (see the example).
-These three parts specify:
-.RS
-.IP + 2
-the name of the column, which may be:
-.LP
-.RS
-.nf
-Compress (compression ratio)
-Disk (client disk name)
-DumpRate (dump rate in KBytes/sec)
-DumpTime (total dump time in hours:minutes)
-HostName (client host name)
-Level (dump level)
-OrigKB (original image size in KBytes)
-OutKB (output image size in KBytes)
-TapeRate (tape writing rate in KBytes/sec)
-TapeTime (total tape time in hours:minutes)
-.fi
-.RE
-.IP + 2
-the amount of space to display before the column (used to get whitespace
-between columns).
-.IP + 2
-the width of the column itself.
-If set to a negative value,
-the width will be calculated on demand to fit the largest entry in
-this column.
-.RE
-.LP
-.RS
-Here is an example:
-.LP
-.EX
-     columnspec "Disk=1:18,HostName=0:10,OutKB=1:7"
-.EE
-.LP
-The above will display the disk information in 18 characters
-and put one space before it.
-The hostname column will be 10 characters wide with
-no space to the left.
-The output KBytes column is seven characters wide
-with one space before it.
-.RE
-.TP
-.BS includefile string
-Default:
-.IR none .
-The name of an amanda configuration file to include within
-the current file.
-Useful for sharing dumptypes, tapetypes and
-interface definitions among several configurations.
-.SH "HOLDINGDISK SECTION"
-The
-.B amanda.conf
-file may define one or more holding disks used as buffers to hold
-backup images before they are written to tape.
-The syntax is:
-.LP
-.RS
-.EX
-holdingdisk \fIname\fP {
-    \fIholdingdisk\-option\fP \fIholdingdisk\-value\fP
-    \fI...\fP
-}
-.EE
-.RE
-.LP
-.I Name
-is a logical name for this holding disk.
-.LP
-The options and values are:
-.LP
-.TP
-.BS comment string
-Default:
-.IR none .
-A comment string describing this holding disk.
-.TP
-.BS directory disk
-Default:
-.IR /dumps/amanda .
-The path to this holding area.
-.TP
-.BN use int
-Default:
-.IR "0 Gb" .
-Amount of space that can be used in this holding disk area.
-If the value is zero, all available space on the file system is used.
-If the value is negative,
-Amanda will use all available space minus that value.
-.TP
-.BN chunksize int
-Default:
-.IR "1 Gb" .
-Holding disk chunk size.
-Dumps larger than the specified size will be stored in multiple
-holding disk files.
-The size of each chunk will not exceed the
-specified value.
-However, even though dump images are split in the
-holding disk, they are concatenated as they are written to tape, so
-each dump image still corresponds to a single continuous tape section.
-.IP
-If 0 is specified, Amanda will create holding disk chunks as large as
-((INT_MAX/1024)-64) Kbytes.
-.IP
-Each holding disk chunk includes a 32 Kbyte header, so the minimum
-chunk size is 64 Kbytes (but that would be really silly).
-.IP
-Operating systems that are limited to a maximum file size of 2 Gbytes
-actually cannot handle files that large.
-They must be at least one byte less than 2 Gbytes.
-Since Amanda works with 32 Kbyte blocks, and
-to handle the final read at the end of the chunk, the chunk size
-should be at least 64 Kbytes (2 * 32 Kbytes) smaller than the maximum
-file size, e.g.\& 2047 Mbytes.
-.SH "DUMPTYPE SECTION"
-The
-.B amanda.conf
-file may define multiple sets of backup options and
-refer to them by name from the
-.B disklist
-file.
-For instance, one set of options might be defined for file systems
-that can benefit from high compression,
-another set that does not compress well,
-another set for file systems that should always get a full backup
-and so on.
-.LP
-A set of backup options are entered in a
-.B dumptype
-section, which looks like this:
-.LP
-.RS
-.EX
-define dumptype \fIname\fP {
-    \fIdumptype\-option\fP \fIdumptype\-value\fP
-    \fI...\fP
-}
-.EE
-.RE
-.LP
-.I Name
-is the name of this set of backup options.
-It is referenced from the
-.I disklist
-file.
-.LP
-Some of the options in a
-.B dumptype
-section are the same as those in the main part of
-.BR amanda.conf .
-The main option value is used to set the default for all
-.B dumptype
-sections.
-For instance, setting
-.B dumpcycle
-to 50 in the main part of the config file causes all following
-.B dumptype
-sections to start with that value,
-but the value may be changed on a section by section basis.
-Changes to variables in the main part of the config file must be
-done before (earlier in the file) any
-.BR dumptype s
-are defined.
-.LP
-The dumptype options and values are:
-.LP
-.TP
-.BS auth string
-Default:
-.IR bsd .
-Type of authorization to perform between tape server and backup client hosts.
-May be
-.B krb4
-to use Kerberos\-IV authorization.
-.TP
-.BS comment string
-Default:
-.IR none .
-A comment string describing this set of backup options.
-.TP
-\fBcomprate\fP \fIfloat\fP [, \fIfloat\fP ]
-Default:
-.IR 0.50 ,
-.IR 0.50 .
-The expected full and incremental compression factor for dumps.
-It is only used if Amanda does not have any history information on
-compression rates for a filesystem, so should not usually need to
-be set.
-However, it may be useful for the first time a
-very large filesystem that compresses very little is backed up.
-.TP
-.BS "compress [client|server]" string
-Default:
-.IR "client fast" .
-If Amanda does compression of the backup images,
-it can do so either on the backup client host before it crosses the network
-or on the tape server host as it goes from the
-network into the holding disk or to tape.
-Which place to do compression (if at all) depends on how well the
-dump image usually compresses, the speed and load on the client or
-server, network capacity, holding disk capacity,
-availability of tape hardware compression, etc.
-.IP
-For either type of compression, Amanda also allows the selection
-of two styles of compression.
-.B Best
-is the best compression available, often at the expense of CPU overhead.
-.B Fast
-is often not as good a compression as
-.BR best ,
-but usually less CPU overhead.
-.IP
-So the
-.B compress
-options line may be one of:
-.LP
-.RS
-.RS
-.nf
-compress none
-compress [client] fast
-compress [client] best
-compress server fast
-compress server best
-.fi
-.RE
-.RE
-.IP
-Note that some tape devices do compression and this option has nothing
-to do with whether that is used.
-If hardware compression is used (usually via a particular tape device name
-or
-.B mt
-option),
-Amanda (software) compression should be disabled.
-.TP
-.BN dumpcycle int
-Default:
-.IR "10 days" .
-The number of days in the backup cycle.
-Each disk using this set of options
-will get a full backup at least this often.
-Setting this to zero tries to do a full backup each run.
-.TP
-.P1 exclude [ list|file ][[optional][ append ][ "string" ]+]
-Default:
-.IR file .
-There is two exclude list
-.B exclude file
-and
-.B exclude list.
-With
-.B exclude file
-, the
-.I string
-is a gnutar exclude expression. With
-.B exclude list
-, the
-.I string
-is a file name on the client containing gnutar exclude expression.
-.IP
-All exclude expression are concatenated in one file and passed to gnutar as a
-.B \-\-exclude\-from
-argument.
-.IP
-With the
-.B append
-keyword, the
-.I string
-are appended to the current value of the list, without it, the
-.I string
-overwrite the list.
-.IP
-If
-.B optional
-is specified for
-.B exclude list,
-then amcheck will not complain if the file doesn't exist or is not readable.
-.IP
-For
-.B exclude list,
-If the file name is relative,
-the disk name being backed up is prepended.
-So if this is entered:
-.LP
-.EX
-    exclude list ".amanda.excludes"
-.EE
-.IP
-the actual file use would be
-.I /var/.amanda.excludes
-for a backup of
-.IR /var ,
-.I /usr/local/.amanda.excludes
-for a backup of
-.IR /usr/local ,
-and so on.
-.TP
-.BS holdingdisk boolean
-Default:
-.IR yes .
-Whether a holding disk should be used for these backups or whether
-they should go directly to tape.
-If the holding disk is a portion of another file system that Amanda
-is backing up, that file system should refer to a dumptype with
-.B holdingdisk
-set to
-.I no
-to avoid backing up the holding disk into itself.
-.TP
-.BS ignore boolean
-Default:
-.IR no .
-Whether disks associated with this backup type should be backed up or not.
-This option is useful when the
-.I disklist
-file is shared among several configurations,
-some of which should not back up all the listed file systems.
-.TP
-.P1 include [ list|file ][[optional][ append ][ "string" ]+]
-Default:
-.I file
-".".
-There is two include list
-.B include file
-and
-.B include list.
-With
-.B include file
-, the
-.I string
-is a glob expression. With
-.B include list
-, the
-.I string
-is a file name on the client containing glob expression.
-.IP
-All include expression are expanded by amanda and concatenated in one file and passed to gnutar as a
-.B \-\-files\-from
-argument. They must start with "./" and containing no other "/".
-.IP
-With the
-.B append
-keyword, the
-.I string
-are appended to the current value of the list, without it, the
-.I string
-overwrite the list.
-.IP
-If
-.B optional
-is specified for
-.B include list,
-then amcheck will not complain if the file doesn't exist or is not readable.
-.IP
-For
-.B include list,
-If the file name is relative,
-the disk name being backed up is prepended.
-.TP
-.BS index boolean
-Default:
-.IR no .
-Whether an index (catalogue) of the backup should be generated and
-saved in
-.BR indexdir .
-These catalogues are used by the
-.B amrecover
-utility.
-.TP
-.BS kencrypt boolean
-Default:
-.IR no .
-Whether the backup image should be encrypted by Kerberos as it is sent
-across the network from the backup client host to the tape server host.
-.TP
-.BS maxdumps int
-Default:
-.IR 1 .
-The maximum number of backups from a single host that Amanda will
-attempt to run in parallel.
-See also the main section
-.B inparallel
-option.
-.TP
-.BS maxpromoteday int
-Default:
-.IR 10000 .
-The Maximum number of day for a promotion, set it 0 if you don't want
-promotion, set it to 1 or 2 if your disk get overpromoted.
-.TP
-.BS priority string
-Default:
-.IR medium .
-When there is no tape to write to, Amanda will do incremental backups
-in priority order to the holding disk.
-The priority may be
-.BR high (2),
-.BR medium (1),
-.BR low (0)
-or a number of your choice.
-.TP
-.BS program string
-Default:
-.IR DUMP .
-The type of backup to perform.
-Valid values are
-.B DUMP
-for the native operating system backup program, and
-.B GNUTAR
-to use GNU tar or to do Samba PC backups.
-.TP
-.BS record boolean
-Default:
-.IR yes .
-Whether to ask the backup program to update its
-database (e.g.\&
-.IR /etc/dumpdates
-for DUMP or 
-.IR @GNUTAR_LISTED_INCREMENTAL_DIRX@
-for GNUTAR) of time stamps.
-This is normally enabled for daily backups and turned off
-for periodic archival runs.
-.TP
-.BS skip\-full boolean
-Default:
-.IR no .
-If
-.I true
-and
-.B planner
-has scheduled a full backup, these disks will be skipped, and
-full backups should be run off-line on these days.
-It was reported that
-Amanda only schedules level 1 incrementals in this configuration; this
-is probably a bug.
-.TP
-.BS skip\-incr boolean
-Default:
-.IR no .
-If
-.I true
-and
-.B planner
-has scheduled an incremental backup, these disks will be skipped.
-.TP
-.BS starttime int
-Default:
-.IR none .
-Backups will not start until after this time of day.
-The value should be hh*100+mm, e.g.\& 6:30PM (18:30) would be entered as
-.BR 1830 .
-.TP
-.BS strategy string
-Default:
-.IR standard .
-Strategy to use when planning what level of backup to run next.
-Values are:
-.LP
-.RS
-.TP
-.B standard
-The standard Amanda schedule.
-.TP
-.B nofull
-Never do full backups, only level 1 incrementals.
-.TP
-.B noinc
-Never do incremental backups, only full dumps.
-.TP
-.B skip
-Never do backups (useful when sharing the
-.I disklist
-file).
-.TP
-.B incronly
-Only do incremental dumps.
-`amadmin force' should be used to tell
-Amanda that a full dump has been performed off-line, so that it resets
-to level 1.
-It is similar to skip-full, but with incronly
-full dumps may be scheduled manually.
-Unfortunately, it appears that Amanda
-will perform full backups with this configuration, which is probably a
-bug.
-.RE
-.LP
-The following
-.B dumptype
-entries are predefined by Amanda:
-.LP
-.RS
-.EX
-define dumptype no-compress {
-    compress none
-}
-define dumptype compress-fast {
-    compress client fast
-}
-define dumptype compress-best {
-    compress client best
-}
-define dumptype srvcompress {
-    compress server fast
-}
-define dumptype bsd-auth {
-    auth bsd
-}
-define dumptype krb4-auth {
-    auth krb4
-}
-define dumptype no-record {
-    record no
-}
-define dumptype no-hold {
-    holdingdisk no
-}
-define dumptype no-full {
-    skip-full yes
-}
-.EE
-.RE
-.LP
-In addition to options in a
-.B dumptype
-section, one or more other
-.B dumptype
-names may be entered, which make this
-.B dumptype
-inherit options from other
-previously defined
-.BR dumptype s.
-For instance, two sections might be the same except for the
-.B record
-option:
-.LP
-.RS
-.EX
-define dumptype normal {
-    comment "Normal backup, no compression, do indexing"
-    no-compress
-    index yes
-    maxdumps 2
-}
-define dumptype testing {
-    comment "Test backup, no compression, do indexing, no recording"
-    normal
-    record no
-}
-.EE
-.RE
-.LP
-Amanda provides a
-.B dumptype
-named
-.I global
-in the sample
-.B amanda.conf
-file that all
-.BR dumptype s
-should reference.
-This provides an easy place to make changes that will affect
-every
-.BR dumptype .
-.SH "TAPETYPE SECTION"
-The
-.B amanda.conf
-file may define multiple types of tape media and devices.
-The information is entered in a
-.B tapetype
-section, which looks like this in the config file:
-.LP
-.RS
-.EX
-define tapetype \fIname\fP {
-    \fItapetype\-option\fP \fItapetype\-value\fP
-    \fI...\fP
-}
-.EE
-.RE
-.LP
-.I Name
-is the name of this type of tape medium/device.
-It is referenced from the
-.B tapetype
-option in the main part of the config file.
-.LP
-The tapetype options and values are:
-.TP
-.BS comment string
-Default:
-.IR none .
-A comment string describing this set of tape information.
-.TP
-.BS filemark int
-Default:
-.IR "1000 bytes" .
-How large a file mark (tape mark) is, measured in bytes.
-If the size is only known in some linear measurement (e.g.\& inches),
-convert it to bytes using the device density.
-.TP
-.BS length int
-Default:
-.IR "2000 kbytes" .
-How much data will fit on a tape.
-.IP
-Note that this value is only used by Amanda to schedule which backups
-will be run.
-Once the backups start, Amanda will continue to write to a tape until
-it gets an error, regardless of what value is entered for
-.B length
-(but see the
-.B OUTPUT DRIVERS
-section later for exceptions).
-.TP
-.BS blocksize int
-Default:
-.IR "32 kbytes" .
-How much data will be written in each tape record.
-The minimum blocksize value is 32 KBytes.
-The maximum blocksize value is @MAXTAPEBLOCKSIZE@ KBytes.
-The maximum is set during configure with --with-maxtapeblocksize.
-.TP
-.BS file-pad boolean
-Default:
-.IR "true" .
-If true, every record, including the last one in the
-file, will have the same length.
-This matches the way Amanda wrote tapes prior to the availability
-of this parameter.
-It may also be useful on devices that only support a fixed blocksize.
-.IP
-Note that the last record on the tape probably includes trailing
-null byte padding, which will be passed back to
-.BR gzip ,
-.B compress
-or the restore program.
-Most programs just ignore this (although possibly with a warning).
-.IP
-If this parameter is false, the last record in a file may be shorter
-than the block size.
-The file will contain the same amount of data the dump program generated,
-without trailing null byte padding.
-When read, the same amount of data that was written will be returned.
-.TP
-.BS speed int
-Default:
-.IR "200 bps" .
-How fast the drive will accept data, in bytes per second.
-This parameter is not currently used by Amanda.
-.TP
-.BS lbl-templ string
-A PostScript template file used by
-.B amreport
-to generate labels.
-Several sample files are provided with the Amanda sources in the
-.I example
-directory.
-See the
-.IR amreport (8)
-man page for more information.
-.LP
-In addition to options, another
-.B tapetype
-name may be entered, which makes this
-.B tapetype
-inherit options from another
-.BR tapetype .
-For instance, the only difference between a DLT4000 tape drive using
-Compact\-III tapes and one using Compact\-IV tapes is the length of
-the tape.
-So they could be entered as:
-.LP
-.RS
-.EX
-define tapetype DLT4000\-III {
-    comment "DLT4000 tape drives with Compact\-III tapes"
-    length 12500 mbytes         # 10 Gig tapes with some compression
-    filemark 2000 kbytes
-    speed 1536 kps
-}
-define tapetype DLT4000\-IV {
-    DLT4000\-III
-    comment "DLT4000 tape drives with Compact\-IV tapes"
-    length 25000 mbytes         # 20 Gig tapes with some compression
-}
-.EE
-.RE
-.SH "INTERFACE SECTION"
-The
-.B amanda.conf
-file may define multiple types of network interfaces.
-The information is entered in an
-.B interface
-section, which looks like this:
-.LP
-.RS
-.EX
-define interface \fIname\fP {
-    \fIinterface\-option\fP \fIinterface\-value\fP
-    \fI...\fP
-}
-.EE
-.RE
-.LP
-.I Name
-is the name of this type of network interface.
-It is referenced from the
-.I disklist
-file.
-.LP
-Note that these sections define network interface characteristics,
-not the actual interface that will be used.
-Nor do they impose limits on the bandwidth that will actually be
-taken up by Amanda.
-Amanda computes the estimated bandwidth each file system backup will take
-based on the estimated size and time,
-then compares that plus any other running
-backups with the limit as another of the criteria when deciding whether
-to start the backup.
-Once a backup starts, Amanda will use as much of the network as it can
-leaving throttling up to the operating system and network hardware.
-.LP
-The interface options and values are:
-.TP
-.BS comment string
-Default:
-.IR none .
-A comment string describing this set of network information.
-.TP
-.BS use int
-Default:
-.IR "300 Kbps" .
-The speed of the interface in Kbytes per second.
-.LP
-In addition to options, another
-.B interface
-name may be entered, which makes this
-.B interface
-inherit options from another
-.BR interface .
-At the moment, this is of little use.
-.SH "DISKLIST FILE"
-The
-.I disklist
-file determines which disks will be backed up by Amanda.
-The file usually contains one line per disk:
-.LP
-.RS
-.I hostname diskname
-[
-.I diskdevice
-]
-.I dumptype
-[
-.I spindle
-[
-.I interface
-] ]
-.RE
-.LP
-All pair [
-.B hostname diskname
-] must be unique.
-.LP
-Lines starting with # are ignored, as are blank lines.
-The fields have the following meanings:
-.TP
-.I hostname
-The name of the host to be backed up.
-If
-.B diskdevice
-refers to a PC share, this is the host Amanda will
-run the Samba
-.B smbclient
-program on to back up the share.
-.TP
-.I diskname
-The name of the disk (a label).
-In most case, you set your
-.B diskname
-to the
-.B diskdevice
-and you don't set the
-.B diskdevice.
-If you want multiple entry with the same
-.B diskdevice,
-you must set a different
-.B diskname
-for each entry. It's the
-.B diskname
-that you use on command line for any amanda command.
-Look at the example/disklist file for example.
-.TP
-.I diskdevice
-Default: same as diskname.
-The name of the disk device to be backed up.
-It may be a full device name,
-a device name without the
-.I /dev/
-prefix, e.g.\&
-.IR sd0a ,
-or a mount point such as
-.IR /usr .
-.IP
-It may also refer to a PC share by starting the name with two (forward)
-slashes, e.g.\&
-.IR //some-pc/home .
-In this case, the
-.B program
-option in the associated
-.B dumptype
-must be entered as
-.BR GNUTAR .
-It is the combination of the double slash disk name and
-.B program GNUTAR
-in the
-.B dumptype
-that triggers the use of Samba.
-.TP
-.I dumptype
-Refers to a
-.B dumptype
-defined in the
-.B amanda.conf
-file.
-.IR Dumptype s
-specify backup related parameters,
-such as whether to compress the backups,
-whether to record backup results in
-.IR /etc/dumpdates ,
-the disk's relative priority,
-etc.
-.TP
-.I spindle
-Default:
-.IR \-1 .
-A number used to balance backup load on a host.
-Amanda will not run multiple backups at the same time
-on the same spindle, unless the spindle number is -1,
-which means there is no spindle restriction.
-.TP
-.I interface
-Default:
-.IR local .
-The name of a network interface definition in the
-.B amanda.conf
-file, used to balance network load.
-.LP
-Instead of naming a
-.BR dumptype ,
-it is possible to define one in-line, enclosing
-.B dumptype
-options within curly braces, one per line, just like a
-.B dumptype
-definition in
-.BR amanda.conf .
-Since pre-existing
-.BR dumptype s
-are valid option names, this syntax may be used to customize
-.BR dumptype s
-for particular disks.
-.LP
-A line break
-.B must
-follow the left curly bracket.
-.LP
-For instance, if a
-.B dumptype
-named
-.I normal
-is used for most disks, but use of the holding disk needs to be disabled
-for the file system that holds it, this would work instead of defining
-a new dumptype:
-.RS
-.EX
-\fIhostname diskname\fP [ \fIdiskdevice\fP ] {
-  normal
-  holdingdisk no
-} [ \fIspindle\fP [ \fIinterface\fP ] ]
-.EE
-.RE
-.LP
-.SH "TAPE MANAGEMENT"
-The
-.I tapelist
-file contains the list of tapes in active use.
-This file is maintained entirely by Amanda and should not be created
-or edited during normal operation.
-It contains lines of the form:
-.LP
-.RS
-.I YYYYMMDD label flags
-.RE
-.LP
-Where
-.I YYYYMMDD
-is the date the tape was written,
-.I label
-is a label for the tape as written by
-.B amlabel
-and
-.I flags
-tell Amanda whether the tape may be reused, etc (see
-the
-.B reuse
-options of
-.BR amadmin ).
-.LP
-.B Amdump
-and
-.B amflush
-will refuse to write to an unlabeled tape,
-or to a labeled tape that is considered active.
-There must be more tapes in active rotation
-(see the
-.B tapecycle
-option)
-than there are runs in the backup cycle
-(see the
-.B dumpcycle
-option)
-to prevent overwriting a backup image that would be needed to
-do a full recovery.
-.SH "OUTPUT DRIVERS"
-The normal value for the
-.B tapedev
-parameter,
-or for what a tape changer returns,
-is a full path name to a non-rewinding tape device,
-such as
-.I /dev/nst0
-or
-.I /dev/rmt/0mn
-or
-.I /dev/nst0.1
-or whatever conventions the operating system uses.
-Amanda provides additional application level drivers that
-support non-tradition tape simulatation or features.
-To access a specific output driver, set
-.B tapedev
-(or configure your changer to return)
-a string of the form
-.I driver\fR:\fIdriver-info
-where
-.I driver
-is one of the supported drivers and
-.I driver-info
-is optional additional information needed by the driver.
-.LP
-The supported drivers are:
-.TP 10
-.I tape
-This is the default driver.
-The
-.I driver-info
-is the tape device name.
-Entering
-.I /dev/rmt/0mn
-is really a short hand for
-.IR tape:/dev/rmt/0mn .
-.TP
-.I null
-This driver throws away anything written to it and returns EOF
-for any reads except a special case is made for reading a label,
-in which case a "fake" value is returned that Amanda checks for
-and allows through regardless of what you have set in
-.BR labelstr .
-The
-.I driver-info
-field is not used and may be left blank:
-.RS
-.IP
-.BS tapedev null:
-.RE
-.IP
-The
-.I length
-value from the associated
-.B tapetype
-is used to limit the amount of data written.
-When the limit is reached, the driver will simulate end of tape.
-.IP
-NOTE: this driver should only be used for debugging and testing,
-and probably only with the
-.B record
-option set to
-.IR no .
-.TP
-.I rait
-\fIR\fRedundant
-\fIA\fRrray
-of
-\fII\fRnexpensive (?)
-\fIT\fRapes.
-Reads and writes tapes mounted on multiple drives by spreading
-the data across N-1 drives and using the last drive for a checksum.
-See docs/RAIT for more information.
-.IP
-The
-.I driver-info
-field describes the devices to use.
-Curly braces indicate multiple replacements in the string.
-For instance:
-.RS
-.IP
-.BS tapedev rait:/dev/rmt/tps0d{4,5,6}n
-.RE
-.IP
-would use the following devices:
-.RS
-.IP
-/dev/rmt/tps0d4n
-.br
-/dev/rmt/tps0d5n
-.br
-/dev/rmt/tps0d6n
-.RE
-.TP
-.I file
-This driver emulates a tape device with a set of files in a directory.
-The
-.I driver-info
-field must be the name of an existing directory.
-The driver will test for a subdirectory of that named
-.I data
-and return
-.B offline
-until it is present.
-When present, the driver uses two files in the
-.I data
-subdirectory for each tape file.
-One contains the actual data.
-The other contains record length information.
-.IP
-The driver uses a file named
-.I status
-in the
-.B file
-device directory to hold driver status information,
-such as tape position.
-If not present, the driver will create it as though the device is rewound.
-.IP
-The
-.I length
-value from the associated
-.B tapetype
-is used to limit the amount of data written.
-When the limit is reached, the driver will simulate end of tape.
-.IP
-One way to use this driver with a real device such as a CD is to
-create a directory for the
-.B file
-device and one or more other directories
-for the actual data.
-Create a symlink named
-.I data
-in the
-.B file
-directory to one of the data directories.
-Set the
-.B tapetype
-length to whatever the medium will hold.
-.IP
-When Amanda fills the
-.B file
-device,
-remove the symlink and (optionally) create a new symlink to another
-data area.
-Use a CD writer software package to burn the image from the first data area.
-.IP
-To read the CD,
-mount it and create the
-.I data
-symlink in the
-.B file
-device directory.
-.SH AUTHORIZATION
-Amanda processes on the tape server host run as the
-.B dumpuser
-user listed in
-.BR amanda.conf .
-When they connect to a backup client, they do so with an Amanda-specific
-protocol.
-They do not, for instance, use
-.B rsh
-or
-.B ssh
-directly.
-.LP
-On the client side, the
-.B amandad
-daemon validates the connection using one of several methods,
-depending on how it was compiled and on options it is passed:
-.LP
-.IP .rhosts
-Even though Amanda does not use
-.BR rsh ,
-it can use
-.BR .rhosts -style
-authentication and a
-.B .rhosts
-file.
-.IP .amandahosts
-This is essentially the same as
-.B .rhosts
-authentication except a different file, with almost the same format, is used.
-This is the default mechanism built into Amanda.
-.IP
-The format of the
-.B .amandahosts
-file is:
-.RS
-.IP
-.I hostname
-[
-.I username
-]
-.RE
-.IP
-If
-.I username
-is ommitted, it defaults to the user running
-.BR amandad ,
-i.e. the user listed in the
-.B inetd
-or
-.B xinetd
-configuration file.
-.IP Kerberos
-Amanda may use the Kerberos authentication system.
-Further information is in the
-.B docs/KERBEROS
-file that comes with an Amanda distribution.
-.LP
-For Samba access,
-Amanda needs a file on the Samba server (which may
-or may not also be the tape server) named
-.B /etc/amandapass
-with share names, (clear text) passwords and (optional) domain names,
-in that order, one per line, whitespace separated.
-By default, the user used to connect to the PC is the same for all
-PC's and is compiled into Amanda.
-It may be changed on a host by host basis
-by listing it first in the password field followed
-by a percent sign and then the password.
-For instance:
-.LP
-.EX
-  //some-pc/home       normalpw
-  //another-pc/disk    otheruser%otherpw
-.EE
-.LP
-With clear text passwords, this file should obviously be tightly protected.
-It only needs to be readable by the Amanda user on the Samba server.
-.LP
-Further information is in the
-.B docs/SAMBA
-file that comes with an Amanda distribution.
-.SH HOST & DISK EXPRESSION
-All host and disk arguments to programs are special expression.
-The command apply to all disk that match your arguments.
-This section describe the matcher.
-.LP
-The matcher match by word, each word is a glob expression, word
-are separated by the separator '.' for host and '/' for disk. You
-can anchor the expression at left with a '^'. You can
-anchor the expression at right with a '$'. The matcher
-is case insensitive for host but is case sensitive for disk. A match
-succeed if all word in your expression match contiguous word in 
-the host or disk.
-.LP
-.EX
- .   word separator for a host
- /   word separator for a disk
- ^   anchor at left
- $   anchor at right
- ?   match exactly one character except the separator
- *   match zero or more characters except the separator
- **  match zero or more characters including the separator
-.EE
-.LP
-.LP
-Some examples:
-.LP
-.EX
-  EXPRESSION      WILL MATCH              WILL NOT MATCH
-  hosta           hosta                   hostb
-                  hoSTA.dOMAIna.ORG
-                  foo.hosta.org
-  host            host                    hosta
-  host?           hosta                   host
-                  hostb
-  ho*na           hoina                   ho.aina.org
-  ho**na          hoina
-                  ho.aina.org
-  ^hosta          hosta                   foo.hosta.org
-  sda*            /dev/sda1
-                  /dev/sda12
-  /opt/           opt (disk)              opt (host)
-  .opt.           opt (host)              opt (disk)
-  /               /                       any other disk
-  /usr            /usr
-                  /usr/opt
-  /usr$           /usr                    /usr/opt
-
-.EE
-.SH DATESTAMP EXPRESSION
-A
-.I datestamp
-expression is a range expression where we only match the prefix.
-Leading ^ is removed. Trailing $ force an exact match.
-.LP
-.EX
-  20001212-14  match all dates beginning with 20001212, 20001213 or 20001214
-  20001212-4   same as previous
-  20001212-24  match all dates between 20001212 and 20001224
-  2000121      match all dates that start with 2000121 (20001210-20001219)
-  2            match all dates that start with 2 (20000101-29991231)
-  2000-10      match all dates between 20000101-20101231
-  200010$      match only 200010
-.EE
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amadmin(8),
-amcheck(8),
-amcheckdb(8),
-amcleanup(8),
-amdd(8),
-amdump(8),
-amflush(8),
-amgetconf(8),
-amlabel(8),
-ammt(8),
-amoverview(8),
-amplot(8),
-amrecover(8),
-amreport(8),
-amrestore(8),
-amrmtape(8),
-amstatus(8),
-amtape(8),
-amtoc(8),
-amverify(8),
-amverifyrun(8)
diff --git a/man/amcheck.8 b/man/amcheck.8
new file mode 100644 (file)
index 0000000..75cb5c8
--- /dev/null
@@ -0,0 +1,393 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMCHECK" 8 "" "" ""
+.SH NAME
+amcheck \- run AMANDA self-checks
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 8
+\fBamcheck\fR [\-mwsclt] [\-Maddress] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmcheck\fR runs a number of self\-checks on both the \fBAMANDA\fR tape server host and the \fBAMANDA\fR client hosts\&.
+
+.PP
+On the tape server host, \fBamcheck\fR can go through the same tape checking used at the start of the nightly \fBamdump\fR run to verify the correct tape for the next run is mounted\&.
+
+.PP
+\fBAmcheck\fR can also do a self\-check on all client hosts to make sure each host is running and that permissions on filesystems to be backed up are correct\&.
+
+.PP
+You can specify many host/disk expressions, only disks that match an expression will be checked\&. All disks are checked if no expressions are given\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-s\fR
+Run the tape server local and tape checks (same as \fB\-lt\fR)\&.
+
+.TP
+\fB\-c\fR
+Run the client host checks\&.
+
+.TP
+\fB\-l\fR
+Run the local tests (e\&.g\&. permissions) on the server host\&.
+
+.TP
+\fB\-t\fR
+Run the tape tests on the server host\&.
+
+.TP
+\fB\-w\fR
+Enables a destructive check for write\-protection on the tape (which would otherwise cause the subsequent \fBamdump\fR 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 implies \fB\-t\fR and is only made if the tape is otherwise correct\&.
+
+.TP
+\fB\-m\fR
+Nothing is printed, but mail is sent if any errors are detected\&. The mail goes to the \fBmailto\fR address specified in the \fBamanda\&.conf\fR file or the \fBaddress\fR value if \fB\-M\fR is set\&.
+
+.TP
+\fB\-a\fR
+Like \fB\-m\fR but the mail is always sent\&.
+
+.TP
+\fB\-M\fR\fIaddress\fR
+Mail the report to \fBaddress\fR instead of the \fBmailto\fR value from \fBamanda\&.conf\fR\&. Implies \fB\-m\fR\&.
+
+.PP
+The default is \fB\-cs\fR\&.
+
+.SH "EXAMPLES"
+
+.PP
+In this example, both the tape server and client tests are run\&. The results are displayed on standard output\&.
+.nf
+
+% amcheck daily
+\fBAMANDA\fR Tape Server Host Check
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+/amanda2/amanda/work: 911475 KB disk space available, that's plenty\&.
+NOTE: skipping tape\-writable test\&.
+Tape VOL10 label ok\&.
+Server check took 34\&.966 seconds\&.
+
+\fBAMANDA\fR 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 \fBAMANDA\fR 2\&.4\&.5) 
+.fi
+
+.PP
+In this example, if the line \fBmailto csd\-amanda\fR is in \fBamanda\&.conf\fR, mail will be sent to \fBcsd\-amanda\fR if the server check returns an error\&.
+.nf
+
+% amcheck \-s \-m daily 
+.fi
+
+.SH "MESSAGES"
+
+.TP
+fatal slot \fBslot\fR: \fBerror message\fR
+(error) The tape changer detected some kind of fatal error while trying to load slot \fBslot\fR\&.
+
+.TP
+slot \fBslot\fR: \fBerror message\fR
+(warning) The tape changer detected some kind of non\-fatal error (e\&.g\&. an empty slot was detected) while trying to load slot \fBslot\fR, or an error was detected trying to read the tape label\&.
+
+.TP
+slot \fBslot\fR: date \fBYYYYMMDD\fR label \fBlabel\fR (\fBresult\fR)
+(info) Tape \fBlabel\fR in slot \fBslot\fR was loaded and found to have been last written on \fBYYYYMMDD\fR\&. If the tape is new, the date field will be an \fBX\fR\&. The \fBresult\fR may be one of:
+
+.RS
+
+.TP
+exact label match
+This is the expected tape\&.
+
+.TP
+no match
+This label does not match the \fBlabelstr\fR pattern in \fBamanda\&.conf\fR\&. Tape scanning will continue\&.
+
+.TP
+active tape
+This tape is still active and cannot be overwritten\&. Tape scanning will continue\&.
+
+.TP
+first labelstr match
+This tape is the first one that matches the \fBlabelstr\fR pattern in \fBamanda\&.conf\fR\&. Tape scanning will continue if necessary\&.
+
+.TP
+labelstr match
+This tape is the next one that matches the \fBlabelstr\fR pattern in \fBamanda\&.conf\fR\&. Tape scanning will continue\&.
+
+.RE
+.IP
+
+.TP
+ERROR: cannot look up dump user \fBuser\fR
+(error) Dump user \fBuser\fR from \fBamanda\&.conf\fR could not be found in the system password information\&.
+
+.TP
+ERROR: cannot look up my own uid (\fBuid\fR)
+(error) User id \fBuid\fR running \fBamcheck\fR could not be found in the system password information\&.
+
+.TP
+ERROR: running as user \fBrunuser\fR instead of \fBdumpuser\fR
+(error) \fBAmcheck\fR should be run as the dump user \fBdumpuser\fR from \fBamanda\&.conf\fR instead of \fBrunuser\fR\&.
+
+.TP
+ERROR: program dir \fBdirectory\fR: not accessible
+(error) The directory \fBAMANDA\fR expects to find its auxiliary programs in, \fBdirectory\fR, is not accessible\&.
+
+.TP
+ERROR: program \fBprogram\fR: does not exist
+(error) Program \fBprogram\fR needed on the tape server could not be found\&.
+
+.TP
+ERROR: program \fBprogram\fR: not a file
+(error) Program \fBprogram\fR needed on the tape server exists but is not a file\&.
+
+.TP
+ERROR: program \fBprogram\fR: not executable
+(error) Program \fBprogram\fR needed on the tape server exists but is not executable\&.
+
+.TP
+WARNING: program \fBprogram\fR: not setuid\-root
+(warning) Program \fBprogram\fR needed on the tape server exists but should be owned by user "root" and setuid\&.
+
+.TP
+ERROR: \fBXXX\fR dir \fBdirectory\fR: not writable
+(error) Directory \fBdirectory\fR is either not writable, i\&.e\&. the dump user will not be able to create or remove files, or cannot be accessed, perhaps because a parent directory does not allow search permission\&. The \fBXXX\fR may be:
+
+.RS
+
+.TP
+log
+for the \fBAMANDA\fR log directory (see \fBlogdir\fR in \fBamanda\&.conf\fR)
+
+.TP
+oldlog
+for the directory that holds the old log files (see \fBlogdir\fR in \fBamanda\&.conf\fR)
+
+.TP
+info
+for an \fBAMANDA\fR database information directory (see \fBcurinfo\fR in \fBamanda\&.conf\fR) or
+
+.TP
+index
+for an \fBAMANDA\fR index directory (see \fBindexdir\fR in \fBamanda\&.conf\fR)
+
+.TP
+tapelist
+for the \fBAMANDA\fR tapelist directory (see \fBtapelist\fR in \fBamanda\&.conf\fR)
+
+.RE
+.IP
+
+.TP
+NOTE: \fBXXX\fR dir \fBdirectory\fR: does not exist
+(info) A database (info) or index directory does not exist or cannot be accessed\&. This might just mean this is a new client or disk, but if that is not the case, this should be treated as an error\&.
+
+.TP
+NOTE: it will be created on the next run
+(info) This indicates the info directory listed in the previous message will be created on the next run\&.
+
+.TP
+ERROR: \fBXXX\fR dir \fBname\fR: not a directory
+(error) \fBAmcheck\fR expected \fBname\fR to be a directory, but it is something else (e\&.g\&. file)\&.
+
+.TP
+WARNING: info file \fIfile\fR: does not exist
+(warning) File \fBfile\fR does not exist in the text format database\&. Since the parent directories do exist, the file should already have been created\&.
+
+.TP
+ERROR: info file \fIname\fR: not a file
+(error) \fBAmcheck\fR expected \fBname\fR to be a file, but it is something else (e\&.g\&. file)\&.
+
+.TP
+ERROR: info file \fIfile\fR: not readable
+(error) The text format database file \fBfile\fR is not readable\&.
+
+.TP
+ERROR: log file \fIfile\fR: not writable
+(error) Log file \fBfile\fR (file \fBlog\fR in \fBlogdir\fR from \fBamanda\&.conf\fR) is either not writable, or cannot be accessed, perhaps because a parent directory does not allow search permission\&.
+
+.TP
+ERROR: tape list \fBtapelist\fR: not writable
+(error) \fBAMANDA\fR tape list file \fBtapelist\fR (see \fBtapelist\fR in \fBamanda\&.conf\fR) is not writable or was not found\&.
+
+.TP
+ERROR: tape list \fBtapelist\fR: parse error
+(error) \fBAMANDA\fR tape list file \fBtapelist\fR (see \fBtapelist\fR in \fBamanda\&.conf\fR) could not be read or parsed\&.
+
+.TP
+WARNING: tapedev is /dev/null, dumps will be thrown away
+(warning) The \fBtapedev\fR parameter in \fBamanda\&.conf\fR is set to \fI/dev/null\fR and \fBAMANDA\fR uses that when debugging to throw all the dump images away\&.
+
+.TP
+WARNING: hold file \fIfile\fR exists
+(info) Hold file \fBfile\fR exists and will cause \fBamdump\fR to pause at the beginning until it is removed\&.
+
+.TP
+ERROR: holding disk \fBdisk\fR: statfs: \fBerror message\fR
+(error) An error was returned from the \fBstatfs\fR system call on holding disk \fBdisk\fR (maybe because it does not exist)\&.
+
+.TP
+ERROR: holding disk \fBdisk\fR: not writable
+(error) Holding disk \fBdisk\fR, is not writable, probably because the caller does not have write permission or a parent directory does not allow search permission\&.
+
+.TP
+WARNING: holding disk \fBdisk\fR: available space unknown \fBN\fR KB requested\&.
+(warning) \fBAmcheck\fR could not determine the amount of available space on holding disk \fBdisk\fR to see if there were at least \fBN\fR KBytes available\&.
+
+.TP
+WARNING: holding disk \fBdisk\fR: only \fBF\fR KB free (\fBR\fR KB requested)\&.
+(warning) \fBamanda\&.conf\fR requested \fBR\fR KBytes of free space on holding disk \fBdisk\fR, but only \fBF\fR KBytes were available\&. 10 MBytes is subtracted for each backup process (see the \fBinparallel\fR  \fBamanda\&.conf\fR option) to allow for unexpected overruns\&.
+
+.RS
+.Sh "Note"
+Even though this message is listed as a warning, it causes  \fBamcheck\fR to exit with a non\-zero status\&.
+.RE
+
+.TP
+Holding disk \fBdisk\fR: \fBN\fR KB disk space available, that's plenty\&.
+(info) There was sufficient free space on holding disk \fBdisk\fR\&.
+
+.TP
+WARNING: holding disk \fBdisk\fR: only \fBF\fR KB free, using nothing
+(warning) Holding disk \fBdisk\fR has \fBF\fR KBytes of free space, but that is not enough for what is requested in \fBamanda\&.conf\fR\&.
+
+.TP
+Holding disk \fBdisk\fR: \fBF\fR KB disk space available, using \fBU\fR KB
+(info) Holding disk \fBdisk\fR has \fBF\fR KBytes of free space and \fBAMANDA\fR will be using up to \fBU\fR Kbytes\&.
+
+.TP
+WARNING: if a tape changer is not available, runtapes must be set to 1\&.
+(warning) The \fBruntapes\fR  \fBamanda\&.conf\fR option must be set to 1 if the \fBtpchanger\fR  \fBamanda\&.conf\fR option is not set\&.
+
+.TP
+ERROR: \fBerror message\fR\&.
+(error) An error was detected while initializing the tape changer\&.
+
+.TP
+ERROR: \fBtape device\fR: \fBerror message\fR\&.
+(error) An error was detected while processing the tape label\&.
+
+.TP
+ERROR: cannot overwrite active tape \fBlabel\fR\&.
+(error) Tape \fBlabel\fR is still active and cannot be used\&.
+
+.TP
+ERROR: label \fBlabel\fR doesn't match labelstr \fBpattern\fR \&.
+(error) The label on tape \fBlabel\fR does not match the \fBlabelstr\fR  \fBamanda\&.conf\fR option\&.
+
+.TP
+(expecting a new tape)
+(info) The tape is not OK and a new tape was expected\&.
+
+.TP
+(expecting tape \fBlabel\fR or a new tape)
+(info) The tape is not OK and either tape \fBlabel\fR or a new tape was expected\&.
+
+.TP
+ERROR: tape \fBlabel\fR label ok, but is not writable\&.
+(error) Tape \fBlabel\fR is OK, but the write enable test failed\&.
+
+.TP
+Tape \fBlabel\fR is writable\&.
+(info) Tape \fBlabel\fR is OK and the write enable test succeeded\&.
+
+.TP
+NOTE: skipping tape\-writable test\&.
+(info) The tape write test (see the \fB\-w\fR option) was not enabled\&.
+
+.TP
+WARNING: skipping tape test because amdump or amflush seem to be running, WARNING: if they are not, you must run amcleanup, 
+(warning) It looked to \fBamcheck\fR like either \fBamdump\fR or \fBamflush\fR were running because a log file or amdump file exists\&. If they are not running, you probably need to run \fBamcleanup\fR to clear up a previous failure\&. Otherwise, you need to wait until they complete before running \fBamcheck\fR\&.
+
+.TP
+NOTE: skipping tape checks
+(info) The tape tests are being skipped because you used the \fB\-t\fR command line option\&.
+
+.TP
+WARNING: \fBcompress\fR is not executable, server\-compression and indexing will not work
+(warning) Compression program \fBcompress\fR is not executable, so compression on the tape server host and creating index files will not work\&.
+
+.TP
+Tape \fBlabel\fR label ok\&.
+(info) Tape \fBlabel\fR is OK for the next run\&.
+
+.TP
+Server check took \fBS\fR seconds\&.
+(info) Reports how long the tape server host checks took\&.
+
+.TP
+ERROR: \fBhost\fR: could not resolve hostname
+(error) Could not look up client hostname \fBhost\fR\&.
+
+.TP
+Client check: \fBH\fR hosts checked in \fBS\fR seconds, \fBN\fR problems found\&.
+(info) Reports the number of client hosts checked, how long it took and the number of errors detected\&.
+
+.TP
+WARNING: \fBhost\fR: selfcheck request timed out\&. Host down?
+(warning) There was no response from \fBhost\fR when trying to do the client checks\&. The host might really be down or it might not be configured properly\&.
+
+.TP
+ERROR: \fBhost\fR NAK: \fBmessage\fR
+(error) \fBHost\fR reported a negative acknowledgment error of \fBmessage\fR to the status check request\&.
+
+.TP
+ERROR: \fBhost\fR NAK: [NAK parse failed]
+(error) \fBAmcheck\fR could not parse the negative acknowledgment error from \fBhost\fR\&. There might be an \fBAMANDA\fR version mismatch between the host running \fBamcheck\fR and \fBhost\fR\&.
+
+.TP
+ERROR: \fBhost\fR [mutual\-authentication failed]
+(error) Kerberos authentication failed while contacting \fBhost\fR\&.
+
+.TP
+ERROR: \fBhost\fR: \fBmessage\fR
+(error) Error \fBmessage\fR was reported by the status check on \fBhost\fR\&.
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8)
+
diff --git a/man/amcheck.8.in b/man/amcheck.8.in
deleted file mode 100644 (file)
index 0cdc22a..0000000
+++ /dev/null
@@ -1,628 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMCHECK 8
-.SH NAME
-amcheck \- run Amanda self\-checks
-.SH SYNOPSIS
-.B amcheck
-[
-.B \-mwsclt
-]
-[
-.BI \-M address
-]
-.I config
-[
-.I host
-[
-.I disk
-]*
-]*
-.SH DESCRIPTION
-.B Amcheck
-runs a number of self\-checks on both the Amanda tape server host and
-the Amanda client hosts.
-.LP
-On the tape server host,
-.B amcheck
-can go through the same tape checking used at the start of the nightly
-.B amdump
-run to verify the correct tape for the next run is mounted.
-.LP
-.B Amcheck
-can also do a self\-check on all client hosts
-to make sure each host is running and that permissions
-on filesystems to be backed up are correct.
-.LP
-You can specify many host/disk expressions, only  disks that
-match an expression will be checked. All disk are checked if no
-expression are given.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-.TP
-.B \-s
-Run the tape server local and tape checks
-(same as
-.BR \-lt ).
-.TP
-.B \-c
-Run the client host checks.
-.TP
-.B \-l
-Run the local tests (e.g. permissions) on the server host.
-.TP
-.B \-t
-Run the tape tests on the server host.
-.TP
-.B \-w
-Enables a destructive check for write\-protection on the
-tape (which would otherwise cause the subsequent
-.B 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 implies
-.B \-t
-and is only made if the tape is otherwise correct.
-.TP
-.B \-m
-Nothing is printed, but mail is sent
-if any errors are detected.
-The mail goes to the
-.B mailto
-address specified in the
-.I amanda.conf
-file or the
-.I address
-value if
-.B \-M
-is set.
-.TP
-.B \-a
-Like
-.B \-m
-but the mail is always sent.
-.TP
-.BI \-M address
-Mail the report to
-.I address
-instead of the
-.B mailto
-value from
-.IR amanda.conf .
-Implies
-.BR \-m .
-.LP
-The default is
-.BR \-cs .
-.SH EXAMPLES
-In this example, both the tape server and client tests are run.
-The results are displayed on standard output.
-.LP
-.RS
-.EX
-% amcheck @DEFAULT_CONFIG@
-Amanda Tape Server Host Check
------------------------------
-/amanda2/amanda/work: 911475 KB disk space available, that's plenty.
-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.2)
-.EE
-.RE
-.LP
-In this example, if the line
-.B mailto csd-amanda
-is in
-.IR amanda.conf ,
-mail will be sent to
-.B csd-amanda
-if the server check returns an error.
-.LP
-.RS
-.EX
-% amcheck \-s \-m @DEFAULT_CONFIG@
-.EE
-.RE
-.SH MESSAGES
-.TP
-fatal slot \fIslot\fP: \fIerror message\fP
-(error)
-The tape changer detected some kind of fatal error
-while trying to load slot
-.IR slot .
-.TP
-slot \fIslot\fP: \fIerror message\fP
-(warning)
-The tape changer detected some kind of non-fatal error
-(e.g. an empty slot was detected)
-while trying to load slot
-.IR slot ,
-or an error was detected trying to read the tape label.
-.TP
-slot \fIslot\fP: date \fIYYYYMMDD\fP label \fIlabel\fP (\fIresult\fP)
-(info)
-Tape
-.I label
-in slot
-.I slot
-was loaded and found to have been last written on
-.IR YYYYMMDD .
-If the tape is new, the date field will be an
-.IR X .
-The
-.I result
-may be one of:
-.RS
-.TP
-exact label match
-This is the expected tape.
-.TP
-no match
-This label does not match the
-.B labelstr
-pattern in
-.IR amanda.conf .
-Tape scanning will continue.
-.TP
-active tape
-This tape is still active and cannot be overwritten.
-Tape scanning will continue.
-.TP
-first labelstr match
-This tape is the first one that matches the
-.B labelstr
-pattern in
-.IR amanda.conf .
-Tape scanning will continue if necessary.
-.TP
-labelstr match
-This tape is the next one that matches the
-.B labelstr
-pattern in
-.IR amanda.conf .
-Tape scanning will continue.
-.RE
-.TP
-ERROR: cannot look up dump user "\fIuser\fP"
-(error)
-Dump user
-.I user
-from
-.I amanda.conf
-could not be found in the system password information.
-.TP
-ERROR: cannot look up my own uid (\fIuid\fP)
-(error)
-User id
-.I uid
-running
-.B amcheck
-could not be found in the system password information.
-.TP
-ERROR: running as user "\fIrunuser\fP" instead of "\fIdumpuser\fP"
-(error)
-.B Amcheck
-should be run as the dump user
-.I dumpuser
-from
-.I amanda.conf
-instead of
-.IR runuser .
-.TP
-ERROR: program dir \fIdirectory\fP: not accessible
-(error)
-The directory Amanda expects to find its auxiliary programs in,
-.IR directory ,
-is not accessible.
-.TP
-ERROR: program \fIprogram\fP: does not exist
-(error)
-Program
-.I program
-needed on the tape server could not be found.
-.TP
-ERROR: program \fIprogram\fP: not a file
-(error)
-Program
-.I program
-needed on the tape server exists but is not a file.
-.TP
-ERROR: program \fIprogram\fP: not executable
-(error)
-Program
-.I program
-needed on the tape server exists but is not executable.
-.TP
-WARNING: program \fIprogram\fP: not setuid-root
-(warning)
-Program
-.I program
-needed on the tape server exists but should be owned by user "root"
-and setuid.
-.TP
-ERROR: \fIXXX\fP dir \fIdirectory\fP: not writable
-(error)
-Directory
-.I directory
-is either not writable,
-i.e. the dump user will not be able to create or remove files,
-or cannot be accessed, perhaps because a parent directory
-does not allow search permission.
-The
-.I XXX
-may be:
-.RS
-.TP
-log
-for the Amanda log directory (see
-.B logdir
-in
-.BR amanda.conf )
-.TP
-oldlog
-for the directory that holds the old log files (see
-.B logdir
-in
-.BR amanda.conf )
-.TP
-info
-for an Amanda database information directory (see
-.B curinfo
-in
-.BR amanda.conf )
-or
-.TP
-index
-for an Amanda index directory (see
-.B indexdir
-in
-.BR amanda.conf )
-.TP
-tapelist
-for the Amanda tapelist directory (see
-.B tapelist
-in
-.BR amanda.conf )
-.RE
-.TP
-NOTE: \fIXXX\fP dir \fIdirectory\fP: does not exist
-(info)
-A database (info) or index directory does not exist or cannot be accessed.
-This might just mean this is a new client or disk,
-but if that is not the case,
-this should be treated as an error.
-.TP
-NOTE: it will be created on the next run
-(info)
-This indicates the info directory listed in the previous message
-will be created on the next run.
-.TP
-ERROR: \fIXXX\fP dir \fIname\fP: not a directory
-(error)
-.B Amcheck
-expected
-.I name
-to be a directory,
-but it is something else (e.g. file).
-.TP
-WARNING: info file \fIfile\fP: does not exist
-(warning)
-File
-.I file
-does not exist in the text format database.
-Since the parent directories do exist,
-the file should already have been created.
-.TP
-ERROR: info file \fIname\fP: not a file
-(error)
-.B Amcheck
-expected
-.I name
-to be a file,
-but it is something else (e.g. file).
-.TP
-ERROR: info file \fIfile\fP: not readable
-(error)
-The text format database file
-.I file
-is not readable.
-.TP
-ERROR: log file \fIfile\fP: not writable
-(error)
-Log file
-.I file
-(file
-.B log
-in
-.B logdir
-from
-.BR amanda.conf )
-is either not writable,
-or cannot be accessed, perhaps because a parent directory
-does not allow search permission.
-.TP
-ERROR: tape list \fItapelist\fP: not writable
-(error)
-Amanda tape list file
-.I tapelist
-(see
-.B tapelist
-in
-.BR amanda.conf )
-is not writable or was not found.
-.TP
-ERROR: tape list \fItapelist\fP: parse error
-(error)
-Amanda tape list file
-.I tapelist
-(see
-.B tapelist
-in
-.BR amanda.conf )
-could not be read or parsed.
-.TP
-WARNING: tapedev is /dev/null, dumps will be thrown away
-(warning)
-The
-.B tapedev
-parameter in
-.B amanda.conf
-is set to
-.B /dev/null
-and Amanda uses that when debugging to throw all the dump images away.
-.TP
-WARNING: hold file \fIfile\fP exists
-(info)
-Hold file
-.I file
-exists and will cause
-.B amdump
-to pause at the beginning until it is removed.
-.TP
-ERROR: holding disk \fIdisk\fP: statfs: \fIerror message\fP
-(error)
-An error was returned from the
-.I statfs
-system call on holding disk
-.I disk
-(maybe because it does not exist).
-.TP
-ERROR: holding disk \fIdisk\fP: not writable
-(error)
-Holding disk
-.IR disk ,
-is not writable,
-probably because the caller does not have write permission
-or a parent directory does not allow search permission.
-.TP
-WARNING: holding disk \fIdisk\fP: available space unknown \fIN\fP KB requested.
-(warning)
-.B Amcheck
-could not determine the amount of available space on holding disk
-.I disk
-to see if there were at least
-.I N
-KBytes available.
-.TP
-WARNING: holding disk \fIdisk\fP: only \fIF\fP KB free (\fIR\fP KB requested).
-(warning)
-.I Amanda.conf
-requested
-.I R
-KBytes of free space on holding disk
-.IR disk ,
-but only
-.I F
-KBytes were available.
-10 MBytes is subtracted for each backup process
-(see the
-.B inparallel
-.I amanda.conf
-option)
-to allow for unexpected overruns.
-.IP
-Note:
-even though this message is listed as a warning, it causes
-.B amcheck
-to exit with a non-zero status.
-.TP
-Holding disk \fIdisk\fP: \fIN\fP KB disk space available, that's plenty.
-(info)
-There was sufficient free space on holding disk
-.IR disk .
-.TP
-WARNING: holding disk \fIdisk\fP: only \fIF\fP KB free, using nothing
-(warning)
-Holding disk
-.I disk
-has
-.I F
-KBytes of free space, but that is not enough for what is requested in
-.IR amanda.conf .
-.TP
-Holding disk \fIdisk\fP: \fIF\fP KB disk space available, using \fIU\fP KB
-(info)
-Holding disk
-.I disk
-has
-.I F
-KBytes of free space and Amanda will be using up to
-.I U
-Kbytes.
-.TP
-WARNING: if a tape changer is not available, runtapes must be set to 1.
-(warning)
-The
-.B runtapes
-.I amanda.conf
-option must be set to 1 if the
-.B tpchanger
-.I amanda.conf
-option is not set.
-.TP
-ERROR: \fIerror message\fP.
-(error)
-An error was detected while initializing the tape changer.
-.TP
-ERROR: \fItape device\fP: \fIerror message\fP.
-(error)
-An error was detected while processing the tape label.
-.TP
-ERROR: cannot overwrite active tape \fIlabel\fP.
-(error)
-Tape
-.I label
-is still active and cannot be used.
-.TP
-ERROR: label \fIlabel\fP doesn't match labelstr "\fIpattern\fP".
-(error)
-The label on tape
-.I label
-does not match the
-.B labelstr
-.I amanda.conf
-option.
-.TP
-(expecting a new tape)
-(info)
-The tape is not OK and a new tape was expected.
-.TP
-(expecting tape \fIlabel\fP or a new tape)
-(info)
-The tape is not OK and either tape
-.I label
-or a new tape was expected.
-.TP
-ERROR: tape \fIlabel\fP label ok, but is not writable.
-(error)
-Tape
-.I label
-is OK, but the write enable test failed.
-.TP
-Tape \fIlabel\fP is writable.
-(info)
-Tape
-.I label
-is OK and the write enable test succeeded.
-.TP
-NOTE: skipping tape-writable test.
-(info)
-The tape write test (see the
-.B \-w
-option) was not enabled.
-.TP
-WARNING: skipping tape test because amdump or amflush seem to be running
-.TP
-WARNING: if they are not, you must run amcleanup
-(warning)
-It looked to
-.B amcheck
-like either
-.B amdump
-or
-.B amflush
-were running because a log file or amdump file exists.
-If they are not running, you probably need to run
-.B amcleanup
-to clear up a previous failure.
-Otherwise, you need to wait until they complete before running
-.BI amcheck .
-.TP
-NOTE: skipping tape checks
-(info)
-The tape tests are being skipped because you used the
-.B \-t
-command line option.
-.TP
-WARNING: \fIcompress\fP is not executable, server-compression and indexing will not work
-(warning)
-Compression program
-.I compress
-is not executable,
-so compression on the tape server host and creating index files will not work.
-.TP
-Tape \fIlabel\fP label ok.
-(info)
-Tape
-.I label
-is OK for the next
-run.
-.TP
-Server check took \fIS\fP seconds.
-(info)
-Reports how long the tape server host checks took.
-.TP
-ERROR: \fIhost\fP: could not resolve hostname
-(error)
-Could not look up client hostname
-.IR host .
-.TP
-Client check: \fIH\fP hosts checked in \fIS\fP seconds, \fIN\fP problems found.
-(info)
-Reports the number of client hosts checked,
-how long it took and the number of errors detected.
-.TP
-WARNING: \fIhost\fP: selfcheck request timed out.  Host down?
-(warning)
-There was no response from
-.I host
-when trying to do the client checks.
-The host might really be down or it might not be configured properly.
-.TP
-ERROR: \fIhost\fP NAK: \fImessage\fP
-(error)
-.I Host
-reported a negative acknowledgment error of
-.I message
-to the status check request.
-.TP
-ERROR: \fIhost\fP NAK: [NAK parse failed]
-(error)
-.B Amcheck
-could not parse the negative acknowledgment error from
-.IR host .
-There might be an Amanda version mismatch between the host running
-.B amcheck
-and
-.IR host .
-.TP
-ERROR: \fIhost\fP [mutual-authentication failed]
-(error)
-Kerberos authentication failed while contacting
-.IR host .
-.TP
-ERROR: \fIhost\fP: \fImessage\fP
-(error)
-Error
-.I message
-was reported by the status check on
-.IR host .
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8),
-amdump(8)
diff --git a/man/amcheckdb.8 b/man/amcheckdb.8
new file mode 100644 (file)
index 0000000..d5f4b4c
--- /dev/null
@@ -0,0 +1,70 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMCHECKDB" 8 "" "" ""
+.SH NAME
+amcheckdb \- check AMANDA database for tape consistency
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 10
+\fBamcheckdb\fR \fIconfig\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmcheckdb\fR verifies that every tape mentioned in the \fBAMANDA\fR database is still valid in the \fBtapelist\fR file\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLE"
+
+.PP
+This shows a normal response:
+.nf
+
+# amcheckdb daily
+Ready\&.
+.fi
+
+.PP
+This shows tape \fBDMP014\fR is still listed in the database but is no longer listed in the \fBtapelist\fR file:
+.nf
+
+# amcheckdb daily
+Tape DMP014 missing in /usr/local/etc/amanda//daily/tapelist
+Ready\&.
+.fi
+
+.SH "AUTHOR"
+
+.PP
+Adrian T\&. Filipi\-Martin <atf3r@cs\&.virginia\&.edu>: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamadmin\fR(8), \fBamrmtape\fR(8), \fBamanda\fR(8)
+
diff --git a/man/amcheckdb.8.in b/man/amcheckdb.8.in
deleted file mode 100644 (file)
index b2f5ee7..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMCHECKDB 8
-.SH NAME
-amcheckdb \- check Amanda database for tape consistency
-.SH SYNOPSIS
-.B amcheckdb
-.I config
-.SH DESCRIPTION
-.B Amcheckdb
-verifies that every tape mentioned in the Amanda database
-is still valid in the
-.I tapelist
-file.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLE
-This shows a normal response:
-.LP
-.RS
-.EX
-# amcheckdb @DEFAULT_CONFIG@
-Ready.
-.EE
-.RE
-.LP
-This shows tape
-.I DMP014
-is still listed in the database but is no longer listed in the
-.I tapelist
-file:
-.LP
-.RS
-.EX
-# amcheckdb @DEFAULT_CONFIG@
-Tape DMP014 missing in @CONFIG_DIR@/@DEFAULT_CONFIG@/tapelist
-Ready.
-.EE
-.RE
-.SH AUTHOR
-Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
-.SH "SEE ALSO"
-amadmin(8),
-amrmtape(8),
-amanda(8)
diff --git a/man/amcleanup.8 b/man/amcleanup.8
new file mode 100644 (file)
index 0000000..d924605
--- /dev/null
@@ -0,0 +1,74 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMCLEANUP" 8 "" "" ""
+.SH NAME
+amcleanup \- run the AMANDA cleanup process after a failure
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 10
+\fBamcleanup\fR \fIconfig\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmcleanup\fR generates the \fB\fBAMANDA\fR Mail Report\fR and updates the \fBAMANDA\fR databases after a system failure on a tape server host\&. This cleanup process is normally done automatically as part of the \fBamdump\fR program, but if \fBamdump\fR cannot complete for some reason (usually because of a tape server host crash), \fBamcleanup\fR must be run some time later (usually during system boot)\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLES"
+
+.PP
+This example runs the \fBAMANDA\fR cleanup process by hand after a failure\&.
+.nf
+
+% amcleanup daily
+.fi
+
+.PP
+Putting the following line in a system boot script (e\&.g\&. \fI/etc/rc\&.local\fR) runs the \fBAMANDA\fR cleanup process as part of the reboot, eliminating the need to run it by hand\&.
+.nf
+
+/usr/local/sbin/amcleanup daily
+.fi
+
+.PP
+If nothing needs to be done, \fBamcleanup\fR exits normally with the message:
+.nf
+
+amcleanup: no unprocessed logfile to clean up\&.
+.fi
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org>: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8)
+
diff --git a/man/amcleanup.8.in b/man/amcleanup.8.in
deleted file mode 100644 (file)
index d0c8dba..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMCLEANUP 8
-.SH NAME
-amcleanup \- run the Amanda cleanup process after a failure
-.SH SYNOPSIS
-.B amcleanup
-.I config
-.SH DESCRIPTION
-.B Amcleanup
-generates the
-.I Amanda Mail Report
-and updates the Amanda databases after a system failure on a tape server host.
-This cleanup process is normally done automatically as part of the
-.B amdump
-program, but if
-.B amdump
-cannot complete for some reason (usually because of a tape server host crash),
-.B amcleanup
-must be run some time later
-(usually during system boot).
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLES
-This example runs the Amanda cleanup process by hand after
-a failure.
-.LP
-.RS
-.EX
-% amcleanup @DEFAULT_CONFIG@
-.EE
-.RE
-.LP
-Putting the following line in a system boot script (e.g.\&
-.IR /etc/rc.local )
-runs the Amanda cleanup process as part of the reboot,
-eliminating the need to run it by hand.
-.LP
-.RS
-.EX
-.ie '@sbindir@'${exec_prefix}/sbin' \{\
-.ie '@exec_prefix@'${prefix}' .ds pr @prefix@/sbin
-.el .ds pr @exec_prefix@/sbin\}
-.el .ds pr @sbindir@
-\*(pr/amcleanup @DEFAULT_CONFIG@
-.EE
-.RE
-.LP
-If nothing needs to be done,
-.B amcleanup
-exits normally with the message:
-.LP
-.RS
-.EX
-amcleanup: no unprocessed logfile to clean up.
-.EE
-.RE
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8),
-amdump(8)
index 9a88e3141792c9089d3fd9a6c9a14e11d68f1766..39e8f183115281f9e32678d56ed9de537f733497 100644 (file)
-.\"
-.de CO
-\fB\\$1\fP \fI\\$2\fP
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
 ..
-.TH AMDD 8
-.SH NAME
-amdd \- Amanda version of dd
-.SH SYNOPSIS
-.B amdd
-[
-.B -d
-]
-[
-.B if=\fIinput
-]
-[
-.B of=\fIoutput
-]
-[
-.B bs=\fIblocksize
-]
-[
-.B skip=\fIcount
-]
-[
-.B count=\fIcount
-]
-.SH DESCRIPTION
-.B Amdd
-provides just enough of the standard
-.UX
-.B dd
-command for the needs of Amanda.
-This is handy when doing a full restore and the standard
-.B dd
-program has not yet been found.
-.LP
-.B Amdd
-also provides access to the Amanda output drivers that support
-various tape simulations.
-This may be used for debugging or to convert from one format
-to another.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-See the
-.B OUTPUT DRIVERS
-section of
-.I amanda(8)
-for more information on the Amanda output drivers.
-.SH OPTIONS
-.de BS
-\fB\\$1\fP\ \fR\\$2\fP
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
 ..
+.TH "AMDD" 8 "" "" ""
+.SH NAME
+amdd \- AMANDA version of dd
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 5
+\fBamdd\fR [\-d] [\fIif=input\fR] [\fIof=output\fR] [\fIbs=blocksize\fR] [\fIskip=count\fR] [\fIcount=count\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmdd\fR provides just enough of the standard UNIX \fBdd\fR command for the needs of \fBAMANDA\fR\&. This is handy when doing a full restore and the standard \fBdd\fR program has not yet been found\&.
+
+.PP
+\fBAmdd\fR also provides access to the \fBAMANDA\fR output drivers that support various tape simulations\&. This may be used for debugging or to convert from one format to another\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&. See the \fBOUTPUT DRIVERS\fR section of \fBamanda(8)\fR for more information on the \fBAMANDA\fR output drivers\&.
+
+.SH "OPTIONS"
+
 .TP
-.B \-d
-Turn on debugging output.
+\fB\-d\fR
+Turn on debugging output\&.
+
 .TP
-.BI \-l length
-Set the output length.
-If the output driver limits the output size, this controls
-when end of tape will be simulated.
-.IP
-.I Length
-may have a multiplier suffix:
-.RS
-.IP
-.BS k 1024\ (Kilobytes)
-.IP
-.BS b 512\ (Blocks)
-.IP
-.BS M 1024*1024\ (Megabytes)
-.RE
-.IP
-The default is no multipler (bytes).
+\fB\-l\fR\fIlength\fR
+Set the output length\&. If the output driver limits the output size, this controls when end of tape will be simulated\&.
+
+\fBLength\fR may have a multiplier suffix:
+
+
+.nf
+
+k \-> 1024 (Kilobytes)
+b \-> 512 (Blocks)
+M \-> 1024*1024 (Megabytes)
+
+.fi
+The default is no multiplier (bytes)\&.
+
 .TP
-.B if=\fIinput
-Input to
-.BR dd .
-Default is stdin.
+\fBif=\fR\fBinput\fR
+Input to \fBdd\fR\&. Default is stdin\&.
+
 .TP
-.B of=\fIoutput
-Where to send the output of
-.BR dd .
-Default is stdout.
+\fBof=\fR\fBoutput\fR
+Where to send the output of \fBdd\fR\&. Default is stdout\&.
+
 .TP
-.B bs=\fIblocksize
-Size of each record.
-Input records smaller than this will
-.I not
-be padded.
-Output records will be the same size as the corresponding input record.
-Default is 512 bytes.
-.IP
-.I Blocksize
-may have a multiplier suffix:
-.RS
-.IP
-.BS k 1024\ (Kilobytes)
-.IP
-.BS b 512\ (Blocks)
-.IP
-.BS M 1024*1024\ (Megabytes)
-.RE
-.IP
-The default is no multipler (bytes).
+\fBbs=\fR\fBblocksize\fR
+Size of each record\&. Input records smaller than this will \fBnot\fR be padded\&. Output records will be the same size as the corresponding input record\&. Default is 512 bytes\&.
+
+\fBBlocksize\fR may have a multiplier suffix:
+
+
+.nf
+
+k \-> 1024 (Kilobytes)
+b \-> 512 (Blocks)
+M \-> 1024*1024 (Megabytes)
+
+.fi
+The default is no multiplier (bytes)\&.
+
 .TP
-.B count=\fIcount
-Number of records to copy.
-Default is all records until end of file.
+\fBcount=\fR\fBcount\fR
+Number of records to copy\&. Default is all records until end of file\&.
+
 .TP
-.B skip=\fIcount
-Number of records to skip before copying input to output.
-Default is zero.
-.SH AUTHOR
-Marc Mengel <mengel@fnal.gov>
-.br
-John R. Jackson <jrj@purdue.edu>
+\fBskip=\fR\fBcount\fR
+Number of records to skip before copying input to output\&. Default is zero\&.
+
+.SH "AUTHOR"
+
+.PP
+Marc Mengel <mengel@fnal\&.gov>, John R\&. Jackson <jrj@purdue\&.edu> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
 .SH "SEE ALSO"
-amanda(8)
+
+.PP
+\fBamanda\fR(8)
+
diff --git a/man/amdump.8 b/man/amdump.8
new file mode 100644 (file)
index 0000000..e824edd
--- /dev/null
@@ -0,0 +1,79 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMDUMP" 8 "" "" ""
+.SH NAME
+amdump \- back up all disks in an AMANDA configuration
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 7
+\fBamdump\fR \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmdump\fR switches to the appropriate \fBAMANDA\fR configuration directory, e\&.g\&. /usr/local/etc/amanda/\fBconfig\fR, then attempts to back up every disk specified by the \fBamanda\&.conf\fR file\&. \fBAmdump\fR is normally run by \fBcron\fR\&.
+
+.PP
+You can specify many host/disk expressions, only disks that match an expression will be dumped\&. All disks are dumped if no expressions are given\&.
+
+.PP
+If the file /usr/local/etc/amanda/\fBconfig\fR/hold exists, \fBamdump\fR will wait until it is removed before starting the backups\&. This allows scheduled backups to be delayed when circumstances warrant, for example, if the tape device is being used for some other purpose\&. While waiting, \fBamdump\fR checks for the hold file every minute\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLE"
+
+.PP
+Here is a typical crontab entry\&. It runs \fBamdump\fR every weeknight at 1 a\&.m\&. as user \fBbin\fR:
+.nf
+
+0 1 * * 1\-5 bin /usr/local/sbin/amdump daily
+.fi
+
+.PP
+Please see the \fBcrontab\fR(5) or \fBcrontab\fR(1) manual page for the correct crontab format for your system\&.
+
+.SH "MESSAGES"
+
+.TP
+amdump: waiting for hold file to be removed
+The ``\fBhold\fR'' file exists and \fBamdump\fR is waiting for it to be removed before starting backups\&.
+
+.TP
+amdump: amdump or amflush is already running, or you must run amcleanup
+Amdump detected another \fBamdump\fR or \fBamflush\fR running, or the remains of a previous incomplete \fBamdump\fR or \fBamflush\fR run\&. This run is terminated\&. If the problem is caused by the remains of a previous run, you must execute \fBamcleanup\fR(8) and then rerun \fBamdump\fR\&.
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamcheck\fR(8), \fBamcleanup\fR(8), \fBamrestore\fR(8), \fBamflush\fR(8), \fBcron\fR(8)
+
diff --git a/man/amdump.8.in b/man/amdump.8.in
deleted file mode 100644 (file)
index 3c520e6..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMDUMP 8
-.SH NAME
-amdump \- back up all disks in an Amanda configuration
-.SH SYNOPSIS
-.B amdump
-.I config
-[
-.I host
-[
-.I disk
-]*
-]*
-.SH DESCRIPTION
-.B Amdump
-switches to the appropriate Amanda configuration directory,
-e.g. @CONFIG_DIR@/\fIconfig\fR,
-then attempts to back up every disk specified by the
-.I amanda.conf
-file.
-.B Amdump
-is normally run by
-.BR cron .
-.LP
-You can specify many host/disk expression, only disks that
-match an expression will be dumped. All disk are dumped if no
-expression are given.
-.LP
-If file @CONFIG_DIR@/\fIconfig\fR/hold exists,
-.B amdump
-will wait until it is removed before starting the backups.
-This allows scheduled backups to be delayed when
-circumstances warrant, for example, if the tape device is being
-used for some other purpose.
-While waiting,
-.B amdump
-checks for the hold file every minute.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLE
-Here is a typical crontab entry.
-It runs
-.B amdump
-every weeknight at 1 a.m. as user
-.BR bin :
-.LP
-.RS
-.EX
-.ie '@sbindir@'${exec_prefix}/sbin' \{\
-.ie '@exec_prefix@'${prefix}' .ds pr @prefix@/sbin
-.el .ds pr @exec_prefix@/sbin\}
-.el .ds pr @sbindir@
-0 1 * * 1-5 bin \*(pr/amdump @DEFAULT_CONFIG@
-.EE
-.RE
-.LP
-Please see the 
-.IR crontab (5)
-or
-.IR crontab (1)
-manual page for the correct crontab format for your system.
-.SH MESSAGES
-.TP
-amdump: waiting for hold file to be removed
-The "hold" file exists and amdump is waiting for it to be removed
-before starting backups.
-.TP
-amdump: amdump or amflush is already running, or you must run amcleanup
-Amdump detected another amdump or amflush running,
-or the remains of a previous incomplete amdump or amflush run.
-This run is terminated.
-If the problem is caused by the remains of a previous run,
-you must execute
-.IR amcleanup (8)
-and then rerun
-.IR amdump .
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8),
-amcheck(8),
-amcleanup(8),
-amrestore(8),
-amflush(8),
-cron(8)
diff --git a/man/amflush.8 b/man/amflush.8
new file mode 100644 (file)
index 0000000..797bfd9
--- /dev/null
@@ -0,0 +1,100 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMFLUSH" 8 "" "" ""
+.SH NAME
+amflush \- flush AMANDA backup files from holding disk to tape
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 8
+\fBamflush\fR [\-b] [\-f] [\-s] [\-D\ \fIdatestamp\fR...] \fIconfig\fR [\fIhost\fR\ [\fIdisk\fR...]...]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmflush\fR writes \fBAMANDA\fR backups from the holding disks to tape, and updates the \fBAMANDA\fR info database and tapelist accordingly\&. Backups may stay in a holding disk when something is wrong with the tape at the time \fBamdump\fR is run\&. When this happens, the problem must be corrected and \fBamflush\fR run by hand\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-b\fR
+Run \fBamflush\fR in batch mode\&. All datestamps are selected unless specified\&. The flush is started without confirmation\&.
+
+.TP
+\fB\-f\fR
+Run \fBamflush\fR in foreground\&. \fBAmflush\fR normally detaches itself from the tty and runs as a background process\&. With the \fB\-f\fR option, \fBamflush\fR stays in the foreground\&. This is useful if \fBamflush\fR is run as part of another script that, for example, advances the tape after the flush is completed\&.
+
+.TP
+\fB\-s\fR
+Write log to stdout/stderr instead of the amflush log file\&. Requires the \fB\-f\fR option\&.
+
+.TP
+\fB\-D datestamp\fR
+specify a datestamp expression you want to flush, see the ``\fBDATESTAMP EXPRESSION\fR'' section of \fBamanda\fR(8) for a description\&. \fB\-D 20001225\-7\fR will flush all dumps from 25 december 2000 to 27 december 2000\&.
+
+.PP
+You can specify many host/disk expressions, only disks that match an expression will be flushed\&. All disks are flushed if no expressions are given\&. see the ``\fBHOST & DISK EXPRESSION\fR'' section of \fBamanda\fR(8) for a description\&.
+
+.PP
+\fBAmflush\fR will look in the holding disks specified by the \fBamanda\&.conf\fR file in /usr/local/etc/amanda/\fBconfig\fR for any non\-empty \fBAMANDA\fR work directories\&. It then prompts you to select a directory or to process all of the directories\&. The work directories in the holding disks are named by the date at the time \fBamdump\fR was run, e\&.g\&. 19910215\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLE"
+
+.PP
+\fBAmflush\fR will search for holding areas associated with the \fBdaily\fR configuration\&. After you select which holding area to flush, \fBamflush\fR writes the data to tape, updates the databases and sends a mail report similar to \fBamdump\fR(8)\&.
+.nf
+
+% amflush daily
+Scanning /amanda\-hold\&.\&.\&.
+  20001113: found \fBAMANDA\fR directory\&.
+  20001114: found \fBAMANDA\fR directory\&.
+
+Multiple \fBAMANDA\fR directories, please pick one by letter:
+  A\&. 20001113
+  B\&. 20001114
+Select directories to flush [A\&.\&.B]: [ALL] all
+
+Flushing dumps in 20001113, 20001114,
+today: 20001117
+to tape drive /dev/rmt/0mn\&.
+Expecting tape DMP014 or a new tape\&.  (The last dumps were to tape DMP013)
+Are you sure you want to do this? yes
+Running in background, you can log off now\&.
+You'll get mail when amflush is finished\&.
+.fi
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8)
+
diff --git a/man/amflush.8.in b/man/amflush.8.in
deleted file mode 100644 (file)
index 961918e..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMFLUSH 8
-.SH NAME
-amflush \- flush Amanda backup files from holding disk to tape
-.SH SYNOPSIS
-.B amflush
-[
-.B -b
-] [
-.B -f
-] [
-.B -s
-] [
-.B -D
-.I datestamp
-]*
-.I config
-[
-.I host
-[
-.I disk
-]*
-]*
-.SH DESCRIPTION
-.B Amflush
-writes Amanda backups from the holding disks to tape,
-and updates the Amanda info database and tape list accordingly.
-Backups may stay in a holding disk when something is wrong with the tape
-at the time
-.B amdump
-is run.
-When this happens, the problem must be corrected and
-.B amflush
-run by hand.
-.SH OPTIONS
-.TP
-.B \-b
-Run
-.B amflush
-in batch mode. All datestamp are selected unless specified.
-The flush is started without confirmation.
-.TP
-.B \-f
-Run
-.B amflush
-in foreground.
-.B Amflush
-normally detaches itself from the tty and runs as a background process.
-With the
-.B -f
-option,
-.B amflush
-stays in the foreground.
-This is useful if
-.B amflush
-is run as part of another script that, for example, advances the tape
-after the flush is completed.
-.TP
-.B \-s
-Write log to stdout/stderr instead of the amflush log file. Require the
-.B \-f
-option.
-.TP
-.B \-D datestamp
-specify a  datestamp expression you want to flush, see the 
-"DATASTAMP EXPRESSION" section of
-.IR amanda (8)
-for a description.
-.B -D 20001225-7
-will flush all
-dump from 25 december 2000 to 27 december 2000.
-.LP
-You can specify many host/disk expressions, only disks that
-match an expression will be flushed. All disk are flushed if no
-expression are given. see the "HOST & DISK EXPRESSION" section of
-.IR amanda (8)
-for a description.
-.PP
-.B Amflush
-will look in the holding disks specified by the
-.I amanda.conf
-file in @CONFIG_DIR@/\fIconfig\fR
-for any non-empty Amanda work directories.
-It then prompts you to select a directory
-or to process all of the directories.
-The work directories in the holding disks are named by the date at the time
-.B amdump
-was run, e.g.\&
-.IR 19910215 .
-.PP
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLE
-.B Amflush
-will search for holding areas associated with the
-.I PUCC
-configuration.
-After you select which holding area to flush,
-.B amflush
-writes the data to tape, updates the databases and sends
-a mail report similar to
-.IR amdump (8).
-.LP
-.RS
-.EX
-% amflush @DEFAULT_CONFIG@
-Scanning /amanda-hold...
-  20001113: found Amanda directory.
-  20001114: found Amanda directory.
-
-Multiple Amanda directories, please pick one by letter:
-  A. 20001113
-  B. 20001114
-Select directories to flush [A..B]: [ALL] all
-
-Flushing dumps in 20001113, 20001114,
-today: 20001117
-to tape drive /dev/rmt/0mn.
-Expecting tape DMP014 or a new tape.  (The last dumps were to tape DMP013)
-Are you sure you want to do this? yes
-Running in background, you can log off now.
-You'll get mail when amflush is finished.
-.EE
-.RE
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8),
-amdump(8)
diff --git a/man/amgetconf.8 b/man/amgetconf.8
new file mode 100644 (file)
index 0000000..b13e407
--- /dev/null
@@ -0,0 +1,104 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMGETCONF" 8 "" "" ""
+.SH NAME
+amgetconf \- look up amanda.conf variables
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 10
+\fBamgetconf\fR [\fIconfig\fR] \fIparameter\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmgetconf\fR looks up parameters in \fBamanda\&.conf\fR, the \fBAMANDA\fR configuration file, or from the build and runtime environment, and returns their corresponding value\&.
+
+.PP
+If \fBconfig\fR is not specified, \fBamgetconf\fR assumes it is being run from the configuration directory and that \fBamanda\&.conf\fR is present\&.
+
+.PP
+If \fBparameter\fR begins with \fBbuild\&.\fR, the (case insensitive) string following the period is a build environment variable\&. Variables without a value (e\&.g\&. \fBXFSDUMP\fR on a system that does not support that type of file system) will not report an error and will return an empty string as the value\&. Flag variables (e\&.g\&. \fBUSE_AMANDAHOSTS\fR) will return 1 if the flag is set or an empty string if it is not\&.
+
+.PP
+If \fBparameter\fR begins with \fBdbopen\&.\fR, the string following the period is a program name and an \fBAMANDA\fR debug file will be created for the caller\&. The name of the file is returned\&.
+
+.PP
+If \fBparameter\fR begins with \fBdbclose\&.\fR, the string following the period is a program name previously used with \fBdbopen\&.\fR, followed by a colon (:) and the previously opened file name\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLE"
+
+.PP
+Find out the path to the log file directory:
+
+.nf
+
+% amgetconf daily logdir
+/usr/local/etc/amanda//daily
+
+.fi
+
+.PP
+Find out the current tape type:
+
+.nf
+
+% amgetconf daily tapetype
+DLT4000\-IV
+
+.fi
+
+.PP
+Find out the default configuration directory:
+
+.nf
+
+% amgetconf daily build\&.CONFIG_DIR
+/usr/local/etc/amanda/
+
+.fi
+
+.PP
+Create, use and close a debug file in a script:
+
+.nf
+
+% set debug_file = `amgetconf daily dbopen\&.myscript`
+% echo debug information >> $debug_file
+% amgetconf daily dbclose\&.myscript:$debug_file
+
+.fi
+
+.SH "MESSAGES"
+
+.TP
+amgetconf: no such parameter \fBparam\fR
+Parameter \fBparam\fR is not a known keyword (e\&.g\&. not a valid \fBamanda\&.conf\fR keyword)\&. In this case, \fBamgetconf\fR will write "\fBBUGGY\fR" to stdout as the value\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8)
+
diff --git a/man/amgetconf.8.in b/man/amgetconf.8.in
deleted file mode 100644 (file)
index 80237c2..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMGETCONF 8
-.SH NAME
-amgetconf \- look up amanda.conf variables
-.SH SYNOPSIS
-.B amgetconf
-[
-.I config
-]
-.I parameter
-.SH DESCRIPTION
-.B Amgetconf
-looks up parameters in
-.IR amanda.conf ,
-the Amanda configuration file,
-or from the build and runtime environment,
-and returns their corresponding value.
-.LP
-If
-.I config
-is not specified,
-.B amgetconf
-assumes it is being run from the configuration directory and that
-.I amanda.conf
-is present.
-.LP
-If
-.I parameter
-begins with
-.IR build. ,
-the (case insensitive) string following the period
-is a build environment variable.
-Variables without a value (e.g.\&
-.I XFSDUMP
-on a system that does not support that type of file system)
-will not report an error and will return an empty string as the value.
-Flag variables (e.g.\&
-.IR USE_AMANDAHOSTS )
-will return
-.I 1
-if the flag is set or an empty string if it is not.
-.LP
-If
-.I parameter
-begins with
-.IR dbopen. ,
-the string following the period is a program name and an Amanda debug
-file will be created for the caller.
-The name of the file is returned.
-.LP
-If
-.I parameter
-begins with
-.IR dbclose. ,
-the string following the period is a program name previously used with
-.IR dbopen. ,
-followed by a colon (:) and the previously opened file name.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLE
-Find out the path to the log file directory:
-.LP
-.RS
-.nf
-% amgetconf @DEFAULT_CONFIG@ logdir
-@CONFIG_DIR@/@DEFAULT_CONFIG@
-.fi
-.RE
-.LP
-Find out the current tape type:
-.LP
-.RS
-.nf
-% amgetconf @DEFAULT_CONFIG@ tapetype
-DLT4000-IV
-.fi
-.RE
-.LP
-Find out the default configuration directory:
-.LP
-.RS
-.nf
-% amgetconf @DEFAULT_CONFIG@ build.CONFIG_DIR
-@CONFIG_DIR@
-.fi
-.RE
-.LP
-Create, use and close a debug file in a script:
-.LP
-.RS
-.nf
-% set debug_file = `amgetconf @DEFAULT_CONFIG@ dbopen.myscript`
-% echo debug information >> $debug_file
-% amgetconf @DEFAULT_CONFIG@ dbclose.myscript:$debug_file
-.fi
-.RE
-.SH MESSAGES
-.TP
-amgetconf: no such parameter "\fIparam\fR"
-Parameter
-.I param
-is not a known keyword
-(e.g. not a valid
-.I amanda.conf
-keyword).
-In this case,
-.B amgetconf
-will write "\fBBUGGY\fR" to stdout as the value.
-.SH "SEE ALSO"
-amanda(8)
diff --git a/man/amlabel.8 b/man/amlabel.8
new file mode 100644 (file)
index 0000000..863da6c
--- /dev/null
@@ -0,0 +1,105 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMLABEL" 8 "" "" ""
+.SH NAME
+amlabel \- label an AMANDA tape
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 8
+\fBamlabel\fR [\-f] \fIconfig\fR \fIlabel\fR [\fIslot\fR\ \fIslot\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+All \fBAMANDA\fR tapes must be pre\-labeled before they are used\&. \fBAMANDA\fR verifies the label in \fBamdump\fR and \fBamflush\fR before writing to make sure the proper tape is loaded\&.
+
+.PP
+\fBAmlabel\fR writes an \fBAMANDA\fR label on the tape in the device specified by the \fBamanda\&.conf\fR file in /usr/local/etc/amanda/\fBconfig\fR\&. \fBLabel\fR may be any string that does not contain whitespace and that matches the \fBamanda\&.conf\fR  \fBlabelstr\fR regular expression option\&. It is up to the system administrator to define a naming convention\&.
+
+.PP
+\fBAmlabel\fR appends the new tape to the \fBtapelist\fR file so it will be used by \fBAMANDA\fR before it reuses any other tapes\&. When you \fBamlabel\fR multiple tapes, they will be used in the order you \fBamlabel\fR them\&.
+
+.PP
+\fBAmlabel\fR will not write the label if the tape contains an active \fBAMANDA\fR tape or if the label specified is on an active tape\&. The \fB\-f\fR (force) flag bypasses these verifications\&.
+
+.PP
+An optional \fBslot\fR may be specified after the tape label\&. If a tape changer is in use, \fBamlabel\fR will label the tape in the specified slot instead of the currently loaded tape\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "EXAMPLE"
+
+.PP
+Write an \fBAMANDA\fR label with the string ``\fBDMP000\fR'' on the tape loaded in the device named in the \fBtapedev\fR option in /usr/local/etc/amanda/daily/amanda\&.conf:
+.nf
+
+% amlabel daily DMP000 
+.fi
+
+.PP
+Label the tape in slot 3 of the currently configured tape changer with the string ``\fBDMP003\fR'':
+.nf
+
+% amlabel daily DMP003 slot 3 
+.fi
+
+.SH "MESSAGES"
+
+.TP
+label \fBlabel\fR doesn't match labelstr \fBstr\fR
+Label \fBlabel\fR on the command line does not match the \fBlabelstr\fR regular expression \fBstr\fR from \fBamanda\&.conf\fR\&.
+
+.TP
+label \fBlabel\fR already on a tape
+Label \fBlabel\fR is already listed as an active \fBAMANDA\fR tape\&.
+
+.TP
+no tpchanger specified in \fBpath\fR , so slot command invalid
+The command line has the \fBslot\fR parameter but the \fBamanda\&.conf\fR file in \fBpath\fR does not have a tape changer configured\&.
+
+.TP
+reading label \fBlabel\fR, tape is in another amanda configuration
+This tape appears to be a valid \fBAMANDA\fR tape, but label does not match \fBlabelstr\fR for this configuration so it is probably part of a different \fBAMANDA\fR configuration\&.
+
+.TP
+reading label \fBlabel\fR, tape is active
+Tape \fBlabel\fR appears to already be part of this \fBAMANDA\fR configuration and active, i\&.e\&. has valid data on it\&.
+
+.TP
+no label found, are you sure \fBtape\fR is non\-rewinding?
+While checking that the label was written correctly, \fBamlabel\fR got an error that might be caused by mis\-configuring \fBAMANDA\fR with a rewinding tape device name instead of a non\-rewinding device name for \fBtape\&.\fR
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org>: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8)  \fBamdump\fR(8)  \fBamflush\fR(8)
+
diff --git a/man/amlabel.8.in b/man/amlabel.8.in
deleted file mode 100644 (file)
index 5c478ae..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMLABEL 8
-.SH NAME
-amlabel \- label an Amanda tape
-.SH SYNOPSIS
-.B amlabel
-[-f]
-.I config label
-[
-.B slot
-.I slot
-]
-.SH DESCRIPTION
-All Amanda tapes must be pre-labeled before they are used.
-Amanda verifies the label in
-.B amdump
-and
-.B amflush
-before writing to make sure the proper tape is loaded.
-.LP
-.B Amlabel
-writes an Amanda label on the tape in the device specified by the
-.I amanda.conf
-file in @CONFIG_DIR@/\fIconfig\fR.
-.I Label
-may be any string that does not contain whitespace and that matches the
-.I amanda.conf
-.B labelstr
-regular expression option.
-It is up to the system administrator to define a naming convention.
-.LP
-.B Amlabel
-appends the new tape to the
-.I tapelist
-file so it will be used by Amanda before it reuses any other
-tapes.
-When you
-.B amlabel
-multiple tapes, they will be used in the
-order you
-.B amlabel
-them.
-.LP
-.B Amlabel
-will not write the label if the tape contains an active
-Amanda tape or if the label specified is on an active tape.
-The
-.B -f
-(force) flag bypasses these verifications.
-.LP
-An optional
-.I slot
-may be specified after the tape label.
-If a tape changer is in use,
-.B amlabel
-will label the tape in the specified slot
-instead of the currently loaded tape.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH EXAMPLE
-Write an Amanda label with the string "DMP000" on
-the tape loaded in the device named in the
-.B tapedev
-option in @CONFIG_DIR@/@DEFAULT_CONFIG@/amanda.conf:
-.LP
-.RS
-.EX
-% amlabel @DEFAULT_CONFIG@ DMP000
-.EE
-.RE
-.LP
-Label the tape in slot 3 of the currently configured tape changer
-with the string "DMP003":
-.LP
-.RS
-.EX
-% amlabel @DEFAULT_CONFIG@ DMP003 slot 3
-.EE
-.RE
-.SH MESSAGES
-.TP
-label \fIlabel\fR doesn't match labelstr "\fIstr\fR"
-Label
-.I label
-on the command line does not match the
-.I labelstr
-regular expression
-.I str
-from
-.IR amanda.conf .
-.TP
-label \fIlabel\fR already on a tape
-Label
-.I label
-is already listed as an active Amanda tape.
-.TP
-no tpchanger specified in "\fIpath\fR", so slot command invalid
-The command line has the
-.B slot
-parameter but the
-.I amanda.conf
-file in
-.I path
-does not have a tape changer configured.
-.TP
-reading label \fIlabel\fR, tape is in another amanda configuration
-This tape appears to be a valid Amanda tape,
-but label does not match
-.B labelstr
-for this configuration so it is probably part of a different
-Amanda configuration.
-.TP
-reading label \fIlabel\fR, tape is active
-Tape
-.I label
-appears to already be part of this Amanda configuration
-and active, i.e. has valid data on it.
-.TP
-no label found, are you sure \fItape\fR is non-rewinding?
-While checking that the label was written correctly,
-.I amlabel
-got an error that might be caused by mis-configuring Amanda
-with a rewinding tape device name
-instead of a non-rewinding device name for
-.IR tape.
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
-.SH "SEE ALSO"
-amanda(8)
-amdump(8)
-amflush(8)
index d6aec29ea611f07f38a22b4d7f631870dbf25865..e6c3739cb9904750c8d2022d312419658f4dfe48 100644 (file)
-.\"
-.de CO
-\fB\\$1\fP \fI\\$2\fP
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
 ..
-.TH AMMT 8
+.TH "AMMT" 8 "" "" ""
 .SH NAME
-ammt \- Amanda version of mt
-.SH SYNOPSIS
-.B ammt
-[
-.B -d
-]
-[
-.B -f|-t
-.I device
-]
-.B command
-[
-.I count
-]
-.SH DESCRIPTION
-.B Ammt
-provides just enough of the standard
-.UX
-.B mt
-command for the needs of Amanda.
-This is handy when doing a full restore and the standard
-.B mt
-program has not yet been found.
-.LP
-.B Ammt
-also provides access to the Amanda output drivers that support
-various tape simulations.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-See the
-.B OUTPUT DRIVERS
-section of
-.I amanda(8)
-for more information on the Amanda output drivers.
-.SH OPTIONS
-.TP
-.B \-d
-Turn on debugging output.
-.TP
-.BI \-f \ device
-Access tape device
-.IR device .
-If not specified, the
-.B TAPE
-environment variable is used.
-.TP
-.BI \-t \ device
-Same as
-.BR -f .
-.TP
-.BI command \ count
-Which command to issue, and an optional count of operations.
-.SH COMMANDS
-Each command may be abbreviated to whatever length makes it unique.
-.TP
-.BI eof|weof \ count
-Write
-.I count
-(default: 1)
-end of file marks (tapemarks).
-.TP
-.BI fsf \ count
-Skip forward
-.I count
-(default: 1)
-files.
-.TP
-.BI bsf \ count
-Skip backward
-.I count
-(default: 1)
-files.
-.TP
-.BI asf \ count
-Position to file number
-.I count
-(default: 0)
-where zero is beginning of tape.
-This is the same as a
-.B rewind
-followed by a
-.B fsf
-.IR count .
-.TP
-.B rewind
-Rewind to beginning of tape.
-.TP
-.B offline|rewoffl
-Rewind to beginning of tape and unload the tape from the drive.
-.TP
-.BI status
-Report status information about the drive.
-Which data reported,
-and what it means,
-depends on the underlying operating system,
-and may include:
+ammt \- AMANDA version of mt
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 5
+\fBammt\fR [\-d] [\fB\-f\fR | \fB\-t\fR | \fB\fIdevice\fR\fR] \fIcommand\fR [\fIcount\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmmt\fR provides just enough of the standard UNIX \fBmt\fR command for the needs of \fBAMANDA\fR\&. This is handy when doing a full restore and the standard \fBmt\fR program has not yet been found\&.
+
+.PP
+\fBAmmt\fR also provides access to the \fBAMANDA\fR output drivers that support various tape simulations\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&. See the \fBOUTPUT DRIVERS\fR section of \fBamanda(8)\fR for more information on the \fBAMANDA\fR output drivers\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-d\fR
+Turn on debugging output\&.
+
+.TP
+\fB\-f\fR\fI device\fR
+Access tape device \fBdevice\fR\&. If not specified, the \fBTAPE\fR environment variable is used\&.
+
+.TP
+\fB\-t\fR\fI device\fR
+Same as \fB\-f\fR\&.
+
+.TP
+\fBcommand\fR\fB count\fR
+Which command to issue, and an optional count of operations\&.
+
+.SH "COMMANDS"
+
+.PP
+Each command may be abbreviated to whatever length makes it unique\&.
+
+.TP
+\fBeof|weof\fR\fB count\fR
+Write \fBcount\fR (default: 1) end of file marks (tapemarks)\&.
+
+.TP
+\fBfsf\fR\fB count\fR
+Skip forward \fBcount\fR (default: 1) files\&.
+
+.TP
+\fBbsf\fR\fB count\fR
+Skip backward \fBcount\fR (default: 1) files\&.
+
+.TP
+\fBasf\fR\fB count\fR
+Position to file number \fBcount\fR (default: 0) where zero is beginning of tape\&. This is the same as a \fBrewind\fR followed by a \fBfsf\fR  \fBcount\fR\&.
+
+.TP
+\fBrewind\fR
+Rewind to beginning of tape\&.
+
+.TP
+\fBoffline|rewoffl\fR
+Rewind to beginning of tape and unload the tape from the drive\&.
+
+.TP
+\fBstatus\fR
+Report status information about the drive\&. Which data reported, and what it means, depends on the underlying operating system, and may include:
+
 .RS
+
 .TP
 ONLINE
-Indicates the drive is online and ready.
+Indicates the drive is online and ready\&.
+
 .TP
 OFFLINE
-Indicates the drive is offline or not ready.
+Indicates the drive is offline or not ready\&.
+
 .TP
 BOT
-Indicates the drive is at beginning of tape.
+Indicates the drive is at beginning of tape\&.
+
 .TP
 EOT
-Indicates the drive is at end of tape.
+Indicates the drive is at end of tape\&.
+
 .TP
 PROTECTED
-Indicates the tape is write protected.
+Indicates the tape is write protected\&.
+
 .TP
 ds
-Device status.
+Device status\&.
+
 .TP
 er
-Error register.
+Error register\&.
+
 .TP
 fileno
-Current tape file number.
+Current tape file number\&.
+
 .TP
 blkno
-Current tape block number file.
+Current tape block number file\&.
+
 .RE
 .IP
-NOTE: many systems only report good data when a tape is in the drive and ready.
-.SH AUTHOR
-Marc Mengel <mengel@fnal.gov>
-.br
-John R. Jackson <jrj@purdue.edu>
+
+.RS
+.Sh "Note"
+Many systems only report good data when a tape is in the drive and ready\&.
+
+.RE
+
+.PP
+
+
+.SH "AUTHOR"
+
+.PP
+Marc Mengel <mengel@fnal\&.gov>, John R\&. Jackson <jrj@purdue\&.edu>: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
 .SH "SEE ALSO"
-amanda(8)
+
+.PP
+\fBamanda\fR(8)
+
diff --git a/man/amoverview.8 b/man/amoverview.8
new file mode 100644 (file)
index 0000000..21c7c15
--- /dev/null
@@ -0,0 +1,97 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMOVERVIEW" 8 "" "" ""
+.SH NAME
+amoverview \- display file systems processed by AMANDA over time
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 11
+\fBamoverview\fR [[\-config]\ \fIconfig\fR] [\-hostwidth\ \fIwidth\fR] [\-diskwidth\ \fIwidth\fR] [\-skipmissed] [\-verbose]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmoverview\fR displays a chart showing hosts and file systems processed by \fBAMANDA\fR along with the backup level performed each day\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-config\fR \fIconfig\fR
+Use configuration \fBconfig\fR instead of configuration daily\&.
+
+.TP
+\fB\-hostwidth\fR \fIwidth\fR
+Set \fBhost\fR field column width to \fBwidth\fR characters instead of 8\&.
+
+.TP
+\fB\-diskwidth\fR \fIwidth\fR
+Set \fBdisk\fR field column width to \fBwidth\fR characters instead of 20\&.
+
+.TP
+\fB\-skipmissed\fR
+Compacts the output by only printing stats for the days \fBAMANDA\fR actually ran\&.
+
+.TP
+\fB\-verbose\fR
+\fBAmoverview\fR can take a long while on large systems\&. This option reports intermediate steps while it is working\&.
+
+.SH "RESULTS"
+
+.PP
+\fBamoverview\fR is a summary of the output of " \fBamadmin <config> find\fR "\&. When the last column of \fBamadmin find\fR contains anything other than ``\fBOK\fR'', amoverview translates this into ``\fBE\fR'' for that day\&.
+
+.PP
+A number indicates the level of backup and it succeeded\&. An ``\fBE\fR'' indicates an error for that day\&. You get an ``\fBE\fR'' for all errors, like failed to connect, datatimeout, computer crashed, etc, but also for failing to write to tape\&.
+
+.PP
+You can have an ``\fBE\fR'' followed by a number if a filesystem ran into end\-of\-tape once (gives an ``\fBE\fR'', and later that day, you flush it to a second tape (a number: the level, indicating success)\&. If the flush failed too, you get a double ``\fBEE\fR'' for that day\&.
+
+.PP
+You can also have a double code if you have two tapes in the changer and \fBAMANDA\fR failed to write to tape the first time because it hit end of tape (resulting in ``\fBE0\fR'', for a full, ``\fBE1\fR'' for an incremental etc\&.) or twice with error (``\fBEE\fR''), and may a successful flush afterwards giving maybe ``\fBEE0\fR''\&. (Only the latest 2 characters are printed)\&.
+
+.SH "EXAMPLE"
+
+.PP
+This shows the \fI/home\fR file system on \fBhost2\fR was backed up at level 3 on the 8th, 9th and 10th of December, had a full backup on the 11th, a level 1 on the 12th and a level 2 on the 13th\&.
+.nf
+
+# amoverview
+                         date 12 12 12 12 12 12
+host     disk                 08 09 10 11 12 13
+host1    /                     0  1  1  1  1  1
+host1    /var                  0  1  1  1  1  1
+host2    /                     1  1  1  1  1  0
+host2    /home                 3  3  3  0  1  2
+host2    /opt                  1  1  1  1  1  1
+host2    /var                  1  1  0  1  1  1 
+.fi
+
+.SH "SEE ALSO"
+
+.PP
+\fBamadmin\fR(8), \fBamanda\fR(8)
+
diff --git a/man/amoverview.8.in b/man/amoverview.8.in
deleted file mode 100644 (file)
index fea91bc..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.de OP
-\fB\\$1\fP \fI\\$2\fP
-..
-.TH AMOVERVIEW 8
-.SH NAME
-amoverview \- display file systems processed by Amanda over time
-.SH SYNOPSIS
-.B amoverview
-[[
-.B -config
-]
-.I config
-] [
-.OP -hostwidth width
-] [
-.OP -diskwidth width
-] [
-.B -verbose
-]
-.SH DESCRIPTION
-.B Amoverview
-displays a chart showing hosts and file systems processed by Amanda
-along with the backup level performed each day.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-.TP
-.OP -config config
-Use configuration
-.I config
-instead of @DEFAULT_CONFIG@.
-.TP
-.OP -hostwidth width
-Set
-.B host
-field column width to
-.I width
-characters instead of eight.
-.TP
-.OP -diskwidth width
-Set
-.B disk
-field column width to
-.I width
-characters instead of 20.
-.TP
-.B -verbose
-.B Amoverview
-can take a long while on large systems.
-This option reports intermediate steps while it is working.
-.SH RESULTS
-.B amoverview
-is a summary of the output of "
-.B amadmin <config> find
-".
-When the last column of 
-.B amadmin find
-contains anything other than "OK",
-amoverview translates this into 'E' for that day.
-
-A number indicates the level of backup and it succeeded.
-An "E" indicates an error for that day.
-You get an 'E' for all errors, like failed to connect, datatimeout,
-computer crashed, etc, but also for failing to write to tape.
-
-You can have an "E" followed by a number if a filesystem ran into
-end-of-tape once (gives an 'E', and later that day, you flush it to a
-second tape (a number: the level, indicating success).  If the flush
-failed too, you get a double "EE" for that day.
-
-You can also have a double code if you have two tapes in the changer and
-amanda failed to write to tape the first time because it hit end of tape
-(resulting in "E0", for a full, "E1" for an incremental etc)
-or twice with error ("EE"), and may a successfull flush afterwards
-giving maybe "EE0".  (Only the latest 2 characters are printed).
-.SH EXAMPLE
-This shows the
-.I /home
-file system on
-.I host2
-was backed up at level 3 on the 8th, 9th and 10th of December,
-had a full backup on the 11th,
-a level 1 on the 12th and a level 2 on the 13th.
-.LP
-.RS
-.EX
-# amoverview
-                         date 12 12 12 12 12 12
-host     disk                 08 09 10 11 12 13
-host1    /                     0  1  1  1  1  1
-host1    /var                  0  1  1  1  1  1
-host2    /                     1  1  1  1  1  0
-host2    /home                 3  3  3  0  1  2
-host2    /opt                  1  1  1  1  1  1
-host2    /var                  1  1  0  1  1  1
-.EE
-.RE
-.SH "SEE ALSO"
-amadmin(8),
-amanda(8)
index 15deaba35713cc4b8bcf1d7e761db48edbf66f6b..450b9bed6033512fb27bbc116f6be3c1118e5bff 100644 (file)
-.TH AMPLOT 8
-.UC 4
-.SH NAME
-amplot \- visualize the behavior of Amanda
-.SH SYNOPSIS
-.B amplot
-[
-.B -b
-]
-[
-.B -c
-]
-[
-.B -e
-]
-[
-.B -g
-]
-[
-.B -l
-]
-[
-.B -p
-]
-[
-.B -t
-.I T
-]
-.I amdump_files
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
 .br
-.SH DESCRIPTION
-.B Amplot
-reads an
-.B amdump
-output file that Amanda generates each run (e.g.
-.IR amdump.1 )
-and translates the information into a
-picture format that may be used to determine how your installation
-is doing and if any parameters need to be changed.
-.B Amplot
-also prints out
-.B amdump
-lines that it either does not
-understand or knows to be warning or error lines
-and a summary of the start, end and total time for each backup image.
-.LP
-.B Amplot
-is a shell script that executes an
-.B awk
-program
-.IR \fR(\fPamplot.awk )
-to scan the
-.B amdump
-output file.
-It then executes a
-.B gnuplot
-program
-.IR \fR(\fPamplot.g )
-to generate the graph.
-The
-.B awk
-program is written in an enhanced version of awk,
-such as GNU awk
-.B \fR(\fPgawk
-version 2.15 or later) or
-.BR nawk .
-.LP
-During execution,
-.B amplot
-generates a few temporary files that
-.B gnuplot
-uses.
-These files are deleted at the end of execution.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMPLOT" 8 "" "" ""
+.SH NAME
+amplot \- visualize the behavior of AMANDA
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 7
+\fBamplot\fR [\-b] [\-c] [\-e] [\-g] [\-l] [\-p] [\-t\ \fIT\fR] \fIamdump_files\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmplot\fR reads an \fBamdump\fR output file that \fBAMANDA\fR generates each run (e\&.g\&. \fBamdump\&.1\fR) and translates the information into a picture format that may be used to determine how your installation is doing and if any parameters need to be changed\&. \fBAmplot\fR also prints out \fBamdump\fR lines that it either does not understand or knows to be warning or error lines and a summary of the start, end and total time for each backup image\&.
+
+.PP
+\fBAmplot\fR is a shell script that executes an \fBawk\fR program \fB\fR(\fBamplot\&.awk\fR) to scan the \fBamdump\fR output file\&. It then executes a \fBgnuplot\fR program \fB\fR(\fBamplot\&.g\fR) to generate the graph\&. The \fBawk\fR program is written in an enhanced version of awk, such as GNU awk \fB\fR(\fBgawk\fR version 2\&.15 or later) or \fBnawk\fR\&.
+
+.PP
+During execution, \fBamplot\fR generates a few temporary files that \fBgnuplot\fR uses\&. These files are deleted at the end of execution\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
 .TP
-.B -b
-Generate b/w postscript file (need
-.BR -p ).
+\fB\-b\fR
+Generate b/w postscript file (need \fB\-p\fR)\&.
+
 .TP
-.B -c
-Compress
-.I amdump_files
-after plotting.
+\fB\-c\fR
+Compress \fBamdump_files\fR after plotting\&.
+
 .TP
-.B -e
-Extend the X (time) axis if needed.
+\fB\-e\fR
+Extend the X (time) axis if needed\&.
+
 .TP
-.B -g
-Direct
-.I gnuplot
-output directly to the X11 display (default).
+\fB\-g\fR
+Direct \fBgnuplot\fR output directly to the X11 display (default)\&.
+
 .TP
-.B -p
-Direct postscript output to file
-.B \fIYYYYMMDD\fP.ps
-(opposite of
-.BR -g ).
+\fB\-p\fR
+Direct postscript output to file \fB\fR\fBYYYYMMDD\fR\fB\&.ps\fR (opposite of \fB\-g\fR)\&.
+
 .TP
-.B -l
-Generate landscape oriented output (need
-.BR -p ).
+\fB\-l\fR
+Generate landscape oriented output (needs \fB\-p\fR)\&.
+
 .TP
-.B "-t \fIT\fR"
-Set the right edge of the plot to be
-.I T
-hours.
-.LP
-The
-.I amdump_files
-may be in various compressed formats
-.BR \fR(\fPcompress ,
-.BR gzip ,
-.BR pact ,
-.BR compact ).
-.SH INTERPRETATION
-The figure is divided into a number of regions.
-There are titles on the top that show important statistical information
-about the configuration and from this execution of
-.BR amdump .
-In the figure, the X axis is time, with 0 being the moment
-.B amdump
-was started.
-The Y axis is divided into 5 regions:
-.IP
-.I QUEUES:
-How many backups have not been started,
-how many are waiting on space in the holding disk
-and how many have been transferred successfully to tape.
-.IP
-.I %BANDWIDTH:
-Percentage of allowed network bandwidth in use.
-.IP
-.I HOLDING DISK:
-The higher line depicts space allocated on the holding disk to
-backups in progress and completed backups waiting to be written to tape.
-The lower line depicts the fraction of the holding disk containing completed
-backups waiting to be written to tape including the file currently being
-written to tape.
-The scale is percentage of the holding disk.
-.IP
-.I TAPE:
-Tape drive usage.
-.IP
-.I %DUMPERS:
-Percentage of active dumpers.
-.LP
-The idle period at the left of the graph is time
-.B amdump
-is asking the machines how much data they are going to dump.
-This process can take a while if hosts are down
-or it takes them a long time to generate estimates.
-.SH AUTHOR
-Olafur Gudmundsson ogud@tis.com
-.br
-Trusted Information Systems
-.br
-formerly at University of Maryland, College Park
-.SH BUGS
-Reports lines it does not recognize, mainly error cases but some are
-legitimate lines the program needs to be taught about.
-.SH SEE ALSO
-amanda(8),
-amdump(8),
-gawk(1),
-nawk(1),
-awk(1),
-gnuplot(1),
-sh(1),
-compress(1),
-gzip(1)
+\fB\-t \fR\fBT\fR
+Set the right edge of the plot to be \fBT\fR hours\&.
+
+.PP
+The \fBamdump_files\fR may be in various compressed formats \fB\fR(\fBcompress\fR, \fBgzip\fR, \fBpact\fR, \fBcompact\fR)\&.
+
+.SH "INTERPRETATION"
+
+.PP
+The figure is divided into a number of regions\&. There are titles on the top that show important statistical information about the configuration and from this execution of \fBamdump\fR\&. In the figure, the X axis is time, with 0 being the moment \fBamdump\fR was started\&. The Y axis is divided into 5 regions:
+
+.PP
+\fBQUEUES:\fR How many backups have not been started, how many are waiting on space in the holding disk and how many have been transferred successfully to tape\&.
+
+.PP
+\fB%BANDWIDTH:\fR Percentage of allowed network bandwidth in use\&.
+
+.PP
+\fBHOLDING DISK:\fR The higher line depicts space allocated on the holding disk to backups in progress and completed backups waiting to be written to tape\&. The lower line depicts the fraction of the holding disk containing completed backups waiting to be written to tape including the file currently being written to tape\&. The scale is percentage of the holding disk\&.
+
+.PP
+\fBTAPE:\fR Tape drive usage\&.
+
+.PP
+\fB%DUMPERS:\fR Percentage of active dumpers\&.
+
+.PP
+The idle period at the left of the graph is time \fBamdump\fR is asking the machines how much data they are going to dump\&. This process can take a while if hosts are down or it takes them a long time to generate estimates\&.
+
+.SH "AUTHOR"
+
+.PP
+Olafur Gudmundsson <ogud@tis\&.com>, Trusted Information Systems, formerly at University of Maryland, College Park: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "BUGS"
+
+.PP
+Reports lines it does not recognize, mainly error cases but some are legitimate lines the program needs to be taught about\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8), \fBgawk\fR(1), \fBnawk\fR(1), \fBawk\fR(1), \fBgnuplot\fR(1), \fBsh\fR(1), \fBcompress\fR(1), \fBgzip\fR(1)
+
diff --git a/man/amrecover.8 b/man/amrecover.8
new file mode 100644 (file)
index 0000000..7fdf97f
--- /dev/null
@@ -0,0 +1,378 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMRECOVER" 8 "" "" ""
+.SH NAME
+amrecover \- AMANDA index database browser
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 10
+\fBamrecover\fR [[\-C]\ \fIconfig\fR] [\-s\ \fIindex\-server\fR] [\-t\ \fItape\-server\fR] [\-d\ \fItape\-device\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmrecover\fR browses the database of \fBAMANDA\fR index files to determine which tapes contain files to recover\&. Furthermore, it is able to recover files\&.
+
+.PP
+In order to restore files in place, you must invoke \fBamrecover\fR from the root of the backed up filesystem, or use \fBlcd\fR to move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory\&. See the examples below for details\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.RS
+.Sh "Note"
+The listed defaults map to the values you ran the configure\-script with\&.
+.RE
+
+.TP
+\fB[ \-C ] config\fR
+\fBAMANDA\fR configuration (default: daily)\&.
+
+.TP
+\fB\-s index\-server\fR
+Host that runs the index daemon (default: oops)\&.
+
+.TP
+\fB\-t tape\-server\fR
+Host that runs the tape server daemon (default: 192\&.168\&.0\&.10)\&.
+
+.TP
+\fB\-d tape\-device\fR
+Tape device to use on the tape server host (default: /dev/nst0)\&.
+
+.SH "COMMANDS"
+
+.PP
+\fBAmrecover\fR connects to the index server and then presents a command line prompt\&. Usage is similar to an ftp client\&. The GNU readline library is used to provide command line history and editing if it was built in to \fBamrecover\fR\&.
+
+.PP
+The purpose of browsing the database is to build up a \fBrestore list\fR of files to be extracted from the backup system\&. The following commands are available:
+
+.TP
+\fBsethost hostname\fR
+Specifies which host to look at backup files for (default: the local host)\&.
+
+.TP
+\fBsetdate YYYY\-MM\-DD\fR
+Set the date (default: today)\&. File listing commands only return information on backup images for this day, for the day before with the next lower dump level, and so on, until the most recent level 0 backup on or before the specified date is encountered\&.
+
+For example, if:
+
+
+.nf
+
+1996\-07\-01 was a level 0 backup
+1996\-07\-02 through 1996\-07\-05 were level 1 backups
+1996\-07\-06 through 1997\-07\-08 were level 2 backups
+
+.fi
+then if 1997\-07\-08 is the requested date, files from the following days would be used:
+
+
+.nf
+
+1997\-07\-08 (the latest level 2 backup)
+1997\-07\-05 (the latest level 1 backup)
+1997\-07\-01 (the latest level 0 backup)
+
+.fi
+Only the most recent version of a file will be presented\&.
+
+The following abbreviated date specifications are accepted:
+
+.RS
+
+.TP
+\fB\-\-MM\-DD\fR
+dates in the current year
+
+.TP
+\fB\-\-\-DD\fR
+dates in the current month of the current year
+
+.RE
+.IP
+
+.TP
+\fBsetdisk diskname mountpoint\fR
+Specifies which disk to consider (default: the disk holding the working directory where \fBamrecover\fR is started)\&. It can only be set after the host is set with \fBsethost\fR\&. \fBDiskname\fR is the device name specified in the \fBamanda\&.conf\fR or \fBdisklist\fR configuration file\&. The disk must be local to the host\&. If \fBmountpoint\fR is not specified, all pathnames will be relative to the (unknown) mount point instead of full pathnames\&.
+
+.TP
+\fBlistdisk [diskdevice]\fR
+List all \fBdiskname\fR
+
+.TP
+\fBsettape [[server]:][tapedev|default]\fR
+Specifies the host to use as the tape server, and which of its tape devices to use\&. If the server is omitted, but the colon is not, the server name reverts to 192\&.168\&.0\&.10, the configure\-time default\&. If the tape device is omitted, it remains unchanged\&. To use the default tape device selected by the tape server, the word \fBdefault\fR must be specified\&. If no argument is specified, or the argument is an empty string, no changes occur, and the current settings are displayed\&.
+
+If you want amrecover to use your changer, the \fBtapedev\fR must be equal to the amrecover_changer setting on the server\&.
+
+If you need to change the protocol (tape:, rait:, file:, null:) then you must specify the hostname\&.
+
+.nf
+
+settape 192\&.168\&.0\&.10:file:/file1
+.fi
+You can change the tape device when amrecover ask you to load the tape:
+.nf
+
+Load tape DMP014 now
+Continue? [Y/n/t]: t
+Tape device: server2:/dev/nst2
+Continue? [Y/n/t]: Y
+Using tape /dev/nst2 from server server2\&.
+.fi
+
+.TP
+\fBsetmode mode\fR
+Set the extraction mode for Samba shares\&. If \fBmode\fR is \fBsmb\fR, shares are sent to the Samba server to be restored back onto the PC\&. If \fBmode\fR is \fBtar\fR, they are extracted on the local machine the same way tar volumes are extracted\&.
+
+.TP
+\fBmode\fR
+Displays the extracting mode for Samba shares\&.
+
+.TP
+\fBhistory\fR
+Show the backup history of the current host and disk\&. Dates, levels, tapes and file position on tape of each backup are displayed\&.
+
+.TP
+\fBpwd\fR
+Display the name of the current backup working directory\&.
+
+.TP
+\fBcd dir\fR
+Change the backup working directory to \fBdir\&.\fR If the mount point was specified with \fBsetdisk\fR, this can be a full pathname or it can be relative to the current backup working directory\&. If the mount point was not specified, paths are relative to the mount point if they start with "/", otherwise they are relative to the current backup working directory\&. The \fBdir\fR can be a shell style wildcards\&.
+
+.TP
+\fBcdx dir\fR
+Like the \fBcd\fR command but allow regular expression\&.
+
+.TP
+\fBlpwd\fR
+Display the \fBamrecover\fR working directory\&. Files will be restored under this directory, relative to the backed up filesystem\&.
+
+.TP
+\fBlcd path\fR
+Change the \fBamrecover\fR working directory to \fBpath\fR\&.
+
+.TP
+\fBls\fR
+List the contents of the current backup working directory\&. See the description of the \fBsetdate\fR command for how the view of the directory is built up\&. The backup date is shown for each file\&.
+
+.TP
+\fBadd item1 item2 \&.\&.\&.\fR
+Add the specified files or directories to the restore list\&. Each item may have shell style wildcards\&.
+
+.TP
+\fBaddx item1 item2 \&.\&.\&.\fR
+Add the specified files or directories to the restore list\&. Each item may be a regular expression\&.
+
+.TP
+\fBdelete item1 item2 \&.\&.\&.\fR
+Delete the specified files or directories from the restore list\&. Each item may have shell style wildcards\&.
+
+.TP
+\fBdeletex item1 item2 \&.\&.\&.\fR
+Delete the specified files or directories from the restore list\&. Each item may be a regular expression\&.
+
+.TP
+\fBlist file\fR
+Display the contents of the restore list\&. If a file name is specified, the restore list is written to that file\&. This can be used to manually extract the files from the \fBAMANDA\fR tapes with \fBamrestore\fR\&.
+
+.TP
+\fBclear\fR
+Clear the restore list\&.
+
+.TP
+\fBquit\fR
+Close the connection to the index server and exit\&.
+
+.TP
+\fBexit\fR
+Close the connection to the index server and exit\&.
+
+.TP
+\fBextract\fR
+Start the extract sequence (see the examples below)\&. Make sure the local working directory is the root of the backed up filesystem, or another directory that will behave like that\&. Use \fBlpwd\fR to display the local working directory, and \fBlcd\fR to change it\&.
+
+.TP
+\fBhelp\fR
+Display a brief list of these commands\&.
+
+.SH "EXAMPLES"
+
+.PP
+The following shows the recovery of an old \fBsyslog\fR file\&.
+.nf
+
+# cd /var/log
+# ls \-l syslog\&.7
+syslog\&.7: No such file or directory
+# amrecover
+AMRECOVER Version 2\&.4\&.2\&. Contacting server on oops \&.\&.\&.
+220 oops \fBAMANDA\fR index server (2\&.4\&.2) ready\&.
+Setting restore date to today (1997\-12\-09)
+200 Working date set to 1997\-12\-09\&.
+200 Config set to daily\&.
+200 Dump host set to this\-host\&.some\&.org\&.
+$CWD '/var/log' is on disk '/var' mounted at '/var'\&.
+200 Disk set to /var\&.
+/var/log
+WARNING: not on root of selected filesystem, check man\-page!
+amrecover> ls
+1997\-12\-09 daemon\&.log
+1997\-12\-09 syslog
+1997\-12\-08 authlog
+1997\-12\-08 sysidconfig\&.log
+1997\-12\-08 syslog\&.0
+1997\-12\-08 syslog\&.1
+1997\-12\-08 syslog\&.2
+1997\-12\-08 syslog\&.3
+1997\-12\-08 syslog\&.4
+1997\-12\-08 syslog\&.5
+1997\-12\-08 syslog\&.6
+1997\-12\-08 syslog\&.7
+amrecover> add syslog\&.7
+Added /log/syslog\&.7
+amrecover> lpwd
+/var/log
+amrecover> lcd \&.\&.
+/var
+amrecover> extract
+
+Extracting files using tape drive /dev/nst0 on host 192\&.168\&.0\&.10
+
+The following tapes are needed: DMP014
+
+Restoring files into directory /var
+Continue? [Y/n]: y
+
+Load tape DMP014 now
+Continue? [Y/n/t]: y
+set owner/mode for '\&.'? [yn] n
+amrecover> quit
+200 Good bye\&.
+# ls \-l syslog\&.7
+total 26
+\-rw\-r\-\-r\-\-   1 root     other      12678 Oct 14 16:36 syslog\&.7
+.fi
+
+.PP
+If you do not want to overwrite existing files, create a subdirectory to run \fBamrecover\fR from and then move the restored files afterward\&.
+.nf
+
+# cd /var
+# (umask 077 ; mkdir \&.restore)
+# cd \&.restore
+# amrecover
+AMRECOVER Version 2\&.4\&.2\&. Contacting server on oops \&.\&.\&.
+\&.\&.\&.
+amrecover> cd log
+/var/log
+amrecover> ls
+\&.\&.\&.
+amrecover> add syslog\&.7
+Added /log/syslog\&.7
+amrecover> lpwd
+/var/\&.restore
+amrecover> extract
+
+Extracting files using tape drive /dev/nst0 on host 192\&.168\&.0\&.10
+\&.\&.\&.
+amrecover> quit
+200 Good bye\&.
+# mv \-i log/syslog\&.7 \&.\&./log/syslog\&.7\-restored
+# cd \&.\&.
+# rm \-fr \&.restore
+.fi
+
+.PP
+If you need to run \fBamrestore\fR by hand instead of letting \fBamrecover\fR control it, use the \fBlist\fR command after browsing to display the needed tapes\&.
+.nf
+
+# cd /var/log
+# amrecover
+AMRECOVER Version 2\&.4\&.2\&. Contacting server on oops \&.\&.\&.
+\&.\&.\&.
+amrecover> ls
+\&.\&.\&.
+amrecover> add syslog syslog\&.6 syslog\&.7
+Added /log/syslog
+Added /log/syslog\&.6
+Added /log/syslog\&.7
+amrecover> list
+TAPE DMP014 LEVEL 0 DATE 1997\-12\-08
+        /log/syslog\&.7
+        /log/syslog\&.6
+TAPE DMP015 LEVEL 1 DATE 1997\-12\-09
+        /log/syslog
+amrecover> quit 
+.fi
+
+.PP
+The \fBhistory\fR command shows each tape that has a backup of the current disk along with the date of the backup, the level, the tape label and the file position on the tape\&. All active tapes are listed, not just back to the most recent full dump\&.
+
+.PP
+Tape file position zero is a label\&. The first backup image is in file position one\&.
+.nf
+
+# cd /var/log
+# amrecover
+AMRECOVER Version 2\&.4\&.2\&. Contacting server on oops \&.\&.\&.
+\&.\&.\&.
+amrecover> history
+200\- Dump history for config "daily" host "this\-host\&.some\&.org" disk "/var"
+201\- 1997\-12\-09 1 DMP015 9
+201\- 1997\-12\-08 1 DMP014 11
+201\- 1997\-12\-07 0 DMP013 22
+201\- 1997\-12\-06 1 DMP012 16
+201\- 1997\-12\-05 1 DMP011 9
+201\- 1997\-12\-04 0 DMP010 11
+201\- 1997\-12\-03 1 DMP009 7
+201\- 1997\-12\-02 1 DMP008 7
+201\- 1997\-12\-01 1 DMP007 9
+201\- 1997\-11\-30 1 DMP006 6
+\&.\&.\&.
+amrecover> quit 
+.fi
+
+.SH "ENVIRONMENT"
+
+.PP
+\fBPAGER\fR   The \fBls\fR and \fBlist\fR commands will use $PAGER to display the file lists\&. Defaults to \fBmore\fR if PAGER is not set\&.
+
+.SH "AUTHOR"
+
+.PP
+Alan M\&. McIvor <alan@kauri\&.auck\&.irl\&.cri\&.nz> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamrestore\fR(8), \fBreadline\fR(3)
+
diff --git a/man/amrecover.8.in b/man/amrecover.8.in
deleted file mode 100644 (file)
index c962b46..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-.TH AMRECOVER 8 "29 November 1996" "Alan M. McIvor" "AMANDA INDEX" \" -*- nroff -*-
-.de CP
-.ie '\\$3'' \\fB\\$1\\fP \\fI\\$2\\fP
-.el .ie '\\$2'' \\fB\\$1\\fP [ \\fI\\$3\\fP ]
-.el \\fB\\$1\\fP \\fI\\$2\\fP [ \\fI\\$3\\fP ]
-..
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.SH NAME
-amrecover \- Amanda index database browser
-.SH SYNOPSIS
-.B amrecover
-[
-[
-.B \-C
-]
-.I config
-]
-[
-.B \-s
-.I index-server
-]
-[
-.B \-t
-.I tape-server
-]
-[
-.B \-d
-.I tape-device
-]
-.SH DESCRIPTION
-.B Amrecover
-browses the database of Amanda index files to determine which tapes
-contain files to recover.  Furthermore, it is able to recover files.
-.LP
-In order to restore files in place, you must invoke
-.BR amrecover
-from the root of the backed up filesystem, or use
-.BR lcd
-to move into that directory, otherwise a directory tree that resembles 
-the backed up filesystem will be created in the current directory.
-See the examples below for details.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-.TP
-.CP "[ -C ]" config
-Amanda configuration
-(default: @DEFAULT_CONFIG@).
-.TP
-.CP -s index-server
-Host that runs the index daemon
-(default: @DEFAULT_SERVER@).
-.TP
-.CP -t tape-server
-Host that runs the tape server daemon
-(default: @DEFAULT_TAPE_SERVER@).
-.TP
-.CP -d tape-device
-Tape device to use on the tape server host
-(default: @DEFAULT_TAPE_DEVICE@).
-.SH COMMANDS
-.B Amrecover
-connects to the index server and then presents a command line prompt.
-Usage is similar to an ftp client.
-The GNU readline library is used to provide command line history and editing
-if it was built in to
-.BR amrecover .
-.LP
-The purpose of browsing the database is to build up a
-.I restore list
-of files to be extracted from the backup system.
-The following commands are available:
-.TP
-.CP sethost hostname
-Specifies which host to look at backup files for
-(default: the local host).
-.TP
-.CP setdate YYYY-MM-DD
-Set the date
-(default: today).
-File listing commands only return information on
-backup images for this day,
-for the day before with the next lower dump level,
-and so on,
-until the most recent level 0 backup on or before
-the specified date is encountered.
-.IP
-For example, if:
-.LP
-.RS
-.RS
-.nf
-1996-07-01 was a level 0 backup
-1996-07-02 through 1996-07-05 were level 1 backups
-1996-07-06 through 1997-07-08 were level 2 backups
-.fi
-.RE
-.RE
-.IP
-then if 1997-07-08 is the requested date,
-files from the following days would be used:
-.LP
-.RS
-.RS
-.nf
-1997-07-08 (the latest level 2 backup)
-1997-07-05 (the latest level 1 backup)
-1997-07-01 (the latest level 0 backup)
-.fi
-.RE
-.RE
-.IP
-Only the most recent version of a file will be presented.
-.IP
-The following abbreviated date specifications are accepted:
-.RS
-.RS
-.TP
-.I --MM-DD
-dates in the current year
-.TP
-.I ---DD
-dates in the current month of the current year
-.RE
-.RE
-.TP
-.CP setdisk diskname mountpoint
-Specifies which disk to consider
-(default: the disk holding the working directory where
-.B amrecover
-is started).
-It can only be set after the host is set with
-.BR sethost .
-.I Diskname
-is the device name specified in the
-.I amanda.conf
-or
-.I disklist
-configuration file.
-The disk must be local to the host.
-If
-.I mountpoint
-is not specified, all pathnames will be relative to the (unknown)
-mount point instead of full pathnames.
-.TP
-.CP listdisk [diskdevice]
-List all
-.B diskname
-.TP
-.CP settape [[server]:][tapedev|default]
-Specifies the host to use as the tape server, and which of its tape
-devices to use.
-If the server is omitted, but the colon is not, the
-server name reverts to @DEFAULT_TAPE_SERVER@, the configure-time
-default.
-If the tape device is omitted, it remains unchanged.
-To use the default tape device selected by the tape server, the word
-.I default
-must be specified.
-If no argument is specified, or the argument is an
-empty string, no changes occur, and the current settings are
-displayed.
-.IP
-If you want amrecover to use your changer, the 
-.I tapedev
-must be equal to the amrecover_changer setting on the server.
-.IP
-If you need to change the protocol (tape:, rait:, file:, null:) then you
-must specify the hostname.
-.LP
-.RS
-.RS
-.nf
-settape @DEFAULT_TAPE_SERVER@:file:/file1
-.fi
-.RE
-.RE
-.IP
-You can change the tape device when amrecover ask you to load the tape:
-.LP
-.RS
-.RS
-.nf
-Load tape DMP014 now
-Continue? [Y/n/t]: t
-Tape device: server2:/dev/nst2
-Continue? [Y/n/t]: Y
-Using tape /dev/nst2 from server server2.
-.fi
-.RE
-.RE
-.IP
-.TP
-.CP setmode mode
-Set the extraction mode for Samba shares.
-If
-.I mode
-is
-.BR smb ,
-shares are sent to the Samba server
-to be restored back onto the PC.
-If
-.I mode
-is
-.BR tar ,
-they are extracted on the local machine the same way tar volumes are extracted.
-.TP
-.CP mode
-Displays the extracting mode for Samba shares.
-.TP
-.CP history
-Show the backup history of the current host and disk.
-Dates, levels, tapes and file position on tape of each backup are displayed.
-.TP
-.CP pwd
-Display the name of the current backup working directory.
-.TP
-.CP cd dir
-Change the backup working directory to
-.I dir.
-If the mount point was specified with
-.BR setdisk ,
-this can be a full pathname or it can be
-relative to the current backup working directory.
-If the mount point was not specified,
-paths are relative to the mount point if they start with "/",
-otherwise they are relative to the current backup working directory.
-The
-.I dir
-can be a shell style wildcards.
-.TP
-.CP cdx dir
-Like the
-.B cd
-command but allow regular expression.
-.TP
-.CP lpwd
-Display the
-.B amrecover
-working directory.
-Files will be restored under this directory,
-relative to the backed up filesystem.
-.TP
-.CP lcd path
-Change the
-.B amrecover
-working directory to
-.IR path .
-.TP
-.CP ls
-List the contents of the current backup working directory.
-See the description of the
-.B setdate
-command for how the view of the
-directory is built up.
-The backup date is shown for each file.
-.TP
-.CP add item1 "item2 ..."
-Add the specified files or directories to the restore list.
-Each item may have shell style wildcards.
-.TP
-.CP addx item1 "item2 ..."
-Add the specified files or directories to the restore list.
-Each item may be a regular expression.
-.TP
-.CP delete item1 "item2 ..."
-Delete the specified files or directories from the restore list.
-Each item may have shell style wildcards.
-.TP
-.CP deletex item1 "item2 ..."
-Delete the specified files or directories from the restore list.
-Each item may be a regular expression.
-.TP
-.CP list "" file
-Display the contents of the restore list.
-If a file name is specified,
-the restore list is written to that file.
-This can be used to manually extract the files from the Amanda tapes with
-.BR amrestore .
-.TP
-.CP clear
-Clear the restore list.
-.TP
-.CP quit
-Close the connection to the index server and exit.
-.TP
-.CP exit
-Close the connection to the index server and exit.
-.TP
-.CP extract
-Start the extract sequence (see the examples below).  Make sure the
-local working directory is the root of the backed up filesystem, or
-another directory that will behave like that.  Use
-.BR lpwd
-to display the local working directory, and
-.BR lcd
-to change it.
-.TP
-.CP help
-Display a brief list of these commands.
-.SH EXAMPLES
-The following shows the recovery of an old
-.I syslog
-file.
-.LP
-.RS
-.EX
-# cd /var/log
-# ls -l syslog.7
-syslog.7: No such file or directory
-# amrecover
-AMRECOVER Version 2.4.2. Contacting server on @DEFAULT_SERVER@ ...
-220 @DEFAULT_SERVER@ AMANDA index server (2.4.2) ready.
-Setting restore date to today (1997-12-09)
-200 Working date set to 1997-12-09.
-200 Config set to @DEFAULT_CONFIG@.
-200 Dump host set to this-host.some.org.
-$CWD '/var/log' is on disk '/var' mounted at '/var'.
-200 Disk set to /var.
-/var/log
-WARNING: not on root of selected filesystem, check man-page!
-amrecover> ls
-1997-12-09 daemon.log
-1997-12-09 syslog
-1997-12-08 authlog
-1997-12-08 sysidconfig.log
-1997-12-08 syslog.0
-1997-12-08 syslog.1
-1997-12-08 syslog.2
-1997-12-08 syslog.3
-1997-12-08 syslog.4
-1997-12-08 syslog.5
-1997-12-08 syslog.6
-1997-12-08 syslog.7
-amrecover> add syslog.7
-Added /log/syslog.7
-amrecover> lpwd
-/var/log
-amrecover> lcd ..
-/var
-amrecover> extract
-
-Extracting files using tape drive @DEFAULT_TAPE_DEVICE@ on host @DEFAULT_TAPE_SERVER@
-
-The following tapes are needed: DMP014
-
-Restoring files into directory /var
-Continue? [Y/n]: y
-
-Load tape DMP014 now
-Continue? [Y/n/t]: y
-set owner/mode for '.'? [yn] n
-amrecover> quit
-200 Good bye.
-# ls -l syslog.7
-total 26
--rw-r--r--   1 root     other      12678 Oct 14 16:36 syslog.7
-.EE
-.RE
-.LP
-If you do not want to overwrite existing files,
-create a subdirectory to run
-.B amrecover
-from and then move the restored files afterward.
-.LP
-.RS
-.EX
-# cd /var
-# (umask 077 ; mkdir .restore)
-# cd .restore
-# amrecover
-AMRECOVER Version 2.4.2. Contacting server on @DEFAULT_SERVER@ ...
-\&...
-amrecover> cd log
-/var/log
-amrecover> ls
-\&...
-amrecover> add syslog.7
-Added /log/syslog.7
-amrecover> lpwd
-/var/.restore
-amrecover> extract
-
-Extracting files using tape drive @DEFAULT_TAPE_DEVICE@ on host @DEFAULT_TAPE_SERVER@
-\&...
-amrecover> quit
-200 Good bye.
-# mv -i log/syslog.7 ../log/syslog.7-restored
-# cd ..
-# rm -fr .restore
-.EE
-.RE
-.LP
-If you need to run
-.B amrestore
-by hand instead of letting
-.B amrecover
-control it,
-use the
-.B list
-command after browsing to display the needed tapes.
-.LP
-.RS
-.EX
-# cd /var/log
-# amrecover
-AMRECOVER Version 2.4.2. Contacting server on @DEFAULT_SERVER@ ...
-\&...
-amrecover> ls
-\&...
-amrecover> add syslog syslog.6 syslog.7
-Added /log/syslog
-Added /log/syslog.6
-Added /log/syslog.7
-amrecover> list
-TAPE DMP014 LEVEL 0 DATE 1997-12-08
-        /log/syslog.7
-        /log/syslog.6
-TAPE DMP015 LEVEL 1 DATE 1997-12-09
-        /log/syslog
-amrecover> quit
-.EE
-.RE
-.LP
-The
-.B history
-command shows each tape that has a backup of the
-current disk along with the date of the backup,
-the level,
-the tape label
-and the file position on the tape.
-All active tapes are listed, not just back to
-the most recent full dump.
-.LP
-Tape file position zero is a label.
-The first backup image is in file position one.
-.LP
-.RS
-.EX
-# cd /var/log
-# amrecover
-AMRECOVER Version 2.4.2. Contacting server on @DEFAULT_SERVER@ ...
-\&...
-amrecover> history
-200- Dump history for config "@DEFAULT_CONFIG@" host "this-host.some.org" disk "/var"
-201- 1997-12-09 1 DMP015 9
-201- 1997-12-08 1 DMP014 11
-201- 1997-12-07 0 DMP013 22
-201- 1997-12-06 1 DMP012 16
-201- 1997-12-05 1 DMP011 9
-201- 1997-12-04 0 DMP010 11
-201- 1997-12-03 1 DMP009 7
-201- 1997-12-02 1 DMP008 7
-201- 1997-12-01 1 DMP007 9
-201- 1997-11-30 1 DMP006 6
-\&...
-amrecover> quit
-.EE
-.RE
-.SH ENVIRONMENT
-.LP
-.B PAGER
-.RS
-The 
-.B ls
-and 
-.B list
-commands will use $PAGER to display the file lists.
-Defaults to
-.I more
-if PAGER is not set.
-.RE
-.SH AUTHOR
-Alan M. McIvor <alan@kauri.auck.irl.cri.nz>
-.SH "SEE ALSO"
-amanda(8),
-amrestore(8),
-readline(3)
diff --git a/man/amreport.8 b/man/amreport.8
new file mode 100644 (file)
index 0000000..8d91fe6
--- /dev/null
@@ -0,0 +1,98 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMREPORT" 8 "" "" ""
+.SH NAME
+amreport \- generate a formatted output of statistics for an AMANDA run
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBamreport\fR [\fIconfig\fR] [\-l\ \fIlogfile\fR] [\-f\ \fIoutputfile\fR] [\-p\ \fIpostscriptfile\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmreport\fR generates a summary report of an \fBamanda\fR(8) backup run\&. If no configuration name is specified, amanda\&.conf is read from the current directory\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.TP
+\fBconfig\fR
+Name of the configuration to process\&.
+
+.TP
+\fB\-l\fR \fIlogfile\fR
+Name of the log file to parse to generate the report\&. If a log file is not specified, it defaults to the file:
+
+.PP
+\fBlogdir\fR/log
+
+.PP
+where \fBlogdir\fR is the log directory defined in amanda\&.conf\&.
+
+.TP
+\fB\-f\fR \fIoutputfile\fR
+Normally, \fBamreport\fR sends the report via e\-mail to the \fBmailto\fR user as defined in the amanda\&.conf file\&. If \fBoutputfile\fR is specified, then the report is put in \fBoutputfile\fR\&.
+
+.TP
+\fB\-p\fR \fIpostscriptfile\fR
+Send the postscript output to the file \fBpostscriptfile\fR instead of to the \fBlpr\fR(1) command\&. This option has an effect only if the \fBlbl\-templ\fR directive is specified in amanda\&.conf\&.
+
+.SH "LABEL PRINTING"
+
+.PP
+\fBAMANDA\fR can print postscript labels describing the contents of tape(s) written in a run\&. The labels are designed to be folded and inserted into the tape case along with the tape or hole punched and put in a 3\-ring binder\&. Various label templates are provided to format data for different tape sizes\&.
+
+.PP
+The information printed varies slightly between label templates due to size constraints\&. Labels contain one line for each host/file\-system pair and may also contain the file number on the tape, the level of the dump, the original size of the dump and the size of the (possibly compressed) tape file\&.
+
+.PP
+Add the \fBlbl\-templ\fR parameter to the tapetype definition in amanda\&.conf to enable labels\&. If you don't add this line to your tapetype definition, \fBamreport\fR will not print tape labels\&.
+
+.PP
+You may use the \fBremap='I'>printer\fR keyword in amanda\&.conf to print to other than the system default printer\&.
+
+.SH "TEMPLATES"
+
+.PP
+\fBAMANDA\fR provides label templates for the following tape types\&. These are pretty generic labels and should be easy to customize for other tape types or particular site needs\&.
+
+.nf
+
+* ExaByte 8mm tapes
+* DAT 4mm tapes
+* DLT tapes
+* 3\-ring binder
+
+.fi
+
+.PP
+The 3\-ring binder type is the most generic\&. It may be used to make a hardcopy log of the tapes\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamflush\fR(8)
+
diff --git a/man/amreport.8.in b/man/amreport.8.in
deleted file mode 100644 (file)
index f319e81..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.de OP
-\fB\\$1\fP \fI\\$2\fP
-..
-.TH AMREPORT 1
-.SH NAME
-amreport \- generate a formatted output of statistics for an Amanda run
-.SH SYNOPSIS
-.B amreport
-[
-.I config
-] [
-.B -l
-.I logfile
-] [
-.B -f
-.I outputfile
-] [
-.B -p
-.I postscriptfile
-] 
-.SH DESCRIPTION
-.B Amreport
-generates a summary report of an
-.IR amanda (8)
-backup run.
-If no configuration name is specified, amanda.conf is
-read from the current directory.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-.TP
-.I config
-Name of the configuration to process.
-.TP
-.OP -l logfile
-Name of the log file to parse to generate the report.
-If a log file is not specified, it defaults to the file:
-.LP
-.RS
-.RS
-\fIlogdir\fP/log
-.RE  
-.RE  
-.IP  
-where
-.I logdir
-is the log directory defined in amanda.conf.
-.TP
-.OP -f outputfile
-Normally,
-.B amreport
-sends the report via e-mail to the
-.I mailto
-user as defined in the amanda.conf file.
-If
-.I outputfile
-is specified, then the report is put in
-.IR outputfile .
-.TP
-.OP -p postscriptfile
-Send the postscript output to the file
-.I postscriptfile
-instead of to the
-.IR lpr (1)
-command.
-This option has an effect only if the
-.I lbl-templ
-directive is specified in amanda.conf.
-.SH LABEL PRINTING
-.LP
-Amanda can print postscript labels describing the contents
-of tape(s) written in a run.
-The labels are designed to be folded and
-inserted into the tape case along with the tape or hole punched and put 
-in a 3-ring binder.
-Various label templates are provided to
-format data for different tape sizes.
-.LP
-The information printed varies slightly between label templates
-due to size constraints.
-Labels contain one line for each host/file-system
-pair and may also contain the file number on the tape,
-the level of the dump,
-the original size of the dump
-and the size of the (possibly compressed) tape file.
-.LP
-Add the
-.I lbl-templ
-parameter to the tapetype definition in amanda.conf to enable labels.
-If you don't add this line to your
-tapetype definition,
-.B amreport
-will not print tape labels.
-.LP
-You may use the
-.I printer
-keyword in amanda.conf to print to other than the system default printer.
-.LP
-.SH TEMPLATES
-.sp
-Amanda provides label templates for the following tape types.
-These are pretty generic labels and should be easy to customize for
-other tape types or particular site needs.
-.LP
-.RS
-.RS
-.nf
-* ExaByte 8mm tapes
-* DAT 4mm tapes
-* DLT tapes
-* 3-ring binder
-.fi
-.RE
-.RE
-.LP
-The 3-ring binder type is the most generic.
-It may be used to make a hardcopy log of the tapes.
-.SH "SEE ALSO"
-amanda(8),
-amflush(8)
index a51961fbf2b04f75509bf9ae4689e479f2ab5752..0e0f418ecf4d6a3508f64bf8c2ec8a51d3b53c26 100644 (file)
-.\"
-.de EX
-.if t .ft C
-.nf
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
 ..
-.de EE
-.fi
-.if t .ft
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
 ..
-.TH AMRESTORE 8
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMRESTORE" 8 "" "" ""
 .SH NAME
-amrestore \- extract backup images from an Amanda tape
-.SH SYNOPSIS
-.B amrestore
-[
-.B \-r
-|
-.B \-c
-|
-.B \-C
-]
-[
-.B \-b
-.I blocksize
-]
-[
-.B \-f
-.I fileno
-]
-[
-.B \-l
-.I label
-]
-[
-.B \-p
-]
-[
-.B \-h
-]
-.I tapedevice
-|
-.I holdingfile
-[
-.I hostname
-[
-.I diskname
-[
-.I datestamp
-[
-.I hostname
-[
-.I diskname
-[
-.I datestamp
-\&...
-]]]]]]
-.SH DESCRIPTION
-.B Amrestore
-extracts backup images from the tape mounted on
-.I tapedevice
-or from the holding disk file
-.I holdingfile
-that match
-.IR hostname ,
-.I diskname
-and
-.I datestamp
-patterns given on the command line.
-The tape or holding file must be in a format written by the
-.B amdump
-or
-.B amflush
-program.
-.LP
-If
-.I diskname
-is not specified, all backups on the tape for the previous
-.I hostname
-are candidates.
-If
-.I datestamp
-is not specified, all backups on the tape for the previous
-.I hostname
-and
-.I diskname
-are candidates.
-If no
-.IR hostname ,
-.I diskname
-or
-.I datestamp
-are specified, every backup on the tape is a candidate.
-.LP
-.I Hostname
-and
-.I diskname
-are special expression descibe in the "HOST & DISK EXPRESSION" section
-of
-.IR amanda (8).
-.I Datestamp
-are special expression describe in the "DATESTAMP EXPRESSION" section
-of
-.IR amanda (8).
-For example, if
-.I diskname
-is "rz[23]a", it would match disks
-.B rz2a
-and
-.BR rz3a .
-.LP
-.I Datestamp
-is useful if
-.B amflush
-writes multiple backup runs to a single tape.
+amrestore \- extract backup images from an AMANDA tape
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 10
+\fBamrestore\fR [\fB\-r\fR | \fB\-c\fR | \fB\-C\fR] [\-b\ \fIblocksize\fR] [\-f\ \fIfileno\fR] [\-l\ \fIlabel\fR] [\-p] [\-h] \fB\fItapedevice\fR\fR | \fB\fIholdingfile\fR\fR | \fB\fIhostname\fR\ [\fIdiskname\fR\ [\fIdatestamp\fR\ [\fIhostname\fR\ [\fIdiskname\fR\ [\fIdatestamp\fR...]]]]]\fR 
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmrestore\fR extracts backup images from the tape mounted on \fBtapedevice\fR or from the holding disk file \fBholdingfile\fR that match \fBhostname\fR, \fBdiskname\fR and \fBdatestamp\fR patterns given on the command line\&. The tape or holding file must be in a format written by the \fBamdump\fR or \fBamflush\fR program\&.
+
+.PP
+If \fBdiskname\fR is not specified, all backups on the tape for the previous \fBhostname\fR are candidates\&. If \fBdatestamp\fR is not specified, all backups on the tape for the previous \fBhostname\fR and \fBdiskname\fR are candidates\&. If no \fBhostname\fR, \fBdiskname\fR or \fBdatestamp\fR are specified, every backup on the tape is a candidate\&.
+
 .PP
-Unless
-.B \-p
-is used,
-candidate backup images are extracted to files
-in the current directory named:
-.LP
-.RS
-.I hostname.diskname.datestamp.dumplevel
-.RE
+\fBHostname\fR and \fBdiskname\fR are special expressions described in the "HOST & DISK EXPRESSION" section of \fBamanda\fR(8)\&. \fBDatestamp\fR are special expression described in the "DATESTAMP EXPRESSION" section of \fBamanda\fR(8)\&. For example, if \fBdiskname\fR is "rz[23]a", it would match disks \fBrz2a\fR and \fBrz3a\fR\&.
+
 .PP
-Amrestore doesn't use a changer, it restore from the tape already loaded
-in the
-.I tapedevice.
-.SH OPTIONS
+\fBDatestamp\fR is useful if \fBamflush\fR writes multiple backup runs to a single tape\&.
+
+.PP
+Unless \fB\-p\fR is used, candidate backup images are extracted to files in the current directory named:
+
+.PP
+\fBhostname\&.diskname\&.datestamp\&.dumplevel\fR
+
+.PP
+Amrestore doesn't use a changer, it restore from the tape already loaded in the \fBtapedevice\&.\fR
+
+.SH "OPTIONS"
+
 .TP
-.B \-b
-Set the blocksize used to read the tape or holding file.
-All holding files must be read with a blocksize of 32 KBytes.
-.B Amrestore
-should normally be able to determine the blocksize for tapes
-on its own and not need this parameter.
-.IP
-The default is 32 KBytes.
+\fB\-b\fR
+Set the blocksize used to read the tape or holding file\&. All holding files must be read with a blocksize of 32 KBytes\&. \fBAmrestore\fR should normally be able to determine the blocksize for tapes on its own and not need this parameter\&.
+
+.PP
+The default is 32 KBytes\&.
+
 .TP
-.B \-f
-Do a rewind followed by a fsf <fileno> before trying to restore an image.
+\fB\-f\fR
+Do a rewind followed by a fsf <fileno> before trying to restore an image\&.
+
 .TP
-.B \-l
-Check if we restoring from the tape with the right
-.I label
+\fB\-l\fR
+Check if we restoring from the tape with the right \fBlabel\fR
+
 .TP
-.B \-p
-Pipe output.
-The first matching backup image is sent to standard output,
-which is normally a pipe to
-.B restore
-or
-.BR tar ,
-then
-.B amrestore
-quits.
-It may be run again to continue selecting backups to process.
-Make sure you specify the no-rewind
-.I tapedevice
-when doing this.
-.IP
-Note:
-.B restore
-may report "short read" errors when reading from a pipe.
-Most versions of
-.B restore
-support a blocking factor option to let you set the read block size,
-and you should set it to 2.
-See the example below.
+\fB\-p\fR
+Pipe output\&. The first matching backup image is sent to standard output, which is normally a pipe to \fBrestore\fR or \fBtar\fR, then \fBamrestore\fR quits\&. It may be run again to continue selecting backups to process\&. Make sure you specify the no\-rewind \fBtapedevice\fR when doing this\&.
+
+.PP
+Note: \fBrestore\fR may report "short read" errors when reading from a pipe\&. Most versions of \fBrestore\fR support a blocking factor option to let you set the read block size, and you should set it to 2\&. See the example below\&.
+
 .TP
-.B \-c
-Compress output using the fastest method the compression program provides.
-.B Amrestore
-normally writes output files in a format understood by
-.B restore
-or
-.BR tar ,
-even if the backups on the tape are compressed.
-With the
-.B \-c
-or
-.B \-C
-option,
-.B amrestore
-writes all files in compressed format,
-even if the backups on the tape are not compressed.
-Output file names will have a
-.I .Z
-or
-.I .gz
-extension depending on whether
-.B compress
-or
-.B gzip
-is the preferred compression program.
-This option is useful when the current directory disk is small.
+\fB\-c\fR
+Compress output using the fastest method the compression program provides\&. \fBAmrestore\fR normally writes output files in a format understood by \fBrestore\fR or \fBtar\fR, even if the backups on the tape are compressed\&. With the \fB\-c\fR or \fB\-C\fR option, \fBamrestore\fR writes all files in compressed format, even if the backups on the tape are not compressed\&. Output file names will have a \&.Z or \&.gz extension depending on whether \fBcompress\fR or \fBgzip\fR is the preferred compression program\&. This option is useful when the current directory disk is small\&.
+
 .TP
-.B \-C
-Compress output using the best method the compression program provides
-(may be very CPU intensive).
-See the notes above about the
-.B \-c
-option.
+\fB\-C\fR
+Compress output using the best method the compression program provides (may be very CPU intensive)\&. See the notes above about the \fB\-c\fR option\&.
+
 .TP
-.B \-r
-Raw output.
-Backup images are output exactly as they are on the tape,
-including the
-.B amdump
-headers.
-Output file names will have a
-.I .RAW
-extension.
-This option is only useful for debugging and other strange circumstances.
+\fB\-r\fR
+Raw output\&. Backup images are output exactly as they are on the tape, including the \fBamdump\fR headers\&. Output file names will have a \&.RAW extension\&. This option is only useful for debugging and other strange circumstances\&.
+
 .TP
-.B \-h
-Header output.
-The tape header block is output at the beginning of each file.
-This is like
-.B \-r
-except
-.B \-c
-or
-.B \-C
-may also be used to compress the result.
-.B Amrecover
-uses the header to determine the restore program to use.
-.LP
-If a header is written (\-r or \-h),
-only 32 KBytes are output regardless of the tape blocksize.
-This makes the resulting image usable as a holding file.
-.SH EXAMPLES
-The following does an interactive restore of disk
-.I rz3g
-from host
-.IR seine ,
-to restore particular files.
-Note the use of the
-.B b
-option to
-.BR restore ,
-which causes it to read in units of two 512-byte blocks (1 Kbyte)
-at a time.
-This helps keep it from complaining about short reads.
-.LP
-.RS
-.EX
+\fB\-h\fR
+Header output\&. The tape header block is output at the beginning of each file\&. This is like \fB\-r\fR except \fB\-c\fR or \fB\-C\fR may also be used to compress the result\&. \fBAmrecover\fR uses the header to determine the restore program to use\&.
+
+.PP
+If a header is written (\-r or \-h), only 32 KBytes are output regardless of the tape blocksize\&. This makes the resulting image usable as a holding file\&.
+
+.SH "EXAMPLES"
+
+.PP
+The following does an interactive restore of disk \fBrz3g\fR from host \fBseine\fR, to restore particular files\&. Note the use of the \fBb\fR option to \fBrestore\fR, which causes it to read in units of two 512\-byte blocks (1 Kbyte) at a time\&. This helps keep it from complaining about short reads\&.
+
+.nf
+
 % amrestore \-p /dev/nrmt9 seine rz3g | restore \-ivbf 2 \-
-.EE
-.RE
-.LP
-The next example extracts all backup images for host
-.IR seine .
-This is the usual way to extract all data for a host after a disk crash.
-.LP
-.RS
-.EX
+
+.fi
+
+.PP
+The next example extracts all backup images for host \fBseine\fR\&. This is the usual way to extract all data for a host after a disk crash\&.
+
+.nf
+
 % amrestore /dev/nrmt9 seine
-.EE
-.RE
-.LP
-If the backup datestamp in the above example is
-.I 19910125
-and
-.I seine
-has level 0 backups of disks
-.I rz1a
-and
-.I rz1g
-on the tape,
-these files will be created in the current directory:
-.LP
-.RS
-.EX
-seine.rz1a.19910125.0
-seine.rz1g.19910125.0
-.EE
-.RE
-.LP
-You may also use
-.B amrestore
-to extract a backup image from a holding disk
-file that has not yet been flushed to tape:
-.LP
-.RS
-.EX
-% amrestore \-p /amanda/20001119/seine.rz1a.2 | restore \-ivbf 2 \-
-.EE
-.RE
-.LP
-.B Amrestore
-may be used to generate a listing of images on a tape:
-.LP
-.RS
-.EX
-% mt -f /dev/nrmt9 rewind
-% amrestore \-p /dev/nrmt9 no-such-host > /dev/null
-.EE
-.RE
-.LP
-This asks
-.B amrestore
-to find images for host
-.BR no-such-host .
-It will not find any entries that match, but along the way will report
-each image it skips.
-.SH CAVEATS
-.LP
-GNU tar must be used to restore files from backup images created with
-the GNUTAR dumptype.
-Vendor tar programs sometimes fail to read GNU tar images.
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
-.br
-University of Maryland, College Park
+
+.fi
+
+.PP
+If the backup datestamp in the above example is 19910125 and \fBseine\fR has level 0 backups of disks \fBrz1a\fR and \fBrz1g\fR on the tape, these files will be created in the current directory:
+
+.nf
+
+seine\&.rz1a\&.19910125\&.0
+seine\&.rz1g\&.19910125\&.0
+
+.fi
+
+.PP
+You may also use \fBamrestore\fR to extract a backup image from a holding disk file that has not yet been flushed to tape:
+
+.nf
+
+% amrestore \-p /amanda/20001119/seine\&.rz1a\&.2 | restore \-ivbf 2 \-
+
+.fi
+
+.PP
+\fBAmrestore\fR may be used to generate a listing of images on a tape:
+
+.nf
+
+% mt \-f /dev/nrmt9 rewind
+% amrestore \-p /dev/nrmt9 no\-such\-host > /dev/null
+
+.fi
+
+.PP
+This asks \fBamrestore\fR to find images for host \fBno\-such\-host\fR\&. It will not find any entries that match, but along the way will report each image it skips\&.
+
+.SH "CAVEATS"
+
+.PP
+\fBGNU\-tar\fR must be used to restore files from backup images created with the GNUTAR dumptype\&. Vendor tar programs sometimes fail to read GNU tar images\&.
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org>, University of Maryland, College Park: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
 .SH "SEE ALSO"
-amanda(8),
-amdump(8),
-amflush(8),
-tar(1)
-restore(8)
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), \fBtar\fR(1)  \fBrestore\fR(8)
+
diff --git a/man/amrmtape.8 b/man/amrmtape.8
new file mode 100644 (file)
index 0000000..b625a5f
--- /dev/null
@@ -0,0 +1,78 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMRMTAPE" 8 "" "" ""
+.SH NAME
+amrmtape \- remove a tape from the AMANDA database
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBamrmtape\fR [\-n] [\-v] [\-q] [\-d] \fIconfig\fR \fIlabel\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmrmtape\fR invalidates the contents of an existing backup tape in the configuration database\&. This is meant as a recovery mechanism when a good backup is damaged either by faulty hardware or user error, e\&.g\&. the tape is eaten by the drive or is overwritten\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-n\fR
+Generate new \fBtapelist\fR and database files with \fBlabel\fR removed, but leave them in \fI/tmp\fR and do not update the original copies\&.
+
+.TP
+\fB\-v\fR
+List backups of hosts and disks that are being discarded\&. Enabled by default\&.
+
+.TP
+\fB\-q\fR
+Opposite of \fB\-v\fR\&.
+
+.TP
+\fB\-d\fR
+Run in debugging mode so all executed commands are shown\&.
+
+.SH "EXAMPLE"
+
+.PP
+Remove tape labeled \fBDAILY034\fR from the \fBDailySet1\fR configuration\&.
+.nf
+
+# amrmtape DailySet1 DAILY034
+.fi
+
+.SH "AUTHOR"
+
+.PP
+Adrian T\&. Filipi\-Martin <atf3r@cs\&.virginia\&.edu>: Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamadmin\fR(8), \fBamanda\fR(8)
+
diff --git a/man/amrmtape.8.in b/man/amrmtape.8.in
deleted file mode 100644 (file)
index a4a37fa..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMRMTAPE 8
-.SH NAME
-amrmtape \- remove a tape from the Amanda database
-.SH SYNOPSIS
-.B amrmtape
-[
-.B -n
-] [
-.B -v
-] [
-.B -q
-] [
-.B -d
-]
-.I config
-.I label
-.SH DESCRIPTION
-.B Amrmtape
-invalidates the contents of an existing backup tape
-in the configuration database.
-This is meant as a recovery mechanism when a
-good backup is damaged either by faulty hardware or user error,
-e.g. the tape is eaten by the drive or is overwritten.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-.TP
-.B -n
-Generate new
-.I tapelist
-and database files with
-.I label
-removed, but leave them in
-.I /tmp
-and do not update the original copies.
-.TP
-.B -v
-List backups of hosts and disks that are being discarded.  Enabled by default.
-.TP
-.B -q
-Opposite of
-.BR -v .
-.TP
-.B -d
-Run in debugging mode so all executed commands are shown.
-.SH EXAMPLE
-Remove tape labeled
-.I DAILY034
-from the
-.I DailySet1
-configuration.
-.LP
-.RS
-.EX
-# amrmtape DailySet1 DAILY034
-.EE
-.RE
-.SH AUTHOR
-Adrian T. Filipi-Martin <atf3r@cs.virginia.edu>
-.SH "SEE ALSO"
-amadmin(8),
-amanda(8)
diff --git a/man/amstatus.8 b/man/amstatus.8
new file mode 100644 (file)
index 0000000..87ea0fe
--- /dev/null
@@ -0,0 +1,100 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMSTATUS" 8 "" "" ""
+.SH NAME
+amstatus \- display the state of an AMANDA run
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBamstatus\fR [\-\-config] \fIconfig\fR [\-\-file\ \fIamdumpfile\fR] [\-\-summary] [\-\-dumping] [\-\-waitdumping] [\-\-waittaper] [\-\-dumpingtape] [\-\-writingtape] [\-\-finished] [\-\-failed] [\-\-estimate] [\-\-gestimate] [\-\-stats]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmstatus\fR gives the current state of the \fBAMANDA\fR run specified by the \fBconfig\fR configuration\&. If there is no active \fBAMANDA\fR running, it summarizes the result of the last run\&. It may also be used to summarize the results of a previous run\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.PP
+All options may be abbreviated to the shortest non\-ambiguous sub\-string\&. If no options are given, everything is displayed\&.
+
+.TP
+\fB[\-\-config] config\fR
+Specify the \fBAMANDA\fR configuration you want to display the state for\&.
+
+.TP
+\fB\-\-file amdumpfile\fR
+Specify an alternate file instead of the \fBamdump\fR or \fBamflush\fR file\&.
+
+.TP
+\fB\-\-summary\fR
+Display a summary of the state of the run\&.
+
+.TP
+\fB\-\-dumping\fR
+Display all partitions that are dumping\&.
+
+.TP
+\fB\-\-waitdumping|wdumping\fR
+Display all partitions that are waiting to be dumped\&.
+
+.TP
+\fB\-\-waittaper|wtaper\fR
+Display all partitions dumped that are waiting to be written to tape\&.
+
+.TP
+\fB\-\-dumpingtape|dtape\fR
+Display all partitions that are dumping directly to tape\&.
+
+.TP
+\fB\-\-writingtape|wtape\fR
+Display all partitions that are writing to tape\&.
+
+.TP
+\fB\-\-finished\fR
+Display all partitions that are dumped and written to tape\&.
+
+.TP
+\fB\-\-failed|error\fR
+Display all partitions that failed\&.
+
+.TP
+\fB\-\-estimate\fR
+Display all partitions whose estimate is finished\&. Works only during the estimate phase\&.
+
+.TP
+\fB\-\-gestimate|gettingestimate\fR
+Display all partitions whose estimate is not finished\&. Works only during the estimate phase\&.
+
+.TP
+\fB\-\-stats|statistics\fR
+Display statistics about active\-time of taper and dumpers\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamcheck\fR(8), \fBamdump\fR(8), \fBamrestore\fR(8), \fBamadmin\fR(8)
+
diff --git a/man/amstatus.8.in b/man/amstatus.8.in
deleted file mode 100644 (file)
index 977f503..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.de P1
-\fB\\$1\fP \fI\\$2\fP \\$3 \fI\\$4\fP \\$5
-..
-.de P2
-\fB\\$1\fP \fI\\$2\fP \fI\\$3\fP
-..
-.de P3
-\fB\\$1\fP \\$2 \fI\\$3\fP \\$4 \fI\\$5\fP \\$6 \\$7
-..
-.TH AMSTATUS 8
-.SH NAME
-amstatus \- display the state of an Amanda run
-.SH SYNOPSIS
-.B amstatus
-[--config]
-.I config
-[--file 
-.I amdumpfile
-]
-[--summary]
-[--dumping]
-[--waitdumping]
-[--waittaper]
-[--dumpingtape]
-[--writingtape]
-[--finished]
-[--failed]
-[--estimate]
-[--gestimate]
-[--stats]
-.SH DESCRIPTION
-.B Amstatus
-gives the current state of the Amanda run specified by the 
-.I config
-configuration.
-If there is no active amanda running, it summarizes the result of the last run.
-It may also be used to summarize the results of a previous run.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH OPTIONS
-All options may be abbreviated to the shortest non-ambiguous sub-string.
-If no options are given, everything is displayed.
-.TP
-.B "[--config]" config
-Specify the Amanda configuration you want to display the state for.
-.TP
-.B --file amdumpfile
-Specify an alternate file instead of the
-.I amdump
-or
-.I amflush
-file.
-.TP
-.B --summary
-Display a summary of the state of the run.
-.TP
-.B --dumping
-Display all partitions that are dumping.
-.TP
-.B --waitdumping|wdumping
-Display all partitions that are waiting to be dumped.
-.TP
-.B --waittaper|wtaper
-Display all partitions dumped that are waiting to be written to tape.
-.TP
-.B --dumpingtape|dtape
-Display all partitions that are dumping directly to tape.
-.TP
-.B --writingtape|wtape
-Display all partitions that are writing to tape.
-.TP
-.B --finished
-Display all partitions that are dumped and written to tape.
-.TP
-.B --failed|error
-Display all partitions that failed.
-.TP
-.B --estimate
-Display all partitions whose estimate is finished.
-Works only during the estimate phase.
-.TP
-.B --gestimate|gettingestimate
-Display all partitions whose estimate is not finished.
-Works only during the estimate phase.
-.TP
-.B --stats|statistics
-Display statistics about active-time of taper and dumpers.
-.SH "SEE ALSO"
-amanda(8),
-amcheck(8),
-amdump(8),
-amrestore(8),
-amadmin(8)
index c31c20784b87c726c02ac9be02940270cea1f0b7..1741d4f74bbba2d227f876b73cd9a73245eac665 100644 (file)
-.\"
-.de CO
-\fB\\$1\fP \fI\\$2\fP
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
 ..
-.TH AMTAPE 8
-.SH NAME
-amtape \- user interface to Amanda tape changer controls
-.SH SYNOPSIS
-.B amtape
-.I config
-.I command
-[
-.I command options
-]
-.SH DESCRIPTION
-.B Amtape
-performs tape changer control operations.
-It uses the underlying tape changer script defined by the
-.B tpchanger
-option for a particular Amanda
-configuration as specified by the
-.I config
-argument.
-.LP
-Tape changers maintain a notion of the
-.I current
-and
-.I next
-slot for each configuration.
-These may or may not correspond to an actual physical state of the device,
-but do tend to minimize searching through the tape storage slots.
-If the desired tape is in the current slot,
-it is likely the next tape needed is in the next slot
-rather than at some random position in the storage slots.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH COMMANDS
-.TP
-.B reset
-Reset the tape changer to a known state.
-The
-.I current
-slot is set to the
-.I first
-slot.
-Other device-specific side effects may occur.
-Some gravity stackers need to be reset to the top position by hand.
-This command notifies Amanda the stacker is back in that position.
-.TP
-.B eject
-If a tape is loaded in the drive, it is ejected and returned to the
-slot from which it was loaded.
-.TP
-.B clean
-If a cleaning tape is defined for the changer,
-it is used to clean the drive.
-.TP
-.B show
-Show the contents of all slots.
-This can be slow.
-.TP
-.CO label label
-Search for and load the Amanda tape with label
-.IR label .
-.TP
-.B taper
-Perform the
-.B taper
-scan algorithm.
-Load the next tape in the configuration's tape sequence,
-or a fresh tape with a suitable label.
-.TP
-.B device
-Display the name of the current tape device on
-.IR stdout .
-.TP
-.B current
-Display the current slot.
-.TP
-.B update
-Update the changer label database, if it has one,
-to match the tapes now available.
-.TP
-.CO slot slot
-Eject any tape in the drive and put it away,
-then load the tape from slot
-.I slot
-and reset
-.IR current .
-.TP
-.B slot current
-Eject any tape in the drive and put it away,
-then load the tape from the current slot.
-.TP
-.B slot prev
-Eject any tape in the drive and put it away,
-then load the tape from the previous slot and reset
-.IR current .
-.TP
-.B slot next
-Eject any tape in the drive and put it away,
-then load the tape from the next slot and reset
-.IR current .
-.TP
-.B slot first
-Eject any tape in the drive and put it away,
-then load the tape from the first slot and reset
-.IR current .
-.TP
-.B slot last
-Eject any tape in the drive and put it away,
-then load the tape from the last slot and reset
-.IR current .
-.TP
-.B slot advance
-Eject any tape in the drive and put it away.
-Advance
-.I current
-to the next tape, but do not load it.
-.IP
-This is useful with non-gravity stackers to unload the last tape used
-and set up Amanda for the next run.
-If you just use
-.BR eject ,
-the current tape will be mounted again in the next run,
-where it will be rejected as being still in use,
-ejected and the next tape requested.
-Using
-.B slot next
-followed by
-.B eject
-does an unnecessary mount.
-.LP
-Note: most changers optimize the
-.B slot
-commands to not eject the loaded tape if it is the one being requested.
-.SH AUTHOR
-James da Silva <jds@cs.umd.edu>
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
 .br
-University of Maryland, College Park
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMTAPE" 8 "" "" ""
+.SH NAME
+amtape \- user interface to AMANDA tape changer controls
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 7
+\fBamtape\fR \fIconfig\fR \fIcommand\fR [\fIcommand\fR\ \fIoptions\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmtape\fR performs tape changer control operations\&. It uses the underlying tape changer script defined by the \fBtpchanger\fR option for a particular \fBAMANDA\fR configuration as specified by the \fBconfig\fR argument\&.
+
+.PP
+Tape changers maintain a notion of the \fBcurrent\fR and \fBnext\fR slot for each configuration\&. These may or may not correspond to an actual physical state of the device, but do tend to minimize searching through the tape storage slots\&. If the desired tape is in the current slot, it is likely the next tape needed is in the next slot rather than at some random position in the storage slots\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about \fBAMANDA\fR\&.
+
+.SH "COMMANDS"
+
+.TP
+\fBreset\fR
+Reset the tape changer to a known state\&. The \fBcurrent\fR slot is set to the \fBfirst\fR slot\&. Other device\-specific side effects may occur\&. Some gravity stackers need to be reset to the top position by hand\&. This command notifies \fBAMANDA\fR the stacker is back in that position\&.
+
+.TP
+\fBeject\fR
+If a tape is loaded in the drive, it is ejected and returned to the slot from which it was loaded\&.
+
+.TP
+\fBclean\fR
+If a cleaning tape is defined for the changer, it is used to clean the drive\&.
+
+.TP
+\fBshow\fR
+Show the contents of all slots\&. This can be slow\&.
+
+.TP
+\fBlabel\fR \fBlabel\fR
+Search for and load the \fBAMANDA\fR tape with label \fBlabel\fR\&.
+
+.TP
+\fBtaper\fR
+Perform the \fBtaper\fR scan algorithm\&. Load the next tape in the configuration's tape sequence, or a fresh tape with a suitable label\&.
+
+.TP
+\fBdevice\fR
+Display the name of the current tape device on \fBstdout\fR\&.
+
+.TP
+\fBcurrent\fR
+Display the current slot\&.
+
+.TP
+\fBupdate\fR
+Update the changer label database, if it has one, to match the tapes now available\&.
+
+.TP
+\fBslot\fR \fBslot\fR
+Eject any tape in the drive and put it away, then load the tape from slot \fBslot\fR and reset \fBcurrent\fR\&.
+
+.TP
+\fBslot current\fR
+Eject any tape in the drive and put it away, then load the tape from the current slot\&.
+
+.TP
+\fBslot prev\fR
+Eject any tape in the drive and put it away, then load the tape from the previous slot and reset \fBcurrent\fR\&.
+
+.TP
+\fBslot next\fR
+Eject any tape in the drive and put it away, then load the tape from the next slot and reset \fBcurrent\fR\&.
+
+.TP
+\fBslot first\fR
+Eject any tape in the drive and put it away, then load the tape from the first slot and reset \fBcurrent\fR\&.
+
+.TP
+\fBslot last\fR
+Eject any tape in the drive and put it away, then load the tape from the last slot and reset \fBcurrent\fR\&.
+
+.TP
+\fBslot advance\fR
+Eject any tape in the drive and put it away\&. Advance \fBcurrent\fR to the next tape, but do not load it\&.
+
+.PP
+This is useful with non\-gravity stackers to unload the last tape used and set up \fBAMANDA\fR for the next run\&. If you just use \fBeject\fR, the current tape will be mounted again in the next run, where it will be rejected as being still in use, ejected and the next tape requested\&. Using \fBslot next\fR followed by \fBeject\fR does an unnecessary mount\&.
+
+.PP
+Note: most changers optimize the \fBslot\fR commands to not eject the loaded tape if it is the one being requested\&.
+
+.SH "AUTHOR"
+
+.PP
+James da Silva, <jds@amanda\&.org> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
 .SH "SEE ALSO"
-amanda(8)
+
+.PP
+\fBamanda\fR(8)
+
diff --git a/man/amtapetype.8 b/man/amtapetype.8
new file mode 100644 (file)
index 0000000..ff168a2
--- /dev/null
@@ -0,0 +1,113 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMTAPETYPE" 8 "" "" ""
+.SH NAME
+amtapetype \- generate a tapetype definition.
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 11
+\fBamtapetype\fR [\-h] [\-c] [\-o] [\-b\ \fIblocksize\fR] [\-e\ \fIestsize\fR] [\-f\ \fItapedev\fR] [\-t\ \fItypename\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBamtapetype\fR generates a tapetype entry for \fBAMANDA\fR\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-h\fR
+Display an help message\&.
+
+.TP
+\fB\-c\fR
+Run only the hardware compression detection heuristic test and stop\&. This takes a few minutes only\&.
+
+.TP
+\fB\-o\fR
+Overwrite the tape, even if it's an \fBAMANDA\fR tape\&.
+
+.TP
+\fB\-b\fR\fI&#8201; blocksize\fR
+record block size (default: 32k)
+
+.TP
+\fB\-e\fR\fI&#8201; estsize\fR
+estimated tape size (default: 1g == 1024m)
+
+.TP
+\fB\-f\fR\fI&#8201; tapedev\fR
+tape device name (default: $TAPE) The device to perform the test\&.
+
+.TP
+\fB\-t\fR\fI&#8201; typename\fR
+tapetype name (default: unknown\-tapetype)
+
+.SH "EXAMPLE"
+
+.PP
+Generate a tapetype definition for your tape device:
+
+.nf
+
+% amtapetype \-f /dev/nst0
+
+.fi
+
+.SH "NOTES"
+
+.PP
+Hardware compression is detected by measuring the writing speed difference of the tape drive when writing an amount of compressable and uncompresseable data\&. It does not rely on the status bits of the tape drive or the OS parameters\&. If your tape drive has very large buffers or is very fast, the program could fail to detect hardware compression status reliably\&.
+
+.PP
+During the first pass, it writes files that are estimated to be 1% of the expected tape capacity\&. It gets the expected capacity from the \-e command line flag, or defaults to 1 GByte\&. In a perfect world (which means there is zero chance of this happening with tapes :\-), there would be 100 files and 100 file marks\&.
+
+.PP
+During the second pass, the file size is cut in half\&. In that same fairyland world, this means 200 files and 200 file marks\&.
+
+.PP
+In both passes the total amount of data written is summed as well as the number of file marks written\&. At the end of the second pass, quoting from the code:
+
+.PP
+* Compute the size of a filemark as the difference in data written between pass 1 and pass 2 divided by the difference in number of file marks written between pass 1 and pass 2\&. \&.\&.\&. *
+
+.PP
+So if we wrote 1\&.0 GBytes on the first pass and 100 file marks, and 0\&.9 GBytes on the second pass with 200 file marks, those additional 100 file marks in the second pass took 0\&.1 GBytes and therefor a file mark is 0\&.001 GBytes (1 MByte)\&.
+
+.PP
+Note that if the estimated capacity is wrong, the only thing that happens is a lot more (or less, but unlikely) files, and thus, file marks, get written\&. But the math still works out the same\&. The \-e flag is there to keep the number of file marks down because they can be slow (since they force the drive to flush all its buffers to physical media)\&.
+
+.PP
+All sorts of things might happen to cause the amount of data written to vary enough to generate a big file mark size guess\&. A little more ``\fBshoe shining\fR'' because of the additional file marks (and flushes), dirt left on the heads from the first pass of a brand new tape, the temperature/humidity changed during the multi\-hour run, a different amount of data was written after the last file mark before EOT was reported, etc\&.
+
+.PP
+Note that the file mark size might really be zero for whatever device this is, and it was just the measured capacity variation that caused \fBamtapetype\fR to think those extra file marks in pass 2 actually took up space\&.
+
+.PP
+It also explains why \fBamtapetype\fR used to sometimes report a negative file mark size if the math happened to end up that way\&. When that happens now we just report it as zero\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8)
+
diff --git a/man/amtapetype.8.in b/man/amtapetype.8.in
deleted file mode 100644 (file)
index a183d23..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMTAPETYPE 8
-.SH NAME
-amtapetype \- generate a tapetype definition.
-.SH SYNOPSIS
-.B amtapetype
-[-h]
-[-c]
-[-b blocksize]
-[-e estsize]
-[-f tapedev]
-[-t typename]
-.SH DESCRIPTION
-.B Amtapetype
-generate a tapetype entry for amanda.
-.SH OPTIONS
-.PP
-.TP 10
-.B \-h
-Display an help message.
-.TP
-.B \-c
-Run only the hardware compression detection heuristic test and stop.
-This takes a few minutes only.
-.TP
-.BI \-b "\| blocksize\^"
-record block size (default: 32k)
-.TP
-.BI \-e "\| estsize\^"
-estimated tape size (default: 1g == 1024m)
-.TP
-.BI \-f "\| tapedev\^"
-tape device name (default: $TAPE)
-The device to perform the test.
-.TP
-.BI \-t "\| typename\^"
-tapetype name (default: unknown-tapetype)
-.PD
-.SH EXAMPLE
-Generate a tapetype definition for your tape device:
-.LP
-.RS
-.nf
-% amtapetype -f @DEFAULT_TAPE_DEVICE@
-.SH NOTES
-Hardware compression is detected by measuring
-the writing speed difference of the tape drive
-when writing an amount of compressable and uncompresseable data.
-It does not rely on the status bits of the tape drive or the OS parameters.
-If your tape drive has very large buffers or is very fast, the program
-could fail to detect hardware compression status reliably.
-
-During the first pass, it writes files that are estimated to be 1%
-of the expected tape capacity.  It gets the expected capacity from
-the -e command line flag, or defaults to 1 GByte.  In a perfect world
-(which means there is zero chance of this happening with tapes :-),
-there would be 100 files and 100 file marks.
-
-During the second pass, the file size is cut in half.  In that same
-fairyland world, this means 200 files and 200 file marks.
-
-In both passes the total amount of data written is summed as well as the
-number of file marks written.  At the end of the second pass, quoting
-from the code:
-
-   * Compute the size of a filemark as the difference in data written
-   * between pass 1 and pass 2 divided by the difference in number of
-   * file marks written between pass 1 and pass 2.  ...
-
-So if we wrote 1.0 GBytes on the first pass and 100 file marks, and
-0.9 GBytes on the second pass with 200 file marks, those additional 100
-file marks in the second pass took 0.1 GBytes and therefor a file mark
-is 0.001 GBytes (1 MByte).
-
-Note that if the estimated capacity is wrong, the only thing that happens
-is a lot more (or less, but unlikely) files, and thus, file marks,
-get written.  But the math still works out the same.  The -e flag is
-there to keep the number of file marks down because they can be slow
-(since they force the drive to flush all its buffers to physical media).
-
-All sorts of things might happen to cause the amount of data
-written to vary enough to generate a big file mark size guess.  A little
-more "shoe shining" because of the additional file marks (and flushes),
-dirt left on the heads from the first pass of a brand new tape, the
-temperature/humidity changed during the multi-hour run, a different amount
-of data was written after the last file mark before EOT was reported, etc.
-
-Note that the file mark size might really be zero for whatever device this
-is, and it was just the measured capacity variation that caused amtapetype
-to think those extra file marks in pass 2 actually took up space.
-
-It also explains why amtapetype used to sometimes report a negative file
-mark size if the math happened to end up that way.  When that happens
-now we just report it as zero.
-.SH "SEE ALSO"
-amanda(8)
diff --git a/man/amtoc.8 b/man/amtoc.8
new file mode 100644 (file)
index 0000000..83de671
--- /dev/null
@@ -0,0 +1,131 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMTOC" 8 "" "" ""
+.SH NAME
+amtoc \- generate TOC (Table Of Contents) for an AMANDA run
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 6
+\fBamtoc\fR [\-a] [\-i] [\-t] [\-f\ \fIfile\fR] [\-s\ \fIsubs\fR] [\-w] [\-\-] \fIlogfile\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmtoc\fR generates a table of contents for an \fBAMANDA\fR run\&. It's a perl script (if you don't have perl, install it first!)\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-a\fR
+The output file name will be \fBlabel\-of\-the\-tape\fR\&.toc in the same directory as \fBlogfile\fR\&.
+
+.TP
+\fB\-i\fR
+Display help about \fBamtoc\fR\&.
+
+.TP
+\fB\-t\fR
+Generate the output in tabular form\&.
+
+.TP
+\fB\-f file\fR
+Write the output to a file ('\-' for stdout)\&.
+
+.TP
+\fB\-s subs\fR
+Evaluate the output file name from \fBsubs\fR, with $_ set to \fBlabel\-of\-the\-tape\fR\&. The \fB\-a\fR option is equivalent to \fB\-s\fR  \fI's/$_/\&.toc/'\fR\&.
+
+.TP
+\fB\-w\fR
+Separate tapes with form\-feeds and display blank lines before totals\&.
+
+.TP
+\fB\-\-\fR
+Marks the last option so the next parameter is the \fBlogfile\fR\&.
+
+.TP
+\fBlogfile\fR
+(use '\-' for stdin)
+
+.SH "OUTPUT FORMAT"
+
+.PP
+The standard output has five fields separated by two spaces:
+
+.nf
+
+#  Server:/partition  date  level  size[Kb]
+0  daily\-05:  19991005  \-  \-
+1  cuisun15:/cuisun15/home  19991005  1  96
+2  cuinfs:/export/dentiste  19991005  1  96
+  \&.\&.\&.
+103  cuisg11:/  19991005  0  4139136
+103  total:  \-  \-  16716288
+
+
+
+.fi
+
+.PP
+In tabular format (\-t), this would look like:
+
+.nf
+
+  #  Server:/partition           date      lev  size[Kb]
+  0  daily\-05:                   19991005    \-         \-
+  1  cuisun15:/cuisun15/home     19991005    1        96
+  2  cuinfs:/export/dentiste     19991005    1        96
+  \&.\&.\&.
+103  cuisg11:/                   19991005    0   4139136
+103  total:                      \-           \-  16716288
+
+
+.fi
+
+.SH "USAGE"
+
+.PP
+The easiest way to use it is to run \fBamtoc\fR right after \fBamdump\fR in the \fBcron job:\fR
+
+.nf
+
+amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log\&.*\&.[0\-9] | head \-1` ; amtoc \-a $log
+
+.fi
+
+.PP
+which will generate /usr/local/etc/amanda//daily/\fBtape_label\fR\&.toc\&. You may also want to call \fBamtoc\fR after an \fBamflush\fR\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamdump\fR(8), \fBamflush\fR(8), \fBamgetconf\fR(8), cron, perl
+
+.SH "AUTHOR"
+
+.PP
+Nicolas Mayencourt <Nicolas\&.Mayencourt@cui\&.unige\&.ch>, University of Geneva/Switzerland : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
diff --git a/man/amtoc.8.in b/man/amtoc.8.in
deleted file mode 100644 (file)
index 6dde1bf..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-.TH AMTOC 8 
-.de CP
-.ie '\\$3'' \\fB\\$1\\fP \\fI\\$2\\fP
-.el .ie '\\$2'' \\fB\\$1\\fP [ \\fI\\$3\\fP ]
-.el \\fB\\$1\\fP \\fI\\$2\\fP [ \\fI\\$3\\fP ]
-..
-.SH NAME 
-amtoc \- generate TOC (Table Of Contents) for an Amanda run
-.SH SYNOPSIS
-.B
-.I amtoc
-[
-.B \-a
-] [
-.B \-i
-] [
-.B \-t
-] [
-.B \-f
-.I file
-] [
-.B \-s
-.I subs
-] [
-.B \-w
-] [
-.B \--
-]
-.I logfile
-.SH DESCRIPTION
-.I Amtoc 
-generates a table of contents for an Amanda run.
-It's a perl script (if you don't have perl, install it first!).
-.SH OPTIONS
-.TP
-.B \-a
-The output file name will be
-.IR label-of-the-tape .toc
-in the same directory as
-.IR logfile .
-.TP
-.B \-i
-Display help about
-.BR amtoc .
-.TP
-.B \-t
-Generate the output in tabular form.
-.TP
-.B \-f file
-Write the output to a file ('-' for stdout).
-.TP 
-.B \-s subs
-Evaluate the output file name from
-.IR subs ,
-with $_ set to
-.IR label-of-the-tape .
-The
-.B -a
-option is equivalent to
-.B -s
-.IR 's/$_/.toc/' .
-.TP
-.B \-w
-Separate tapes with form-feeds and display blank lines before totals.
-.TP
-.B \-\-
-Marks the last option so the next parameter is the
-.IR logfile .
-.TP
-.B logfile
-(use '-' for stdin)
-.SH OUTPUT FORMAT
-The standard output has five fields separated by two spaces:
-.LP
-.RS
-.nf
-#  Server:/partition  date  level  size[Kb]
-0  daily-05:  19991005  -  -
-1  cuisun15:/cuisun15/home  19991005  1  96
-2  cuinfs:/export/dentiste  19991005  1  96
-  ...
-103  cuisg11:/  19991005  0  4139136
-103  total:  -  -  16716288
-.RE
-.LP
-In tabular format (-t), this would look like:
-.LP
-.RS
-.nf
-  #  Server:/partition           date      lev  size[Kb]
-  0  daily-05:                   19991005    -         -
-  1  cuisun15:/cuisun15/home     19991005    1        96
-  2  cuinfs:/export/dentiste     19991005    1        96
-  ...
-103  cuisg11:/                   19991005    0   4139136
-103  total:                      -           -  16716288
-.RE
-.SH USAGE
-The easiest way to use it is to run
-.I amtoc
-right after
-.I amdump
-in the
-.I
-cron job:
-.LP
-.RS  
-.nf
-amdump @DEFAULT_CONFIG@ ; logdir=`amgetconf @DEFAULT_CONFIG@ logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
-.fi
-.RE  
-.LP
-which will generate @CONFIG_DIR@/@DEFAULT_CONFIG@/\fItape_label\fR.toc.
-You may also want to call
-.I amtoc
-after an
-.IR amflush .
-.SH SEE ALSO
-amanda(8),
-amdump(8),
-amflush(8),
-amgetconf(8),
-cron,
-perl
-.SH AUTHOR
-Nicolas MAYENCOURT <Nicolas.Mayencourt@cui.unige.ch>
-.br
-University of Geneva/Switzerland
diff --git a/man/amverify.8 b/man/amverify.8
new file mode 100644 (file)
index 0000000..5939a40
--- /dev/null
@@ -0,0 +1,63 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMVERIFY" 8 "" "" ""
+.SH NAME
+amverify \- check an Amanda tape for errors
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBamverify\fR \fIconfig\fR [\fIslot\fR\ [\fIruntapes\fR]]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmverify\fR reads an Amanda format tape and makes sure each backup image can be processed by \fBamrestore\fR and, if possible, the appropriate restore program (e\&.g\&. \fBtar\fR)\&.
+
+.PP
+\fBAmverify\fR runs \fBamrestore\fR on each file of the tape and pipes the output to a restore program (if available) with an option to create a catalogue of the backup\&. The catalogue itself is discarded\&. Only the success or failure of the operation itself is reported\&.
+
+.PP
+If the backup image cannot be processed by the restore program, e\&.g\&. if it was written on a different operating system, the image is sent through \fBdd\fR to /dev/null\&. This still determines if the tape is readable, but does not do any internal consistency check on the image\&.
+
+.PP
+If \fBconfig\fR is set up to use a tape changer, the \fBslot\fR argument may be used to choose the first tape to process\&. Otherwise, the \fBcurrent\fR slot is used\&.
+
+.PP
+The \fBruntapes\fR configuration parameter determines how many tapes are processed unless it is specified on the command line\&.
+
+.PP
+See the \fBamanda\fR(8) man page for more details about Amanda\&.
+
+.SH "AUTHOR"
+
+.PP
+Axel Zinser <fifi@icem\&.de> : Original text
+
+.PP
+Stefan G\&. Weichinger, <sgw@amanda\&.org>, maintainer of the \fBAMANDA\fR\-documentation: XML\-conversion
+
+.SH "SEE ALSO"
+
+.PP
+\fBamrestore\fR(8), \fBamanda\fR(8), \fBamverifyrun\fR(8)
+
diff --git a/man/amverify.8.in b/man/amverify.8.in
deleted file mode 100644 (file)
index 371e9e4..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-.\"
-.de EX
-.if t .ft C
-.nf
-..
-.de EE
-.fi
-.if t .ft
-..
-.TH AMVERIFY 8
-.SH NAME
-amverify \- check an Amanda tape for errors
-.SH SYNOPSIS
-.B amverify
-.I config
-[
-.I slot
-[
-.I runtapes
-]
-]
-.SH DESCRIPTION
-.B Amverify
-reads an Amanda format tape and makes sure each backup image
-can be processed by
-.B amrestore
-and, if possible, the appropriate restore program (e.g.\&
-.BR tar ).
-.LP
-.B Amverify
-runs
-.B amrestore
-on each file of the tape and pipes the output
-to a restore program (if available) with an option to create a catalogue
-of the backup.
-The catalogue itself is discarded.
-Only the success or failure of the operation itself is reported.
-.LP
-If the backup image cannot be processed by the restore program,
-e.g. if it was written on a different operating system,
-the image is sent through
-.B dd
-to /dev/null.
-This still determines if the tape is readable,
-but does not do any internal consistency check on the image.
-.LP
-If
-.I config
-is set up to use a tape changer,
-the
-.I slot
-argument may be used to choose the first tape to process.
-Otherwise,
-the
-.B current
-slot is used.
-.LP
-The
-.B runtapes
-configuration parameter determines how many tapes are processed unless
-it is specified on the command line.
-.LP
-See the
-.IR amanda (8)
-man page for more details about Amanda.
-.SH AUTHOR
-Axel Zinser <fifi@icem.de>
-.SH "SEE ALSO"
-amrestore(8),
-amanda(8),
-amverifyrun(8)
diff --git a/man/amverifyrun.8 b/man/amverifyrun.8
new file mode 100644 (file)
index 0000000..3255b7c
--- /dev/null
@@ -0,0 +1,40 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "AMVERIFYRUN" 8 "" "" ""
+.SH NAME
+amverifyrun \- check the tapes written by the last AMANDA run
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 12
+\fBamverifyrun\fR \fIconfig\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBAmverifyrun\fR read the log from the last \fBAMANDA\fR run to find the slot of the first tape used and the number of tapes used\&. It call \fBamverify\fR with these argument\&.
+
+.SH "SEE ALSO"
+
+.PP
+\fBamanda\fR(8), \fBamverify\fR(8)
+
diff --git a/man/amverifyrun.8.in b/man/amverifyrun.8.in
deleted file mode 100644 (file)
index 684305c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-.TH AMVERIFYRUN 8
-.SH NAME
-amverifyrun \- check the tapes written by the last amanda run
-.SH SYNOPSIS
-.B amverifyrun
-.I config
-.SH DESCRIPTION
-.B Amverifyrun
-read the log from the last amanda run to find the slot of the first tape
-used and the number of tapes used.
-It call
-.B amverify
-with these argument.
-.LP
-.SH "SEE ALSO"
-amanda(8),
-amverify(8)
index 21603abb51058423705355f121e6ba579e0fa03a..a7498df54c34c19c051fb28a1286bc79a1645648 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: set_commands.c,v 1.11.2.3.4.2.2.7 2004/02/11 13:15:29 martinea Exp $
+ * $Id: set_commands.c,v 1.11.2.3.4.2.2.5.2.2 2004/02/11 13:15:24 martinea Exp $
  *
  * implements the "set" commands in amrecover
  */
index 3d97a0d8117e0118a4dded6df8e8dfcea99a4ac6..d773b31f1dc2609c267c337bafdc42be6825cb06 100644 (file)
@@ -1,243 +1,7 @@
-/* A Bison parser, made from uparse.y
-   by GNU bison 1.35.  */
-
-#define YYBISON 1  /* Identify Bison output.  */
-
-# define       LISTDISK        257
-# define       SETHOST 258
-# define       SETDISK 259
-# define       SETDATE 260
-# define       SETTAPE 261
-# define       SETMODE 262
-# define       CD      263
-# define       CDX     264
-# define       QUIT    265
-# define       DHIST   266
-# define       LS      267
-# define       ADD     268
-# define       ADDX    269
-# define       EXTRACT 270
-# define       LIST    271
-# define       DELETE  272
-# define       DELETEX 273
-# define       PWD     274
-# define       CLEAR   275
-# define       HELP    276
-# define       LCD     277
-# define       LPWD    278
-# define       MODE    279
-# define       SMB     280
-# define       TAR     281
-# define       PATH    282
-# define       DATE    283
-
-#line 31 "uparse.y"
-
-#include "amanda.h"
-#include "amrecover.h"
-
-void yyerror P((char *s));
-extern int yylex P((void));
-
-#line 40 "uparse.y"
-#ifndef YYSTYPE
-typedef union {
-  int intval;
-  double floatval;
-  char *strval;
-  int subtok;
-} yystype;
-# define YYSTYPE yystype
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+/* A Bison parser, made by GNU Bison 1.875c.  */
 
-
-
-#define        YYFINAL         60
-#define        YYFLAG          -32768
-#define        YYNTBASE        30
-
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 283 ? yytranslate[x] : 45)
-
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-static const char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
-      26,    27,    28,    29
-};
-
-#if YYDEBUG
-static const short yyprhs[] =
-{
-       0,     0,     2,     4,     6,     8,    10,    12,    14,    16,
-      18,    20,    23,    25,    28,    31,    35,    38,    41,    43,
-      46,    49,    52,    55,    57,    59,    62,    64,    66,    68,
-      70,    72,    75,    78,    80,    83,    86,    88,    91,    94,
-      96,    99,   102,   104,   106,   109,   111
-};
-static const short yyrhs[] =
-{
-      31,     0,    32,     0,    33,     0,    34,     0,    36,     0,
-      38,     0,    40,     0,    42,     0,    43,     0,    44,     0,
-       3,    28,     0,     3,     0,     6,    29,     0,     4,    28,
-       0,     5,    28,    28,     0,     5,    28,     0,     7,    28,
-       0,     7,     0,     9,    28,     0,    10,    28,     0,     8,
-      26,     0,     8,    27,     0,    12,     0,    13,     0,    17,
-      28,     0,    17,     0,    20,     0,    21,     0,    25,     0,
-      11,     0,    14,    35,     0,    35,    28,     0,    28,     0,
-      15,    37,     0,    37,    28,     0,    28,     0,    18,    39,
-       0,    39,    28,     0,    28,     0,    19,    41,     0,    41,
-      28,     0,    28,     0,    24,     0,    23,    28,     0,    22,
-       0,    16,     0
-};
-
-#endif
-
-#if YYDEBUG
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const short yyrline[] =
-{
-       0,    62,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    75,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    91,    98,   100,   101,   102,   103,   104,   105,
-     108,   112,   116,   118,   121,   125,   127,   130,   134,   136,
-     139,   143,   145,   148,   150,   158,   162
-};
-#endif
-
-
-#if (YYDEBUG) || defined YYERROR_VERBOSE
-
-/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
-static const char *const yytname[] =
-{
-  "$", "error", "$undefined.", "LISTDISK", "SETHOST", "SETDISK", "SETDATE", 
-  "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST", "LS", "ADD", "ADDX", 
-  "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR", "HELP", "LCD", 
-  "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE", "ucommand", "set_command", 
-  "display_command", "quit_command", "add_command", "add_path", 
-  "addx_command", "addx_path", "delete_command", "delete_path", 
-  "deletex_command", "deletex_path", "local_command", "help_command", 
-  "extract_command", 0
-};
-#endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const short yyr1[] =
-{
-       0,    30,    30,    30,    30,    30,    30,    30,    30,    30,
-      30,    31,    31,    31,    31,    31,    31,    31,    31,    31,
-      31,    31,    31,    32,    32,    32,    32,    32,    32,    32,
-      33,    34,    35,    35,    36,    37,    37,    38,    39,    39,
-      40,    41,    41,    42,    42,    43,    44
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const short yyr2[] =
-{
-       0,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     2,     1,     2,     2,     3,     2,     2,     1,     2,
-       2,     2,     2,     1,     1,     2,     1,     1,     1,     1,
-       1,     2,     2,     1,     2,     2,     1,     2,     2,     1,
-       2,     2,     1,     1,     2,     1,     1
-};
-
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
-   doesn't specify something else to do.  Zero means the default is an
-   error. */
-static const short yydefact[] =
-{
-       0,    12,     0,     0,     0,    18,     0,     0,     0,    30,
-      23,    24,     0,     0,    46,    26,     0,     0,    27,    28,
-      45,     0,    43,    29,     1,     2,     3,     4,     5,     6,
-       7,     8,     9,    10,    11,    14,    16,    13,    17,    21,
-      22,    19,    20,    33,    31,    36,    34,    25,    39,    37,
-      42,    40,    44,    15,    32,    35,    38,    41,     0,     0,
-       0
-};
-
-static const short yydefgoto[] =
-{
-      58,    24,    25,    26,    27,    44,    28,    46,    29,    49,
-      30,    51,    31,    32,    33
-};
-
-static const short yypact[] =
-{
-      -3,    -5,    -1,     0,     1,     3,    -2,     4,     5,-32768,
-  -32768,-32768,     6,     7,-32768,     8,     9,    10,-32768,-32768,
-  -32768,    11,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768,-32768,    12,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,    13,-32768,    14,-32768,-32768,    15,
-  -32768,    16,-32768,-32768,-32768,-32768,-32768,-32768,    26,    29,
-  -32768
-};
-
-static const short yypgoto[] =
-{
-  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,-32768,-32768
-};
-
-
-#define        YYLAST          44
-
-
-static const short yytable[] =
-{
-       1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
-      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
-      21,    22,    23,    34,    39,    40,    59,    35,    36,    60,
-      37,    38,    41,    42,    43,    45,    47,    48,    50,    52,
-      53,    54,    55,    56,    57
-};
-
-static const short yycheck[] =
-{
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    28,    26,    27,     0,    28,    28,     0,
-      29,    28,    28,    28,    28,    28,    28,    28,    28,    28,
-      28,    28,    28,    28,    28
-};
-/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/usr/share/bison/bison.simple"
-
-/* Skeleton output parser for bison,
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -259,10 +23,8 @@ static const short yycheck[] =
    This special exception was added by the Free Software Foundation
    in version 1.24 of Bison.  */
 
-/* This is the parser code that is written into each bison parser when
-   the %semantic_parser declaration is not specified in the grammar.
-   It was written by Richard Stallman by simplifying the hairy parser
-   used when %semantic_parser is specified.  */
+/* Written by Richard Stallman by simplifying the original so called
+   ``semantic'' parser.  */
 
 /* All symbols defined below should begin with yy or YY, to avoid
    infringing on user name space.  This should be done even for local
@@ -271,20 +33,153 @@ static const short yycheck[] =
    define necessary library symbols; they are noted "INFRINGES ON
    USER NAME SPACE" below.  */
 
-#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     LISTDISK = 258,
+     SETHOST = 259,
+     SETDISK = 260,
+     SETDATE = 261,
+     SETTAPE = 262,
+     SETMODE = 263,
+     CD = 264,
+     CDX = 265,
+     QUIT = 266,
+     DHIST = 267,
+     LS = 268,
+     ADD = 269,
+     ADDX = 270,
+     EXTRACT = 271,
+     LIST = 272,
+     DELETE = 273,
+     DELETEX = 274,
+     PWD = 275,
+     CLEAR = 276,
+     HELP = 277,
+     LCD = 278,
+     LPWD = 279,
+     MODE = 280,
+     SMB = 281,
+     TAR = 282,
+     PATH = 283,
+     DATE = 284
+   };
+#endif
+#define LISTDISK 258
+#define SETHOST 259
+#define SETDISK 260
+#define SETDATE 261
+#define SETTAPE 262
+#define SETMODE 263
+#define CD 264
+#define CDX 265
+#define QUIT 266
+#define DHIST 267
+#define LS 268
+#define ADD 269
+#define ADDX 270
+#define EXTRACT 271
+#define LIST 272
+#define DELETE 273
+#define DELETEX 274
+#define PWD 275
+#define CLEAR 276
+#define HELP 277
+#define LCD 278
+#define LPWD 279
+#define MODE 280
+#define SMB 281
+#define TAR 282
+#define PATH 283
+#define DATE 284
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 31 "uparse.y"
+
+#include "amanda.h"
+#include "amrecover.h"
+
+void yyerror P((char *s));
+extern int yylex P((void));
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 40 "uparse.y"
+typedef union YYSTYPE {
+  int intval;
+  double floatval;
+  char *strval;
+  int subtok;
+} YYSTYPE;
+/* Line 191 of yacc.c.  */
+#line 149 "uparse.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 214 of yacc.c.  */
+#line 161 "uparse.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+#  define YYFREE free
+# endif
+# ifndef YYMALLOC
+#  define YYMALLOC malloc
+# endif
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   define YYSTACK_ALLOC alloca
+#  endif
 # else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
+#  if defined (alloca) || defined (_ALLOCA_H)
+#   define YYSTACK_ALLOC alloca
+#  else
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
 #   endif
 #  endif
 # endif
@@ -297,45 +192,36 @@ static const short yycheck[] =
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 #   define YYSIZE_T size_t
 #  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
 # endif
-#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
 
 
 #if (! defined (yyoverflow) \
      && (! defined (__cplusplus) \
-        || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+        || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
   short yyss;
   YYSTYPE yyvs;
-# if YYLSP_NEEDED
-  YYLTYPE yyls;
-# endif
-};
+  };
 
 /* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
 
 /* The size of an array large to enough to hold all stacks, each with
    N elements.  */
-# if YYLSP_NEEDED
-#  define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))     \
-      + 2 * YYSTACK_GAP_MAX)
-# else
-#  define YYSTACK_BYTES(N) \
+# define YYSTACK_BYTES(N) \
      ((N) * (sizeof (short) + sizeof (YYSTYPE))                                \
-      + YYSTACK_GAP_MAX)
-# endif
+      + YYSTACK_GAP_MAXIMUM)
 
 /* Copy COUNT objects from FROM to TO.  The source and destination do
    not overlap.  */
 # ifndef YYCOPY
-#  if 1 < __GNUC__
+#  if defined (__GNUC__) && 1 < __GNUC__
 #   define YYCOPY(To, From, Count) \
       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 #  else
@@ -361,13 +247,235 @@ union yyalloc
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
        Stack = &yyptr->Stack;                                          \
-       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
+       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
       }                                                                        \
     while (0)
 
 #endif
 
+#if defined (__STDC__) || defined (__cplusplus)
+   typedef signed char yysigned_char;
+#else
+   typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL  54
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   44
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS  30
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS  16
+/* YYNRULES -- Number of rules. */
+#define YYNRULES  47
+/* YYNRULES -- Number of states. */
+#define YYNSTATES  60
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   284
+
+#define YYTRANSLATE(YYX)                                               \
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const unsigned char yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const unsigned char yyprhs[] =
+{
+       0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
+      19,    21,    23,    26,    28,    31,    34,    38,    41,    44,
+      46,    49,    52,    55,    58,    60,    62,    65,    67,    69,
+      71,    73,    75,    78,    81,    83,    86,    89,    91,    94,
+      97,    99,   102,   105,   107,   109,   112,   114
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+      31,     0,    -1,    32,    -1,    33,    -1,    34,    -1,    35,
+      -1,    37,    -1,    39,    -1,    41,    -1,    43,    -1,    44,
+      -1,    45,    -1,     3,    28,    -1,     3,    -1,     6,    29,
+      -1,     4,    28,    -1,     5,    28,    28,    -1,     5,    28,
+      -1,     7,    28,    -1,     7,    -1,     9,    28,    -1,    10,
+      28,    -1,     8,    26,    -1,     8,    27,    -1,    12,    -1,
+      13,    -1,    17,    28,    -1,    17,    -1,    20,    -1,    21,
+      -1,    25,    -1,    11,    -1,    14,    36,    -1,    36,    28,
+      -1,    28,    -1,    15,    38,    -1,    38,    28,    -1,    28,
+      -1,    18,    40,    -1,    40,    28,    -1,    28,    -1,    19,
+      42,    -1,    42,    28,    -1,    28,    -1,    24,    -1,    23,
+      28,    -1,    22,    -1,    16,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const unsigned char yyrline[] =
+{
+       0,    63,    63,    64,    65,    66,    67,    68,    69,    70,
+      71,    72,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    91,    99,   100,   101,   102,   103,   104,
+     105,   109,   113,   117,   118,   122,   126,   127,   131,   135,
+     136,   140,   144,   145,   149,   150,   159,   163
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "LISTDISK", "SETHOST", "SETDISK",
+  "SETDATE", "SETTAPE", "SETMODE", "CD", "CDX", "QUIT", "DHIST", "LS",
+  "ADD", "ADDX", "EXTRACT", "LIST", "DELETE", "DELETEX", "PWD", "CLEAR",
+  "HELP", "LCD", "LPWD", "MODE", "SMB", "TAR", "PATH", "DATE", "$accept",
+  "ucommand", "set_command", "display_command", "quit_command",
+  "add_command", "add_path", "addx_command", "addx_path", "delete_command",
+  "delete_path", "deletex_command", "deletex_path", "local_command",
+  "help_command", "extract_command", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const unsigned short yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const unsigned char yyr1[] =
+{
+       0,    30,    31,    31,    31,    31,    31,    31,    31,    31,
+      31,    31,    32,    32,    32,    32,    32,    32,    32,    32,
+      32,    32,    32,    32,    33,    33,    33,    33,    33,    33,
+      33,    34,    35,    36,    36,    37,    38,    38,    39,    40,
+      40,    41,    42,    42,    43,    43,    44,    45
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const unsigned char yyr2[] =
+{
+       0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     2,     1,     2,     2,     3,     2,     2,     1,
+       2,     2,     2,     2,     1,     1,     2,     1,     1,     1,
+       1,     1,     2,     2,     1,     2,     2,     1,     2,     2,
+       1,     2,     2,     1,     1,     2,     1,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const unsigned char yydefact[] =
+{
+       0,    13,     0,     0,     0,    19,     0,     0,     0,    31,
+      24,    25,     0,     0,    47,    27,     0,     0,    28,    29,
+      46,     0,    44,    30,     0,     2,     3,     4,     5,     6,
+       7,     8,     9,    10,    11,    12,    15,    17,    14,    18,
+      22,    23,    20,    21,    34,    32,    37,    35,    26,    40,
+      38,    43,    41,    45,     1,    16,    33,    36,    39,    42
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+      -1,    24,    25,    26,    27,    28,    45,    29,    47,    30,
+      50,    31,    52,    32,    33,    34
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -6
+static const yysigned_char yypact[] =
+{
+      -3,    -5,    -1,     0,     1,     3,    -2,     4,     5,    -6,
+      -6,    -6,     6,     7,    -6,     8,     9,    10,    -6,    -6,
+      -6,    11,    -6,    -6,    26,    -6,    -6,    -6,    -6,    -6,
+      -6,    -6,    -6,    -6,    -6,    -6,    -6,    12,    -6,    -6,
+      -6,    -6,    -6,    -6,    -6,    13,    -6,    14,    -6,    -6,
+      15,    -6,    16,    -6,    -6,    -6,    -6,    -6,    -6,    -6
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yysigned_char yypgoto[] =
+{
+      -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,    -6,
+      -6,    -6,    -6,    -6,    -6,    -6
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const unsigned char yytable[] =
+{
+       1,     2,     3,     4,     5,     6,     7,     8,     9,    10,
+      11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
+      21,    22,    23,    35,    40,    41,    54,    36,    37,     0,
+      38,    39,    42,    43,    44,    46,    48,    49,    51,    53,
+      55,    56,    57,    58,    59
+};
+
+static const yysigned_char yycheck[] =
+{
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    28,    26,    27,     0,    28,    28,    -1,
+      29,    28,    28,    28,    28,    28,    28,    28,    28,    28,
+      28,    28,    28,    28,    28
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const unsigned char yystos[] =
+{
+       0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    31,    32,    33,    34,    35,    37,
+      39,    41,    43,    44,    45,    28,    28,    28,    29,    28,
+      26,    27,    28,    28,    28,    36,    28,    38,    28,    28,
+      40,    28,    42,    28,     0,    28,    28,    28,    28,    28
+};
 
 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
 # define YYSIZE_T __SIZE_TYPE__
@@ -387,29 +495,35 @@ union yyalloc
 
 #define yyerrok                (yyerrstatus = 0)
 #define yyclearin      (yychar = YYEMPTY)
-#define YYEMPTY                -2
+#define YYEMPTY                (-2)
 #define YYEOF          0
+
 #define YYACCEPT       goto yyacceptlab
-#define YYABORT        goto yyabortlab
-#define YYERROR                goto yyerrlab1
+#define YYABORT                goto yyabortlab
+#define YYERROR                goto yyerrorlab
+
+
 /* Like YYERROR except do call yyerror.  This remains here temporarily
    to ease the transition to the new meaning of YYERROR, for GCC.
    Once GCC version 2 has supplanted version 1, this can go.  */
+
 #define YYFAIL         goto yyerrlab
+
 #define YYRECOVERING()  (!!yyerrstatus)
+
 #define YYBACKUP(Token, Value)                                 \
 do                                                             \
   if (yychar == YYEMPTY && yylen == 1)                         \
     {                                                          \
       yychar = (Token);                                                \
       yylval = (Value);                                                \
-      yychar1 = YYTRANSLATE (yychar);                          \
+      yytoken = YYTRANSLATE (yychar);                          \
       YYPOPSTACK;                                              \
       goto yybackup;                                           \
     }                                                          \
   else                                                         \
     {                                                          \
-      yyerror ("syntax error: cannot back up");                        \
+      yyerror ("syntax error: cannot back up");\
       YYERROR;                                                 \
     }                                                          \
 while (0)
@@ -417,41 +531,24 @@ while (0)
 #define YYTERROR       1
 #define YYERRCODE      256
 
-
 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).
-
-   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
-   first token.  By default, to implement support for ranges, extend
-   its range to the last symbol.  */
+   are run).  */
 
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)               \
-   Current.last_line   = Rhs[N].last_line;     \
-   Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N)               \
+   ((Current).first_line   = (Rhs)[1].first_line,      \
+    (Current).first_column = (Rhs)[1].first_column,    \
+    (Current).last_line    = (Rhs)[N].last_line,       \
+    (Current).last_column  = (Rhs)[N].last_column)
 #endif
 
-
 /* YYLEX -- calling `yylex' with the right arguments.  */
 
-#if YYPURE
-# if YYLSP_NEEDED
-#  ifdef YYLEX_PARAM
-#   define YYLEX               yylex (&yylval, &yylloc, YYLEX_PARAM)
-#  else
-#   define YYLEX               yylex (&yylval, &yylloc)
-#  endif
-# else /* !YYLSP_NEEDED */
-#  ifdef YYLEX_PARAM
-#   define YYLEX               yylex (&yylval, YYLEX_PARAM)
-#  else
-#   define YYLEX               yylex (&yylval)
-#  endif
-# endif /* !YYLSP_NEEDED */
-#else /* !YYPURE */
-# define YYLEX                 yylex ()
-#endif /* !YYPURE */
-
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
 
 /* Enable debugging if requested.  */
 #if YYDEBUG
@@ -466,13 +563,93 @@ do {                                              \
   if (yydebug)                                 \
     YYFPRINTF Args;                            \
 } while (0)
+
+# define YYDSYMPRINT(Args)                     \
+do {                                           \
+  if (yydebug)                                 \
+    yysymprint Args;                           \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location)           \
+do {                                                           \
+  if (yydebug)                                                 \
+    {                                                          \
+      YYFPRINTF (stderr, "%s ", Title);                                \
+      yysymprint (stderr,                                      \
+                  Token, Value);       \
+      YYFPRINTF (stderr, "\n");                                        \
+    }                                                          \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    short *bottom;
+    short *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (/* Nothing. */; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)                           \
+do {                                                           \
+  if (yydebug)                                                 \
+    yy_stack_print ((Bottom), (Top));                          \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+    int yyrule;
+#endif
+{
+  int yyi;
+  unsigned int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+             yyrule - 1, yylno);
+  /* Print the symbols being reduced, and their result.  */
+  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule)         \
+do {                                   \
+  if (yydebug)                         \
+    yy_reduce_print (Rule);            \
+} while (0)
+
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
 int yydebug;
 #else /* !YYDEBUG */
 # define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
 #endif /* !YYDEBUG */
 
+
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
 #ifndef        YYINITDEPTH
 # define YYINITDEPTH 200
@@ -485,15 +662,17 @@ int yydebug;
    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */
 
-#if YYMAXDEPTH == 0
+#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
 # undef YYMAXDEPTH
 #endif
 
 #ifndef YYMAXDEPTH
 # define YYMAXDEPTH 10000
 #endif
+
 \f
-#ifdef YYERROR_VERBOSE
+
+#if YYERROR_VERBOSE
 
 # ifndef yystrlen
 #  if defined (__GLIBC__) && defined (_STRING_H)
@@ -543,86 +722,134 @@ yystpcpy (yydest, yysrc)
 }
 #  endif
 # endif
-#endif
+
+#endif /* !YYERROR_VERBOSE */
+
 \f
-#line 315 "/usr/share/bison/bison.simple"
 
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
 
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-   into yyparse.  The argument should have type void *.
-   It should actually point to an object.
-   Grammar actions can access the variable by casting it
-   to the proper pointer type.  */
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  /* Pacify ``unused variable'' warnings.  */
+  (void) yyvaluep;
+
+  if (yytype < YYNTOKENS)
+    {
+      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+    }
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  switch (yytype)
+    {
+      default:
+        break;
+    }
+  YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  /* Pacify ``unused variable'' warnings.  */
+  (void) yyvaluep;
+
+  switch (yytype)
+    {
+
+      default:
+        break;
+    }
+}
+\f
+
+/* Prevent warnings from -Wmissing-prototypes.  */
 
 #ifdef YYPARSE_PARAM
 # if defined (__STDC__) || defined (__cplusplus)
-#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL
+int yyparse (void *YYPARSE_PARAM);
 # else
-#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+int yyparse ();
 # endif
-#else /* !YYPARSE_PARAM */
-# define YYPARSE_PARAM_ARG
-# define YYPARSE_PARAM_DECL
-#endif /* !YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
-int yyparse (void *);
-# else
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
 int yyparse (void);
-# endif
+#else
+int yyparse ();
 #endif
+#endif /* ! YYPARSE_PARAM */
 
-/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
-   variables are global, or local to YYPARSE.  */
-
-#define YY_DECL_NON_LSP_VARIABLES                      \
-/* The lookahead symbol.  */                           \
-int yychar;                                            \
-                                                       \
-/* The semantic value of the lookahead symbol. */      \
-YYSTYPE yylval;                                                \
-                                                       \
-/* Number of parse errors so far.  */                  \
-int yynerrs;
 
-#if YYLSP_NEEDED
-# define YY_DECL_VARIABLES                     \
-YY_DECL_NON_LSP_VARIABLES                      \
-                                               \
-/* Location data for the lookahead symbol.  */ \
-YYLTYPE yylloc;
-#else
-# define YY_DECL_VARIABLES                     \
-YY_DECL_NON_LSP_VARIABLES
-#endif
 
+/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
 
-/* If nonreentrant, generate the variables here. */
 
-#if !YYPURE
-YY_DECL_VARIABLES
-#endif  /* !YYPURE */
 
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+  void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
 int
-yyparse (YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
-{
-  /* If reentrant, generate the variables here. */
-#if YYPURE
-  YY_DECL_VARIABLES
-#endif  /* !YYPURE */
+yyparse (void)
+#else
+int
+yyparse ()
 
+#endif
+#endif
+{
+  
   register int yystate;
   register int yyn;
   int yyresult;
   /* Number of tokens to shift before error messages enabled.  */
   int yyerrstatus;
   /* Lookahead token as an internal (translated) token number.  */
-  int yychar1 = 0;
+  int yytoken = 0;
 
   /* Three stacks and their tools:
      `yyss': related to states,
@@ -632,7 +859,7 @@ yyparse (YYPARSE_PARAM_ARG)
      Refer to the stacks thru separate pointers, to allow yyoverflow
      to reallocate them elsewhere.  */
 
-  /* The state stack. */
+  /* The state stack.  */
   short        yyssa[YYINITDEPTH];
   short *yyss = yyssa;
   register short *yyssp;
@@ -642,31 +869,19 @@ yyparse (YYPARSE_PARAM_ARG)
   YYSTYPE *yyvs = yyvsa;
   register YYSTYPE *yyvsp;
 
-#if YYLSP_NEEDED
-  /* The location stack.  */
-  YYLTYPE yylsa[YYINITDEPTH];
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-#endif
 
-#if YYLSP_NEEDED
-# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
-#else
-# define YYPOPSTACK   (yyvsp--, yyssp--)
-#endif
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
+#define YYPOPSTACK   (yyvsp--, yyssp--)
 
+  YYSIZE_T yystacksize = YYINITDEPTH;
 
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
-#if YYLSP_NEEDED
-  YYLTYPE yyloc;
-#endif
+
 
   /* When reducing, the number of symbols on the RHS of the reduced
-     rule. */
+     rule.  */
   int yylen;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
@@ -683,9 +898,7 @@ yyparse (YYPARSE_PARAM_ARG)
 
   yyssp = yyss;
   yyvsp = yyvs;
-#if YYLSP_NEEDED
-  yylsp = yyls;
-#endif
+
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -700,7 +913,7 @@ yyparse (YYPARSE_PARAM_ARG)
  yysetstate:
   *yyssp = yystate;
 
-  if (yyssp >= yyss + yystacksize - 1)
+  if (yyss + yystacksize - 1 <= yyssp)
     {
       /* Get the current used size of the three stacks, in elements.  */
       YYSIZE_T yysize = yyssp - yyss + 1;
@@ -713,24 +926,17 @@ yyparse (YYPARSE_PARAM_ARG)
        YYSTYPE *yyvs1 = yyvs;
        short *yyss1 = yyss;
 
+
        /* Each stack pointer address is followed by the size of the
-          data in use in that stack, in bytes.  */
-# if YYLSP_NEEDED
-       YYLTYPE *yyls1 = yyls;
-       /* This used to be a conditional around just the two extra args,
-          but that might be undefined if yyoverflow is a macro.  */
-       yyoverflow ("parser stack overflow",
-                   &yyss1, yysize * sizeof (*yyssp),
-                   &yyvs1, yysize * sizeof (*yyvsp),
-                   &yyls1, yysize * sizeof (*yylsp),
-                   &yystacksize);
-       yyls = yyls1;
-# else
+          data in use in that stack, in bytes.  This used to be a
+          conditional around just the two extra args, but that might
+          be undefined if yyoverflow is a macro.  */
        yyoverflow ("parser stack overflow",
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),
+
                    &yystacksize);
-# endif
+
        yyss = yyss1;
        yyvs = yyvs1;
       }
@@ -739,10 +945,10 @@ yyparse (YYPARSE_PARAM_ARG)
       goto yyoverflowlab;
 # else
       /* Extend the stack our own way.  */
-      if (yystacksize >= YYMAXDEPTH)
+      if (YYMAXDEPTH <= yystacksize)
        goto yyoverflowlab;
       yystacksize *= 2;
-      if (yystacksize > YYMAXDEPTH)
+      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;
 
       {
@@ -753,10 +959,8 @@ yyparse (YYPARSE_PARAM_ARG)
          goto yyoverflowlab;
        YYSTACK_RELOCATE (yyss);
        YYSTACK_RELOCATE (yyvs);
-# if YYLSP_NEEDED
-       YYSTACK_RELOCATE (yyls);
-# endif
-# undef YYSTACK_RELOCATE
+
+#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
       }
@@ -765,14 +969,12 @@ yyparse (YYPARSE_PARAM_ARG)
 
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
-      yylsp = yyls + yysize - 1;
-#endif
+
 
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                  (unsigned long int) yystacksize));
 
-      if (yyssp >= yyss + yystacksize - 1)
+      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
     }
 
@@ -780,7 +982,6 @@ yyparse (YYPARSE_PARAM_ARG)
 
   goto yybackup;
 
-
 /*-----------.
 | yybackup.  |
 `-----------*/
@@ -793,88 +994,55 @@ yybackup:
   /* First try to decide what to do without reference to lookahead token.  */
 
   yyn = yypact[yystate];
-  if (yyn == YYFLAG)
+  if (yyn == YYPACT_NINF)
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
 
-  /* yychar is either YYEMPTY or YYEOF
-     or a valid token in external form.  */
-
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
       yychar = YYLEX;
     }
 
-  /* Convert token to internal form (in yychar1) for indexing tables with */
-
-  if (yychar <= 0)             /* This means end of input. */
+  if (yychar <= YYEOF)
     {
-      yychar1 = 0;
-      yychar = YYEOF;          /* Don't call YYLEX any more */
-
+      yychar = yytoken = YYEOF;
       YYDPRINTF ((stderr, "Now at end of input.\n"));
     }
   else
     {
-      yychar1 = YYTRANSLATE (yychar);
-
-#if YYDEBUG
-     /* We have to keep this `#if YYDEBUG', since we use variables
-       which are defined only if `YYDEBUG' is set.  */
-      if (yydebug)
-       {
-         YYFPRINTF (stderr, "Next token is %d (%s",
-                    yychar, yytname[yychar1]);
-         /* Give the individual parser a way to print the precise
-            meaning of a token, for further debugging info.  */
-# ifdef YYPRINT
-         YYPRINT (stderr, yychar, yylval);
-# endif
-         YYFPRINTF (stderr, ")\n");
-       }
-#endif
+      yytoken = YYTRANSLATE (yychar);
+      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
     }
 
-  yyn += yychar1;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
     goto yydefault;
-
   yyn = yytable[yyn];
-
-  /* yyn is what to do for this token type in this state.
-     Negative => reduce, -yyn is rule number.
-     Positive => shift, yyn is new state.
-       New state is final state => don't bother to shift,
-       just return success.
-     0, or most negative number => error.  */
-
-  if (yyn < 0)
+  if (yyn <= 0)
     {
-      if (yyn == YYFLAG)
+      if (yyn == 0 || yyn == YYTABLE_NINF)
        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
-  else if (yyn == 0)
-    goto yyerrlab;
 
   if (yyn == YYFINAL)
     YYACCEPT;
 
   /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
-             yychar, yytname[yychar1]));
+  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
 
   /* Discard the token being shifted unless it is eof.  */
   if (yychar != YYEOF)
     yychar = YYEMPTY;
 
   *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
+
 
   /* Count tokens shifted since error; after three, turn off error
      status.  */
@@ -905,206 +1073,204 @@ yyreduce:
   /* If YYLEN is nonzero, implement the default value of the action:
      `$$ = $1'.
 
-     Otherwise, the following line sets YYVAL to the semantic value of
-     the lookahead token.  This behavior is undocumented and Bison
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
      users should not rely upon it.  Assigning to YYVAL
      unconditionally makes the parser a bit smaller, and it avoids a
      GCC warning that YYVAL may be used uninitialized.  */
   yyval = yyvsp[1-yylen];
 
-#if YYLSP_NEEDED
-  /* Similarly for the default location.  Let the user run additional
-     commands if for instance locations are ranges.  */
-  yyloc = yylsp[1-yylen];
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-#endif
 
-#if YYDEBUG
-  /* We have to keep this `#if YYDEBUG', since we use variables which
-     are defined only if `YYDEBUG' is set.  */
-  if (yydebug)
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
     {
-      int yyi;
-
-      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
-                yyn, yyrline[yyn]);
-
-      /* Print the symbols being reduced, and their result.  */
-      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
-       YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
-      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
-    }
-#endif
-
-  switch (yyn) {
-
-case 11:
+        case 12:
 #line 76 "uparse.y"
-{ list_disk(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { list_disk(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 12:
+
+  case 13:
 #line 77 "uparse.y"
-{ list_disk(NULL); }
+    { list_disk(NULL); }
     break;
-case 13:
+
+  case 14:
 #line 78 "uparse.y"
-{ set_date(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { set_date(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 14:
+
+  case 15:
 #line 79 "uparse.y"
-{ set_host(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { set_host(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 15:
+
+  case 16:
 #line 80 "uparse.y"
-{ set_disk(yyvsp[-1].strval, yyvsp[0].strval); amfree(yyvsp[-1].strval); amfree(yyvsp[0].strval); }
+    { set_disk(yyvsp[-1].strval, yyvsp[0].strval); amfree(yyvsp[-1].strval); amfree(yyvsp[0].strval); }
     break;
-case 16:
+
+  case 17:
 #line 81 "uparse.y"
-{ set_disk(yyvsp[0].strval, NULL); amfree(yyvsp[0].strval); }
+    { set_disk(yyvsp[0].strval, NULL); amfree(yyvsp[0].strval); }
     break;
-case 17:
+
+  case 18:
 #line 82 "uparse.y"
-{ set_tape(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { set_tape(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 18:
+
+  case 19:
 #line 83 "uparse.y"
-{ set_tape(""); }
+    { set_tape(""); }
     break;
-case 19:
+
+  case 20:
 #line 84 "uparse.y"
-{ cd_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { cd_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 20:
+
+  case 21:
 #line 85 "uparse.y"
-{ cd_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { cd_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 21:
+
+  case 22:
 #line 86 "uparse.y"
-{
+    {
 #ifdef SAMBA_CLIENT
                         set_mode(SAMBA_SMBCLIENT);
 #endif /* SAMBA_CLIENT */
                     }
     break;
-case 22:
+
+  case 23:
 #line 91 "uparse.y"
-{
+    {
 #ifdef SAMBA_CLIENT
                         set_mode(SAMBA_TAR);
 #endif /* SAMBA_CLIENT */
                     }
     break;
-case 23:
+
+  case 24:
 #line 99 "uparse.y"
-{ list_disk_history(); }
+    { list_disk_history(); }
     break;
-case 24:
+
+  case 25:
 #line 100 "uparse.y"
-{ list_directory(); }
+    { list_directory(); }
     break;
-case 25:
+
+  case 26:
 #line 101 "uparse.y"
-{ display_extract_list(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { display_extract_list(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 26:
+
+  case 27:
 #line 102 "uparse.y"
-{ display_extract_list(NULL); }
+    { display_extract_list(NULL); }
     break;
-case 27:
+
+  case 28:
 #line 103 "uparse.y"
-{ show_directory(); }
+    { show_directory(); }
     break;
-case 28:
+
+  case 29:
 #line 104 "uparse.y"
-{ clear_extract_list(); }
+    { clear_extract_list(); }
     break;
-case 29:
+
+  case 30:
 #line 105 "uparse.y"
-{ show_mode (); }
+    { show_mode (); }
     break;
-case 30:
+
+  case 31:
 #line 109 "uparse.y"
-{ quit(); }
+    { quit(); }
     break;
-case 32:
+
+  case 33:
 #line 117 "uparse.y"
-{ add_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { add_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 33:
+
+  case 34:
 #line 118 "uparse.y"
-{ add_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { add_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 35:
+
+  case 36:
 #line 126 "uparse.y"
-{ add_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { add_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 36:
+
+  case 37:
 #line 127 "uparse.y"
-{ add_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { add_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 38:
+
+  case 39:
 #line 135 "uparse.y"
-{ delete_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { delete_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 39:
+
+  case 40:
 #line 136 "uparse.y"
-{ delete_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { delete_glob(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 41:
+
+  case 42:
 #line 144 "uparse.y"
-{ delete_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { delete_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 42:
+
+  case 43:
 #line 145 "uparse.y"
-{ delete_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
+    { delete_regex(yyvsp[0].strval); amfree(yyvsp[0].strval); }
     break;
-case 43:
+
+  case 44:
 #line 149 "uparse.y"
-{ char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
+    { char buf[STR_SIZE]; puts(getcwd(buf, sizeof(buf))); }
     break;
-case 44:
+
+  case 45:
 #line 150 "uparse.y"
-{
+    {
                if (chdir(yyvsp[0].strval) == -1) {
                        perror(yyvsp[0].strval);
                }
                amfree(yyvsp[0].strval);
        }
     break;
-case 45:
+
+  case 46:
 #line 159 "uparse.y"
-{ help_list(); }
+    { help_list(); }
     break;
-case 46:
+
+  case 47:
 #line 163 "uparse.y"
-{ extract_files(); }
+    { extract_files(); }
     break;
-}
 
-#line 705 "/usr/share/bison/bison.simple"
 
+    }
+
+/* Line 1000 of yacc.c.  */
+#line 1265 "uparse.c"
 \f
   yyvsp -= yylen;
   yyssp -= yylen;
-#if YYLSP_NEEDED
-  yylsp -= yylen;
-#endif
 
-#if YYDEBUG
-  if (yydebug)
-    {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "state stack now");
-      while (yyssp1 != yyssp)
-       YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
-    }
-#endif
+
+  YY_STACK_PRINT (yyss, yyssp);
 
   *++yyvsp = yyval;
-#if YYLSP_NEEDED
-  *++yylsp = yyloc;
-#endif
+
 
   /* Now `shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
@@ -1112,11 +1278,11 @@ case 46:
 
   yyn = yyr1[yyn];
 
-  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
     yystate = yytable[yystate];
   else
-    yystate = yydefgoto[yyn - YYNTBASE];
+    yystate = yydefgoto[yyn - YYNTOKENS];
 
   goto yynewstate;
 
@@ -1129,145 +1295,151 @@ yyerrlab:
   if (!yyerrstatus)
     {
       ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
+#if YYERROR_VERBOSE
       yyn = yypact[yystate];
 
-      if (yyn > YYFLAG && yyn < YYLAST)
+      if (YYPACT_NINF < yyn && yyn < YYLAST)
        {
          YYSIZE_T yysize = 0;
+         int yytype = YYTRANSLATE (yychar);
+         const char* yyprefix;
          char *yymsg;
-         int yyx, yycount;
+         int yyx;
 
-         yycount = 0;
          /* Start YYX at -YYN if negative to avoid negative indexes in
             YYCHECK.  */
-         for (yyx = yyn < 0 ? -yyn : 0;
-              yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-           if (yycheck[yyx + yyn] == yyx)
-             yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-         yysize += yystrlen ("parse error, unexpected ") + 1;
-         yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
+         int yyxbegin = yyn < 0 ? -yyn : 0;
+
+         /* Stay within bounds of both yycheck and yytname.  */
+         int yychecklim = YYLAST - yyn;
+         int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+         int yycount = 0;
+
+         yyprefix = ", expecting ";
+         for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+           if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+             {
+               yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+               yycount += 1;
+               if (yycount == 5)
+                 {
+                   yysize = 0;
+                   break;
+                 }
+             }
+         yysize += (sizeof ("syntax error, unexpected ")
+                    + yystrlen (yytname[yytype]));
          yymsg = (char *) YYSTACK_ALLOC (yysize);
          if (yymsg != 0)
            {
-             char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
-             yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
+             char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+             yyp = yystpcpy (yyp, yytname[yytype]);
 
              if (yycount < 5)
                {
-                 yycount = 0;
-                 for (yyx = yyn < 0 ? -yyn : 0;
-                      yyx < (int) (sizeof (yytname) / sizeof (char *));
-                      yyx++)
-                   if (yycheck[yyx + yyn] == yyx)
+                 yyprefix = ", expecting ";
+                 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+                   if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
                      {
-                       const char *yyq = ! yycount ? ", expecting " : " or ";
-                       yyp = yystpcpy (yyp, yyq);
+                       yyp = yystpcpy (yyp, yyprefix);
                        yyp = yystpcpy (yyp, yytname[yyx]);
-                       yycount++;
+                       yyprefix = " or ";
                      }
                }
              yyerror (yymsg);
              YYSTACK_FREE (yymsg);
            }
          else
-           yyerror ("parse error; also virtual memory exhausted");
+           yyerror ("syntax error; also virtual memory exhausted");
        }
       else
-#endif /* defined (YYERROR_VERBOSE) */
-       yyerror ("parse error");
+#endif /* YYERROR_VERBOSE */
+       yyerror ("syntax error");
     }
-  goto yyerrlab1;
 
 
-/*--------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action |
-`--------------------------------------------------*/
-yyerrlab1:
+
   if (yyerrstatus == 3)
     {
       /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */
 
-      /* return failure if at end of input */
-      if (yychar == YYEOF)
-       YYABORT;
-      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
-                 yychar, yytname[yychar1]));
-      yychar = YYEMPTY;
+      if (yychar <= YYEOF)
+        {
+          /* If at end of input, pop the error token,
+            then the rest of the stack, then return failure.  */
+         if (yychar == YYEOF)
+            for (;;)
+              {
+                YYPOPSTACK;
+                if (yyssp == yyss)
+                  YYABORT;
+                YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+                yydestruct (yystos[*yyssp], yyvsp);
+              }
+        }
+      else
+       {
+         YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+         yydestruct (yytoken, &yylval);
+         yychar = YYEMPTY;
+
+       }
     }
 
   /* Else will try to reuse lookahead token after shifting the error
      token.  */
-
-  yyerrstatus = 3;             /* Each real token shifted decrements this */
-
-  goto yyerrhandle;
+  goto yyerrlab1;
 
 
-/*-------------------------------------------------------------------.
-| yyerrdefault -- current state does not do anything special for the |
-| error token.                                                       |
-`-------------------------------------------------------------------*/
-yyerrdefault:
-#if 0
-  /* This is wrong; only states that explicitly want error tokens
-     should shift them.  */
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
 
-  /* If its default is to accept any token, ok.  Otherwise pop it.  */
-  yyn = yydefact[yystate];
-  if (yyn)
-    goto yydefault;
+#ifdef __GNUC__
+  /* Pacify GCC when the user code never invokes YYERROR and the label
+     yyerrorlab therefore never appears in user code.  */
+  if (0)
+     goto yyerrorlab;
 #endif
 
+  yyvsp -= yylen;
+  yyssp -= yylen;
+  yystate = *yyssp;
+  goto yyerrlab1;
 
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token                                                    |
-`---------------------------------------------------------------*/
-yyerrpop:
-  if (yyssp == yyss)
-    YYABORT;
-  yyvsp--;
-  yystate = *--yyssp;
-#if YYLSP_NEEDED
-  yylsp--;
-#endif
 
-#if YYDEBUG
-  if (yydebug)
-    {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "Error: state stack now");
-      while (yyssp1 != yyssp)
-       YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
-    }
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
 
-/*--------------.
-| yyerrhandle.  |
-`--------------*/
-yyerrhandle:
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yyerrdefault;
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+       {
+         yyn += YYTERROR;
+         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+           {
+             yyn = yytable[yyn];
+             if (0 < yyn)
+               break;
+           }
+       }
 
-  yyn += YYTERROR;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-    goto yyerrdefault;
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+       YYABORT;
 
-  yyn = yytable[yyn];
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-       goto yyerrpop;
-      yyn = -yyn;
-      goto yyreduce;
+      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+      yydestruct (yystos[yystate], yyvsp);
+      YYPOPSTACK;
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
     }
-  else if (yyn == 0)
-    goto yyerrpop;
 
   if (yyn == YYFINAL)
     YYACCEPT;
@@ -1275,9 +1447,7 @@ yyerrhandle:
   YYDPRINTF ((stderr, "Shifting error token, "));
 
   *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
+
 
   yystate = yyn;
   goto yynewstate;
@@ -1297,13 +1467,15 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-/*---------------------------------------------.
-| yyoverflowab -- parser overflow comes here.  |
-`---------------------------------------------*/
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here.  |
+`----------------------------------------------*/
 yyoverflowlab:
   yyerror ("parser stack overflow");
   yyresult = 2;
   /* Fall through.  */
+#endif
 
 yyreturn:
 #ifndef yyoverflow
@@ -1312,6 +1484,8 @@ yyreturn:
 #endif
   return yyresult;
 }
+
+
 #line 167 "uparse.y"
 
 
@@ -1322,3 +1496,4 @@ char *s;
 }
 
 
+
index 3c60816638a5dc0038c1f081d9a47a6146ab2e26..a6c5327c29a9956ff3a7d89e259689ec0f02df5a 100644 (file)
-#ifndef BISON_UPARSE_H
-# define BISON_UPARSE_H
+/* A Bison parser, made by GNU Bison 1.875c.  */
 
-#ifndef YYSTYPE
-typedef union {
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     LISTDISK = 258,
+     SETHOST = 259,
+     SETDISK = 260,
+     SETDATE = 261,
+     SETTAPE = 262,
+     SETMODE = 263,
+     CD = 264,
+     CDX = 265,
+     QUIT = 266,
+     DHIST = 267,
+     LS = 268,
+     ADD = 269,
+     ADDX = 270,
+     EXTRACT = 271,
+     LIST = 272,
+     DELETE = 273,
+     DELETEX = 274,
+     PWD = 275,
+     CLEAR = 276,
+     HELP = 277,
+     LCD = 278,
+     LPWD = 279,
+     MODE = 280,
+     SMB = 281,
+     TAR = 282,
+     PATH = 283,
+     DATE = 284
+   };
+#endif
+#define LISTDISK 258
+#define SETHOST 259
+#define SETDISK 260
+#define SETDATE 261
+#define SETTAPE 262
+#define SETMODE 263
+#define CD 264
+#define CDX 265
+#define QUIT 266
+#define DHIST 267
+#define LS 268
+#define ADD 269
+#define ADDX 270
+#define EXTRACT 271
+#define LIST 272
+#define DELETE 273
+#define DELETEX 274
+#define PWD 275
+#define CLEAR 276
+#define HELP 277
+#define LCD 278
+#define LPWD 279
+#define MODE 280
+#define SMB 281
+#define TAR 282
+#define PATH 283
+#define DATE 284
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 40 "uparse.y"
+typedef union YYSTYPE {
   int intval;
   double floatval;
   char *strval;
   int subtok;
-} yystype;
-# define YYSTYPE yystype
+} YYSTYPE;
+/* Line 1275 of yacc.c.  */
+#line 102 "y.tab.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
 #endif
-# define       LISTDISK        257
-# define       SETHOST 258
-# define       SETDISK 259
-# define       SETDATE 260
-# define       SETTAPE 261
-# define       SETMODE 262
-# define       CD      263
-# define       CDX     264
-# define       QUIT    265
-# define       DHIST   266
-# define       LS      267
-# define       ADD     268
-# define       ADDX    269
-# define       EXTRACT 270
-# define       LIST    271
-# define       DELETE  272
-# define       DELETEX 273
-# define       PWD     274
-# define       CLEAR   275
-# define       HELP    276
-# define       LCD     277
-# define       LPWD    278
-# define       MODE    279
-# define       SMB     280
-# define       TAR     281
-# define       PATH    282
-# define       DATE    283
-
 
 extern YYSTYPE yylval;
 
-#endif /* not BISON_UPARSE_H */
+
+
index a30a0b975069a6edc5db2eab6c1ce5d024dee195..40e1075dbd9e33f59a0d5165f668e7da3572abed 100644 (file)
@@ -461,7 +461,7 @@ char *yytext;
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: uscan.l,v 1.14.2.3.4.1.2.3 2004/02/11 13:03:52 martinea Exp $
+ * $Id: uscan.l,v 1.14.2.3.4.1.2.2.2.1 2004/02/11 13:03:38 martinea Exp $
  *
  * lexer for amrecover interactive language
  */
index 2a53cfab8694ca009fb21e5e81ff3f3b127e8bd0..510d4965e00004a75dd0e7cbca57d816f16ca6c0 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: uscan.l,v 1.14.2.3.4.1.2.3 2004/02/11 13:03:52 martinea Exp $
+ * $Id: uscan.l,v 1.14.2.3.4.1.2.2.2.1 2004/02/11 13:03:38 martinea Exp $
  *
  * lexer for amrecover interactive language
  */
index e1161ba755d96ef8c44ef4c297a9ba0b0eb7b039..dca74ba3c0c043fc753b9372a104b04e5bc0da02 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amrestore.c,v 1.28.2.4.4.3.2.8 2003/02/09 04:33:13 jrjackson Exp $
+ * $Id: amrestore.c,v 1.28.2.4.4.3.2.8.2.3 2004/11/19 18:12:30 martinea Exp $
  *
  * retrieves files from an amanda tape
  */
@@ -482,6 +482,7 @@ char **argv;
     char *e;
     char *err;
     char *label = NULL;
+    int count_error;
 
     for(fd = 3; fd < FD_SETSIZE; fd++) {
        /*
@@ -667,24 +668,28 @@ char **argv;
                        get_pname());
     }
 
-    while(file.type == F_TAPESTART || file.type == F_DUMPFILE) {
-       amfree(filename);
-       filename = make_filename(&file);
+    count_error=0;
+    while(count_error < 10) {
+       if(file.type == F_TAPEEND) break;
        found_match = 0;
-       for(me = match_list; me; me = me->next) {
-           if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 0) {
-               found_match = 1;
-               break;
+       if(file.type == F_DUMPFILE) {
+           amfree(filename);
+           filename = make_filename(&file);
+           for(me = match_list; me; me = me->next) {
+               if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 0) {
+                   found_match = 1;
+                   break;
+               }
+           }
+           fprintf(stderr, "%s: %3d: %s ",
+                           get_pname(),
+                           file_number,
+                           found_match ? "restoring" : "skipping");
+           if(file.type != F_DUMPFILE) {
+               print_header(stderr, &file);
+           } else {
+               fprintf(stderr, "%s\n", filename);
            }
-       }
-       fprintf(stderr, "%s: %3d: %s ",
-                       get_pname(),
-                       file_number,
-                       found_match ? "restoring" : "skipping");
-       if(file.type != F_DUMPFILE) {
-           print_header(stderr, &file);
-       } else {
-           fprintf(stderr, "%s\n", filename);
        }
        if(found_match) {
            restore(&file, filename, isafile);
@@ -718,6 +723,7 @@ char **argv;
            if((tapedev = tape_open(tapename, 0)) < 0) {
                error("could not open %s: %s", tapename, strerror(errno));
            }
+           count_error++;
        } else {
            /*
             * If the last read got something (even an error), we can
@@ -726,6 +732,7 @@ char **argv;
            if(tapefd_fsf(tapedev, 1) < 0) {
                error("could not fsf %s: %s", tapename, strerror(errno));
            }
+           count_error=0;
        }
        file_number++;
        read_file_header(&file, isafile);
index 30b5fb5a24ab5720fdc17c5be19e70e1118c0a54..c3169076fc61696f00ff58f9f673155dee708d98 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: amadmin.c,v 1.49.2.13.2.3.2.15 2003/11/18 16:44:34 martinea Exp $
+ * $Id: amadmin.c,v 1.49.2.13.2.3.2.15.2.9 2005/03/29 16:35:11 martinea Exp $
  *
  * controlling process for the Amanda backup system
  */
@@ -74,8 +74,11 @@ void export_db P((int argc, char **argv));
 void import_db P((int argc, char **argv));
 void disklist P((int argc, char **argv));
 void disklist_one P((disk_t *dp));
+static void check_dumpuser P((void));
 
 static char *conf_tapelist = NULL;
+static char *displayunit;
+static long int unitdivisor;
 
 int main(argc, argv)
 int argc;
@@ -119,6 +122,9 @@ char **argv;
        error("errors processing config file \"%s\"", conffile);
     }
     amfree(conffile);
+
+    check_dumpuser();
+
     conf_diskfile = getconf_str(CNF_DISKFILE);
     if (*conf_diskfile == '/') {
        conf_diskfile = stralloc(conf_diskfile);
@@ -149,6 +155,9 @@ char **argv;
     }
     amfree(conf_infofile);
 
+    displayunit = getconf_str(CNF_DISPLAYUNIT);
+    unitdivisor = getconf_unit_divisor();
+
     if(strcmp(argv[2],"force-bump") == 0) force_bump(argc, argv);
     else if(strcmp(argv[2],"force-no-bump") == 0) force_no_bump(argc, argv);
     else if(strcmp(argv[2],"unforce-bump") == 0) unforce_bump(argc, argv);
@@ -699,7 +708,7 @@ char **argv;
 void due_one(dp)
 disk_t *dp;
 {
-    host_t *hp;
+    am_host_t *hp;
     int days;
     info_t info;
 
@@ -805,11 +814,13 @@ char **argv;
     float fseq, disk_dumpcycle;
     info_t info;
     long int total_balanced, balanced;
+    int empty_day;
 
     time(&today);
     conf_dumpcycle = getconf_int(CNF_DUMPCYCLE);
     conf_runspercycle = getconf_int(CNF_RUNSPERCYCLE);
     later = conf_dumpcycle;
+    if(later > 10000) later = 10000;
     overdue = 0;
     max_overdue = 0;
 
@@ -848,18 +859,18 @@ char **argv;
            continue;
        }
        sp[distinct].disks++;
-       sp[distinct].origsize += info.inf[0].size;
-       sp[distinct].outsize += info.inf[0].csize;
+       sp[distinct].origsize += info.inf[0].size/unitdivisor;
+       sp[distinct].outsize += info.inf[0].csize/unitdivisor;
 
        sp[balance].disks++;
        if(dp->dumpcycle == 0) {
-           sp[balance].origsize += info.inf[0].size * runs_per_cycle;
-           sp[balance].outsize += info.inf[0].csize * runs_per_cycle;
+           sp[balance].origsize += (info.inf[0].size/unitdivisor) * runs_per_cycle;
+           sp[balance].outsize += (info.inf[0].csize/unitdivisor) * runs_per_cycle;
        }
        else {
-           sp[balance].origsize += info.inf[0].size *
+           sp[balance].origsize += (info.inf[0].size/unitdivisor) *
                                    (conf_dumpcycle / dp->dumpcycle);
-           sp[balance].outsize += info.inf[0].csize *
+           sp[balance].outsize += (info.inf[0].csize/unitdivisor) *
                                   (conf_dumpcycle / dp->dumpcycle);
        }
 
@@ -882,13 +893,13 @@ char **argv;
            }
            
            sp[seq].disks++;
-           sp[seq].origsize += info.inf[0].size;
-           sp[seq].outsize += info.inf[0].csize;
+           sp[seq].origsize += info.inf[0].size/unitdivisor;
+           sp[seq].outsize += info.inf[0].csize/unitdivisor;
 
            if(seq < later) {
                sp[total].disks++;
-               sp[total].origsize += info.inf[0].size;
-               sp[total].outsize += info.inf[0].csize;
+               sp[total].origsize += info.inf[0].size/unitdivisor;
+               sp[total].outsize += info.inf[0].csize/unitdivisor;
            }
            
            /* See, if there's another run in this dumpcycle */
@@ -897,7 +908,7 @@ char **argv;
        } while (seq < later);
     }
 
-    if(sp[total].outsize == 0) {
+    if(sp[total].outsize == 0 && sp[later].outsize == 0) {
        printf("\nNo data to report on yet.\n");
        amfree(sp);
        return;
@@ -912,16 +923,30 @@ char **argv;
                            / (runs_per_cycle * later));
     }
 
-    printf("\n due-date  #fs    orig KB     out KB   balance\n");
+    empty_day = 0;
+    printf("\n due-date  #fs    orig %cB     out %cB   balance\n",
+          displayunit[0], displayunit[0]);
     printf("----------------------------------------------\n");
     for(seq = 0; seq < later; seq++) {
-       printf("%-9.9s  %3d %10ld %10ld ",
-              seqdatestr(seq), sp[seq].disks,
-              sp[seq].origsize, sp[seq].outsize);
-       if(!sp[seq].outsize) printf("     --- \n");
-       else printf("%+8.1f%%\n",
-                   (sp[seq].outsize-balanced)*100.0/(double)balanced);
+       if(sp[seq].disks == 0 &&
+          ((seq > 0 && sp[seq-1].disks == 0) ||
+           ((seq < later-1) && sp[seq+1].disks == 0))) {
+           empty_day++;
+       }
+       else {
+           if(empty_day > 0) {
+               printf("\n");
+               empty_day = 0;
+           }
+           printf("%-9.9s  %3d %10ld %10ld ",
+                  seqdatestr(seq), sp[seq].disks,
+                  sp[seq].origsize, sp[seq].outsize);
+           if(!sp[seq].outsize) printf("     --- \n");
+           else printf("%+8.1f%%\n",
+                       (sp[seq].outsize-balanced)*100.0/(double)balanced);
+       }
     }
+
     if(sp[later].disks != 0) {
        printf("later      %3d %10ld %10ld ",
               sp[later].disks,
@@ -1037,20 +1062,43 @@ int level;
 void bumpsize()
 {
     int l;
+    int conf_bumppercent = getconf_int(CNF_BUMPPERCENT);
+    double conf_bumpmult = getconf_real(CNF_BUMPMULT);
 
     printf("Current bump parameters:\n");
-    printf("  bumpsize %5d KB\t- minimum savings (threshold) to bump level 1 -> 2\n",
-          getconf_int(CNF_BUMPSIZE));
-    printf("  bumpdays %5d\t- minimum days at each level\n",
-          getconf_int(CNF_BUMPDAYS));
-    printf("  bumpmult %5.5g\t- threshold = bumpsize * bumpmult**(level-1)\n\n",
-          getconf_real(CNF_BUMPMULT));
-
-    printf("      Bump -> To  Threshold\n");
-    for(l = 1; l < 9; l++) {
-       printf("\t%d  ->  %d  %9d KB\n", l, l+1, bump_thresh(l));
-    }
-    putchar('\n');
+
+    if(conf_bumppercent == 0) {
+       printf("  bumpsize %5d KB\t- minimum savings (threshold) to bump level 1 -> 2\n",
+              getconf_int(CNF_BUMPSIZE));
+       printf("  bumpdays %5d\t- minimum days at each level\n",
+              getconf_int(CNF_BUMPDAYS));
+       printf("  bumpmult %5.5g\t- threshold = bumpsize * bumpmult**(level-1)\n\n",
+              conf_bumpmult);
+
+       printf("      Bump -> To  Threshold\n");
+       for(l = 1; l < 9; l++) {
+           printf("\t%d  ->  %d  %9d KB\n", l, l+1, bump_thresh(l));
+       }
+       putchar('\n');
+    }
+    else {
+       double bumppercent = conf_bumppercent;
+
+       printf("  bumppercent %3d %%\t- minimum savings (threshold) to bump level 1 -> 2\n",
+              conf_bumppercent);
+       printf("  bumpdays %5d\t- minimum days at each level\n",
+              getconf_int(CNF_BUMPDAYS));
+       printf("  bumpmult %5.5g\t- threshold = disk_size * bumppercent * bumpmult**(level-1)\n\n",
+              conf_bumpmult);
+
+       printf("      Bump -> To  Threshold\n");
+       for(l = 1; l < 9; l++) {
+           printf("\t%d  ->  %d  %7.2f %%\n", l, l+1, bumppercent);
+           bumppercent *= conf_bumpmult;
+           if(bumppercent >= 100.000) { bumppercent = 100.0;}
+       }
+       putchar('\n');
+    }
 }
 
 /* ----------------------------------------------- */
@@ -1123,6 +1171,11 @@ disk_t *dp;
               (long)info.inf[l].date, info.inf[l].filenum,
               info.inf[l].label);
     }
+    for(l=0;info.history[l].level > -1;l++) {
+       printf("history: %d %ld %ld %ld\n",info.history[l].level,
+              info.history[l].size, info.history[l].csize,
+              info.history[l].date);
+    }
     printf("//\n");
 }
 
@@ -1239,6 +1292,7 @@ int import_one P((void))
     char *line = NULL;
     char *s, *fp;
     int ch;
+    int nb_history, i;
     char *hostname = NULL;
     char *diskname = NULL;
 
@@ -1347,6 +1401,10 @@ int import_one P((void))
            /* end of record */
            break;
        }
+       if(strncmp(line, "history:", 8) == 0) {
+           /* end of record */
+           break;
+       }
        memset(&onestat, 0, sizeof(onestat));
 
        s = line;
@@ -1415,6 +1473,58 @@ int import_one P((void))
 
        info.inf[level] = onestat;
     }
+    nb_history = 0;
+    for(i=0;i<=NB_HISTORY+1;i++) {
+       info.history[i].level = -2;
+    }
+    while(1) {
+       history_t onehistory;
+       long date;
+
+       if(line[0] == '/' && line[1] == '/') {
+           info.history[nb_history].level = -2;
+           rc = 0;
+           break;
+       }
+       memset(&onehistory, 0, sizeof(onehistory));
+       s = line;
+       ch = *s++;
+#define sc "history:"
+       if(strncmp(line, sc, sizeof(sc)-1) != 0) {
+           break;
+       }
+       s += sizeof(sc)-1;
+       ch = s[-1];
+#undef sc
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%d", &onehistory.level) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &onehistory.size) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &onehistory.csize) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &date) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+       onehistory.date = date; /* time_t not guarranteed to be long */
+
+       info.history[nb_history++] = onehistory;
+       amfree(line);
+       if((line = impget_line()) == NULL) goto shortfile_err;
+    }
     amfree(line);
 
     /* got a full record, now write it out to the database */
@@ -1475,7 +1585,7 @@ impget_line ()
 void disklist_one(dp)
 disk_t *dp;
 {
-    host_t *hp;
+    am_host_t *hp;
     interface_t *ip;
     sle_t *excl;
 
@@ -1526,6 +1636,14 @@ disk_t *dp;
     printf("        dumpcycle %ld\n", dp->dumpcycle);
     printf("        maxdumps %d\n", dp->maxdumps);
     printf("        maxpromoteday %d\n", dp->maxpromoteday);
+    if(dp->bumppercent > 0) {
+       printf("        bumppercent %d\n", dp->bumppercent);
+    }
+    else {
+       printf("        bumpsize %d\n", dp->bumpsize);
+    }
+    printf("        bumpdays %d\n", dp->bumpdays);
+    printf("        bumpmult %f\n", dp->bumpmult);
 
     printf("        strategy ");
     switch(dp->strategy) {
@@ -1549,6 +1667,19 @@ disk_t *dp;
        break;
     }
 
+    printf("        estimate ");
+    switch(dp->estimate) {
+    case ES_CLIENT:
+       printf("CLIENT\n");
+       break;
+    case ES_SERVER:
+       printf("SERVER\n");
+       break;
+    case ES_CALCSIZE:
+       printf("CALCSIZE\n");
+       break;
+    }
+
     printf("        compress ");
     switch(dp->compress) {
     case COMP_NONE:
index f7fb4fcfc545a790202bf0b9083b18528353cb9d..b7c2c172dafc000fc3386e3482c21070e09613cb 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amcheck.c,v 1.50.2.19.2.7.2.22 2004/03/16 19:03:39 martinea Exp $
+ * $Id: amcheck.c,v 1.50.2.19.2.7.2.20.2.10 2005/04/06 12:32:31 martinea Exp $
  *
  * checks for common problems in server and clients
  */
@@ -90,6 +90,8 @@ static unsigned long malloc_hist_2, malloc_size_2;
 
 static am_feature_t *our_features = NULL;
 static char *our_feature_string = NULL;
+static char *displayunit;
+static long int unitdivisor;
 
 int main(argc, argv)
 int argc;
@@ -252,6 +254,9 @@ char **argv;
              dumpuser);
     }
 
+    displayunit = getconf_str(CNF_DISPLAYUNIT);
+    unitdivisor = getconf_unit_divisor();
+
     /*
      * If both server and client side checks are being done, the server
      * check output goes to the main output, while the client check output
@@ -791,7 +796,8 @@ int start_server_check(fd, do_localchk, do_tapechk)
        char *tape_dir;
        char *lastslash;
        char *holdfile;
-
+       struct stat statbuf;
+       
        conf_tapelist=getconf_str(CNF_TAPELIST);
        if (*conf_tapelist == '/') {
            tapefile = stralloc(conf_tapelist);
@@ -809,7 +815,16 @@ int start_server_check(fd, do_localchk, do_tapechk)
         */
        }
        if(access(tape_dir, W_OK) == -1) {
-           fprintf(outf, "ERROR: tapelist dir %s: not writable\n", tape_dir);
+           fprintf(outf, "ERROR: tapelist dir %s: not writable.\n", tape_dir);
+           tapebad = 1;
+       }
+       else if(stat(tapefile, &statbuf) == -1) {
+           fprintf(outf, "ERROR: tapefile %s: %s, you must create an empty file.\n",
+                   tapefile, strerror(errno));
+           tapebad = 1;
+       }
+       else if(access(tapefile, F_OK) != 0) {
+           fprintf(outf, "ERROR: can't access tape list %s\n", tapefile);
            tapebad = 1;
        } else if(access(tapefile, F_OK) == 0 && access(tapefile, W_OK) != 0) {
            fprintf(outf, "ERROR: tape list %s: not writable\n", tapefile);
@@ -840,12 +855,12 @@ int start_server_check(fd, do_localchk, do_tapechk)
     if(do_localchk) {
        for(hdp = holdingdisks; hdp != NULL; hdp = hdp->next) {
            if(get_fs_stats(hdp->diskdir, &fs) == -1) {
-               fprintf(outf, "ERROR: holding disk %s: statfs: %s\n",
+               fprintf(outf, "ERROR: holding dir %s: %s, you must create a directory.\n",
                        hdp->diskdir, strerror(errno));
                disklow = 1;
            }
            else if(access(hdp->diskdir, W_OK) == -1) {
-               fprintf(outf, "ERROR: holding disk %s: not writable: %s\n",
+               fprintf(outf, "ERROR: holding disk %s: not writable: %s.\n",
                        hdp->diskdir, strerror(errno));
                disklow = 1;
            }
@@ -858,26 +873,28 @@ int start_server_check(fd, do_localchk, do_tapechk)
            else if(hdp->disksize > 0) {
                if(fs.avail < hdp->disksize) {
                    fprintf(outf,
-                           "WARNING: holding disk %s: only %ld KB free (%ld KB requested)\n",
-                           hdp->diskdir, (long)fs.avail, (long)hdp->disksize);
+                           "WARNING: holding disk %s: only %ld %sB free (%ld %sB requested)\n",
+                           hdp->diskdir, (long)fs.avail/unitdivisor, displayunit,
+                           (long)hdp->disksize/unitdivisor, displayunit);
                    disklow = 1;
                }
                else
                    fprintf(outf,
-                           "Holding disk %s: %ld KB disk space available, that's plenty\n",
-                           hdp->diskdir, fs.avail);
+                           "Holding disk %s: %ld %sB disk space available, that's plenty\n",
+                           hdp->diskdir, fs.avail/unitdivisor, displayunit);
            }
            else {
                if(fs.avail < -hdp->disksize) {
                    fprintf(outf,
-                           "WARNING: holding disk %s: only %ld KB free, using nothing\n",
-                           hdp->diskdir, fs.avail);
+                           "WARNING: holding disk %s: only %ld %sB free, using nothing\n",
+                           hdp->diskdir, fs.avail/unitdivisor, displayunit);
                    disklow = 1;
                }
                else
                    fprintf(outf,
-                           "Holding disk %s: %ld KB disk space available, using %ld KB\n",
-                           hdp->diskdir, fs.avail, fs.avail + hdp->disksize);
+                           "Holding disk %s: %ld %sB disk space available, using %ld %sB\n",
+                           hdp->diskdir, fs.avail/unitdivisor, displayunit,
+                           (fs.avail + hdp->disksize)/unitdivisor, displayunit);
            }
        }
     }
@@ -889,6 +906,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
        char *logfile;
        char *olddir;
        struct stat stat_old;
+       struct stat statbuf;
 
        conf_logdir = getconf_str(CNF_LOGDIR);
        if (*conf_logdir == '/') {
@@ -898,7 +916,12 @@ int start_server_check(fd, do_localchk, do_tapechk)
        }
        logfile = vstralloc(conf_logdir, "/log", NULL);
 
-       if(access(conf_logdir, W_OK) == -1) {
+       if(stat(conf_logdir, &statbuf) == -1) {
+           fprintf(outf, "ERROR: logdir %s: %s, you must create a directory.\n",
+                   conf_logdir, strerror(errno));
+           disklow = 1;
+       }
+       else if(access(conf_logdir, W_OK) == -1) {
            fprintf(outf, "ERROR: log dir %s: not writable\n", conf_logdir);
            logbad = 1;
        }
@@ -1019,7 +1042,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
        char *infofile = NULL;
        struct stat statbuf;
        disk_t *dp;
-       host_t *hostp;
+       am_host_t *hostp;
        int indexdir_checked = 0;
        int hostindexdir_checked = 0;
        char *host;
@@ -1049,7 +1072,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
 #if TEXTDB
        if(stat(conf_infofile, &statbuf) == -1) {
            fprintf(outf, "NOTE: info dir %s: does not exist\n", conf_infofile);
-           fprintf(outf, "NOTE: it will be created on the next run\n");
+           fprintf(outf, "NOTE: it will be created on the next run.\n");
            amfree(conf_infofile);
        } else if (!S_ISDIR(statbuf.st_mode)) {
            fprintf(outf, "ERROR: info dir %s: not a directory\n", conf_infofile);
@@ -1072,6 +1095,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                if(stat(hostinfodir, &statbuf) == -1) {
                    fprintf(outf, "NOTE: info dir %s: does not exist\n",
                            hostinfodir);
+                   fprintf(outf, "NOTE: it will be created on the next run.\n");
                    amfree(hostinfodir);
                } else if (!S_ISDIR(statbuf.st_mode)) {
                    fprintf(outf, "ERROR: info dir %s: not a directory\n",
@@ -1097,6 +1121,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                    if(stat(diskdir, &statbuf) == -1) {
                        fprintf(outf, "NOTE: info dir %s: does not exist\n",
                                diskdir);
+                       fprintf(outf, "NOTE: it will be created on the next run.\n");
                    } else if (!S_ISDIR(statbuf.st_mode)) {
                        fprintf(outf, "ERROR: info dir %s: not a directory\n",
                                diskdir);
@@ -1108,6 +1133,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                    } else if(stat(infofile, &statbuf) == -1) {
                        fprintf(outf, "WARNING: info file %s: does not exist\n",
                                infofile);
+                       fprintf(outf, "NOTE: it will be created on the next run.\n");
                    } else if (!S_ISREG(statbuf.st_mode)) {
                        fprintf(outf, "ERROR: info file %s: not a file\n",
                                infofile);
@@ -1125,6 +1151,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                        if(stat(conf_indexdir, &statbuf) == -1) {
                            fprintf(outf, "NOTE: index dir %s: does not exist\n",
                                    conf_indexdir);
+                           fprintf(outf, "NOTE: it will be created on the next run.\n");
                            amfree(conf_indexdir);
                        } else if (!S_ISDIR(statbuf.st_mode)) {
                            fprintf(outf, "ERROR: index dir %s: not a directory\n",
@@ -1147,6 +1174,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                            if(stat(hostindexdir, &statbuf) == -1) {
                                fprintf(outf, "NOTE: index dir %s: does not exist\n",
                                        hostindexdir);
+                               fprintf(outf, "NOTE: it will be created on the next run.\n");
                                amfree(hostindexdir);
                            } else if (!S_ISDIR(statbuf.st_mode)) {
                                fprintf(outf, "ERROR: index dir %s: not a directory\n",
@@ -1168,6 +1196,7 @@ int start_server_check(fd, do_localchk, do_tapechk)
                            if(stat(diskdir, &statbuf) == -1) {
                                fprintf(outf, "NOTE: index dir %s: does not exist\n",
                                        diskdir);
+                               fprintf(outf, "NOTE: it will be created on the next run.\n");
                            } else if (!S_ISDIR(statbuf.st_mode)) {
                                fprintf(outf, "ERROR: index dir %s: not a directory\n",
                                        diskdir);
@@ -1241,7 +1270,7 @@ static void handle_response P((proto_t *p, pkt_t *pkt));
 #define DISK_DONE                              ((void *)2)
 
 int start_host(hostp)
-    host_t *hostp;
+    am_host_t *hostp;
 {
     disk_t *dp;
     char *req = NULL;
@@ -1254,6 +1283,12 @@ int start_host(hostp)
        return 0;
     }
 
+    if (strncmp (hostp->hostname,"localhost",9) == 0) {
+        fprintf(outf,
+                    "WARNING: Usage of fully qualified hostname recommended for Client %s.\n",
+                    hostp->hostname);
+    }
+
     /*
      * The first time through here we send a "noop" request.  This will
      * return the feature list from the client if it supports that.
@@ -1327,6 +1362,7 @@ int start_host(hostp)
            char *l;
            int l_len;
            char *o;
+           char* calcsize;
 
            if(dp->todo == 0) continue;
 
@@ -1362,10 +1398,22 @@ int start_host(hostp)
                fprintf(outf, "ERROR: %s:%s does not support GNUTAR.\n",
                        hostp->hostname, dp->name);
            }
-           l = vstralloc(dp->program, 
-                         " ",
-                         dp->name,
-                         " ",
+           if(dp->estimate == ES_CALCSIZE &&
+              !am_has_feature(hostp->features, fe_calcsize_estimate)) {
+               fprintf(outf, "ERROR: %s:%s does not support CALCSIZE for estimate, using CLIENT.\n",
+                       hostp->hostname, dp->name);
+               dp->estimate = ES_CLIENT;
+           }
+
+           if(dp->estimate == ES_CALCSIZE &&
+              am_has_feature(hostp->features, fe_selfcheck_calcsize))
+               calcsize = "CALCSIZE ";
+           else
+               calcsize = "";
+
+           l = vstralloc(calcsize, 
+                         dp->program, " ",
+                         dp->name, " ",
                          dp->device ? dp->device : "",
                          " 0 OPTIONS |",
                          o,
@@ -1435,7 +1483,7 @@ int start_host(hostp)
 int start_client_checks(fd)
 int fd;
 {
-    host_t *hostp;
+    am_host_t *hostp;
     disk_t *dp;
     int hostcount, pid;
     struct servent *amandad;
@@ -1521,7 +1569,7 @@ static void handle_response(p, pkt)
 proto_t *p;
 pkt_t *pkt;
 {
-    host_t *hostp;
+    am_host_t *hostp;
     disk_t *dp;
     char *line;
     char *s;
@@ -1529,7 +1577,7 @@ pkt_t *pkt;
     int ch;
     int tch;
 
-    hostp = (host_t *) p->datap;
+    hostp = (am_host_t *) p->datap;
     hostp->up = HOST_READY;
 
     if(p->state == S_FAILED && pkt == NULL) {
index ce56b8f164c3c7f8ceac0d2d9544a005f569af8c..28ba2a5ed95ea1c5a73d65bc793ecda9aebf498a 100644 (file)
@@ -93,19 +93,26 @@ fi
 umask 077
 
 # Plan and drive the dumps.
-exec </dev/null >$errfile 2>&1
+#exec </dev/null >$errfile 2>&1
+touch $errfile
+exec </dev/null 2>>$errfile 1>&2
 echo "amdump: start at `date`"
 echo "amdump: datestamp `date +%Y%m%d`"
 $libexecdir/planner$SUF "$@" | $libexecdir/driver$SUF $conf
 echo "amdump: end at `date`"
 
 # Send out a report on the dumps.
-exec </dev/null >/dev/null 2>&1
 $sbindir/amreport$SUF $conf
 
 # Roll the log file to its datestamped name.
 $libexecdir/amlogroll$SUF $conf
 
+# Trim the log file to those for dumps that still exist.
+$libexecdir/amtrmlog$SUF $conf
+
+# Trim the index file to those for dumps that still exist.
+$libexecdir/amtrmidx$SUF $conf
+
 # Keep a debug log through the tapecycle plus a couple of days.
 maxdays=`expr $tapecycle + 2`
 days=1
@@ -122,10 +129,4 @@ while [ $days -ge 2 ]; do
 done
 mv $errfile $errfile.1
 
-# Trim the log file to those for dumps that still exist.
-$libexecdir/amtrmlog$SUF $conf
-
-# Trim the index file to those for dumps that still exist.
-$libexecdir/amtrmidx$SUF $conf
-
 exit 0
index 73ff0308cf9257d2d93d5ba89c5aaa4d34210620..f6a5df5d79315905ccc0d9fa73aec2481e9df0ea 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amflush.c,v 1.41.2.13.4.6.2.10 2004/04/23 11:44:57 martinea Exp $
+ * $Id: amflush.c,v 1.41.2.13.4.6.2.9.2.2 2004/10/20 21:49:26 martinea Exp $
  *
  * write files from work directory onto tape
  */
@@ -226,6 +226,12 @@ char **main_argv;
        exit(1);
     }
 
+    holding_list = get_flush(datestamp_list, NULL, 1, 0);
+    if(holding_list->first == NULL) {
+       printf("Could not find any valid dump image, check directory.\n");
+       exit(1);
+    }
+
     if(!batch) confirm();
 
     for(dp = diskqp->head; dp != NULL; dp = dp->next) {
@@ -269,7 +275,6 @@ char **main_argv;
     }
     driver_stream = fdopen(driver_pipe[1], "w");
 
-    holding_list = get_flush(datestamp_list, NULL, 1, 0);
     for(holding_file=holding_list->first; holding_file != NULL;
                                   holding_file = holding_file->next) {
        get_dumpfile(holding_file->name, &file);
index 38079b0949d838c1d375d6768421cc9281c103d9..e35d2709fe2ed89c4108cec033778f2e464f4fc3 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amindexd.c,v 1.39.2.11.4.4.2.13 2003/10/27 18:33:03 martinea Exp $
+ * $Id: amindexd.c,v 1.39.2.11.4.4.2.13.2.1 2004/04/05 17:22:59 martinea Exp $
  *
  * This is the server daemon part of the index client/server system.
  * It is assumed that this is launched from inetd instead of being
@@ -331,7 +331,7 @@ char *host;
 {
     struct stat dir_stat;
     char *fn;
-    host_t *ihost;
+    am_host_t *ihost;
 
     if (config_name == NULL) {
        reply(501, "Must set config before setting host.");
index 15a943d1cc3c0ca2541acbd8ad8813645874daa7..dc303d17474331149e94d8e790307c21329047c7 100644 (file)
@@ -14,7 +14,7 @@ use POSIX;
 
 sub Usage {
     print STDERR <<END;
-Usage: $0 [[-config] CONFIG] [-hostwidth width] [-diskwidth width] [-verbose]
+Usage: $0 [[-config] CONFIG] [-hostwidth width] [-diskwidth width] [-skipmissed] [-verbose]
 
 This script generates to standard output an overview of the filesystems
 dumped over time and the type of dump done on a particular day, such as
@@ -55,11 +55,13 @@ my $amadmin = "$sbindir/amadmin$suf";
 my $opt_config         = "$config";
 my $opt_hostwidth      = 8;
 my $opt_diskwidth      = 20;
+my $opt_skipmissed     = 0;
 my $opt_verbose                = 0;
 
 GetOptions('config=s'          => \$opt_config,
           'hostwidth=i'        => \$opt_hostwidth,
           'diskwidth=i'        => \$opt_diskwidth,
+          'skipmissed'         => \$opt_skipmissed,
           'verbose'            => \$opt_verbose)
 or Usage();
 
@@ -106,6 +108,7 @@ while (<$fh>) {
     chomp;
     next if /found Amanda directory/;
     next if /skipping cruft directory/;
+    next if /skip-incr/;
     ($date, $host, $disk, $level, $tape, $file, $status) = split ' ', $_;
     next if $date eq 'date';
     next if $date eq 'Warning:';
@@ -124,6 +127,24 @@ while (<$fh>) {
 $fh->close or
     die "$0: error in closing `$amadmin $opt_config find|' pipe: $!\n";
 
+# Process the status to arrive at a "last" status
+for $host (sort keys %disks) {
+    for $disk (sort keys %{$disks{$host}}) {
+       $level{$host}{$disk}{"0000-LA-ST"} = '';
+       for $date (sort keys %dates) {
+           if ($level{$host}{$disk}{$date} eq "E"
+                && $level{$host}{$disk}{"0000-LA-ST"} =~ /^\d/ ) {
+               $level{$host}{$disk}{"0000-LA-ST"} .= $level{$host}{$disk}{$date};
+           } elsif ($level{$host}{$disk}{$date} eq "") {
+               $level{$host}{$disk}{"0000-LA-ST"} =~ s/E//;
+           } else {
+               $level{$host}{$disk}{"0000-LA-ST"} = $level{$host}{$disk}{$date};
+           }
+       }
+    }
+}
+
+unless ($opt_skipmissed)
 # touch all the dates just in case whole days were missed.
 {
     my ($start, $finish) = 
@@ -138,7 +159,9 @@ $fh->close or
        $start += 86400;
     }
 }
-    
+
+#Add the "last" entry    
+$dates{"0000-LA-ST"}=1;
 
 # make formats
 
index 2138262134de9d56677029de6a0bac82b4d6cfc5..b0becf1878a513918546d2c0914cfe0cf91348c2 100644 (file)
@@ -189,6 +189,10 @@ CleanCurinfo () {
          echo "${Line}"
        fi
        ;;
+      history*)
+       set ${Line}
+       echo "${Line}"
+       ;;
       //)
        echo "${Line}"
        DeadLevel=10
index d5489603e34f4e87ff1611e0c7864f686c9f1e18..9a702534fdb00ade0a35afd3633be934d7c60ad3 100644 (file)
@@ -35,7 +35,7 @@ $result = &NGetOpt (  "summary",
                        "gestimate|gettingestimate",
                        "date",
                        "config|c:s",
-                       "file:s",
+                       "file:s"
                        );
 if($result !=1 ) {
        &usage();
@@ -92,6 +92,27 @@ if($nb_options == 0 ) {
        $opt_estimate    = 1;
 }
 
+$unit=`$sbindir/amgetconf$suf displayunit`;
+chomp($unit);
+$unitdivisor=1;
+if($unit eq 'K') {
+  $unitdivisor = 1;
+  $unit='k';
+}
+elsif($unit eq 'M') {
+  $unitdivisor = 1024;
+  $unit='m';
+}
+elsif($unit eq 'G') {
+  $unitdivisor = 1024*1024;
+  $unit='g';
+}
+elsif($unit eq 'T') {
+  $unitdivisor = 1024*1024*1024;
+  $unit='t';
+}
+
+
 if( defined $opt_file) {
        if( $opt_file =~ m,^/, ) {
                $errfile = $opt_file;
@@ -135,7 +156,7 @@ $tape_size = 0;
 while(<AMDUMP>) {
        chomp;
        if(/(amdump|amflush): start at (.*)/) {
-               print " from $2";
+               print " from $2\n";
                $starttime=&unctime(split(/[    ]+/,$2));
        }
        elsif(/amdump: datestamp (\S+)/) {
@@ -145,6 +166,23 @@ while(<AMDUMP>) {
                        push @datestamp, $gdatestamp;
                }
        }
+       elsif(/setup_estimate: (\S+):(\S+): command .*, options: *(\S+) *last_level -?\d+ next_level0 -?\d+ level_days \d+ *getting estimates (-?\d) \(-2\) (-?\d) \(-2\) (-?\d) \(-2\)/) {
+               $host=$1;
+               $partition=$2;
+               $hostpart=&make_hostpart($host,$partition,$gdatestamp);
+               $estimate{$hostpart}=0;
+               $level{$hostpart}=0;
+               $esize{$hostpart}=0;
+               $dump_started{$hostpart}=0;
+               $dump_finished{$hostpart}=0;
+               $taper_started{$hostpart}=0;
+               $taper_finished{$hostpart}=0;
+               $partialestimate{$hostpart}=0;
+               $error{$hostpart}="";
+               if($4 != -1) { $getest{$hostpart} .= ":$4:" };
+               if($5 != -1) { $getest{$hostpart} .= ":$5:" };
+               if($6 != -1) { $getest{$hostpart} .= ":$6:" };
+       }
        elsif(/setup_estimate: (\S+):(\S+): command .*, options:/) {
                $host=$1;
                $partition=$2;
@@ -156,7 +194,19 @@ while(<AMDUMP>) {
                $dump_finished{$hostpart}=0;
                $taper_started{$hostpart}=0;
                $taper_finished{$hostpart}=0;
+               $partialestimate{$hostpart}=0;
                $error{$hostpart}="";
+               $_ = <AMDUMP>;
+               while (! /getting estimates/) { $_ = <AMDUMP>; }
+               chomp;
+               if(/getting estimates (-?\d) \(-2\) (-?\d) \(-2\) (-?\d) \(-2\)/) {
+                       if($1 != -1) { $getest{$hostpart} .= ":$1:" };
+                       if($2 != -1) { $getest{$hostpart} .= ":$2:" };
+                       if($3 != -1) { $getest{$hostpart} .= ":$3:" };
+               }
+               else {
+                       die("ERROR $_");
+               }
        }
        elsif(/got result for host (\S+) disk (\S+): (\d+) -> (\d+)K,/) {
                $host=$1;
@@ -164,7 +214,25 @@ while(<AMDUMP>) {
                $hostpart=&make_hostpart($host,$partition,$gdatestamp);
                $estimate{$hostpart}=1;
                $level{$hostpart}=$3;
-               $esize{$hostpart}=$4;
+               $esize{$hostpart}=$4 / $unitdivisor;
+               $partialestimate{$hostpart}=0;
+               $getest{$hostpart} = "";
+       }
+       elsif(/got partial result for host (\S+) disk (\S+): (-?\d+) -> (-?\d+)K, (-?\d+) -> (-?\d+)K, (-?\d+) -> (-?\d+)K/) {
+               $host=$1;
+               $partition=$2;
+               $hostpart=&make_hostpart($host,$partition,$gdatestamp);
+               if($4 > 0 || $6 > 0 || $8 > 0) {
+                       $estimate{$hostpart}=1;
+                       $level{$hostpart}=$3;
+                       $esize{$hostpart}=$4 / $unitdivisor;
+                       $partialestimate{$hostpart}=1;
+                       if($4 > 0) { $getest{$hostpart} =~ s/:$3://; }
+                       if($6 > 0) { $getest{$hostpart} =~ s/:$5://; }
+                       if($8 > 0) { $getest{$hostpart} =~ s/:$7://; }
+
+                       if($getest{$hostpart} eq "") { $partialestimate{$hostpart}=0; }
+               }
        }
        elsif(/getting estimates took/) {
                $estimate_done=1;
@@ -183,7 +251,7 @@ while(<AMDUMP>) {
                        $level{"$hostpart"}=$4;
                        $esize=$5;
                        $esize=32 if $esize<32;
-                       $esize{$hostpart}=$esize;
+                       $esize{$hostpart}=$esize / $unitdivisor;
                        $degr_level{$hostpart}=-1;
                }
        }
@@ -196,7 +264,7 @@ while(<AMDUMP>) {
                        $level{"$hostpart"}=$5;
                        $esize=$6;
                        $esize=32 if $esize<32;
-                       $esize{$hostpart}=$esize;
+                       $esize{$hostpart}=$esize / $unitdivisor;
                        $degr_level{$hostpart}=-1;
                }
        }
@@ -211,7 +279,7 @@ while(<AMDUMP>) {
                        $level{"$hostpart"}=$6;
                        $esize=$7;
                        $esize=32 if $esize<32;
-                       $esize{$hostpart}=$esize;
+                       $esize{$hostpart}=$esize / $unitdivisor;
                        $degr_level{$hostpart}=-1;
                }
        }
@@ -223,9 +291,9 @@ while(<AMDUMP>) {
                        $level{$hostpart}=$4;
                        $esize=$5;
                        $esize=32 if $esize<32;
-                       $esize{$hostpart}=$esize;
+                       $esize{$hostpart}=$esize / $unitdivisor;
                        $degr_level{$hostpart}=$6;
-                       $degr_size{$hostpart}=$7;
+                       $degr_size{$hostpart}=$7 / $unitdivisor;
                        $degr_size{$hostpart}=32 if ($7 < 32);
                }
        }
@@ -238,16 +306,16 @@ while(<AMDUMP>) {
                        $level{$hostpart}=$5;
                        $esize=$6;
                        $esize=32 if $esize<32;
-                       $esize{$hostpart}=$esize;
+                       $esize{$hostpart}=$esize / $unitdivisor;
                        $degr_level{$hostpart}=$7;
-                       $degr_size{$hostpart}=$8;
+                       $degr_size{$hostpart}=$8 / $unitdivisor;
                        $degr_size{$hostpart}=32 if ($8 < 32);
                }
        }
        elsif(/^FLUSH (\S+) (\S+) (\S+) (\d+) (\S+)/) {
                $host=$1;
                $partition=$2;
-               $datestamp=$3;
+               $datestamp="$3";
                $level=$4;
                $holding_file=$5;
                $hostpart=&make_hostpart($host,$partition,$datestamp);
@@ -263,7 +331,7 @@ while(<AMDUMP>) {
                $dumpers_active=0;
        }
        elsif(/^driver: tape size (\d+)/) {
-               $tape_size = $1;
+               $tape_size = $1 / $unitdivisor;
        }
        elsif(/^driver: adding holding disk \d+ dir \S+ size (\d+)/) {
                $holding_space += $1;
@@ -361,6 +429,15 @@ while(<AMDUMP>) {
                        $dumpers_held[$dumpers_active]={};
                }
        }
+       elsif(/driver: send-cmd time (\S+) to (dumper\d*): CONTINUE (\d+-\d+) (\S+) (\d+) (\d+)/) {
+               $current_time=$1;
+               $serial=$3;
+               $hostpart=$serial{$serial};
+               if($hostpart ne "") {
+                       $dump_roomq{$hostpart}=undef;
+                       $error{$hostpart}="";
+               }
+       }
        elsif(/driver: result time (\S+) from (dumper\d+): FAILED (\d+-\d+) (.*)/) {
                $current_time=$1;
                $serial=$3;
@@ -389,8 +466,8 @@ while(<AMDUMP>) {
        elsif(/driver: result time (\S+) from (dumper\d+): DONE (\d+-\d+) (\d+) (\d+) (\d+) \[.*\]/) {
                $current_time=$1;
                $serial=$3;
-               $origsize=$4;
-               $outputsize=$5;
+               $origsize=$4 / $unitdivisor;
+               $outputsize=$5 / $unitdivisor;
                $hostpart=$serial{$serial};
                $size{$hostpart}=$outputsize;
                $dump_finished{$hostpart}=1;
@@ -412,6 +489,13 @@ while(<AMDUMP>) {
                $error{$hostpart}="driver: (aborted)";
                $dumpers_active--;
        }
+       elsif(/driver: result time (\S+) from (dumper\d+): RQ-MORE-DISK (\d+-\d+)/) {
+               $current_time=$1;
+               $serial=$3;
+               $hostpart=$serial{$serial};
+               $dump_roomq{$hostpart}=1;
+               $error{$hostpart}="(waiting for holding disk space)";
+       }
        elsif(/driver: finished-cmd time (\S+) dumper\d+ dumped (\S+):(\S+)/){
                $current_time=$1;
        }
@@ -496,7 +580,7 @@ while(<AMDUMP>) {
                $current_time=$1;
                $serial=$2;
                $label=$3;
-               $size=$6;
+               $size=$6 / $unitdivisor;
                $hostpart=$serial{$serial};
                $taper_finished{$hostpart}=1;
                $busy_time{"taper"}+=($1-$taper_time{$hostpart});
@@ -523,7 +607,21 @@ while(<AMDUMP>) {
                $taper_time{$hostpart}=$1;
                $error{$hostpart}="driver: $error";
        }
-       elsif(/planner: FAILED (\S+) (\S+) (\S+) (\d+) (.*)/) {
+       elsif(/driver: dump failed (\S+) (\S+) (\S+), too many dumper retry/) {
+               $serial=$1;
+               $hostpart=$serial{$serial};
+               $dump_started{$hostpart}=-1;
+               $dump_finished{$hostpart}=-2;
+               $error{$hostpart} .= "(too many dumper retry)";
+       }
+       elsif(/driver: tape failed (\S+) (\S+) (\S+), too many taper retry/) {
+               $serial=$1;
+               $hostpart=$serial{$serial};
+               $taper_started{$hostpart}=-1;
+               $taper_finished{$hostpart}=-2;
+               $error{$hostpart} .= "(too many taper retry)";
+       }
+       elsif(/planner: FAILED (\S+) (\S+) (\S+) (-?\d+) (.*)/) {
                $host=$1;
                $partition=$2;
                $datestamp=$3;
@@ -563,6 +661,9 @@ while(<AMDUMP>) {
                $ntsize{$nb_tape} = 0;
                $ntesize{$nb_tape} = 0;
        }
+       else {
+               #print "Ignoring: $_\n";
+       }
 }
 
 close(AMDUMP);
@@ -577,7 +678,7 @@ if(defined $current_time) {
        }
 }
 
-print "\n\n";
+print "\n";
 
 $nb_partition = 0;
 
@@ -635,10 +736,10 @@ foreach $host (sort @hosts) {
                        next if(!defined $estimate{$hostpart} && !defined $flush{$hostpart});
                        $nb_partition++;
                        if( !defined $size{$hostpart} && defined $holding_file{$hostpart}) {
-                               $size{$hostpart} = &dump_size($holding_file{$hostpart}) / 1024;
+                               $size{$hostpart} = &dump_size($holding_file{$hostpart}) / (1024 * $unitdivisor);
                        }
                        $in_flush=0;
-                       if($estimate_done != 1) {
+                       if($estimate_done != 1 && !defined $flush{$hostpart}) {
                                if(defined $estimate{$hostpart}) {
                                        if($estimate{$hostpart} != 1) {
                                                if( defined $opt_gestimate) {
@@ -648,11 +749,15 @@ foreach $host (sort @hosts) {
                                                }
                                        }
                                        else {
-                                               if(defined $opt_estimate) {
+                                               if(defined $opt_estimate ||
+                                                       (defined $opt_gestimate && $partialestimate{$hostpart} == 1)) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s", "$host:$partition";
                                                        printf "%2d",  $level{$hostpart};
-                                                       printf "%9dk", $esize{$hostpart};
+                                                       printf "%9d$unit", $esize{$hostpart};
+                                                       if($partialestimate{$hostpart} == 1) {
+                                                               print " partial";
+                                                       }
                                                        print " estimate done\n";
                                                }
                                                $epartition++;
@@ -699,7 +804,7 @@ foreach $host (sort @hosts) {
                                                if( defined $opt_dumpingtape ) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $esize{$hostpart};
+                                                       printf "%9d$unit", $esize{$hostpart};
                                                        print " dumping to tape";
                                                        if( defined $starttime ) {
                                                                print " (", &showtime($taper_time{$hostpart}), ")";
@@ -713,7 +818,7 @@ foreach $host (sort @hosts) {
                                                if( defined $opt_writingtape ) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $size{$hostpart};
+                                                       printf "%9d$unit", $size{$hostpart};
                                                        if($in_flush == 0) {
                                                                print " writing to tape";
                                                        }
@@ -735,11 +840,29 @@ foreach $host (sort @hosts) {
                                                }
                                        }
                                        elsif($taper_finished{$hostpart} < 0) {
+
+                                               if(defined $size{$hostpart}) {
+                                                       $xsize = $size{$hostpart};
+                                               }
+                                               elsif(defined $esize{$hostpart}) {
+                                                       $xsize = $esize{$hostpart};
+                                               }
+                                               else {
+                                                       $xsize = 0;
+                                               }
+
+                                               if(defined $esize{$hostpart}) {
+                                                       $exsize += $esize{$hostpart};
+                                               }
+                                               else {
+                                                       $exsize += $xsize;
+                                               }
+
                                                if( defined $opt_failed  ||
                                                         (defined $opt_waittaper && ($taper_finished{$hostpart} == -1))) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $size{$hostpart};
+                                                       printf "%9d$unit", $xsize;
                                                        if($in_flush == 0) {
                                                                print " failed to tape";
                                                        }
@@ -754,40 +877,24 @@ foreach $host (sort @hosts) {
                                                }
 
                                                $tfpartition++;
-                                               $tfsize += $size{$hostpart};
-                                               if(defined $esize{$hostpart}) {
-                                                       $tfesize += $esize{$hostpart};
-                                               }
-                                               else {
-                                                       $tfesize += $size{$hostpart};
-                                               }
+                                               $tfsize += $xsize;
+                                               $tfesize += $exsize;
 
                                                if($in_flush == 0) {
                                                        $twpartition++;
-                                                       $twsize += $size{$hostpart};
-                                                       if(defined $esize{$hostpart}) {
-                                                               $twesize += $esize{$hostpart};
-                                                       }
-                                                       else {
-                                                               $twesize += $size{$hostpart};
-                                                       }
+                                                       $twsize += $xsize;
+                                                       $twesize += $exsize;
                                                }
                                                else {
                                                        $wfpartition++;
-                                                       $wfsize += $size{$hostpart};
-                                                       if(defined $esize{$hostpart}) {
-                                                               $wfesize += $esize{$hostpart};
-                                                       }
-                                                       else {
-                                                               $wfesize += $size{$hostpart};
-                                                       }
+                                                       $wfsize += $xsize;
                                                }
                                        }
                                        elsif($taper_finished{$hostpart} == 1) {
                                                if( defined $opt_finished ) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $size{$hostpart};
+                                                       printf "%9d$unit", $size{$hostpart};
                                                        if($in_flush == 0) {
                                                                print " finished";
                                                        }
@@ -829,7 +936,7 @@ foreach $host (sort @hosts) {
                                                        if( defined $opt_waitdumping ) {
                                                                printf "%8s ", $datestamp if defined $opt_date;
                                                                printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                               printf "%9dk", $esize{$hostpart};
+                                                               printf "%9d$unit", $esize{$hostpart};
                                                                print " wait for dumping $error{$hostpart}\n";
                                                        }
                                                        $wpartition++;
@@ -855,14 +962,17 @@ foreach $host (sort @hosts) {
                                                if( defined $opt_dumping ) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $esize{$hostpart};
-                                                       printf " dumping %8dk", $size{$hostpart};
+                                                       printf "%9d$unit", $esize{$hostpart};
+                                                       printf " dumping %8d$unit", $size{$hostpart};
                                                        if($size{$hostpart} != 0) {
                                                                printf " (%6.2f%%)", (100.0*$size{$hostpart})/$esize{$hostpart};
                                                        }
                                                        if( defined $starttime ) {
                                                                print " (", &showtime($dump_time{$hostpart}), ")";
                                                        }
+                                                       if(defined $dump_roomq{$hostpart}) {
+                                                               print " " . $error{$hostpart};
+                                                       }
                                                        print "\n";
                                                }
                                                $dupartition++;
@@ -874,7 +984,7 @@ foreach $host (sort @hosts) {
                                                if( defined $opt_waittaper ) {
                                                        printf "%8s ", $datestamp if defined $opt_date;
                                                        printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                                       printf "%9dk", $size{$hostpart};
+                                                       printf "%9d$unit", $size{$hostpart};
                                                        print " dump done";
                                                        if( defined $starttime ) {
                                                                print " (", &showtime($dump_time{$hostpart}), ")";
@@ -898,7 +1008,7 @@ foreach $host (sort @hosts) {
                                        if( defined $opt_waittaper ) {
                                                printf "%8s ", $datestamp if defined $opt_date;
                                                printf "%-${maxnamelength}s%2d", "$host:$partition", $level{$hostpart};
-                                               printf "%9dk", $size{$hostpart};
+                                               printf "%9d$unit", $size{$hostpart};
                                                print " waiting to flush\n";
                                        }
                                        $wfpartition++;
@@ -919,51 +1029,51 @@ if (defined $opt_summary) {
        print  "SUMMARY          part      real  estimated\n";
        print  "                           size       size\n";
        printf "partition       : %3d\n", $nb_partition;
-       printf "estimated       : %3d %20dk\n", $epartition , $estsize;
-       printf "flush           : %3d %9dk\n", $flpartition, $flsize;
-       printf "failed          : %3d %20dk           (%6.2f%%)\n",
+       printf "estimated       : %3d %20d$unit\n", $epartition , $estsize;
+       printf "flush           : %3d %9d$unit\n", $flpartition, $flsize;
+       printf "failed          : %3d %20d$unit           (%6.2f%%)\n",
                $fpartition , $fsize,
                $estsize ? ($fsize * 1.0 / $estsize) * 100 : 0.0;
-       printf "wait for dumping: %3d %20dk           (%6.2f%%)\n",
+       printf "wait for dumping: %3d %20d$unit           (%6.2f%%)\n",
                $wpartition , $wsize,
                $estsize ? ($wsize * 1.0 / $estsize) * 100 : 0.0;
-       printf "dumping to tape : %3d %20dk           (%6.2f%%)\n",
+       printf "dumping to tape : %3d %20d$unit           (%6.2f%%)\n",
                $dtpartition, $dtesize,
                $estsize ? ($dtesize * 1.0 / $estsize) * 100 : 0.0;
-       printf "dumping         : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "dumping         : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $dupartition, $dusize, $duesize,
                $duesize ? ($dusize * 1.0 / $duesize) * 100 : 0.0,
                $estsize ? ($dusize * 1.0 / $estsize) * 100 : 0.0;
-       printf "dumped          : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "dumped          : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $dpartition , $dsize , $desize,
                $desize ? ($dsize * 1.0 / $desize) * 100 : 0.0,
                $estsize ? ($dsize * 1.0 / $estsize) * 100 : 0.0;
-       printf "wait for writing: %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "wait for writing: %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $twpartition, $twsize, $twesize,
                $twesize ? ($twsize * 1.0 / $twesize) * 100 : 0.0,
                $estsize ? ($twsize * 1.0 / $estsize) * 100 : 0.0;
-       printf "wait to flush   : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "wait to flush   : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $wfpartition, $wfsize, $wfsize, 100, 0;
-       printf "writing to tape : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "writing to tape : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $tapartition, $tasize, $taesize,
                $taesize ? ($tasize * 1.0 / $taesize) * 100 : 0.0,
                $estsize ? ($tasize * 1.0 / $estsize) * 100 : 0.0;
-       printf "failed to tape  : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "failed to tape  : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $tfpartition, $tfsize, $tfesize,
                $tfesize ? ($tfsize * 1.0 / $tfesize) * 100 : 0.0,
                $estsize ? ($tfsize * 1.0 / $estsize) * 100 : 0.0;
-       printf "taped           : %3d %9dk %9dk (%6.2f%%) (%6.2f%%)\n",
+       printf "taped           : %3d %9d$unit %9d$unit (%6.2f%%) (%6.2f%%)\n",
                $tpartition , $tsize , $tesize,
                $tesize ? ($tsize * 1.0 / $tesize) * 100 : 0.0,
                ($estsize+$flsize) ? ($tsize * 1.0 / ($estsize + $flsize)) * 100 : 0.0;
        if($nb_tape > 1 || $tape_size != 0) {
                for($i=1; $i <= $nb_tape; $i++) {
                        if($tape_size != 0) {
-                               printf "  tape %-3d      : %3d %9dk %9dk (%6.2f%%) %s\n",
+                               printf "  tape %-3d      : %3d %9d$unit %9d$unit (%6.2f%%) %s\n",
                                        $i, $ntpartition{$i}, $ntsize{$i}, $ntesize{$i}, 100*$ntsize{$i}/$tape_size, $ntlabel{$i};
                        }
                        else {
-                               printf "  tape %-3d      : %3d %9dk %9dk %s\n",
+                               printf "  tape %-3d      : %3d %9d$unit %9d$unit %s\n",
                                        $i, $ntpartition{$i}, $ntsize{$i}, $ntesize{$i}, $ntlabel{$i};
                        }
                }
@@ -992,7 +1102,7 @@ if (defined $opt_summary) {
                } else {
                        $hs = 0.0;
                }
-               printf "holding space   : %9dk (%6.2f%%)\n", $free{"space:"}, $hs;
+               printf "holding space   : %9d$unit (%6.2f%%)\n", ($free{"space:"}/$unitdivisor), $hs;
        }
 }
 
index 6613be463551d62ee808bc77e6fc7149dcdb16ad..19e2c57ec1a712f86642fc6fa46dcf06f42663fe 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amtrmidx.c,v 1.21.4.1.4.2.2.6 2004/02/12 18:28:42 martinea Exp $
+ * $Id: amtrmidx.c,v 1.21.4.1.4.2.2.5.2.1 2004/02/12 18:28:37 martinea Exp $
  *
  * trims number of index files to only those still in system.  Well
  * actually, it keeps a few extra, plus goes back to the last level 0
index 6608ac9360171674319d0a0850e9d1ca742bf2ec..8b052e12fb6c3a081157d46ce32b970d4771731d 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#      $Id: amverify.sh.in,v 1.7.2.13.4.5.2.6 2003/10/24 13:44:49 martinea Exp $
+#      $Id: amverify.sh.in,v 1.7.2.13.4.5.2.6.2.2 2004/11/19 18:12:30 martinea Exp $
 #
 # (C) 1996 by ICEM Systems GmbH
 # Author: Axel Zinser (fifi@icem.de)
@@ -370,7 +370,20 @@ while [ $SLOT -lt $SLOTS ]; do
                sleep 3
        done
        $Echon "Rewinding..."
-       until $MT $MTF $DEVICE rewind; do
+       ERRORS=0
+       until $MT $MTF $DEVICE rewind > $TEMP/ammt.out 2>&1; do
+               RESULT=`grep "No medium found" $TEMP/ammt.out`
+               [ X"$RESULT" != X"" ] \
+                       && report "** Error rewinding tape" \
+                       && report "`cat $TEMP/ammt.out`" \
+                       && cat $TEMP/ammt.out >> $DEFECTS \
+                       && break
+               ERRORS=`expr $ERRORS + 1`
+               [ $ERRORS -gt 100 ] \
+                       && report "** Error rewinding tape" \
+                       && report "`cat $TEMP/ammt.out`" \
+                       && cat $TEMP/ammt.out >> $DEFECTS \
+                       && break
                sleep 3
        done
        $Echon "Processing label..."
@@ -415,6 +428,7 @@ while [ $SLOT -lt $SLOTS ]; do
                FILE=`grep restoring $TEMP/amrestore.out \
                        | sed 's/^.*restoring //'`
                EOF=`grep "reached end of tape" $TEMP/amrestore.out`
+               EOI=`grep "reached end of information" $TEMP/amrestore.out`
                # amrestore:   0: restoring sundae._mnt_sol1_usr.19961127.1
                if [ X"$FILE" != X"" -a X"$RESULT" = X"0" ]; then
                        report "Checked $FILE"
@@ -423,6 +437,9 @@ while [ $SLOT -lt $SLOTS ]; do
                elif [ -n "$EOF" ]; then
                        report "End-of-Tape detected."
                        break
+               elif [ -n "$EOI" ]; then
+                       report "End-of-Information detected."
+                       break
                else
                        report "** Error detected ($FILE)"
                        echo "$VOLUME ($FILE):" >>$DEFECTS
index 4404e1b06e7afd5bb327549bd3eb82ee6764d101..b842d7aa9f4301607bfbb32aac9d32b707f90fc9 100644 (file)
@@ -48,11 +48,17 @@ else
 fi
 
 
-FIRST_SLOT=`grep "taper: slot" $AMLOG | sed 1q | sed 's/://g' | awk '{print $3}'`
+FIRST_SLOT=`grep "taper: slot" $AMLOG | fgrep 'exact label match 
+new tape 
+first labelstr match' | sed 1q | sed 's/://g' | awk '{print $3}'`
 if [ X"$FIRST_SLOT" = X"" ]; then
   FIRST_SLOT='-1'
 fi
 
 NBTAPES=`grep -c "taper: wrote label " $AMLOG`
 
-$AMVERIFY $CONFIG $FIRST_SLOT $NBTAPES
+if [ X"$NBTAPES" != X"0" ]; then
+  $AMVERIFY $CONFIG $FIRST_SLOT $NBTAPES
+else
+  echo "Nothing to verify"
+fi
index 62e17626915451bdf52b03d8ec13a8be4f332cc5..16cd795eb1cbab095f1d2492898fe27188fe0f06 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: conffile.c,v 1.54.2.16.2.5.2.20 2003/11/26 16:12:19 martinea Exp $
+ * $Id: conffile.c,v 1.54.2.16.2.5.2.20.2.8 2005/03/29 16:35:11 martinea Exp $
  *
  * read configuration file
  */
 
 typedef enum {
     UNKNOWN, ANY, COMMA, LBRACE, RBRACE, NL, END,
-    IDENT, INT, BOOL, REAL, STRING, TIME,
+    IDENT, INT, LONG, BOOL, REAL, STRING, TIME,
 
     /* config parameters */
     INCLUDEFILE,
     ORG, MAILTO, DUMPUSER,
     TAPECYCLE, TAPEDEV, CHNGRDEV, CHNGRFILE, LABELSTR,
-    BUMPSIZE, BUMPDAYS, BUMPMULT, ETIMEOUT, DTIMEOUT, CTIMEOUT,
+    BUMPPERCENT, BUMPSIZE, BUMPDAYS, BUMPMULT, ETIMEOUT, DTIMEOUT, CTIMEOUT,
     TAPEBUFS, TAPELIST, DISKFILE, INFOFILE, LOGDIR, LOGFILE,
     DISKDIR, DISKSIZE, INDEXDIR, NETUSAGE, INPARALLEL, DUMPORDER, TIMEOUT,
     TPCHANGER, RUNTAPES,
@@ -81,6 +81,7 @@ typedef enum {
     AMRECOVER_DO_FSF, AMRECOVER_CHECK_LABEL, AMRECOVER_CHANGER,
 
     TAPERALGO, FIRST, FIRSTFIT, LARGEST, LARGESTFIT, SMALLEST, LAST,
+    DISPLAYUNIT,
 
     /* holding disk */
     COMMENT, DIRECTORY, USE, CHUNKSIZE,
@@ -88,7 +89,7 @@ typedef enum {
     /* dump type */
     /*COMMENT,*/ PROGRAM, DUMPCYCLE, RUNSPERCYCLE, MAXCYCLE, MAXDUMPS,
     OPTIONS, PRIORITY, FREQUENCY, INDEX, MAXPROMOTEDAY,
-    STARTTIME, COMPRESS, AUTH, STRATEGY,
+    STARTTIME, COMPRESS, AUTH, STRATEGY, ESTIMATE,
     SKIP_INCR, SKIP_FULL, RECORD, HOLDING,
     EXCLUDE, INCLUDE, KENCRYPT, IGNORE, COMPRATE,
 
@@ -101,8 +102,8 @@ typedef enum {
     /* dump options (obsolete) */
     EXCLUDE_FILE, EXCLUDE_LIST,
 
-    /* compress */
-    NONE, FAST, BEST, SERVER, CLIENT,
+    /* compress, estimate */
+    NONE, FAST, BEST, SERVER, CLIENT, CALCSIZE,
 
     /* priority */
     LOW, MEDIUM, HIGH,
@@ -134,6 +135,7 @@ keytab_t *keytable;
 
 typedef union {
     int i;
+    long l;
     double r;
     char *s;
 } val_t;
@@ -163,6 +165,8 @@ char *config_dir = NULL;
 holdingdisk_t *holdingdisks;
 int num_holdingdisks;
 
+long int unit_divisor = 1;
+
 /* configuration parameters */
 
 /* strings */
@@ -198,6 +202,7 @@ static val_t conf_netusage;
 static val_t conf_inparallel;
 static val_t conf_timeout;
 static val_t conf_maxdumps;
+static val_t conf_bumppercent;
 static val_t conf_bumpsize;
 static val_t conf_bumpdays;
 static val_t conf_etimeout;
@@ -210,6 +215,7 @@ static val_t conf_maxdumpsize;
 static val_t conf_amrecover_do_fsf;
 static val_t conf_amrecover_check_label;
 static val_t conf_taperalgo;
+static val_t conf_displayunit;
 
 /* reals */
 static val_t conf_bumpmult;
@@ -240,6 +246,7 @@ static int seen_infofile;
 static int seen_diskfile;
 static int seen_diskdir;
 static int seen_logdir;
+static int seen_bumppercent;
 static int seen_bumpsize;
 static int seen_bumpmult;
 static int seen_bumpdays;
@@ -266,6 +273,7 @@ static int seen_amrecover_do_fsf;
 static int seen_amrecover_check_label;
 static int seen_amrecover_changer;
 static int seen_taperalgo;
+static int seen_displayunit;
 
 static int allow_overwrites;
 static int token_pushed;
@@ -307,13 +315,14 @@ static void get_compress P((void));
 static void get_priority P((void));
 static void get_auth P((void));
 static void get_strategy P((void));
+static void get_estimate P((void));
 static void get_exclude P((void));
 static void get_include P((void));
 static void get_taperalgo P((val_t *c_taperalgo, int *s_taperalgo));
 
 static void get_simple P((val_t *var, int *seen, tok_t type));
 static int get_time P((void));
-static int get_number P((void));
+static long get_number P((void));
 static int get_bool P((void));
 static void ckseen P((int *seen));
 static void parserror P((char *format, ...))
@@ -396,6 +405,7 @@ struct byname {
     /*{ "DISKSIZE", CNF_DISKSIZE, INT },*/
     { "BUMPDAYS", CNF_BUMPDAYS, INT },
     { "BUMPSIZE", CNF_BUMPSIZE, INT },
+    { "BUMPPERCENT", CNF_BUMPPERCENT, INT },
     { "BUMPMULT", CNF_BUMPMULT, REAL },
     { "NETUSAGE", CNF_NETUSAGE, INT },
     { "INPARALLEL", CNF_INPARALLEL, INT },
@@ -412,6 +422,7 @@ struct byname {
     { "AMRECOVER_CHECK_LABEL", CNF_AMRECOVER_CHECK_LABEL, BOOL },
     { "AMRECOVER_CHANGER", CNF_AMRECOVER_CHANGER, STRING },
     { "TAPERALGO", CNF_TAPERALGO, INT },
+    { "DISPLAYUNIT", CNF_DISPLAYUNIT, STRING },
     { "AUTOFLUSH", CNF_AUTOFLUSH, BOOL },
     { "RESERVE", CNF_RESERVE, INT },
     { "MAXDUMPSIZE", CNF_MAXDUMPSIZE, INT },
@@ -441,6 +452,13 @@ char *str;
     if(np->typ == INT) {
        ap_snprintf(number, sizeof(number), "%d", getconf_int(np->parm));
        tmpstr = newstralloc(tmpstr, number);
+    } else if(np->typ == BOOL) {
+       if(getconf_int(np->parm) == 0) {
+           tmpstr = newstralloc(tmpstr, "off");
+       }
+       else {
+           tmpstr = newstralloc(tmpstr, "on");
+       }
     } else if(np->typ == REAL) {
        ap_snprintf(number, sizeof(number), "%f", getconf_real(np->parm));
        tmpstr = newstralloc(tmpstr, number);
@@ -472,6 +490,7 @@ confparm_t parm;
     /*case CNF_DISKDIR: return seen_diskdir;*/
     case CNF_LOGDIR: return seen_logdir;
     /*case CNF_LOGFILE: return seen_logfile;*/
+    case CNF_BUMPPERCENT: return seen_bumppercent;
     case CNF_BUMPSIZE: return seen_bumpsize;
     case CNF_BUMPMULT: return seen_bumpmult;
     case CNF_BUMPDAYS: return seen_bumpdays;
@@ -498,6 +517,7 @@ confparm_t parm;
     case CNF_AMRECOVER_CHECK_LABEL: return seen_amrecover_check_label;
     case CNF_AMRECOVER_CHANGER: return seen_amrecover_changer;
     case CNF_TAPERALGO: return seen_taperalgo;
+    case CNF_DISPLAYUNIT: return seen_displayunit;
     default: return 0;
     }
 }
@@ -514,6 +534,7 @@ confparm_t parm;
     case CNF_TAPECYCLE: r = conf_tapecycle.i; break;
     case CNF_RUNTAPES: r = conf_runtapes.i; break;
     /*case CNF_DISKSIZE: r = conf_disksize.i; break;*/
+    case CNF_BUMPPERCENT: r = conf_bumppercent.i; break;
     case CNF_BUMPSIZE: r = conf_bumpsize.i; break;
     case CNF_BUMPDAYS: r = conf_bumpdays.i; break;
     case CNF_NETUSAGE: r = conf_netusage.i; break;
@@ -582,6 +603,7 @@ confparm_t parm;
     case CNF_RAWTAPEDEV: r = conf_rawtapedev.s; break;
     case CNF_COLUMNSPEC: r = conf_columnspec.s; break;
     case CNF_AMRECOVER_CHANGER: r = conf_amrecover_changer.s; break;
+    case CNF_DISPLAYUNIT: r = conf_displayunit.s; break;
 
     default:
        error("error [unknown getconf_str parm: %d]", parm);
@@ -701,6 +723,7 @@ static void init_defaults()
     malloc_mark(conf_dumporder.s);
     conf_amrecover_changer.s = stralloc("");
     conf_printer.s = stralloc("");
+    conf_displayunit.s = stralloc("k");
 
     conf_dumpcycle.i   = 10;
     conf_runspercycle.i        = 0;
@@ -711,6 +734,7 @@ static void init_defaults()
     conf_inparallel.i  = 10;
     conf_maxdumps.i    = 1;
     conf_timeout.i     = 2;
+    conf_bumppercent.i = 0;
     conf_bumpsize.i    = 10*1024;
     conf_bumpdays.i    = 2;
     conf_bumpmult.r    = 1.5;
@@ -744,6 +768,7 @@ static void init_defaults()
     seen_diskfile = 0;
     seen_diskdir = 0;
     seen_logdir = 0;
+    seen_bumppercent = 0;
     seen_bumpsize = 0;
     seen_bumpmult = 0;
     seen_bumpdays = 0;
@@ -770,6 +795,7 @@ static void init_defaults()
     seen_amrecover_check_label = 0;
     seen_amrecover_changer = 0;
     seen_taperalgo = 0;
+    seen_displayunit = 0;
     line_num = got_parserror = 0;
     allow_overwrites = 0;
     token_pushed = 0;
@@ -900,6 +926,7 @@ keytab_t main_keytable[] = {
     { "BUMPDAYS", BUMPDAYS },
     { "BUMPMULT", BUMPMULT },
     { "BUMPSIZE", BUMPSIZE },
+    { "BUMPPERCENT", BUMPPERCENT },
     { "DEFINE", DEFINE },
     { "DISKDIR", DISKDIR },    /* XXX - historical */
     { "DISKFILE", DISKFILE },
@@ -947,6 +974,7 @@ keytab_t main_keytable[] = {
     { "AMRECOVER_CHECK_LABEL", AMRECOVER_CHECK_LABEL },
     { "AMRECOVER_CHANGER", AMRECOVER_CHANGER },
     { "TAPERALGO", TAPERALGO },
+    { "DISPLAYUNIT", DISPLAYUNIT },
     { NULL, IDENT }
 };
 
@@ -1007,6 +1035,11 @@ static int read_confline()
                        parserror("bumpmult must be positive");
                    }
                    break;
+    case BUMPPERCENT:  get_simple(&conf_bumppercent,  &seen_bumppercent,  INT);
+                   if(conf_bumppercent.i < 0 || conf_bumppercent.i > 100) {
+                       parserror("bumppercent must be between 0 and 100");
+                   }
+                   break;
     case BUMPSIZE:  get_simple(&conf_bumpsize,  &seen_bumpsize,  INT);
                    if(conf_bumpsize.i < 1) {
                        parserror("bumpsize must be positive");
@@ -1068,6 +1101,31 @@ static int read_confline()
     case AMRECOVER_CHANGER: get_simple(&conf_amrecover_changer,&seen_amrecover_changer, STRING); break;
 
     case TAPERALGO: get_taperalgo(&conf_taperalgo,&seen_taperalgo); break;
+    case DISPLAYUNIT: get_simple(&conf_displayunit,&seen_displayunit, STRING);
+                     if(strcmp(conf_displayunit.s,"k") == 0 ||
+                        strcmp(conf_displayunit.s,"K") == 0) {
+                         conf_displayunit.s[0] = toupper(conf_displayunit.s[0]);
+                         unit_divisor=1;
+                     }
+                     else if(strcmp(conf_displayunit.s,"m") == 0 ||
+                        strcmp(conf_displayunit.s,"M") == 0) {
+                         conf_displayunit.s[0] = toupper(conf_displayunit.s[0]);
+                         unit_divisor=1024;
+                     }
+                     else if(strcmp(conf_displayunit.s,"g") == 0 ||
+                        strcmp(conf_displayunit.s,"G") == 0) {
+                         conf_displayunit.s[0] = toupper(conf_displayunit.s[0]);
+                         unit_divisor=1024*1024;
+                     }
+                     else if(strcmp(conf_displayunit.s,"t") == 0 ||
+                        strcmp(conf_displayunit.s,"T") == 0) {
+                         conf_displayunit.s[0] = toupper(conf_displayunit.s[0]);
+                         unit_divisor=1024*1024*1024;
+                     }
+                     else {
+                         parserror("displayunit must be k,m,g or t.");
+                     }
+                     break;
 
     case LOGFILE: /* XXX - historical */
        /* truncate the filename part and pretend he said "logdir" */
@@ -1188,11 +1246,11 @@ static void get_holdingdisk()
            get_simple((val_t *)&hdcur.diskdir, &hdcur.s_disk, STRING);
            break;
        case USE:
-           get_simple((val_t *)&hdcur.disksize, &hdcur.s_size, INT);
+           get_simple((val_t *)&hdcur.disksize, &hdcur.s_size, LONG);
            hdcur.disksize = am_floor(hdcur.disksize, DISK_BLOCK_KB);
            break;
        case CHUNKSIZE:
-           get_simple((val_t *)&hdcur.chunksize, &hdcur.s_csize, INT);
+           get_simple((val_t *)&hdcur.chunksize, &hdcur.s_csize, LONG);
            if(hdcur.chunksize == 0) {
                hdcur.chunksize =  ((INT_MAX / 1024) - (2 * DISK_BLOCK_KB));
            } else if(hdcur.chunksize < 0) {
@@ -1226,7 +1284,7 @@ static void init_holdingdisk_defaults()
     hdcur.diskdir = stralloc(conf_diskdir.s);
     malloc_mark(hdcur.diskdir);
     hdcur.disksize = 0;
-    hdcur.chunksize = 1024*1024*1024; /* 1 Gb */
+    hdcur.chunksize = 1024*1024/**1024*/; /* 1 Gb = 1M counted in 1Kb blocks */
 
     hdcur.s_comment = 0;
     hdcur.s_disk = 0;
@@ -1252,6 +1310,10 @@ static void save_holdingdisk()
 
 keytab_t dumptype_keytable[] = {
     { "AUTH", AUTH },
+    { "BUMPDAYS", BUMPDAYS },
+    { "BUMPMULT", BUMPMULT },
+    { "BUMPSIZE", BUMPSIZE },
+    { "BUMPPERCENT", BUMPPERCENT },
     { "COMMENT", COMMENT },
     { "COMPRATE", COMPRATE },
     { "COMPRESS", COMPRESS },
@@ -1274,6 +1336,7 @@ keytab_t dumptype_keytable[] = {
     { "SKIP-INCR", SKIP_INCR },
     { "STARTTIME", STARTTIME },
     { "STRATEGY", STRATEGY },
+    { "ESTIMATE", ESTIMATE },
     { NULL, IDENT }
 };
 
@@ -1390,6 +1453,30 @@ dumptype_t *read_dumptype(name, from, fname, linenum)
                parserror("dpcur.maxpromoteday must be >= 0");
            }
            break;
+       case BUMPPERCENT:
+           get_simple((val_t *)&dpcur.bumppercent,  &dpcur.s_bumppercent,  INT);
+           if(dpcur.bumppercent < 0 || dpcur.bumppercent > 100) {
+               parserror("bumppercent must be between 0 and 100");
+           }
+           break;
+       case BUMPSIZE:
+           get_simple((val_t *)&dpcur.bumpsize,  &dpcur.s_bumpsize,  INT);
+           if(dpcur.bumpsize < 1) {
+               parserror("bumpsize must be positive");
+           }
+           break;
+       case BUMPDAYS:
+           get_simple((val_t *)&dpcur.bumpdays,  &dpcur.s_bumpdays,  INT);
+           if(dpcur.bumpdays < 1) {
+               parserror("bumpdays must be positive");
+           }
+           break;
+       case BUMPMULT:
+           get_simple((val_t *)&dpcur.bumpmult,  &dpcur.s_bumpmult,  REAL);
+           if(dpcur.bumpmult < 0.999) {
+               parserror("bumpmult must be positive (%f)",dpcur.bumpmult);
+           }
+           break;
        case OPTIONS:
            get_dumpopts();
            break;
@@ -1420,7 +1507,9 @@ dumptype_t *read_dumptype(name, from, fname, linenum)
        case STRATEGY:
            get_strategy();
            break;
-
+       case ESTIMATE:
+           get_estimate();
+           break;
        case IDENT:
            copy_dumptype();
            break;
@@ -1481,6 +1570,10 @@ static void init_dumptype_defaults()
     dpcur.frequency = 1;
     dpcur.maxdumps = conf_maxdumps.i;
     dpcur.maxpromoteday = 10000;
+    dpcur.bumppercent = conf_bumppercent.i;
+    dpcur.bumpsize = conf_bumpsize.i;
+    dpcur.bumpdays = conf_bumpdays.i;
+    dpcur.bumpmult = conf_bumpmult.r;
     dpcur.start_t = 0;
 
     dpcur.auth = AUTH_BSD;
@@ -1488,6 +1581,7 @@ static void init_dumptype_defaults()
     /* options */
     dpcur.record = 1;
     dpcur.strategy = DS_STANDARD;
+    dpcur.estimate = ES_CLIENT;
     dpcur.compress = COMP_FAST;
     dpcur.comprate[0] = dpcur.comprate[1] = 0.50;
     dpcur.skip_incr = dpcur.skip_full = 0;
@@ -1508,10 +1602,15 @@ static void init_dumptype_defaults()
     dpcur.s_frequency = 0;
     dpcur.s_maxdumps = 0;
     dpcur.s_maxpromoteday = 0;
+    dpcur.s_bumppercent = 0;
+    dpcur.s_bumpsize = 0;
+    dpcur.s_bumpdays = 0;
+    dpcur.s_bumpmult = 0;
     dpcur.s_start_t = 0;
     dpcur.s_auth = 0;
     dpcur.s_record = 0;
     dpcur.s_strategy = 0;
+    dpcur.s_estimate = 0;
     dpcur.s_compress = 0;
     dpcur.s_comprate = 0;
     dpcur.s_skip_incr = 0;
@@ -1583,10 +1682,15 @@ static void copy_dumptype()
     dtcopy(frequency, s_frequency);
     dtcopy(maxdumps, s_maxdumps);
     dtcopy(maxpromoteday, s_maxpromoteday);
+    dtcopy(bumppercent, s_bumppercent);
+    dtcopy(bumpsize, s_bumpsize);
+    dtcopy(bumpdays, s_bumpdays);
+    dtcopy(bumpmult, s_bumpmult);
     dtcopy(start_t, s_start_t);
     dtcopy(auth, s_auth);
     dtcopy(record, s_record);
     dtcopy(strategy, s_strategy);
+    dtcopy(estimate, s_estimate);
     dtcopy(compress, s_compress);
     dtcopy(comprate[0], s_comprate);
     dtcopy(comprate[1], s_comprate);
@@ -1649,7 +1753,7 @@ static void get_tapetype()
            get_simple((val_t *)&tpcur.lbl_templ, &tpcur.s_lbl_templ, STRING);
            break;
        case BLOCKSIZE:
-           get_simple((val_t *)&tpcur.blocksize, &tpcur.s_blocksize, INT);
+           get_simple((val_t *)&tpcur.blocksize, &tpcur.s_blocksize, LONG);
            if(tpcur.blocksize < DISK_BLOCK_KB) {
                parserror("Tape blocksize must be at least %d KBytes",
                          DISK_BLOCK_KB);
@@ -1663,21 +1767,21 @@ static void get_tapetype()
            tpcur.file_pad = (value.i != 0);
            break;
        case LENGTH:
-           get_simple(&value, &tpcur.s_length, INT);
-           if(value.i < 0) {
+           get_simple(&value, &tpcur.s_length, LONG);
+           if(value.l < 0) {
                parserror("Tape length must be positive");
            }
            else {
-               tpcur.length = value.i;
+               tpcur.length = (unsigned long) value.l;
            }
            break;
        case FILEMARK:
-           get_simple(&value, &tpcur.s_filemark, INT);
-           if(value.i < 0) {
+           get_simple(&value, &tpcur.s_filemark, LONG);
+           if(value.l < 0) {
                parserror("Tape file mark size must be positive");
            }
            else {
-               tpcur.filemark = value.i;
+               tpcur.filemark = (unsigned long) value.l;
            }
            break;
        case SPEED:
@@ -2183,6 +2287,42 @@ static void get_strategy()
     keytable = save_kt;
 }
 
+keytab_t estimate_keytable[] = {
+    { "CLIENT", CLIENT },
+    { "SERVER", SERVER },
+    { "CALCSIZE", CALCSIZE }
+};
+
+static void get_estimate()
+{
+    int estime;
+    keytab_t *save_kt;
+
+    save_kt = keytable;
+    keytable = estimate_keytable;
+
+    ckseen(&dpcur.s_estimate);
+
+    get_conftoken(ANY);
+    switch(tok) {
+    case CLIENT:
+       estime = ES_CLIENT;
+       break;
+    case SERVER:
+       estime = ES_SERVER;
+       break;
+    case CALCSIZE:
+       estime = ES_CALCSIZE;
+       break;
+    default:
+       parserror("CLIENT, SERVER or CALCSIZE expected");
+       estime = ES_CLIENT;
+    }
+    dpcur.estimate = estime;
+
+    keytable = save_kt;
+}
+
 keytab_t exclude_keytable[] = {
     { "LIST", LIST },
     { "FILE", EFILE },
@@ -2333,6 +2473,9 @@ tok_t type;
     case INT:
        var->i = get_number();
        break;
+    case LONG:
+       var->l = get_number();
+       break;
     case BOOL:
        var->i = get_bool();
        break;
@@ -2409,9 +2552,9 @@ keytab_t numb_keytable[] = {
     { NULL, IDENT }
 };
 
-static int get_number()
+static long get_number()
 {
-    int val;
+    long val;
     keytab_t *save_kt;
 
     save_kt = keytable;
@@ -2421,10 +2564,10 @@ static int get_number()
 
     switch(tok) {
     case INT:
-       val = tokenval.i;
+       val = (long) tokenval.i;
        break;
     case INFINITY:
-       val = BIGINT;
+       val = (long) BIGINT;
        break;
     default:
        parserror("an integer expected");
@@ -2833,6 +2976,10 @@ int taperalgo;
     return "UNKNOWN";
 }
 
+long int getconf_unit_divisor()
+{
+    return unit_divisor;
+}
 
 /* ------------------------ */
 
@@ -2872,6 +3019,7 @@ dump_configuration(filename)
     printf("conf_runspercycle = %d\n", getconf_int(CNF_RUNSPERCYCLE));
     printf("conf_runtapes = %d\n", getconf_int(CNF_RUNTAPES));
     printf("conf_tapecycle = %d\n", getconf_int(CNF_TAPECYCLE));
+    printf("conf_bumppercent = %d\n", getconf_int(CNF_BUMPPERCENT));
     printf("conf_bumpsize = %d\n", getconf_int(CNF_BUMPSIZE));
     printf("conf_bumpdays = %d\n", getconf_int(CNF_BUMPDAYS));
     printf("conf_bumpmult = %f\n", getconf_real(CNF_BUMPMULT));
@@ -2891,6 +3039,7 @@ dump_configuration(filename)
     printf("conf_amrecover_check_label  = %d\n", getconf_int(CNF_AMRECOVER_CHECK_LABEL));
     printf("conf_amrecover_changer = \"%s\"\n", getconf_str(CNF_AMRECOVER_CHANGER));
     printf("conf_taperalgo  = %s\n", taperalgo2str(getconf_int(CNF_TAPERALGO)));
+    printf("conf_displayunit  = %s\n", getconf_str(CNF_DISPLAYUNIT));
 
     /*printf("conf_diskdir = \"%s\"\n", getconf_str(CNF_DISKDIR));*/
     /*printf("conf_disksize = %d\n", getconf_int(CNF_DISKSIZE));*/
@@ -2985,6 +3134,19 @@ dump_configuration(filename)
            break;
        }
        putchar('\n');
+       printf("        ESTIMATE ");
+       switch(dp->estimate) {
+       case ES_CLIENT:
+           printf("CLIENT");
+           break;
+       case ES_SERVER:
+           printf("SERVER");
+           break;
+       case ES_CALCSIZE:
+           printf("CALCSIZE");
+           break;
+       }
+       putchar('\n');
        printf("        COMPRATE %f, %f\n", dp->comprate[0], dp->comprate[1]);
 
        printf("        OPTIONS: ");
index 1aecb34debe0390e5e76bc368abce7a9ddbc315a..926a897c640500f641ba076c281ddd7709ff75ef 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: conffile.h,v 1.24.2.8.4.4.2.9 2003/01/04 03:35:54 martinea Exp $
+ * $Id: conffile.h,v 1.24.2.8.4.4.2.9.2.5 2005/03/29 16:35:11 martinea Exp $
  *
  * interface for config file reading code
  */
@@ -61,6 +61,7 @@ typedef enum conf_e {
     CNF_INPARALLEL,
     CNF_DUMPORDER,
     CNF_TIMEOUT,
+    CNF_BUMPPERCENT,
     CNF_BUMPSIZE,
     CNF_BUMPMULT,
     CNF_BUMPDAYS,
@@ -80,7 +81,8 @@ typedef enum conf_e {
     CNF_AMRECOVER_DO_FSF,
     CNF_AMRECOVER_CHECK_LABEL,
     CNF_AMRECOVER_CHANGER,
-    CNF_TAPERALGO
+    CNF_TAPERALGO,
+    CNF_DISPLAYUNIT
 } confparm_t;
 
 typedef enum auth_e {
@@ -121,6 +123,11 @@ typedef struct tapetype_s {
 #define DS_HANOI       6       /* Tower of Hanoi (? ? ? ? ? ...) */
 #define DS_INCRONLY    7       /* Forced fulls (0 1 1 2 2 FORCE0 1 1 ...) */
 
+/* Estimate strategies */
+#define ES_CLIENT      0       /* client estimate */
+#define ES_SERVER      1       /* server estimate */
+#define ES_CALCSIZE    2       /* calcsize estimate */
+
 /* Compression types */
 #define COMP_NONE      0       /* No compression */
 #define COMP_FAST      1       /* Fast compression on client */
@@ -153,10 +160,15 @@ typedef struct dumptype_s {
     int maxcycle;
     int frequency;
     int maxpromoteday;
+    int bumppercent;
+    int bumpsize;
+    int bumpdays;
+    double bumpmult;
     auth_t auth;
     int maxdumps;
     time_t start_t;
     int strategy;
+    int estimate;
     int compress;
     float comprate[2]; /* first is full, second is incremental */
     /* flag options */
@@ -184,8 +196,13 @@ typedef struct dumptype_s {
     int s_auth;
     int s_maxdumps;
     int s_maxpromoteday;
+    int s_bumppercent;
+    int s_bumpsize;
+    int s_bumpdays;
+    int s_bumpmult;
     int s_start_t;
     int s_strategy;
+    int s_estimate;
     int s_compress;
     int s_comprate;
     int s_record;
@@ -273,6 +290,7 @@ dumptype_t *read_dumptype P((char *name, FILE *from, char *fname, int *linenum))
 tapetype_t *lookup_tapetype P((char *identifier));
 interface_t *lookup_interface P((char *identifier));
 holdingdisk_t *getconf_holdingdisks P((void));
+long int getconf_unit_divisor P((void));
 
 int ColumnDataCount P((void));
 int StringToColumn P((char *s));
index e2abcf9111eb57ead44daa4bbe161b10adf708ad..a952394846509a01e12893be071988f4434b718e 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: diskfile.c,v 1.27.4.6.4.3.2.15 2003/12/16 22:36:45 martinea Exp $
+ * $Id: diskfile.c,v 1.27.4.6.4.3.2.15.2.5 2004/11/19 13:28:15 martinea Exp $
  *
  * read disklist file
  */
@@ -38,7 +38,7 @@
 static disklist_t lst;
 static FILE *diskf;
 static char *diskfname = NULL;
-static host_t *hostlist;
+static am_host_t *hostlist;
 static int line_num, got_parserror;
 
 /* local functions */
@@ -72,10 +72,10 @@ char *filename;
     else return &lst;
 }
 
-host_t *lookup_host(hostname)
+am_host_t *lookup_host(hostname)
 char *hostname;
 {
-    host_t *p;
+    am_host_t *p;
 
     for(p = hostlist; p != NULL; p = p->next) {
        if(strcasecmp(p->hostname, hostname) == 0) return p;
@@ -86,7 +86,7 @@ char *hostname;
 disk_t *lookup_disk(hostname, diskname)
 char *hostname, *diskname;
 {
-    host_t *host;
+    am_host_t *host;
     disk_t *disk;
 
     host = lookup_host(hostname);
@@ -151,7 +151,7 @@ char *hostname;
 char *diskname;
 {
     disk_t *disk;
-    host_t *host;
+    am_host_t *host;
 
     disk = alloc(sizeof(disk_t));
     disk->line = 0;
@@ -165,7 +165,7 @@ char *diskname;
 
     host = lookup_host(hostname);
     if(host == NULL) {
-       host = alloc(sizeof(host_t));
+       host = alloc(sizeof(am_host_t));
        host->next = hostlist;
        hostlist = host;
 
@@ -261,7 +261,7 @@ char *st;
 
 static int read_diskline()
 {
-    host_t *host;
+    am_host_t *host;
     disk_t *disk;
     dumptype_t *dtype;
     interface_t *netif = 0;
@@ -421,8 +421,13 @@ static int read_diskline()
     disk->auth         = dtype->auth;
     disk->maxdumps     = dtype->maxdumps;
     disk->maxpromoteday        = dtype->maxpromoteday;
+    disk->bumppercent  = dtype->bumppercent;
+    disk->bumpsize     = dtype->bumpsize;
+    disk->bumpdays     = dtype->bumpdays;
+    disk->bumpmult     = dtype->bumpmult;
     disk->start_t      = dtype->start_t;
     disk->strategy     = dtype->strategy;
+    disk->estimate     = dtype->estimate;
     disk->compress     = dtype->compress;
     disk->comprate[0]  = dtype->comprate[0];
     disk->comprate[1]  = dtype->comprate[1];
@@ -437,6 +442,24 @@ static int read_diskline()
     skip_whitespace(s, ch);
     fp = s - 1;
     if(ch && ch != '#') {              /* get optional spindle number */
+       char *fp1;
+       int is_digit=1;
+       skip_non_whitespace(s, ch);
+       s[-1] = '\0';
+       fp1=fp;
+       if (*fp1 == '-') fp1++;
+       for(;*fp1!='\0';fp1++) {
+           if(!isdigit(*fp1)) {
+               is_digit = 0;
+           }
+       }
+       if(is_digit == 0) {
+           parserror("non-integer spindle `%s'", fp);
+           if(host == NULL) amfree(hostname);
+           amfree(disk->name);
+           amfree(disk);
+           return 1;
+       }
        disk->spindle = atoi(fp);
        skip_integer(s, ch);
     }
@@ -475,7 +498,7 @@ static int read_diskline()
     /* success, add disk to lists */
 
     if(host == NULL) {                 /* new host */
-       host = alloc(sizeof(host_t));
+       host = alloc(sizeof(am_host_t));
        malloc_mark(host);
        host->next = hostlist;
        hostlist = host;
@@ -928,7 +951,7 @@ void
 dump_disklist()
 {
     disk_t *dp, *prev;
-    host_t *hp;
+    am_host_t *hp;
 
     if(hostlist == NULL) {
        printf("DISKLIST not read in\n");
index 403b5692f71ba75bfb86975269f47a19938d90bc..ae17fc8c9fb3d995ac079afa26844e1f730c830e 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: diskfile.h,v 1.11.4.3.4.1.2.9 2003/01/04 03:35:54 martinea Exp $
+ * $Id: diskfile.h,v 1.11.4.3.4.1.2.9.2.3 2004/08/03 11:27:17 martinea Exp $
  *
  * interface for disklist file reading code
  */
@@ -36,8 +36,8 @@
 #include "conffile.h"
 #include "amfeatures.h"
 
-typedef struct host_s {
-    struct host_s *next;               /* next host */
+typedef struct amhost_s {
+    struct amhost_s *next;             /* next host */
     char *hostname;                    /* name of host */
     struct disk_s *disks;              /* linked list of disk records */
     int inprogress;                    /* # dumps in progress */
@@ -46,13 +46,13 @@ typedef struct host_s {
     time_t start_t;                    /* start dump after this time */
     char *up;                          /* generic user pointer */
     am_feature_t *features;            /* feature set */
-} host_t;
+} am_host_t;
 
 typedef struct disk_s {
     int line;                          /* line number of last definition */
     struct disk_s *prev, *next;                /* doubly linked disk list */
 
-    host_t *host;                      /* host list */
+    am_host_t *host;                   /* host list */
     struct disk_s *hostnext;
 
     char *name;                                /* label name for disk */
@@ -71,17 +71,22 @@ typedef struct disk_s {
     auth_t auth;                       /* type of authentication (per system?) */
     int maxdumps;                      /* max number of parallel dumps (per system) */
     int maxpromoteday;                 /* maximum of promote day */
+    int bumppercent;
+    int bumpsize;
+    int bumpdays;
+    double bumpmult;
     time_t start_t;                    /* start this dump after this time */
     int strategy;                      /* what dump strategy to use */
+    int estimate;                      /* what estimate strategy to use */
     int compress;                      /* type of compression to use */
     float comprate[2];                 /* default compression rates */
     /* flag options */
-    unsigned int record:1;                     /* record dump in /etc/dumpdates ? */
-    unsigned int skip_incr:1;                  /* incs done externally ? */
-    unsigned int skip_full:1;                  /* fulls done externally ? */
-    unsigned int no_hold:1;                    /* don't use holding disk ? */
+    unsigned int record:1;             /* record dump in /etc/dumpdates ? */
+    unsigned int skip_incr:1;          /* incs done externally ? */
+    unsigned int skip_full:1;          /* fulls done externally ? */
+    unsigned int no_hold:1;            /* don't use holding disk ? */
     unsigned int kencrypt:1;
-    unsigned int index:1;                      /* produce an index ? */
+    unsigned int index:1;              /* produce an index ? */
     int spindle;                       /* spindle # - for parallel dumps */
     int inprogress;                    /* being dumped now? */
     int todo;
@@ -98,7 +103,7 @@ typedef struct disklist_s {
 disklist_t *read_diskfile P((char *filename));
 
 disk_t *add_disk P((char *hostname, char *diskname));
-host_t *lookup_host P((char *hostname));
+am_host_t *lookup_host P((char *hostname));
 disk_t *lookup_disk P((char *hostname, char *diskname));
 
 void enqueue_disk P((disklist_t *list, disk_t *disk));
index 1d3bc767d2550f45032dcf9dbc30e4b50dd52770..248eb218c9aa9e253b2f35ec3f599b88728dcc0f 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: driver.c,v 1.58.2.31.2.8.2.21 2004/04/26 15:02:47 martinea Exp $
+ * $Id: driver.c,v 1.58.2.31.2.8.2.20.2.14 2005/02/09 18:12:31 martinea Exp $
  *
  * controlling process for the Amanda backup system
  */
@@ -57,7 +57,7 @@ int  inparallel;
 int nodump = 0;
 long tape_length, tape_left = 0;
 int conf_taperalgo;
-host_t *flushhost = NULL;
+am_host_t *flushhost = NULL;
 
 int client_constrained P((disk_t *dp));
 int sort_by_priority_reversed P((disk_t *a, disk_t *b));
@@ -94,6 +94,7 @@ int main P((int main_argc, char **main_argv));
 
 static int idle_reason;
 char *datestamp;
+char *timestamp;
 
 char *idle_strings[] = {
 #define NOT_IDLE               0
@@ -156,6 +157,9 @@ int main(main_argc, main_argv)
        close(fd);
     }
 
+    setvbuf(stdout, (char *)NULL, _IOLBF, 0);
+    setvbuf(stderr, (char *)NULL, _IOLBF, 0);
+
     set_pname("driver");
 
     signal(SIGPIPE, SIG_IGN);
@@ -202,6 +206,7 @@ int main(main_argc, main_argv)
 
     amfree(datestamp);
     datestamp = construct_datestamp(NULL);
+    timestamp = construct_timestamp(NULL);
     log_add(L_START,"date %s", datestamp);
 
     taper_program = vstralloc(libexecdir, "/", "taper", versionsuffix(), NULL);
@@ -273,11 +278,11 @@ int main(main_argc, main_argv)
                hdp->disksize += fs.avail;
        }
 
-       printf("driver: adding holding disk %d dir %s size %ld\n",
-              dsk, hdp->diskdir, hdp->disksize);
+       printf("driver: adding holding disk %d dir %s size %ld chunksize %ld\n",
+              dsk, hdp->diskdir, hdp->disksize, hdp->chunksize);
 
        newdir = newvstralloc(newdir,
-                             hdp->diskdir, "/", datestamp,
+                             hdp->diskdir, "/", timestamp,
                              NULL);
         if(!mkholdingdir(newdir)) {
            hdp->disksize = 0L;
@@ -312,7 +317,6 @@ int main(main_argc, main_argv)
     runq.head = runq.tail = NULL;
 
     read_flush(&tapeq);
-    if(!nodump) read_schedule(&waitq, &runq);
 
     log_add(L_STATS, "startup time %s", walltime_str(curclock()));
 
@@ -324,7 +328,7 @@ int main(main_argc, main_argv)
           getconf_str(CNF_DUMPORDER));
     fflush(stdout);
 
-    /* ok, planner is done, now lets see if the tape is ready */
+    /* Let's see if the tape is ready */
 
     cmd = getresult(taper, 1, &result_argc, result_argv, MAX_ARGS+1);
 
@@ -334,14 +338,44 @@ int main(main_argc, main_argv)
        FD_CLR(taper,&readset);
     }
 
+    short_dump_state();                                        /* for amstatus */
+
     tape_left = tape_length;
     taper_busy = 0;
     taper_disk = NULL;
+
+    /* Start autoflush while waiting for dump schedule */
+    if(!nodump) {
+       /* Start any autoflush tape writes */
+       if (!empty(tapeq)) {
+           startaflush();
+           short_dump_state();                         /* for amstatus */
+
+           /* Process taper results until the schedule arrives */
+           while (1) {
+               FD_ZERO(&selectset);
+               FD_SET(0, &selectset);
+               FD_SET(taper, &selectset);
+
+               if(select(taper+1, (SELECT_ARG_TYPE *)(&selectset), NULL, NULL,
+                         &sleep_time) == -1)
+                   error("select: %s", strerror(errno));
+               if (FD_ISSET(0, &selectset)) break;     /* schedule arrived */
+               if (FD_ISSET(taper, &selectset)) handle_taper_result();
+               short_dump_state();                     /* for amstatus */
+           }
+           
+       }
+
+       /* Read the dump schedule */
+       read_schedule(&waitq, &runq);
+    }
+
+    /* Start any needed flushes */
     startaflush();
 
     while(start_some_dumps(&runq) || some_dumps_in_progress() ||
          any_delayed_disk) {
-
        short_dump_state();
 
        /* wait for results */
@@ -472,6 +506,7 @@ int main(main_argc, main_argv)
     fflush(stdout);
     log_add(L_FINISH,"date %s time %s", datestamp, walltime_str(curclock()));
     amfree(datestamp);
+    amfree(timestamp);
 
     amfree(dumper_program);
     amfree(taper_program);
@@ -536,25 +571,26 @@ void startaflush() {
                if(dp) remove_disk(&tapeq, dp);
                break;
        case ALGO_SMALLEST: 
-               fit = dp = tapeq.head;
-               while (fit != NULL) {
-                   if(sched(fit)->act_size < sched(dp)->act_size &&
-                      strcmp(sched(fit)->datestamp, datestamp) <= 0) {
-                       dp = fit;
-                   }
-                   fit = fit->next;
-               }
-               if(dp) remove_disk(&tapeq, dp);
                break;
        case ALGO_LAST:
                dp = tapeq.tail;
                remove_disk(&tapeq, dp);
                break;
        }
-       if(!dp) {
-           dp = dequeue_disk(&tapeq); /* first if nothing fit */
-           fprintf(stderr,
-                   "driver: startaflush: Using first because nothing fit\n");
+       if(!dp) { /* ALGO_SMALLEST, or default if nothing fit. */
+           if(conf_taperalgo != ALGO_SMALLEST)  {
+               fprintf(stderr,
+                  "driver: startaflush: Using SMALLEST because nothing fit\n");
+           }
+           fit = dp = tapeq.head;
+           while (fit != NULL) {
+               if(sched(fit)->act_size < sched(dp)->act_size &&
+                  strcmp(sched(fit)->datestamp, datestamp) <= 0) {
+                   dp = fit;
+               }
+               fit = fit->next;
+           }
+           if(dp) remove_disk(&tapeq, dp);
        }
        taper_disk = dp;
        taper_busy = 1;
@@ -563,7 +599,10 @@ void startaflush() {
        fprintf(stderr,"driver: startaflush: %s %s %s %ld %ld\n",
                taperalgo2str(conf_taperalgo), dp->host->hostname,
                dp->name, sched(taper_disk)->act_size, tape_left);
-       tape_left -= sched(dp)->act_size;
+       if(sched(dp)->act_size <= tape_left)
+           tape_left -= sched(dp)->act_size;
+       else
+           tape_left = 0;
     }
 }
 
@@ -784,7 +823,7 @@ char *str;
     printf("dump of driver schedule %s:\n--------\n", str);
 
     for(dp = qp->head; dp != NULL; dp = dp->next) {
-       printf("  %-10.10s %.16s lv %d t %5ld s %8lu p %d\n",
+       printf("  %-20s %-25s lv %d t %5ld s %8lu p %d\n",
               dp->host->hostname, dp->name, sched(dp)->level,
               sched(dp)->est_time, sched(dp)->est_size, sched(dp)->priority);
     }
@@ -960,6 +999,7 @@ void handle_taper_result()
            log_add(L_FAIL, "%s %s %d %s [too many taper retries]",
                    dp->host->hostname, dp->name, sched(dp)->level,
                    sched(dp)->datestamp);
+           printf("driver: taper failed %s %s %s, too many taper retry\n", result_argv[2], dp->host->hostname, dp->name);
        }
        else {
            sched(dp)->attempted++;
@@ -1150,9 +1190,10 @@ void handle_dumper_result(fd)
        dp->inprogress = 0;
 
        if(sched(dp)->attempted) {
-           log_add(L_FAIL, "%s %s %d %s[could not connect to %s]",
+           log_add(L_FAIL, "%s %s %d %s [too many dumper retry]",
                    dp->host->hostname, dp->name,
-                   sched(dp)->level, sched(dp)->datestamp, dp->host->hostname);
+                   sched(dp)->level, sched(dp)->datestamp);
+           printf("driver: dump failed %s %s %s, too many dumper retry\n", result_argv[2], dp->host->hostname, dp->name);
        } else {
            sched(dp)->attempted++;
            enqueue_disk(&runq, dp);
@@ -1421,7 +1462,7 @@ disklist_t *tapeqp;
 
        /* add it to the flushhost list */
        if(!flushhost) {
-           flushhost = alloc(sizeof(host_t));
+           flushhost = alloc(sizeof(am_host_t));
            flushhost->next = NULL;
            flushhost->hostname = stralloc("FLUSHHOST");
            flushhost->up = NULL;
@@ -1898,7 +1939,7 @@ disk_t *diskp;
     for( ; holdp[i]; i++ ) {
        holdp[i]->destname = newvstralloc( holdp[i]->destname,
                                           holdp[i]->disk->diskdir, "/",
-                                          datestamp, "/",
+                                          timestamp, "/",
                                           diskp->host->hostname, ".",
                                           sfn, ".",
                                           lvl, NULL );
@@ -2120,6 +2161,7 @@ int dump_to_tape(dp)
     cmd_t cmd;
     int result_argc;
     char *result_argv[MAX_ARGS+1];
+    int dumper_tryagain = 0;
 
     inside_dump_to_tape = 1;   /* for simulator */
 
@@ -2203,7 +2245,10 @@ int dump_to_tape(dp)
     case TRYAGAIN: /* TRY-AGAIN <handle> <err str> */
     default:
        /* dump failed, but we must still finish up with taper */
-       failed = 1;     /* problem with dump, possibly nonfatal */
+       /* problem with dump, possibly nonfatal, retry one time */
+       sched(dp)->attempted++;
+       failed = sched(dp)->attempted;
+       dumper_tryagain = 1;
        break;
        
     case FAILED: /* FAILED <handle> <errstr> */
@@ -2244,8 +2289,14 @@ int dump_to_tape(dp)
        break;
 
     case TRYAGAIN: /* TRY-AGAIN <handle> <err mess> */
+       if(dumper_tryagain == 0) {
+           sched(dp)->attempted++;
+           if(sched(dp)->attempted > failed)
+               failed = sched(dp)->attempted;
+       }
     tryagain:
-       headqueue_disk(&runq, dp);
+       if(failed <= 1)
+           headqueue_disk(&runq, dp);
     failed_dumper:
        update_failed_dump_to_tape(dp);
        free_serial(result_argv[2]);
index 307135f8a9501c13a06d4eb1695d31e5f71b73cd..bfb3a24ee35a22fa63eebaa3df96de38530e57bd 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: driverio.c,v 1.35.2.14.4.2.2.5 2003/01/01 23:28:54 martinea Exp $
+ * $Id: driverio.c,v 1.35.2.14.4.2.2.5.2.4 2005/03/16 18:15:28 martinea Exp $
  *
  * I/O-related functions for driver program
  */
@@ -375,6 +375,7 @@ disk_t *dp;
            ap_snprintf(use, sizeof(use), "%ld", 
                        h[activehd]->reserved - h[activehd]->used );
            cmdline = vstralloc(cmdstr[cmd],
+                               " ", disk2serial(dp),
                                " ", h[activehd]->destname,
                                " ", chunksize,
                                " ", use,
@@ -456,6 +457,7 @@ char *str;
        printf("driver: error time %s serial gen mismatch\n",
               walltime_str(curclock()));
     stable[s].gen = 0;
+    stable[s].dp = NULL;
 }
 
 
@@ -465,8 +467,17 @@ disk_t *dp;
     int s;
     static char str[NUM_STR_SIZE];
 
+    for(s = 0; s < MAX_SERIAL; s++) {
+       if(stable[s].dp == dp) {
+           ap_snprintf(str, sizeof(str), "%02d-%05ld", s, stable[s].gen);
+           return str;
+       }
+    }
+
     /* find unused serial number */
-    for(s = 0; s < MAX_SERIAL; s++) if(stable[s].gen == 0) break;
+    for(s = 0; s < MAX_SERIAL; s++)
+       if(stable[s].gen == 0 && stable[s].dp == NULL)
+           break;
     if(s >= MAX_SERIAL) {
        printf("driver: error time %s bug: out of serial numbers\n",
               walltime_str(curclock()));
@@ -551,6 +562,17 @@ void update_info_dumper(dp, origsize, dumpsize, dumptime)
        info.last_level = level;
        info.consecutive_runs = 1;
     }
+
+    for(i=NB_HISTORY-1;i>0;i--) {
+       info.history[i] = info.history[i-1];
+    }
+
+    info.history[0].level = level;
+    info.history[0].size  = origsize;
+    info.history[0].csize = dumpsize;
+    info.history[0].date  = sched(dp)->timestamp;
+    info.history[0].secs  = dumptime;
+
     if(put_info(dp->host->hostname, dp->name, &info))
        error("infofile update failed (%s,%s)\n", dp->host->hostname, dp->name);
 
index 48b8d1087aa8fae0ce222f567f4b65a4fb76d8a8..92af8e874209aa47738be2f713a245aa0f6e46d0 100644 (file)
@@ -23,7 +23,7 @@
  * Authors: the Amanda Development Team.  Its members are listed in a
  * file named AUTHORS, in the root directory of this distribution.
  */
-/* $Id: dumper.c,v 1.75.2.14.2.7.2.17 2003/10/30 18:09:27 martinea Exp $
+/* $Id: dumper.c,v 1.75.2.14.2.7.2.17.2.3 2005/03/31 13:08:05 martinea Exp $
  *
  * requests remote amandad processes to dump filesystems
  */
@@ -668,7 +668,12 @@ int *p_outfd, size;
 
        NAUGHTY_BITS;
 
-       while(size > 0 && split_size > 0 && dumpsize >= split_size) {
+       /* We open a new chunkfile if                                    */
+       /*   We have something to write (dataout < datain)               */
+       /*   We have a split_size defined (split_size > 0)               */
+       /*   The current file is already filled (dumpsize >= split_size) */
+
+       while(dataout < datain && split_size > 0 && dumpsize >= split_size) {
            amfree(new_filename);
            if(use == 0) {
                /*
@@ -679,12 +684,13 @@ int *p_outfd, size;
                 if(cmd == CONTINUE) {
                    /*
                     * CONTINUE
+                    *   serial
                     *   filename
                     *   chunksize
                     *   use
                     */
                    cmdargs.argc++;             /* true count of args */
-                   a = 2;
+                   a = 3;
 
                    if(a >= cmdargs.argc) {
                        error("error [dumper CONTINUE: not enough args: filename]");
@@ -955,6 +961,12 @@ char *str;
            break;
        }
 #undef sc
+#define sc "sendbackup: warning"
+       if(strncmp(str, sc, sizeof(sc)-1) == 0) {
+           dump_result = max(dump_result, 1);
+           break;
+       }
+#undef sc
 #define sc "sendbackup: error"
        if(strncmp(str, sc, sizeof(sc)-1) == 0) {
            s += sizeof(sc)-1;
index 61c279bd8d377bf064b0b67906e2b309f7397b91..cc07fb1b804e47d277adc8cea48d7eb5ee7a2371 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: find.c,v 1.6.2.4.4.2.2.5 2003/10/27 18:33:03 martinea Exp $
+ * $Id: find.c,v 1.6.2.4.4.2.2.5.2.1 2004/02/02 20:29:12 martinea Exp $
  *
  * controlling process for the Amanda backup system
  */
@@ -253,7 +253,20 @@ find_result_t **output_find;
                    find_result_t *new_output_find =
                        alloc(sizeof(find_result_t));
                    new_output_find->next=*output_find;
-                   new_output_find->datestamp=atoi(dir->name);
+                   if(strlen(dir->name) == 8) {
+                       new_output_find->datestamp=atoi(dir->name);
+                       new_output_find->timestamp=stralloc2(dir->name, "000000");
+                   }
+                   else if(strlen(dir->name) == 14) {
+                       char *name = stralloc(dir->name);
+                       name[8] = '\0';
+                       new_output_find->datestamp=atoi(name);
+                       new_output_find->timestamp=stralloc(dir->name);
+                       amfree(name);
+                   }
+                   else {
+                       error("Bad date\n");
+                   }
                    new_output_find->datestamp_aux=1001;
                    new_output_find->hostname=hostname;
                    hostname = NULL;
@@ -659,6 +672,8 @@ int datestamp, datestamp_aux;
                        (find_result_t *)alloc(sizeof(find_result_t));
                    new_output_find->next=*output_find;
                    new_output_find->datestamp=datestampI;
+                   new_output_find->timestamp = alloc(15);
+                   ap_snprintf(new_output_find->timestamp, 15, "%d000000", datestampI);
                    new_output_find->datestamp_aux=datestamp_aux;
                    new_output_find->hostname=stralloc(host);
                    new_output_find->diskname=stralloc(disk);
@@ -677,6 +692,8 @@ int datestamp, datestamp_aux;
                    new_output_find->next=*output_find;
                    new_output_find->datestamp=datestamp;
                    new_output_find->datestamp_aux=datestamp_aux;
+                   new_output_find->timestamp = alloc(15);
+                   ap_snprintf(new_output_find->timestamp, 15, "%d000000", datestamp);
                    new_output_find->hostname=stralloc(host);
                    new_output_find->diskname=stralloc(disk);
                    new_output_find->level=level;
index 779964b93b19c7f5943a7baaf42b5f345643f6cd..c657dfc203e22c41774de1bf4b8e22891bf90789 100644 (file)
@@ -7,6 +7,7 @@ typedef struct find_result_s {
     int datestamp_aux;
         /* aux is secondary key for intra-day comparisons -- could be timestamp,
            just use seq# */
+    char *timestamp;
     char *hostname;
     char *diskname;
     int level;
index a734aa9199caa1a2c39f1940bb4b9b34f7bd57da..a158fecc7fc3913c05f83d1c46ec0be181e7b722 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: holding.c,v 1.17.2.12.4.3.2.10 2003/06/14 13:47:05 martinea Exp $
+ * $Id: holding.c,v 1.17.2.12.4.3.2.10.2.2 2004/10/21 13:12:29 martinea Exp $
  *
  * Functions to access holding disk
  */
@@ -60,10 +60,11 @@ char *fname;
 
 int is_datestr(fname)
 char *fname;
-/* sanity check on datestamp of the form YYYYMMDD */
+/* sanity check on datestamp of the form YYYYMMDD or YYYYMMDDhhmmss*/
 {
     char *cp;
-    int ch, num, date, year, month;
+    int ch, num, date, year, month, hour, minute, second;
+    char ymd[9], hms[7];
 
     /* must be 8 digits */
     for(cp = fname; (ch = *cp) != '\0'; cp++) {
@@ -71,19 +72,34 @@ char *fname;
            break;
        }
     }
-    if(ch != '\0' || cp-fname != 8) {
+    if(ch != '\0' || (cp-fname != 8 && cp-fname != 14)) {
        return 0;
     }
 
     /* sanity check year, month, and day */
 
-    num = atoi(fname);
+    strncpy(ymd, fname, 8);
+    ymd[8] = '\0';
+    num = atoi(ymd);
     year = num / 10000;
     month = (num / 100) % 100;
     date = num % 100;
     if(year<1990 || year>2100 || month<1 || month>12 || date<1 || date>31)
        return 0;
 
+    if(cp-fname == 8)
+       return 1;
+
+    /* sanity check hour, minute, and second */
+    strncpy(hms, fname+8, 6);
+    hms[6] = '\0';
+    num = atoi(hms);
+    hour = num / 10000;
+    minute = (num / 100) % 100;
+    second = num % 100;
+    if(hour> 23 || minute>59 || second>59)
+       return 0;
+
     /* yes, we passed all the checks */
 
     return 1;
@@ -496,19 +512,25 @@ int complete;
            return 0;
        }
        buflen = fullread(fd, buffer, sizeof(buffer));
+       close(fd);
+
+       if(rename(filename_tmp, filename) != 0) {
+           fprintf(stderr,
+                   "rename_tmp_holding: could not rename \"%s\" to \"%s\": %s",
+                   filename_tmp, filename, strerror(errno));
+       }
+
        if (buflen == 0) {
-           fprintf(stderr,"rename_tmp_holding: %s: empty file?\n", filename_tmp);
+           fprintf(stderr,"rename_tmp_holding: %s: empty file?\n", filename);
            amfree(filename);
            amfree(filename_tmp);
-           close(fd);
            return 0;
        }
        parse_file_header(buffer, &file, buflen);
-       close(fd);
        if(complete == 0 ) {
-           if((fd = open(filename_tmp,O_RDWR)) == -1) {
+           if((fd = open(filenameO_RDWR)) == -1) {
                fprintf(stderr, "rename_tmp_holdingX: open of %s failed: %s\n",
-                       filename_tmp, strerror(errno));
+                       filename, strerror(errno));
                amfree(filename);
                amfree(filename_tmp);
                return 0;
@@ -519,11 +541,6 @@ int complete;
            fullwrite(fd, buffer, sizeof(buffer));
            close(fd);
        }
-       if(rename(filename_tmp, filename) != 0) {
-           fprintf(stderr,
-                   "rename_tmp_holding(): could not rename \"%s\" to \"%s\": %s",
-                   filename_tmp, filename, strerror(errno));
-       }
        filename = newstralloc(filename, file.cont_filename);
     }
     amfree(filename);
index ae41ff61940dc414b33afe63e712177b0df7672c..ef5052ca944f7eb272e00c66e6165688da5afcb1 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: infofile.c,v 1.44.4.4 1999/11/10 14:36:10 oliva Exp $
+ * $Id: infofile.c,v 1.44.4.4.8.2 2005/03/16 18:15:28 martinea Exp $
  *
  * manage current info file
  */
@@ -134,6 +134,8 @@ info_t *info;
     perf_t *pp;
     char *s;
     int ch;
+    int nb_history;
+    int i;
 
     /* get version: command: lines */
 
@@ -194,6 +196,9 @@ info_t *info;
        else if (strncmp(line,"last_level:",11) == 0) {
            break;                              /* normal */
        }
+       else if (strncmp(line,"history:",8) == 0) {
+           break;                              /* normal */
+       }
        memset(&onestat, 0, sizeof(onestat));
 
        s = line;
@@ -268,7 +273,73 @@ info_t *info;
     if(rc > 2) return -2;
     rc = 0;
 
-    if((line = agets(infof)) == NULL) return -1;
+    nb_history = 0;
+    for(i=0;i<=NB_HISTORY+1;i++) {
+       info->history[i].level = -2;
+    }
+    for(rc = -2; (line = agets(infof)) != NULL; free(line)) {
+       history_t onehistory;   /* one history record */
+       long date;
+
+       if(line[0] == '/' && line[1] == '/') {
+           info->history[nb_history].level = -2;
+           rc = 0;
+           amfree(line);
+           return 0;                           /* normal end of record */
+       }
+
+       memset(&onehistory, 0, sizeof(onehistory));
+
+       s = line;
+       ch = *s++;
+
+#define sc "history:"
+       if(strncmp(line, sc, sizeof(sc)-1) != 0) {
+           break;
+       }
+       s += sizeof(sc)-1;
+       ch = s[-1];
+#undef sc
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%d", &onehistory.level) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &onehistory.size) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &onehistory.csize) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       skip_whitespace(s, ch);
+       if(ch == '\0' || sscanf((s - 1), "%ld", &date) != 1) {
+           break;
+       }
+       skip_integer(s, ch);
+
+       onehistory.date = date; /* time_t not guarranteed to be long */
+
+       onehistory.secs = -1;
+       skip_whitespace(s, ch);
+       if(ch != '\0') {
+           if(sscanf((s - 1), "%ld", &onehistory.secs) != 1) {
+               break;
+           }
+           skip_integer(s, ch);
+       }
+
+       info->history[nb_history++] = onehistory;
+    }
+
+    if((line = agets(infof)) == NULL) return -1; /* // line */
     amfree(line);
 
     return rc;
@@ -328,6 +399,12 @@ info_t *info;
     }
 
     fprintf(infof, "last_level: %d %d\n", info->last_level, info->consecutive_runs);
+
+    for(i=0;info->history[i].level > -1;i++) {
+       fprintf(infof, "history: %d %ld %ld %ld %ld\n",info->history[i].level,
+               info->history[i].size, info->history[i].csize,
+               info->history[i].date, info->history[i].secs);
+    }
     fprintf(infof, "//\n");
 
     return 0;
@@ -487,6 +564,12 @@ info_t *info;
     info->last_level = -1;
     info->consecutive_runs = -1;
 
+    for(i=0;i<=NB_HISTORY;i++) {
+       info->history[i].level = -2;
+       info->history[i].size = 0;
+       info->history[i].csize = 0;
+       info->history[i].date = 0;
+    }
     return;
 }
 
index 813d816656f015b6db58e4000cdd601b70193d45..eb068f7df20e909961a3344eab1392742fb31fdc 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: infofile.h,v 1.7.4.4 1998/12/03 03:02:45 martinea Exp $
+ * $Id: infofile.h,v 1.7.4.4.8.2 2005/03/16 18:15:28 martinea Exp $
  *
  * interface for current info file reading code
  */
@@ -39,6 +39,7 @@
 #define EPOCH          ((time_t)0)
 
 #define AVG_COUNT      3
+#define NB_HISTORY     100
 #define newperf(ary,f) ( ary[2]=ary[1], ary[1]=ary[0], ary[0]=(f) )
 
 typedef struct stats_s {
@@ -52,6 +53,14 @@ typedef struct stats_s {
     char label[MAX_LABEL];     /* tape label */
 } stats_t;
 
+typedef struct history_s {
+    int level;                 /* level of dump */
+    long size;                 /* original size of dump in kbytes */
+    long csize;                        /* compressed size of dump in kbytes */
+    time_t date;               /* time of dump */
+    long secs;                 /* time of dump in secs */
+} history_t;
+
 typedef struct perf_s {
     float rate[AVG_COUNT];
     float comp[AVG_COUNT];
@@ -67,6 +76,7 @@ typedef struct info_s {
     perf_t  incr;
     stats_t inf[DUMP_LEVELS];
     int last_level, consecutive_runs;
+    history_t history[NB_HISTORY+1];
 } info_t;
 
 
index 82522b77c379cd0f3e8d7bc4ad0711bd95e130fa..9aec032e7d20902f6dc2d15bcdfe3790f2612fdf 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: planner.c,v 1.76.2.15.2.13.2.35 2004/05/10 16:43:49 martinea Exp $
+ * $Id: planner.c,v 1.76.2.15.2.13.2.32.2.16 2005/03/16 18:09:50 martinea Exp $
  *
  * backup schedule planner for the Amanda backup system.
  */
@@ -58,12 +58,9 @@ int conf_runtapes;
 int conf_dumpcycle;
 int conf_runspercycle;
 int conf_tapecycle;
-int conf_bumpdays;
-int conf_bumpsize;
 int conf_etimeout;
 int conf_reserve;
 int conf_autoflush;
-double conf_bumpmult;
 
 #define HOST_READY                             ((void *)0)     /* must be 0 */
 #define HOST_ACTIVE                            ((void *)1)
@@ -71,7 +68,8 @@ double conf_bumpmult;
 
 #define DISK_READY                             0               /* must be 0 */
 #define DISK_ACTIVE                            1
-#define DISK_DONE                              2
+#define DISK_PARTIALY_DONE                     2
+#define DISK_DONE                              3
 
 typedef struct est_s {
     int state;
@@ -96,7 +94,8 @@ typedef struct est_s {
 
 #define est(dp)        ((est_t *)(dp)->up)
 
-disklist_t startq, waitq, estq, failq, schedq;
+/* pestq = partial estimate */
+disklist_t startq, waitq, pestq, estq, failq, schedq;
 long total_size;
 double total_lev0, balanced_size, balance_threshold;
 unsigned long tape_length, tape_mark;
@@ -183,6 +182,8 @@ char **argv;
        close(fd);
     }
 
+    setvbuf(stderr, (char *)NULL, _IOLBF, 0);
+
     if (argc > 1) {
        config_name = stralloc(argv[1]);
        config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
@@ -305,9 +306,6 @@ char **argv;
     conf_dumpcycle = getconf_int(CNF_DUMPCYCLE);
     conf_runspercycle = getconf_int(CNF_RUNSPERCYCLE);
     conf_tapecycle = getconf_int(CNF_TAPECYCLE);
-    conf_bumpdays = getconf_int(CNF_BUMPDAYS);
-    conf_bumpsize = getconf_int(CNF_BUMPSIZE);
-    conf_bumpmult = getconf_real(CNF_BUMPMULT);
     conf_etimeout = getconf_int(CNF_ETIMEOUT);
     conf_reserve  = getconf_int(CNF_RESERVE);
     conf_autoflush = getconf_int(CNF_AUTOFLUSH);
@@ -361,7 +359,47 @@ char **argv;
                    walltime_str(timessub(curclock(), section_start)));
 
     /*
-     * 3. Calculate Preliminary Dump Levels
+     * 3. Send autoflush dumps left on the holding disks
+     *
+     * This should give us something to do while we generate the new
+     * dump schedule.
+     */
+
+    fprintf(stderr,"\nSENDING FLUSHES...\n");
+    if(conf_autoflush) {
+       dumpfile_t file;
+       sl_t *holding_list;
+       sle_t *holding_file;
+       holding_list = get_flush(NULL, NULL, 0, 0);
+       for(holding_file=holding_list->first; holding_file != NULL;
+                                      holding_file = holding_file->next) {
+           get_dumpfile(holding_file->name, &file);
+           
+           log_add(L_DISK, "%s %s", file.name, file.disk);
+           fprintf(stderr,
+                   "FLUSH %s %s %s %d %s\n",
+                   file.name,
+                   file.disk,
+                   file.datestamp,
+                   file.dumplevel,
+                   holding_file->name);
+           fprintf(stdout,
+                   "FLUSH %s %s %s %d %s\n",
+                   file.name,
+                   file.disk,
+                   file.datestamp,
+                   file.dumplevel,
+                   holding_file->name);
+       }
+       free_sl(holding_list);
+       holding_list = NULL;
+    }
+    fprintf(stderr, "ENDFLUSH\n");
+    fprintf(stdout, "ENDFLUSH\n");
+    fflush(stdout);
+
+    /*
+     * 4. Calculate Preliminary Dump Levels
      *
      * Before we can get estimates from the remote slave hosts, we make a
      * first attempt at guessing what dump levels we will be dumping at
@@ -386,7 +424,7 @@ char **argv;
 
 
     /*
-     * 4. Get Dump Size Estimates from Remote Client Hosts
+     * 5. Get Dump Size Estimates from Remote Client Hosts
      *
      * Each host is queried (in parallel) for dump size information on all
      * of its disks, and the results gathered as they come in.
@@ -398,6 +436,8 @@ char **argv;
     section_start = curclock();
 
     estq.head = estq.tail = NULL;
+    pestq.head = pestq.tail = NULL;
+    waitq.head = waitq.tail = NULL;
     failq.head = failq.tail = NULL;
 
     get_estimates();
@@ -418,7 +458,7 @@ char **argv;
 
 
     /*
-     * 5. Analyze Dump Estimates
+     * 6. Analyze Dump Estimates
      *
      * Each disk's estimates are looked at to determine what level it
      * should dump at, and to calculate the expected size and time taking
@@ -456,7 +496,7 @@ char **argv;
 
 
     /*
-     * 6. Delay Dumps if Schedule Too Big
+     * 7. Delay Dumps if Schedule Too Big
      *
      * If the generated schedule is too big to fit on the tape, we need to
      * delay some full dumps to make room.  Incrementals will be done
@@ -481,7 +521,7 @@ char **argv;
 
 
     /*
-     * 7. Promote Dumps if Schedule Too Small
+     * 8. Promote Dumps if Schedule Too Small
      *
      * Amanda attempts to balance the full dumps over the length of the
      * dump cycle.  If this night's full dumps are too small relative to
@@ -516,7 +556,7 @@ char **argv;
 
 
     /*
-     * 8. Output Schedule
+     * 9. Output Schedule
      *
      * The schedule goes to stdout, presumably to driver.  A copy is written
      * on stderr for the debug file.
@@ -524,43 +564,11 @@ char **argv;
 
     fprintf(stderr,"\nGENERATING SCHEDULE:\n--------\n");
 
-    if(conf_autoflush) {
-       dumpfile_t file;
-       sl_t *holding_list;
-       sle_t *holding_file;
-       holding_list = get_flush(NULL, datestamp, 0, 0);
-       for(holding_file=holding_list->first; holding_file != NULL;
-                                      holding_file = holding_file->next) {
-           get_dumpfile(holding_file->name, &file);
-           
-           log_add(L_DISK, "%s %s", file.name, file.disk);
-           fprintf(stderr,
-                   "FLUSH %s %s %s %d %s\n",
-                   file.name,
-                   file.disk,
-                   file.datestamp,
-                   file.dumplevel,
-                   holding_file->name);
-           fprintf(stdout,
-                   "FLUSH %s %s %s %d %s\n",
-                   file.name,
-                   file.disk,
-                   file.datestamp,
-                   file.dumplevel,
-                   holding_file->name);
-       }
-       free_sl(holding_list);
-       holding_list = NULL;
-    }
-    fprintf(stderr, "ENDFLUSH\n");
-    fprintf(stdout, "ENDFLUSH\n");
-    fflush(stdout);
-
     while(!empty(schedq)) output_scheduleline(dequeue_disk(&schedq));
     fprintf(stderr, "--------\n");
 
     close_infofile();
-    log_add(L_FINISH, "date %s", datestamp);
+    log_add(L_FINISH, "date %s time %s", datestamp, walltime_str(curclock()));
 
     amfree(msg);
     amfree(datestamp);
@@ -592,7 +600,7 @@ static long est_size P((disk_t *dp, int level));
 static long est_tape_size P((disk_t *dp, int level));
 static int next_level0 P((disk_t *dp, info_t *info));
 static int runs_at P((info_t *info, int lev));
-static long bump_thresh P((int level));
+static long bump_thresh P((int level, long size_level_0, int bumppercent, int bumpsize, double bumpmult));
 static int when_overwrite P((char *label));
 
 static void askfor(ep, seq, lev, info)
@@ -601,8 +609,6 @@ int seq;    /* sequence number of request */
 int lev;       /* dump level being requested */
 info_t *info;  /* info block for disk */
 {
-    stats_t *stat;
-
     if(seq < 0 || seq >= MAX_LEVELS) {
        error("error [planner askfor: seq out of range 0..%d: %d]",
              MAX_LEVELS, seq);
@@ -615,7 +621,7 @@ info_t *info;       /* info block for disk */
     if (lev == -1) {
        ep->level[seq] = -1;
        ep->dumpdate[seq] = (char *)0;
-       ep->est_size[seq] = -1;
+       ep->est_size[seq] = -2;
        return;
     }
 
@@ -624,9 +630,7 @@ info_t *info;       /* info block for disk */
     ep->dumpdate[seq] = stralloc(get_dumpdate(info,lev));
     malloc_mark(ep->dumpdate[seq]);
 
-    stat = &info->inf[lev];
-    if(stat->date == EPOCH) ep->est_size[seq] = -1;
-    else ep->est_size[seq] = stat->size;
+    ep->est_size[seq] = -2;
 
     return;
 }
@@ -891,8 +895,8 @@ setup_estimate(dp)
                 * last night, we can't bump.
                 */
                if((info.inf[curr_level].size == 0 || /* no data, try it anyway */
-                   (((info.inf[curr_level].size > bump_thresh(curr_level)))
-                    && ep->level_days >= conf_bumpdays))
+                   (((info.inf[curr_level].size > bump_thresh(curr_level, info.inf[0].size,dp->bumppercent, dp->bumpsize, dp->bumpmult)))
+                    && ep->level_days >= dp->bumpdays))
                   && curr_level + 1 < DUMP_LEVELS) {
                    askfor(ep, i++, curr_level+1, &info);
                }
@@ -905,15 +909,13 @@ setup_estimate(dp)
 
     /* debug output */
 
-    fprintf(stderr, "setup_estimate: %s:%s: command %d, options:",
-           dp->host->hostname, dp->name, info.command);
-    if(dp->strategy == DS_NOFULL) fputs(" no-full", stderr);
-    if(dp->strategy == DS_INCRONLY) fputs(" incr-only", stderr);
-    if(dp->skip_full) fputs(" skip-full", stderr);
-    if(dp->skip_incr) fputs(" skip-incr", stderr);
-    fprintf(stderr, "\n    last_level %d next_level0 %d level_days %d\n",
-           ep->last_level, ep->next_level0, ep->level_days);
-    fprintf(stderr, "    getting estimates %d (%ld) %d (%ld) %d (%ld)\n",
+    fprintf(stderr, "setup_estimate: %s:%s: command %d, options: %s    last_level %d next_level0 %d level_days %d    getting estimates %d (%ld) %d (%ld) %d (%ld)\n",
+           dp->host->hostname, dp->name, info.command,
+           dp->strategy == DS_NOFULL ? "no-full" :
+                dp->strategy == DS_INCRONLY ? "incr-only" :
+                dp->skip_full ? "skip-full" :
+                dp->skip_incr ? "skip-incr" : "none",
+           ep->last_level, ep->next_level0, ep->level_days,
            ep->level[0], ep->est_size[0],
            ep->level[1], ep->est_size[1],
            ep->level[2], ep->est_size[2]);
@@ -1079,13 +1081,22 @@ int lev;
 }
 
 
-static long bump_thresh(level)
+static long bump_thresh(level, size_level_0, bumppercent, bumpsize, bumpmult)
 int level;
+long size_level_0;
+int bumppercent;
+int bumpsize;
+double bumpmult;
 {
     double bump;
 
-    bump = conf_bumpsize;
-    while(--level) bump = bump * conf_bumpmult;
+    if(bumppercent != 0 && size_level_0 > 1024) {
+       bump = (size_level_0 * bumppercent)/100.0;
+    }
+    else {
+       bump = bumpsize;
+    }
+    while(--level) bump = bump * bumpmult;
 
     return (long)bump;
 }
@@ -1098,14 +1109,14 @@ int level;
  *
  */
 
-static void getsize P((host_t *hostp));
-static disk_t *lookup_hostdisk P((host_t *hp, char *str));
+static void getsize P((am_host_t *hostp));
+static disk_t *lookup_hostdisk P((am_host_t *hp, char *str));
 static void handle_result P((proto_t *p, pkt_t *pkt));
 
 
 static void get_estimates P((void))
 {
-    host_t *hostp;
+    am_host_t *hostp;
     disk_t *dp;
     struct servent *amandad;
     int something_started;
@@ -1146,16 +1157,80 @@ static void get_estimates P((void))
        est(dp)->errstr = "hmm, disk was stranded on waitq";
        enqueue_disk(&failq, dp);
     }
+
+    while(!empty(pestq)) {
+       disk_t *dp = dequeue_disk(&pestq);
+
+       if(est(dp)->level[0] != -1 && est(dp)->est_size[0] < 0) {
+           if(est(dp)->est_size[0] == -1) {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d failed: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[0], est(dp)->est_size[0]);
+           }
+           else {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d timed out: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[0], est(dp)->est_size[0]);
+           }
+           est(dp)->level[0] = -1;
+       }
+
+       if(est(dp)->level[1] != -1 && est(dp)->est_size[1] < 0) {
+           if(est(dp)->est_size[1] == -1) {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d failed: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[1], est(dp)->est_size[1]);
+           }
+           else {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d timed out: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[1], est(dp)->est_size[1]);
+           }
+           est(dp)->level[1] = -1;
+       }
+
+       if(est(dp)->level[2] != -1 && est(dp)->est_size[2] < 0) {
+           if(est(dp)->est_size[2] == -1) {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d failed: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[2], est(dp)->est_size[2]);
+           }
+           else {
+               log_add(L_WARNING,
+                       "disk %s:%s, estimate of level %d timed out: %d.",
+                       dp->host->hostname, dp->name,
+                       est(dp)->level[2], est(dp)->est_size[2]);
+           }
+           est(dp)->level[2] = -1;
+       }
+
+       if((est(dp)->level[0] != -1 && est(dp)->est_size[0] > 0) ||
+          (est(dp)->level[1] != -1 && est(dp)->est_size[1] > 0) ||
+          (est(dp)->level[2] != -1 && est(dp)->est_size[2] > 0)) {
+           enqueue_disk(&estq, dp);
+       }
+       else {
+          est(dp)->errstr = vstralloc("disk ", dp->name,
+                                      ", all estimate timed out", NULL);
+          enqueue_disk(&failq, dp);
+       }
+    }
 }
 
 static void getsize(hostp)
-host_t *hostp;
+am_host_t *hostp;
 {
     disklist_t *destqp;
     disk_t *dp;
     char *req = NULL, *errstr = NULL;
     int i, estimates, rc, timeout, disk_state, req_len;
     char number[NUM_STR_SIZE];
+    char *calcsize;
 
     assert(hostp->disks != NULL);
 
@@ -1172,6 +1247,9 @@ host_t *hostp;
      */
 
     if(hostp->features != NULL) { /* sendsize service */
+       int nb_client = 0;
+       int nb_server = 0;
+
        int has_features = am_has_feature(hostp->features,
                                          fe_req_options_features);
        int has_hostname = am_has_feature(hostp->features,
@@ -1201,84 +1279,208 @@ host_t *hostp;
            int s_len = 0;
     
            if(dp->todo == 0) continue;
-    
+
            if(est(dp)->state != DISK_READY) {
                continue;
            }
+
            est(dp)->got_estimate = 0;
            if(est(dp)->level[0] == -1) {
                est(dp)->state = DISK_DONE;
                continue;   /* ignore this disk */
            }
     
-           for(i = 0; i < MAX_LEVELS; i++) {
-               char *l;
-               char *exclude1 = "";
-               char *exclude2 = "";
-               char *excludefree = NULL;
-               char spindle[NUM_STR_SIZE];
-               char level[NUM_STR_SIZE];
-               int lev = est(dp)->level[i];
+           if(dp->estimate == ES_CLIENT ||
+              dp->estimate == ES_CALCSIZE) {
+               nb_client++;
     
-               if(lev == -1) break;
+               for(i = 0; i < MAX_LEVELS; i++) {
+                   char *l;
+                   char *exclude1 = "";
+                   char *exclude2 = "";
+                   char *excludefree = NULL;
+                   char spindle[NUM_STR_SIZE];
+                   char level[NUM_STR_SIZE];
+                   int lev = est(dp)->level[i];
     
-               ap_snprintf(level, sizeof(level), "%d", lev);
-               ap_snprintf(spindle, sizeof(spindle), "%d", dp->spindle);
-               if(am_has_feature(hostp->features, fe_sendsize_req_options)) {
-                   exclude1 = " OPTIONS |";
-                   exclude2 = optionstr(dp, hostp->features, NULL);
-                   excludefree = exclude2;
-               }
-               else {
-                   if(dp->exclude_file && dp->exclude_file->nb_element == 1) {
-                       exclude1 = " exclude-file=";
-                       exclude2 = dp->exclude_file->first->name;
+                   if(lev == -1) break;
+    
+                   ap_snprintf(level, sizeof(level), "%d", lev);
+                   ap_snprintf(spindle, sizeof(spindle), "%d", dp->spindle);
+                   if(am_has_feature(hostp->features,fe_sendsize_req_options)){
+                       exclude1 = " OPTIONS |";
+                       exclude2 = optionstr(dp, hostp->features, NULL);
+                       excludefree = exclude2;
                    }
-                   else if(dp->exclude_list
-                           && dp->exclude_list->nb_element == 1) {
-                       exclude1 = " exclude-list=";
-                       exclude2 = dp->exclude_list->first->name;
+                   else {
+                       if(dp->exclude_file &&
+                          dp->exclude_file->nb_element == 1) {
+                           exclude1 = " exclude-file=";
+                           exclude2 = dp->exclude_file->first->name;
+                       }
+                       else if(dp->exclude_list &&
+                               dp->exclude_list->nb_element == 1) {
+                           exclude1 = " exclude-list=";
+                           exclude2 = dp->exclude_list->first->name;
+                       }
                    }
+                   if(dp->estimate == ES_CALCSIZE &&
+                      !am_has_feature(hostp->features, fe_calcsize_estimate)) {
+                       log_add(L_WARNING,"%s:%s does not support CALCSIZE for estimate, using CLIENT.\n",
+                               hostp->hostname, dp->name);
+                       dp->estimate = ES_CLIENT;
+                   }
+                   if(dp->estimate == ES_CLIENT)
+                       calcsize = "";
+                   else
+                       calcsize = "CALCSIZE ";
+
+                   if(dp->device) {
+                       l = vstralloc(calcsize,
+                                     dp->program,  " ",
+                                     dp->name, " ",
+                                     dp->device, " ",
+                                     level, " ",
+                                     est(dp)->dumpdate[i], " ", spindle,
+                                     exclude1,
+                                     exclude2,
+                                     "\n",
+                                     NULL);
+                   }
+                   else {
+                       l = vstralloc(calcsize,
+                                     dp->program, " ",
+                                     dp->name, " ",
+                                     level, " ",
+                                     est(dp)->dumpdate[i], " ", spindle,
+                                     exclude1,
+                                     exclude2,
+                                     "\n",
+                                     NULL);
+                   }
+                   amfree(excludefree);
+                   strappend(s, l);
+                   s_len += strlen(l);
+                   amfree(l);
                }
-               if(dp->device) {
-                   l = vstralloc(dp->program, " ",
-                                 dp->name, " ",
-                                 dp->device, " ",
-                                 level, " ",
-                                 est(dp)->dumpdate[i], " ", spindle,
-                                 exclude1,
-                                 exclude2,
-                                 "\n",
-                                 NULL);
-               }
-               else {
-                   l = vstralloc(dp->program, " ", dp->name, " ", level, " ",
-                                 est(dp)->dumpdate[i], " ", spindle,
-                                 exclude1,
-                                 exclude2,
-                                 "\n",
-                                 NULL);
+               /*
+                * Allow 2X for err response.
+                */
+               if(req_len + s_len > MAX_DGRAM / 2) {
+                   amfree(s);
+                   break;
                }
-               amfree(excludefree);
-               strappend(s, l);
-               s_len += strlen(l);
-               amfree(l);
-           }
-           /*
-            * Allow 2X for err response.
-            */
-           if(req_len + s_len > MAX_DGRAM / 2) {
+               estimates += i;
+               strappend(req, s);
+               req_len += s_len;
                amfree(s);
-               break;
+               est(dp)->state = DISK_ACTIVE;
+               remove_disk(&startq, dp);
+           }
+           else if (dp->estimate == ES_SERVER) {
+               info_t info;
+
+               nb_server++;
+               get_info(dp->host->hostname, dp->name, &info);
+               for(i = 0; i < MAX_LEVELS; i++) {
+                   int j;
+                   int lev = est(dp)->level[i];
+
+                   if(lev == -1) break;
+                   if(lev == 0) { /* use latest level 0, should do extrapolation */
+                       long est_size = 0;
+                       int nb_est = 0;
+
+                       for(j=NB_HISTORY-2;j>=0;j--) {
+                           if(info.history[j].level == 0) {
+                               est_size = info.history[j].size;
+                               nb_est++;
+                           }
+                       }
+                       if(nb_est > 0) {
+                           est(dp)->est_size[i] = est_size;
+                       }
+                       else if(info.inf[lev].size > 1000) { /* stats */
+                           est(dp)->est_size[i] = info.inf[lev].size;
+                       }
+                       else {
+                           est(dp)->est_size[i] = 1000000;
+                       }
+                   }
+                   else if(lev == est(dp)->last_level) {
+                       /* means of all X day at the same level */
+                       #define NB_DAY 30
+                       int nb_day = 0;
+                       long est_size_day[NB_DAY];
+                       int nb_est_day[NB_DAY];
+
+                       for(j=0;j<NB_DAY;j++) {
+                           est_size_day[j]=0;
+                           nb_est_day[j]=0;
+                       }
+
+                       for(j=NB_HISTORY-2;j>=0;j--) {
+                           if(info.history[j].level <= 0) continue;
+                           if(info.history[j].level == info.history[j+1].level) {
+                               if(nb_day <NB_DAY-1) nb_day++;
+                               est_size_day[nb_day] += info.history[j].size;
+                               nb_est_day[nb_day]++;
+                           }
+                           else {
+                               nb_day=0;
+                           }
+                       }
+                       nb_day = info.consecutive_runs + 1;
+                       if(nb_day > NB_DAY-1) nb_day = NB_DAY-1;
+
+                       while(nb_day > 0 && nb_est_day[nb_day] == 0) nb_day--;
+
+                       if(nb_est_day[nb_day] > 0) {
+                           est(dp)->est_size[i] =
+                                     est_size_day[nb_day] / nb_est_day[nb_day];
+                       }
+                       else if(info.inf[lev].size > 1000) { /* stats */
+                           est(dp)->est_size[i] = info.inf[lev].size;
+                       }
+                       else {
+                           est(dp)->est_size[i] = 10000;
+                       }
+                   }
+                   else if(lev == est(dp)->last_level + 1) {
+                       /* means of all first day at a new level */
+                       long est_size = 0;
+                       int nb_est = 0;
+
+                       for(j=NB_HISTORY-2;j>=0;j--) {
+                           if(info.history[j].level <= 0) continue;
+                           if(info.history[j].level == info.history[j+1].level + 1 ) {
+                               est_size += info.history[j].size;
+                               nb_est++;
+                           }
+                       }
+                       if(nb_est > 0) {
+                           est(dp)->est_size[i] = est_size / nb_est;
+                       }
+                       else if(info.inf[lev].size > 1000) { /* stats */
+                           est(dp)->est_size[i] = info.inf[lev].size;
+                       }
+                       else {
+                           est(dp)->est_size[i] = 100000;
+                       }
+                   }
+               }
+               fprintf(stderr,"%s time %s: got result for host %s disk %s:",
+                       get_pname(), walltime_str(curclock()),
+                       dp->host->hostname, dp->name);
+               fprintf(stderr," %d -> %ldK, %d -> %ldK, %d -> %ldK\n",
+                       est(dp)->level[0], est(dp)->est_size[0],
+                       est(dp)->level[1], est(dp)->est_size[1],
+                       est(dp)->level[2], est(dp)->est_size[2]);
+               est(dp)->state = DISK_DONE;
+               remove_disk(&startq, dp);
+               enqueue_disk(&estq, dp);
            }
-           estimates += i;
-           strappend(req, s);
-           req_len += s_len;
-           amfree(s);
-           est(dp)->state = DISK_ACTIVE;
-           remove_disk(&startq, dp);
        }
-    
        if(estimates == 0) {
            amfree(req);
            hostp->up = HOST_DONE;
@@ -1342,7 +1544,7 @@ host_t *hostp;
 }
 
 static disk_t *lookup_hostdisk(hp, str)
-host_t *hp;
+am_host_t *hp;
 char *str;
 {
     disk_t *dp;
@@ -1361,7 +1563,7 @@ pkt_t *pkt;
     int level, i;
     long size;
     disk_t *dp;
-    host_t *hostp;
+    am_host_t *hostp;
     char *msgdisk=NULL, *msgdisk_undo=NULL, msgdisk_undo_ch = '\0';
     char *errbuf = NULL;
     char *line;
@@ -1371,7 +1573,7 @@ pkt_t *pkt;
     int ch;
     int tch;
 
-    hostp = (host_t *) p->datap;
+    hostp = (am_host_t *) p->datap;
     hostp->up = HOST_READY;
 
     if(p->state == S_FAILED && pkt == NULL) {
@@ -1514,63 +1716,87 @@ pkt_t *pkt;
 
     for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) {
        if(dp->todo == 0) continue;
-       if(est(dp)->state != DISK_ACTIVE) continue;
-       est(dp)->state = DISK_DONE;
+       if(est(dp)->state != DISK_ACTIVE &&
+          est(dp)->state != DISK_PARTIALY_DONE) continue;
+
+       if(est(dp)->state == DISK_ACTIVE) {
+           remove_disk(&waitq, dp);
+       }
+       else if(est(dp)->state == DISK_PARTIALY_DONE) {
+           remove_disk(&pestq, dp);
+       }
+
+       if(pkt->type == P_REP) {
+           est(dp)->state = DISK_DONE;
+       }
+       else if(pkt->type == P_PREP) {
+           est(dp)->state = DISK_PARTIALY_DONE;
+       }
+
        if(est(dp)->level[0] == -1) continue;   /* ignore this disk */
-       remove_disk(&waitq, dp);
-       if(est(dp)->got_estimate) {
-           fprintf(stderr,"%s: time %s: got result for host %s disk %s:",
-                   get_pname(), walltime_str(curclock()),
-                   dp->host->hostname, dp->name);
-           fprintf(stderr," %d -> %ldK, %d -> %ldK, %d -> %ldK\n",
-                   est(dp)->level[0], est(dp)->est_size[0],
-                   est(dp)->level[1], est(dp)->est_size[1],
-                   est(dp)->level[2], est(dp)->est_size[2]);
-
-           if((est(dp)->level[0] != -1 && est(dp)->est_size[0] > 0) ||
-              (est(dp)->level[1] != -1 && est(dp)->est_size[1] > 0) ||
-              (est(dp)->level[2] != -1 && est(dp)->est_size[2] > 0)) {
-
-               if(est(dp)->level[2] != -1 && est(dp)->est_size[2] < 0) {
-                   log_add(L_WARNING,
-                           "disk %s:%s, estimate of level %d failed: %d.",
-                           dp->host->hostname, dp->name,
-                           est(dp)->level[2], est(dp)->est_size[2]);
-                   est(dp)->level[2] = -1;
-               }
-               if(est(dp)->level[1] != -1 && est(dp)->est_size[1] < 0) {
-                   log_add(L_WARNING,
-                           "disk %s:%s, estimate of level %d failed: %d.",
-                           dp->host->hostname, dp->name,
-                           est(dp)->level[1], est(dp)->est_size[1]);
-                   est(dp)->level[1] = -1;
-               }
-               if(est(dp)->level[0] != -1 && est(dp)->est_size[0] < 0) {
-                   log_add(L_WARNING,
-                           "disk %s:%s, estimate of level %d failed: %d.",
-                           dp->host->hostname, dp->name,
-                           est(dp)->level[0], est(dp)->est_size[0]);
-                   est(dp)->level[0] = -1;
-               }
 
-               enqueue_disk(&estq, dp);
+
+       if(pkt->type == P_PREP) {
+               fprintf(stderr,"%s: time %s: got partial result for host %s disk %s:",
+                       get_pname(), walltime_str(curclock()),
+                       dp->host->hostname, dp->name);
+               fprintf(stderr," %d -> %ldK, %d -> %ldK, %d -> %ldK\n",
+                       est(dp)->level[0], est(dp)->est_size[0],
+                       est(dp)->level[1], est(dp)->est_size[1],
+                       est(dp)->level[2], est(dp)->est_size[2]);
+           enqueue_disk(&pestq, dp);
+       }
+       else if(pkt->type == P_REP) {
+               fprintf(stderr,"%s: time %s: got result for host %s disk %s:",
+                       get_pname(), walltime_str(curclock()),
+                       dp->host->hostname, dp->name);
+               fprintf(stderr," %d -> %ldK, %d -> %ldK, %d -> %ldK\n",
+                       est(dp)->level[0], est(dp)->est_size[0],
+                       est(dp)->level[1], est(dp)->est_size[1],
+                       est(dp)->level[2], est(dp)->est_size[2]);
+               if((est(dp)->level[0] != -1 && est(dp)->est_size[0] > 0) ||
+                  (est(dp)->level[1] != -1 && est(dp)->est_size[1] > 0) ||
+                  (est(dp)->level[2] != -1 && est(dp)->est_size[2] > 0)) {
+
+                   if(est(dp)->level[2] != -1 && est(dp)->est_size[2] < 0) {
+                       log_add(L_WARNING,
+                               "disk %s:%s, estimate of level %d failed: %d.",
+                               dp->host->hostname, dp->name,
+                               est(dp)->level[2], est(dp)->est_size[2]);
+                       est(dp)->level[2] = -1;
+                   }
+                   if(est(dp)->level[1] != -1 && est(dp)->est_size[1] < 0) {
+                       log_add(L_WARNING,
+                               "disk %s:%s, estimate of level %d failed: %d.",
+                               dp->host->hostname, dp->name,
+                               est(dp)->level[1], est(dp)->est_size[1]);
+                       est(dp)->level[1] = -1;
+                   }
+                   if(est(dp)->level[0] != -1 && est(dp)->est_size[0] < 0) {
+                       log_add(L_WARNING,
+                               "disk %s:%s, estimate of level %d failed: %d.",
+                               dp->host->hostname, dp->name,
+                               est(dp)->level[0], est(dp)->est_size[0]);
+                       est(dp)->level[0] = -1;
+                   }
+                   enqueue_disk(&estq, dp);
            }
            else {
                enqueue_disk(&failq, dp);
-               est(dp)->errstr = vstralloc("disk ", dp->name,
-                                           ", all estimate failed", NULL);
+               if(est(dp)->got_estimate) {
+                   est(dp)->errstr = vstralloc("disk ", dp->name,
+                                               ", all estimate failed", NULL);
+               }
+               else {
+                   fprintf(stderr, "error result for host %s disk %s: missing estimate\n",
+                           dp->host->hostname, dp->name);
+                   est(dp)->errstr = vstralloc("missing result for ", dp->name,
+                                               " in ", dp->host->hostname,
+                                               " response",
+                                               NULL);
+               }
            }
        }
-       else {
-           enqueue_disk(&failq, dp);
-
-           fprintf(stderr, "error result for host %s disk %s: missing estimate\n",
-               dp->host->hostname, dp->name);
-
-           est(dp)->errstr = vstralloc("missing result for ", dp->name,
-                                       " in ", dp->host->hostname, " response",
-                                       NULL);
-       }
     }
     getsize(hostp);
     return;
@@ -1825,15 +2051,15 @@ disk_t *dp;
        return base_level;
     }
 
-    thresh = bump_thresh(base_level);
+    thresh = bump_thresh(base_level, est_size(dp, 0), dp->bumppercent, dp->bumpsize, dp->bumpmult);
 
     fprintf(stderr,
            "   pick: size %ld level %d days %d (thresh %ldK, %d days)\n",
            base_size, base_level, est(dp)->level_days,
-           thresh, conf_bumpdays);
+           thresh, dp->bumpdays);
 
     if(base_level == 9
-       || est(dp)->level_days < conf_bumpdays
+       || est(dp)->level_days < dp->bumpdays
        || base_size <= thresh)
            return base_level;
 
@@ -1894,6 +2120,8 @@ static void delay_dumps P((void))
     char est_kb[20];     /* Text formatted dump size */
     int nb_forced_level_0;
     info_t info;
+    int delete;
+    char *message;
 
     biq.head = biq.tail = NULL;
 
@@ -1919,30 +2147,29 @@ static void delay_dumps P((void))
        ap_snprintf(est_kb, 20, "%ld KB,", est(dp)->dump_size);
 
        if(est(dp)->dump_level == 0) {
-           if(est(dp)->last_level == -1 || dp->skip_incr) {
-               delay_one_dump(dp, 1,
-                              "dump larger than tape,",
-                              est_kb,
-                              "but cannot incremental dump",
-                              dp->skip_incr ? "skip-incr": "new",
-                              "disk",
-                              NULL);
+           if(dp->skip_incr) {
+               delete = 1;
+               message = "but cannot incremental dump skip-incr disk";
+           }
+           else if(est(dp)->last_level < 0) {
+               delete = 1;
+               message = "but cannot incremental dump new disk";
+           }
+           else if(est(dp)->degr_level < 0) {
+               delete = 1;
+               message = "but no incremental estimate";
            }
            else {
-               delay_one_dump(dp, 0,
-                              "dump larger than tape,",
-                              est_kb,
-                              "full dump delayed",
-                              NULL);
+               delete = 0;
+               message = "full dump delayed";
            }
        }
        else {
-           delay_one_dump(dp, 1,
-                          "dump larger than tape,",
-                          est_kb,
-                          "skipping incremental",
-                          NULL);
+           delete = 1;
+           message = "skipping incremental";
        }
+       delay_one_dump(dp, delete, "dump larger than tape,", est_kb,
+                      message, NULL);
     }
 
     /*
@@ -1984,22 +2211,24 @@ static void delay_dumps P((void))
             /* Format dumpsize for messages */
            ap_snprintf(est_kb, 20, "%ld KB,", est(dp)->dump_size);
 
-           if(est(dp)->last_level == -1 || dp->skip_incr) {
-               delay_one_dump(dp, 1,
-                              "dumps too big,",
-                              est_kb,
-                              "but cannot incremental dump",
-                              dp->skip_incr ? "skip-incr": "new",
-                              "disk",
-                              NULL);
+           if(dp->skip_incr) {
+               delete = 1;
+               message = "but cannot incremental dump skip-incr disk";
+           }
+           else if(est(dp)->last_level < 0) {
+               delete = 1;
+               message = "but cannot incremental dump new disk";
+           }
+           else if(est(dp)->degr_level < 0) {
+               delete = 1;
+               message = "but no incremental estimate";
            }
            else {
-               delay_one_dump(dp, 0,
-                              "dumps too big,",
-                              est_kb,
-                              "full dump delayed",
-                              NULL);
+               delete = 0;
+               message = "full dump delayed";
            }
+           delay_one_dump(dp, delete, "dumps too big,", est_kb,
+                          message, NULL);
        }
     }
 
@@ -2015,22 +2244,24 @@ static void delay_dumps P((void))
                /* Format dumpsize for messages */
                ap_snprintf(est_kb, 20, "%ld KB,", est(dp)->dump_size);
 
-               if(est(dp)->last_level == -1 || dp->skip_incr) {
-                   delay_one_dump(dp, 1,
-                                  "dumps too big,",
-                                  est_kb,
-                                  "but cannot incremental dump",
-                                  dp->skip_incr ? "skip-incr": "new",
-                                  "disk",
-                                  NULL);
+               if(dp->skip_incr) {
+                   delete = 1;
+                   message = "but cannot incremental dump skip-incr disk";
+               }
+               else if(est(dp)->last_level < 0) {
+                   delete = 1;
+                   message = "but cannot incremental dump new disk";
+               }
+               else if(est(dp)->degr_level < 0) {
+                   delete = 1;
+                   message = "but no incremental estimate";
                }
                else {
-                   delay_one_dump(dp, 0,
-                                  "dumps too big,",
-                                  est_kb,
-                                  "full dump delayed",
-                                  NULL);
+                   delete = 0;
+                   message = "full dump delayed";
                }
+               delay_one_dump(dp, delete, "dumps too big,", est_kb,
+                              message, NULL);
            }
        }
     }
@@ -2321,29 +2552,30 @@ static int promote_hills P((void))
        int disks;
        long size;
     } *sp = NULL;
-    int tapecycle;
     int days;
     int hill_days = 0;
     long hill_size;
     long new_size;
     long new_total;
+    int my_dumpcycle;
 
     /* If we are already doing a level 0 don't bother */
     if(total_lev0 > 0)
        return 0;
 
     /* Do the guts of an "amadmin balance" */
-    tapecycle = conf_tapecycle;
+    my_dumpcycle = conf_dumpcycle;
+    if(my_dumpcycle > 10000) my_dumpcycle = 10000;
 
     sp = (struct balance_stats *)
-       alloc(sizeof(struct balance_stats) * tapecycle);
+       alloc(sizeof(struct balance_stats) * my_dumpcycle);
 
-    for(days = 0; days < tapecycle; days++)
+    for(days = 0; days < my_dumpcycle; days++)
        sp[days].disks = sp[days].size = 0;
 
     for(dp = schedq.head; dp != NULL; dp = dp->next) {
        days = est(dp)->next_level0;   /* This is > 0 by definition */
-       if(days<tapecycle && !dp->skip_full && dp->strategy != DS_NOFULL &&
+       if(days<my_dumpcycle && !dp->skip_full && dp->strategy != DS_NOFULL &&
           dp->strategy != DS_INCRONLY) {
            sp[days].disks++;
            sp[days].size += est(dp)->last_lev0size;
@@ -2354,7 +2586,7 @@ static int promote_hills P((void))
     while(1) {
        /* Find the tallest hill */
        hill_size = 0;
-       for(days = 0; days < tapecycle; days++) {
+       for(days = 0; days < my_dumpcycle; days++) {
            if(sp[days].disks > 1 && sp[days].size > hill_size) {
                hill_size = sp[days].size;
                hill_days = days;
index 96bf404faf2d8a9bc15c05fd13831e3f8e4efdc7..a28d5b49a80830f1009d589ca57991c89cc4f45b 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: reporter.c,v 1.44.2.17.4.6.2.16 2003/11/26 16:10:23 martinea Exp $
+ * $Id: reporter.c,v 1.44.2.17.4.6.2.16.2.6 2005/03/29 16:35:11 martinea Exp $
  *
  * nightly Amanda Report generator
  */
@@ -96,7 +96,7 @@ typedef struct taper_s {
 taper_t *stats_by_tape = NULL;
 taper_t *current_tape = NULL;
 
-float total_time, startup_time;
+float total_time, startup_time, planner_time;
 
 /* count files to tape */
 int tapefcount = 0;
@@ -126,9 +126,8 @@ line_t *notes = NULL;
 
 static char MaxWidthsRequested = 0;    /* determined via config data */
 
-/*
-char *hostname = NULL, *diskname = NULL;
-*/
+char *displayunit;
+long int unitdivisor;
 
 /* local functions */
 int contline_next P((void));
@@ -404,6 +403,9 @@ char **argv;
 
     today_datestamp = construct_datestamp(NULL);
 
+    displayunit = getconf_str(CNF_DISPLAYUNIT);
+    unitdivisor = getconf_unit_divisor();
+
     ColumnSpec = getconf_str(CNF_COLUMNSPEC);
     if(SetColumDataFromString(ColumnData, ColumnSpec, &errstr) < 0) {
        curlog = L_ERROR;
@@ -654,7 +656,8 @@ char **argv;
 
 /* ----- */
 
-#define mb(f)  ((f)/1024.0)            /* kbytes -> mbytes */
+#define mb(f)  ((f)/1024)              /* kbytes -> mbutes */
+#define du(f)  ((f)/unitdivisor)       /* kbytes -> displayunit */
 #define pct(f) ((f)*100.0)             /* percent */
 #define hrmn(f) ((int)(f)+30)/3600, (((int)(f)+30)%3600)/60
 #define mnsc(f) ((int)(f+0.5))/60, ((int)(f+0.5)) % 60
@@ -682,7 +685,6 @@ char **argv;
 
 void output_stats()
 {
-    double idle_time;
     tapetype_t *tp = lookup_tapetype(getconf_str(CNF_TAPETYPE));
     int tapesize, marksize, lv, first;
 
@@ -700,19 +702,16 @@ void output_stats()
     stats[2].dumper_time = stats[0].dumper_time + stats[1].dumper_time;
 
     if(!got_finish)    /* no driver finish line, estimate total run time */
-       total_time = stats[2].taper_time + startup_time;
-
-    idle_time = (total_time - startup_time) - stats[2].taper_time;
-    if(idle_time < 0) idle_time = 0.0;
+       total_time = stats[2].taper_time + planner_time;
 
     fprintf(mailf,"STATISTICS:\n");
     fprintf(mailf,
-           "                          Total       Full      Daily\n");
+           "                          Total       Full      Incr.\n");
     fprintf(mailf,
            "                        --------   --------   --------\n");
 
     fprintf(mailf,
-           "Estimate Time (hrs:min)   %2d:%02d\n", hrmn(startup_time));
+           "Estimate Time (hrs:min)   %2d:%02d\n", hrmn(planner_time));
 
     fprintf(mailf,
            "Run Time (hrs:min)        %2d:%02d\n", hrmn(total_time));
@@ -817,7 +816,7 @@ void output_stats()
            current_tape = current_tape->next) {
            fprintf(mailf, "  %-*s", label_length, current_tape->label);
            fprintf(mailf, " %2d:%02d", hrmn(current_tape->taper_time));
-           fprintf(mailf, " %9.1f  ", mb(current_tape->coutsize));
+           fprintf(mailf, " %8.0f%s  ", du(current_tape->coutsize), displayunit);
            divzero(mailf, pct(current_tape->coutsize + 
                               marksize * current_tape->tapedisks),
                           tapesize);
@@ -1011,7 +1010,6 @@ void CalcMaxWidth() {
     disk_t *dp;
     float f;
     repdata_t *repdata;
-
     for(dp = sortq.head; dp != NULL; dp = dp->next) {
       if(dp->todo) {
        for(repdata = data(dp); repdata != NULL; repdata = repdata->next) {
@@ -1025,8 +1023,8 @@ void CalcMaxWidth() {
                continue;
            CheckIntMax(&ColumnData[Level], repdata->level);
            if(repdata->dumper.result == L_SUCCESS) {
-               CheckFloatMax(&ColumnData[OrigKB], repdata->dumper.origsize);
-               CheckFloatMax(&ColumnData[OutKB], repdata->dumper.outsize);
+               CheckFloatMax(&ColumnData[OrigKB], du(repdata->dumper.origsize));
+               CheckFloatMax(&ColumnData[OutKB], du(repdata->dumper.outsize));
                if(dp->compress == COMP_NONE)
                    f = 0.0;
                else 
@@ -1128,6 +1126,16 @@ void output_summary()
            fmt= "%-*s";
        else
            fmt= "%*s";
+       if(strcmp(cd->Title,"ORIG-KB") == 0) {
+           /* cd->Title must be re-allocated in write-memory */
+           cd->Title = stralloc("ORIG-KB");
+           cd->Title[5] = displayunit[0];
+       }
+       if(strcmp(cd->Title,"OUT-KB") == 0) {
+           /* cd->Title must be re-allocated in write-memory */
+           cd->Title = stralloc("OUT-KB");
+           cd->Title[4] = displayunit[0];
+       }
        fprintf(mailf, fmt, cd->Width, cd->Title);
     }
     fputc('\n', mailf);
@@ -1174,7 +1182,6 @@ void output_summary()
              continue;
            }
            
-           cd= &ColumnData[Level];
            fprintf(mailf, "%*s", cd->PrefixSpace, "");
            fprintf(mailf, cd->Format, cd->Width, cd->Precision,repdata->level);
 
@@ -1204,14 +1211,14 @@ void output_summary()
            cd= &ColumnData[OrigKB];
            fprintf(mailf, "%*s", cd->PrefixSpace, "");
            if(origsize != 0.0)
-               fprintf(mailf, cd->Format, cd->Width, cd->Precision, origsize);
+               fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(origsize));
            else
                fprintf(mailf, "%*.*s", cd->Width, cd->Width, "N/A");
 
            cd= &ColumnData[OutKB];
            fprintf(mailf, "%*s", cd->PrefixSpace, "");
 
-           fprintf(mailf, cd->Format, cd->Width, cd->Precision, outsize);
+           fprintf(mailf, cd->Format, cd->Width, cd->Precision, du(outsize));
                
            cd= &ColumnData[Compress];
            fprintf(mailf, "%*s", cd->PrefixSpace, "");
@@ -1430,8 +1437,9 @@ void handle_finish()
 {
     char *s;
     int ch;
+    float a_time;
 
-    if(curprog == P_DRIVER || curprog == P_AMFLUSH) {
+    if(curprog == P_DRIVER || curprog == P_AMFLUSH || curprog == P_PLANNER) {
        s = curstr;
        ch = *s++;
 
@@ -1455,6 +1463,8 @@ void handle_finish()
        skip_whitespace(s, ch);
 #define sc "time"
        if(ch == '\0' || strncmp(s - 1, sc, sizeof(sc)-1) != 0) {
+           /* older planner doesn't write time */
+           if(curprog == P_PLANNER) return;
            bogus_line();
            return;
        }
@@ -1467,12 +1477,17 @@ void handle_finish()
            bogus_line();
            return;
        }
-       if(sscanf(s - 1, "%f", &total_time) != 1) {
+       if(sscanf(s - 1, "%f", &a_time) != 1) {
            bogus_line();
            return;
        }
-
-       got_finish = 1;
+       if(curprog == P_PLANNER) {
+           planner_time = a_time;
+       }
+       else {
+           total_time = a_time;
+           got_finish = 1;
+       }
     }
 }
 
@@ -1504,6 +1519,7 @@ void handle_stats()
            bogus_line();
            return;
        }
+       planner_time = startup_time;
     }
 }
 
@@ -1813,17 +1829,11 @@ repdata_t *handle_success()
 void handle_strange()
 {
     char *str = NULL;
+    char *strangestr = NULL;
     repdata_t *repdata;
 
     repdata = handle_success();
 
-    str = vstralloc("  ", prefix(repdata->disk->host->hostname, 
-                                repdata->disk->name, repdata->level),
-                   " ", "STRANGE",
-                   NULL);
-    addline(&errsum, str);
-    amfree(str);
-
     addline(&errdet,"");
     str = vstralloc("/-- ", prefix(repdata->disk->host->hostname, 
                                   repdata->disk->name, repdata->level),
@@ -1834,9 +1844,21 @@ void handle_strange()
 
     while(contline_next()) {
        get_logline(logfile);
+#define sc "sendbackup: warning "
+       if(strncmp(curstr, sc, sizeof(sc)-1) == 0) {
+           strangestr = newstralloc(strangestr, curstr+sizeof(sc)-1);
+       }
        addline(&errdet, curstr);
     }
     addline(&errdet,"\\--------");
+
+    str = vstralloc("  ", prefix(repdata->disk->host->hostname, 
+                                repdata->disk->name, repdata->level),
+                   " ", "STRANGE", " ", strangestr,
+                   NULL);
+    addline(&errsum, str);
+    amfree(str);
+    amfree(strangestr);
 }
 
 void handle_failed()
index ec84069e708fe616c67b8cf9a122ebe076171d5a..b110522b5995398aea8eecbfd5d7e20f1c855748 100644 (file)
@@ -23,7 +23,7 @@
  * Authors: the Amanda Development Team.  Its members are listed in a
  * file named AUTHORS, in the root directory of this distribution.
  */
-/* $Id: taper.c,v 1.47.2.14.4.8.2.18 2004/02/13 14:11:26 martinea Exp $
+/* $Id: taper.c,v 1.47.2.14.4.8.2.17.2.1 2004/02/13 14:09:34 martinea Exp $
  *
  * moves files from holding disk to tape, or from a socket to tape
  */
index 9c955a3b8fca234cebf10abed0d5b3f5cab15f1e..ece9686d7bc29d0a65cea3625368dc7c810363de 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: tapetype.c,v 1.3.2.3.4.3.2.9 2003/11/28 12:34:52 martinea Exp $
+ * $Id: tapetype.c,v 1.3.2.3.4.3.2.9.2.2 2004/11/10 16:28:43 martinea Exp $
  *
  * tests a tape in a given tape unit and prints a tapetype entry for
  * it.  */
@@ -146,8 +146,9 @@ void usage()
 {
   fputs("usage: ", stderr);
   fputs(sProgName, stderr);
-  fputs(" -h", stderr);
+  fputs(" [-h]", stderr);
   fputs(" [-c]", stderr);
+  fputs(" [-o]", stderr);
   fputs(" [-b blocksize]", stderr);
   fputs(" [-e estsize]", stderr);
   fputs(" [-f tapedev]", stderr);
@@ -161,6 +162,7 @@ void help()
   fputs("\
   -h                   display this message\n\
   -c                   run hardware compression detection test only\n\
+  -o                   overwrite amanda tape\n\
   -b blocksize         record block size (default: 32k)\n\
   -e estsize           estimated tape size (default: 1g == 1024m)\n\
   -f tapedev           tape device name (default: $TAPE)\n\
@@ -307,6 +309,12 @@ int main(argc, argv)
   time_t now;
   int hwcompr = 0;
   int comprtstonly = 0;
+  int overwrite_label = 0;
+  int is_labeled = 0;
+  char *result;
+  char *datestamp = NULL;
+  char *label = NULL;
+
 
   if ((sProgName = strrchr(*argv, '/')) == NULL) {
     sProgName = *argv;
@@ -318,7 +326,7 @@ int main(argc, argv)
   tapedev = getenv("TAPE");
   typename = "unknown-tapetype";
 
-  while ((ch = getopt(argc, argv, "b:e:f:t:hc")) != EOF) {
+  while ((ch = getopt(argc, argv, "b:e:f:t:hco")) != EOF) {
     switch (ch) {
     case 'b':
       blockkb = strtol(optarg, &suffix, 0);
@@ -357,6 +365,9 @@ int main(argc, argv)
       help();
       return 1;
       break;
+    case 'o':
+      overwrite_label=1;
+      break;
     default:
       fprintf(stderr, "%s: unknown option \'%c\'\n", sProgName, ch);
       /* fall through to ... */
@@ -373,6 +384,43 @@ int main(argc, argv)
     return 1;
   }
 
+/* verifier tape */
+
+
+  fd = tape_open(tapedev, O_RDONLY);
+  if (fd == -1) {
+    fprintf(stderr, "%s: could not open %s: %s\n",
+           sProgName, tapedev, strerror(errno));
+    return 1;
+  }
+
+  if((result = tapefd_rdlabel(fd, &datestamp, &label)) == NULL) {
+    is_labeled = 1;
+  }
+  else if (strcmp(result,"not an amanda tape") == 0) {
+    is_labeled = 2;
+  }
+
+  if(tapefd_rewind(fd) == -1) {
+    fprintf(stderr, "%s: could not rewind %s: %s\n",
+           sProgName, tapedev, strerror(errno));
+    tapefd_close(fd);
+    return 1;
+  }
+
+  tapefd_close(fd);
+
+  if(is_labeled == 1 && overwrite_label == 0) {
+    fprintf(stderr, "%s: The tape is an amanda tape, use -o to overwrite the tape\n",
+           sProgName);
+    return 1;
+  }
+  else if(is_labeled == 2 && overwrite_label == 0) {
+    fprintf(stderr, "%s: The tape is already used, use -o to overwrite the tape\n",
+           sProgName);
+    return 1;
+  }
+
   fd = tape_open(tapedev, O_RDWR);
   if (fd == -1) {
     fprintf(stderr, "%s: could not open %s: %s\n",