Imported Upstream version 2.6.0p1
[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 <!-- .RS -->
112 <literallayout remap='.nf'>
113 #  Server:/partition  date  level  size[Kb]
114 0  daily-05:  19991005  -  -
115 1  cuisun15:/cuisun15/home  19991005  1  96
116 2  cuinfs:/export/dentiste  19991005  1  96
117   ...
118 103  cuisg11:/  19991005  0  4139136
119 103  total:  -  -  16716288
120 <!-- .RE -->
121
122 </literallayout><para>In tabular format (-t), this would look like:</para>
123
124 <!-- .RS -->
125 <literallayout remap='.nf'>
126   #  Server:/partition           date      lev  size[Kb]
127   0  daily-05:                   19991005    -         -
128   1  cuisun15:/cuisun15/home     19991005    1        96
129   2  cuinfs:/export/dentiste     19991005    1        96
130   ...
131 103  cuisg11:/                   19991005    0   4139136
132 103  total:                      -           -  16716288
133 <!-- .RE -->
134 </literallayout></refsect1>
135
136 <refsect1><title>USAGE</title>
137 <para>The easiest way to use it is to run
138 <command>amtoc</command>
139 right after
140 <emphasis remap='I'>amdump</emphasis>
141 in the
142 <emphasis remap='I'>cron job:</emphasis></para>
143
144 <!-- .RS -->
145 <literallayout remap='.nf'>
146 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
147 </literallayout> <!-- .fi -->
148
149 <para>which will generate /usr/local/etc/amanda//daily/<emphasis remap='I'>tape_label</emphasis>.toc.
150 You may also want to call
151 <command>amtoc</command>
152 after an
153 <emphasis remap='I'>amflush</emphasis>.</para>
154 </refsect1>
155
156 <refsect1><title>SEE ALSO</title>
157 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
159 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
160 <citerefentry><refentrytitle>amgetconf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
161 cron,
162 perl,
163 <ulink url="http://wiki.zmanda.com"/>
164 </para>
165 </refsect1>
166
167 <refsect1><title>AUTHOR</title>
168 <para>Nicolas Mayencourt <email>Nicolas.Mayencourt@cui.unige.ch</email>, University of Geneva/Switzerland : Original text</para>
169 <para>&maintainer.sgw;: XML-conversion</para>
170 </refsect1>
171 </refentry>
172