1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
5 <!-- entities files to use -->
6 <!ENTITY % global_entities SYSTEM 'global.entities'>
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amtoc.8'>
13 <refentrytitle>amtoc</refentrytitle>
14 <manvolnum>8</manvolnum>
20 <refname>amtoc</refname>
21 <refpurpose>generate TOC (Table Of Contents) for an Amanda run</refpurpose>
27 <!-- body begins here -->
30 <command>amtoc</command>
31 <arg choice='opt'>-a </arg>
32 <arg choice='opt'>-i </arg>
33 <arg choice='opt'>-t </arg>
34 <arg choice='opt'><arg choice='plain'>-f </arg><arg choice='plain'><replaceable>file</replaceable></arg></arg>
35 <arg choice='opt'><arg choice='plain'>-s </arg><arg choice='plain'><replaceable>subs</replaceable></arg></arg>
36 <arg choice='opt'>-w </arg>
37 <arg choice='opt'>-- </arg>
38 <arg choice='plain'><replaceable>logfile</replaceable></arg>
43 <refsect1><title>DESCRIPTION</title>
44 <para><emphasis remap='I'>Amtoc</emphasis>
45 generates a table of contents for an Amanda run.
46 It's a perl script (if you don't have perl, install it first!).</para>
49 <refsect1><title>OPTIONS</title>
50 <variablelist remap='TP'>
52 <term><option>-a</option></term>
54 <para>The output file name will be
55 <emphasis remap='I'>label-of-the-tape</emphasis>.toc
56 in the same directory as
57 <emphasis remap='I'>logfile</emphasis>.</para>
61 <term><option>-i</option></term>
63 <para>Display help about
64 <command>amtoc</command>.</para>
68 <term><option>-t</option></term>
70 <para>Generate the output in tabular form.</para>
74 <term><option>-f file</option></term>
76 <para>Write the output to a file ('-' for stdout).</para>
80 <term><option>-s subs</option></term>
82 <para>Evaluate the output file name from
83 <emphasis remap='I'>subs</emphasis>,
85 <emphasis remap='I'>label-of-the-tape</emphasis>.
88 option is equivalent to
90 <replaceable>'s/$_/.toc/'</replaceable>.</para>
94 <term><option>-w</option></term>
96 <para>Separate tapes with form-feeds and display blank lines before totals.</para>
100 <term><option>--</option></term>
102 <para>Marks the last option so the next parameter is the
103 <emphasis remap='I'>logfile</emphasis>.</para>
107 <term><emphasis remap='B'>logfile</emphasis></term>
109 <para>(use '-' for stdin)</para>
115 <refsect1><title>OUTPUT FORMAT</title>
116 <para>The standard output has five fields separated by two spaces:</para>
119 # Server:/partition date level size[Kb]
120 0 daily-05: 19991005 - -
121 1 cuisun15:/cuisun15/home 19991005 1 96
122 2 cuinfs:/export/dentiste 19991005 1 96
124 103 cuisg11:/ 19991005 0 4139136
125 103 total: - - 16716288
127 <para>In tabular format (-t), this would look like:</para>
130 # Server:/partition date lev size[Kb]
131 0 daily-05: 19991005 - -
132 1 cuisun15:/cuisun15/home 19991005 1 96
133 2 cuinfs:/export/dentiste 19991005 1 96
135 103 cuisg11:/ 19991005 0 4139136
136 103 total: - - 16716288
137 </programlisting></refsect1>
139 <refsect1><title>USAGE</title>
140 <para>The easiest way to use it is to run
141 <command>amtoc</command>
143 <emphasis remap='I'>amdump</emphasis>
145 <emphasis remap='I'>cron job:</emphasis></para>
149 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
152 <para>which will generate /usr/local/etc/amanda//daily/<emphasis remap='I'>tape_label</emphasis>.toc.
153 You may also want to call
154 <command>amtoc</command>
156 <emphasis remap='I'>amflush</emphasis>.</para>
160 <manref name="amdump" vol="8"/>,
161 <manref name="amflush" vol="8"/>,
162 <manref name="amgetconf" vol="8"/>