303bc23a46676e9024102e22844ccaf9da7f1360
[debian/amanda] / man / xml-source / amtoc.8.xml
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"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amtoc.8'>
12 <refmeta>
13 <refentrytitle>amtoc</refentrytitle>
14 <manvolnum>8</manvolnum>
15 &rmi.source;
16 &rmi.version;
17 &rmi.manual.8;
18 </refmeta>
19 <refnamediv>
20 <refname>amtoc</refname>
21 <refpurpose>generate TOC (Table Of Contents) for an &A; run</refpurpose>
22 </refnamediv>
23 <refentryinfo>
24 &author.nm;
25 &author.sgw.xml;
26 </refentryinfo>
27 <!-- body begins here -->
28 <refsynopsisdiv>
29 <cmdsynopsis>
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>
39 </cmdsynopsis>
40 </refsynopsisdiv>
41
42
43 <refsect1><title>DESCRIPTION</title>
44 <para><emphasis remap='I'>Amtoc</emphasis>
45 generates a table of contents for an &A; run.
46 It's a perl script (if you don't have perl, install it first!).</para>
47 </refsect1>
48
49 <refsect1><title>OPTIONS</title>
50 <variablelist remap='TP'>
51   <varlistentry>
52   <term><option>-a</option></term>
53   <listitem>
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>
58   </listitem>
59   </varlistentry>
60   <varlistentry>
61   <term><option>-i</option></term>
62   <listitem>
63 <para>Display help about
64 <command>amtoc</command>.</para>
65   </listitem>
66   </varlistentry>
67   <varlistentry>
68   <term><option>-t</option></term>
69   <listitem>
70 <para>Generate the output in tabular form.</para>
71   </listitem>
72   </varlistentry>
73   <varlistentry>
74   <term><option>-f file</option></term>
75   <listitem>
76 <para>Write the output to a file ('-' for stdout).</para>
77   </listitem>
78   </varlistentry>
79   <varlistentry>
80   <term><option>-s subs</option></term>
81   <listitem>
82 <para>Evaluate the output file name from
83 <emphasis remap='I'>subs</emphasis>,
84 with $_ set to
85 <emphasis remap='I'>label-of-the-tape</emphasis>.
86 The
87 <option>-a</option>
88 option is equivalent to
89 <option>-s</option>
90 <replaceable>'s/$_/.toc/'</replaceable>.</para>
91   </listitem>
92   </varlistentry>
93   <varlistentry>
94   <term><option>-w</option></term>
95   <listitem>
96 <para>Separate tapes with form-feeds and display blank lines before totals.</para>
97   </listitem>
98   </varlistentry>
99   <varlistentry>
100   <term><option>--</option></term>
101   <listitem>
102 <para>Marks the last option so the next parameter is the
103 <emphasis remap='I'>logfile</emphasis>.</para>
104   </listitem>
105   </varlistentry>
106   <varlistentry>
107   <term><emphasis remap='B'>logfile</emphasis></term>
108   <listitem>
109 <para>(use '-' for stdin)</para>
110   </listitem>
111   </varlistentry>
112 </variablelist>
113 </refsect1>
114
115 <refsect1><title>OUTPUT FORMAT</title>
116 <para>The standard output has five fields separated by two spaces:</para>
117
118 <programlisting>
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
123   ...
124 103  cuisg11:/  19991005  0  4139136
125 103  total:  -  -  16716288
126 </programlisting>
127 <para>In tabular format (-t), this would look like:</para>
128
129 <programlisting>
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
134   ...
135 103  cuisg11:/                   19991005    0   4139136
136 103  total:                      -           -  16716288
137 </programlisting></refsect1>
138
139 <refsect1><title>USAGE</title>
140 <para>The easiest way to use it is to run
141 <command>amtoc</command>
142 right after
143 <emphasis remap='I'>amdump</emphasis>
144 in the
145 <emphasis remap='I'>cron job:</emphasis></para>
146
147 <!-- .RS -->
148 <programlisting>
149 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
150 </programlisting>
151
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>
155 after an
156 <emphasis remap='I'>amflush</emphasis>.</para>
157 </refsect1>
158
159 <refsect1><title>SEE ALSO</title>
160 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
161 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
162 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
163 <citerefentry><refentrytitle>amgetconf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
164 cron,
165 perl,
166 <ulink url="http://wiki.zmanda.com"/>
167 </para>
168 </refsect1>
169
170 </refentry>
171