Imported Upstream version 2.6.0p2
[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 </refmeta>
16 <refnamediv>
17 <refname>amtoc</refname>
18 <refpurpose>generate TOC (Table Of Contents) for an &A; run</refpurpose>
19 </refnamediv>
20 <!-- body begins here -->
21 <refsynopsisdiv>
22 <cmdsynopsis>
23   <command>amtoc</command>    
24     <arg choice='opt'>-a </arg>
25     <arg choice='opt'>-i </arg>
26     <arg choice='opt'>-t </arg>
27     <arg choice='opt'><arg choice='plain'>-f </arg><arg choice='plain'><replaceable>file</replaceable></arg></arg>
28     <arg choice='opt'><arg choice='plain'>-s </arg><arg choice='plain'><replaceable>subs</replaceable></arg></arg>
29     <arg choice='opt'>-w </arg>
30     <arg choice='opt'>-- </arg>
31     <arg choice='plain'><replaceable>logfile</replaceable></arg>
32 </cmdsynopsis>
33 </refsynopsisdiv>
34
35
36 <refsect1><title>DESCRIPTION</title>
37 <para><emphasis remap='I'>Amtoc</emphasis>
38 generates a table of contents for an &A; run.
39 It's a perl script (if you don't have perl, install it first!).</para>
40 </refsect1>
41
42 <refsect1><title>OPTIONS</title>
43 <variablelist remap='TP'>
44   <varlistentry>
45   <term><option>-a</option></term>
46   <listitem>
47 <para>The output file name will be
48 <emphasis remap='I'>label-of-the-tape</emphasis>.toc
49 in the same directory as
50 <emphasis remap='I'>logfile</emphasis>.</para>
51   </listitem>
52   </varlistentry>
53   <varlistentry>
54   <term><option>-i</option></term>
55   <listitem>
56 <para>Display help about
57 <command>amtoc</command>.</para>
58   </listitem>
59   </varlistentry>
60   <varlistentry>
61   <term><option>-t</option></term>
62   <listitem>
63 <para>Generate the output in tabular form.</para>
64   </listitem>
65   </varlistentry>
66   <varlistentry>
67   <term><option>-f file</option></term>
68   <listitem>
69 <para>Write the output to a file ('-' for stdout).</para>
70   </listitem>
71   </varlistentry>
72   <varlistentry>
73   <term><option>-s subs</option></term>
74   <listitem>
75 <para>Evaluate the output file name from
76 <emphasis remap='I'>subs</emphasis>,
77 with $_ set to
78 <emphasis remap='I'>label-of-the-tape</emphasis>.
79 The
80 <option>-a</option>
81 option is equivalent to
82 <option>-s</option>
83 <replaceable>'s/$_/.toc/'</replaceable>.</para>
84   </listitem>
85   </varlistentry>
86   <varlistentry>
87   <term><option>-w</option></term>
88   <listitem>
89 <para>Separate tapes with form-feeds and display blank lines before totals.</para>
90   </listitem>
91   </varlistentry>
92   <varlistentry>
93   <term><option>--</option></term>
94   <listitem>
95 <para>Marks the last option so the next parameter is the
96 <emphasis remap='I'>logfile</emphasis>.</para>
97   </listitem>
98   </varlistentry>
99   <varlistentry>
100   <term><emphasis remap='B'>logfile</emphasis></term>
101   <listitem>
102 <para>(use '-' for stdin)</para>
103   </listitem>
104   </varlistentry>
105 </variablelist>
106 </refsect1>
107
108 <refsect1><title>OUTPUT FORMAT</title>
109 <para>The standard output has five fields separated by two spaces:</para>
110
111 <programlisting>
112 #  Server:/partition  date  level  size[Kb]
113 0  daily-05:  19991005  -  -
114 1  cuisun15:/cuisun15/home  19991005  1  96
115 2  cuinfs:/export/dentiste  19991005  1  96
116   ...
117 103  cuisg11:/  19991005  0  4139136
118 103  total:  -  -  16716288
119 </programlisting>
120 <para>In tabular format (-t), this would look like:</para>
121
122 <programlisting>
123   #  Server:/partition           date      lev  size[Kb]
124   0  daily-05:                   19991005    -         -
125   1  cuisun15:/cuisun15/home     19991005    1        96
126   2  cuinfs:/export/dentiste     19991005    1        96
127   ...
128 103  cuisg11:/                   19991005    0   4139136
129 103  total:                      -           -  16716288
130 </programlisting></refsect1>
131
132 <refsect1><title>USAGE</title>
133 <para>The easiest way to use it is to run
134 <command>amtoc</command>
135 right after
136 <emphasis remap='I'>amdump</emphasis>
137 in the
138 <emphasis remap='I'>cron job:</emphasis></para>
139
140 <!-- .RS -->
141 <programlisting>
142 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
143 </programlisting>
144
145 <para>which will generate /usr/local/etc/amanda//daily/<emphasis remap='I'>tape_label</emphasis>.toc.
146 You may also want to call
147 <command>amtoc</command>
148 after an
149 <emphasis remap='I'>amflush</emphasis>.</para>
150 </refsect1>
151
152 <refsect1><title>SEE ALSO</title>
153 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>amgetconf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
157 cron,
158 perl,
159 <ulink url="http://wiki.zmanda.com"/>
160 </para>
161 </refsect1>
162
163 <refsect1><title>AUTHOR</title>
164 <para>Nicolas Mayencourt <email>Nicolas.Mayencourt@cui.unige.ch</email>, University of Geneva/Switzerland : Original text</para>
165 <para>&maintainer.sgw;: XML-conversion</para>
166 </refsect1>
167 </refentry>
168