.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 .br University of Geneva/Switzerland