3 Prev Chapter 36. The Amanda Manual Pages. Next
5 -------------------------------------------------------------------------------
9 amtoc
\14 generate TOC (Table Of Contents) for an Amanda run
13 amtoc [-a ] [-i ] [-t ] [ -f file ] [ -s subs ] [-w ] [-- ] logfile
17 Amtoc generates a table of contents for an Amanda run. It's a perl script (if
18 you don't have perl, install it first!).
25 The output file name will be label-of-the-tape.toc in the same directory
29 Display help about amtoc.
32 Generate the output in tabular form.
35 Write the output to a file ('-' for stdout).
38 Evaluate the output file name from subs, with $_ set to label-of-the-
39 tape. The -a option is equivalent to -s 's/$_/.toc/'.
42 Separate tapes with form-feeds and display blank lines before totals.
45 Marks the last option so the next parameter is the logfile.
53 The standard output has five fields separated by two spaces:
55 # Server:/partition date level size[Kb]
56 0 daily-05: 19991005 - -
57 1 cuisun15:/cuisun15/home 19991005 1 96
58 2 cuinfs:/export/dentiste 19991005 1 96
60 103 cuisg11:/ 19991005 0 4139136
61 103 total: - - 16716288
64 In tabular format (-t), this would look like:
66 # Server:/partition date lev size[Kb]
67 0 daily-05: 19991005 - -
68 1 cuisun15:/cuisun15/home 19991005 1 96
69 2 cuinfs:/export/dentiste 19991005 1 96
71 103 cuisg11:/ 19991005 0 4139136
72 103 total: - - 16716288
77 The easiest way to use it is to run amtoc right after amdump in the cron job:
79 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-
80 9] | head -1` ; amtoc -a $log
81 which will generate /usr/local/etc/amanda//daily/tape_label.toc. You may also
82 want to call amtoc after an amflush.
86 amanda(8), amdump(8), amflush(8), amgetconf(8), cron, perl
90 Nicolas Mayencourt <Nicolas.Mayencourt@cui.unige.ch>, University of Geneva/
91 Switzerland : Original text
92 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
94 -------------------------------------------------------------------------------
97 amtapetype Home amverify