File: amtoc.8.xml

package info (click to toggle)
amanda 1%3A3.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,596 kB
  • sloc: ansic: 265,630; perl: 114,246; xml: 16,058; sh: 8,667; makefile: 2,794; awk: 502; lex: 407; yacc: 347; tcl: 118; sql: 19; sed: 16; php: 2
file content (167 lines) | stat: -rw-r--r-- 4,728 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
[
  <!-- entities files to use -->
  <!ENTITY % global_entities SYSTEM 'global.entities'>
  %global_entities;
]>

<!-- lifted from troff+man by doclifter -->
<refentry id='amtoc.8'>
<refmeta>
<refentrytitle>amtoc</refentrytitle>
<manvolnum>8</manvolnum>
&rmi.source;
&rmi.version;
&rmi.manual.8;
</refmeta>
<refnamediv>
<refname>amtoc</refname>
<refpurpose>generate TOC (Table Of Contents) for an Amanda run</refpurpose>
</refnamediv>
<refentryinfo>
&author.nm;
&author.sgw.xml;
</refentryinfo>
<!-- body begins here -->
<refsynopsisdiv>
<cmdsynopsis>
  <command>amtoc</command>    
    <arg choice='opt'>-a </arg>
    <arg choice='opt'>-i </arg>
    <arg choice='opt'>-t </arg>
    <arg choice='opt'><arg choice='plain'>-f </arg><arg choice='plain'><replaceable>file</replaceable></arg></arg>
    <arg choice='opt'><arg choice='plain'>-s </arg><arg choice='plain'><replaceable>subs</replaceable></arg></arg>
    <arg choice='opt'>-w </arg>
    <arg choice='opt'>-- </arg>
    <arg choice='plain'><replaceable>logfile</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1><title>DESCRIPTION</title>
<para><emphasis remap='I'>Amtoc</emphasis>
generates a table of contents for an Amanda run.
It's a perl script (if you don't have perl, install it first!).</para>
</refsect1>

<refsect1><title>OPTIONS</title>
<variablelist remap='TP'>
  <varlistentry>
  <term><option>-a</option></term>
  <listitem>
<para>The output file name will be
<emphasis remap='I'>label-of-the-tape</emphasis>.toc
in the same directory as
<emphasis remap='I'>logfile</emphasis>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-i</option></term>
  <listitem>
<para>Display help about
<command>amtoc</command>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-t</option></term>
  <listitem>
<para>Generate the output in tabular form.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-f file</option></term>
  <listitem>
<para>Write the output to a file ('-' for stdout).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-s subs</option></term>
  <listitem>
<para>Evaluate the output file name from
<emphasis remap='I'>subs</emphasis>,
with $_ set to
<emphasis remap='I'>label-of-the-tape</emphasis>.
The
<option>-a</option>
option is equivalent to
<option>-s</option>
<replaceable>'s/$_/.toc/'</replaceable>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-w</option></term>
  <listitem>
<para>Separate tapes with form-feeds and display blank lines before totals.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>--</option></term>
  <listitem>
<para>Marks the last option so the next parameter is the
<emphasis remap='I'>logfile</emphasis>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='B'>logfile</emphasis></term>
  <listitem>
<para>(use '-' for stdin)</para>
  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1><title>OUTPUT FORMAT</title>
<para>The standard output has five fields separated by two spaces:</para>

<programlisting>
#  Server:/partition  date  level  size[Kb]
0  daily-05:  19991005  -  -
1  cuisun15:/cuisun15/home  19991005  1  96
2  cuinfs:/export/dentiste  19991005  1  96
  ...
103  cuisg11:/  19991005  0  4139136
103  total:  -  -  16716288
</programlisting>
<para>In tabular format (-t), this would look like:</para>

<programlisting>
  #  Server:/partition           date      lev  size[Kb]
  0  daily-05:                   19991005    -         -
  1  cuisun15:/cuisun15/home     19991005    1        96
  2  cuinfs:/export/dentiste     19991005    1        96
  ...
103  cuisg11:/                   19991005    0   4139136
103  total:                      -           -  16716288
</programlisting></refsect1>

<refsect1><title>USAGE</title>
<para>The easiest way to use it is to run
<command>amtoc</command>
right after
<emphasis remap='I'>amdump</emphasis>
in the
<emphasis remap='I'>cron job:</emphasis></para>

<!-- .RS -->
<programlisting>
amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
</programlisting>

<para>which will generate /usr/local/etc/amanda//daily/<emphasis remap='I'>tape_label</emphasis>.toc.
You may also want to call
<command>amtoc</command>
after an
<emphasis remap='I'>amflush</emphasis>.</para>
</refsect1>

<seealso>
<manref name="amdump" vol="8"/>,
<manref name="amflush" vol="8"/>,
<manref name="amgetconf" vol="8"/>
</seealso>


</refentry>