fb387e9b8ce55206203ddec7e324de50dae26736
[debian/amanda] / man / amtoc.8
1 .\"     Title: amtoc
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
4 .\"      Date: 02/07/2007
5 .\"    Manual: 
6 .\"    Source: 
7 .\"
8 .TH "AMTOC" "8" "02/07/2007" "" ""
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 amtoc \- generate TOC (Table Of Contents) for an Amanda run
15 .SH "SYNOPSIS"
16 .HP 6
17 \fBamtoc\fR [\-a] [\-i] [\-t] [\-f\ \fIfile\fR] [\-s\ \fIsubs\fR] [\-w] [\-\-] \fIlogfile\fR
18 .SH "DESCRIPTION"
19 .PP
20 \fIAmtoc\fR
21 generates a table of contents for an
22 \fIAmanda\fR
23 run. It's a perl script (if you don't have perl, install it first!).
24 .SH "OPTIONS"
25 .PP
26 \fB\-a\fR
27 .RS 4
28 The output file name will be
29 \fIlabel\-of\-the\-tape\fR.toc in the same directory as
30 \fIlogfile\fR.
31 .RE
32 .PP
33 \fB\-i\fR
34 .RS 4
35 Display help about
36 \fBamtoc\fR.
37 .RE
38 .PP
39 \fB\-t\fR
40 .RS 4
41 Generate the output in tabular form.
42 .RE
43 .PP
44 \fB\-f file\fR
45 .RS 4
46 Write the output to a file ('\-' for stdout).
47 .RE
48 .PP
49 \fB\-s subs\fR
50 .RS 4
51 Evaluate the output file name from
52 \fIsubs\fR, with $_ set to
53 \fIlabel\-of\-the\-tape\fR. The
54 \fB\-a\fR
55 option is equivalent to
56 \fB\-s\fR
57 \fI's/$_/.toc/'\fR.
58 .RE
59 .PP
60 \fB\-w\fR
61 .RS 4
62 Separate tapes with form\-feeds and display blank lines before totals.
63 .RE
64 .PP
65 \fB\-\-\fR
66 .RS 4
67 Marks the last option so the next parameter is the
68 \fIlogfile\fR.
69 .RE
70 .PP
71 \fBlogfile\fR
72 .RS 4
73 (use '\-' for stdin)
74 .RE
75 .SH "OUTPUT FORMAT"
76 .PP
77 The standard output has five fields separated by two spaces:
78 .sp
79 .RS 4
80 .nf
81 #  Server:/partition  date  level  size[Kb]
82 0  daily\-05:  19991005  \-  \-
83 1  cuisun15:/cuisun15/home  19991005  1  96
84 2  cuinfs:/export/dentiste  19991005  1  96
85   ...
86 103  cuisg11:/  19991005  0  4139136
87 103  total:  \-  \-  16716288
88
89
90 .fi
91 .RE
92 .PP
93 In tabular format (\-t), this would look like:
94 .sp
95 .RS 4
96 .nf
97   #  Server:/partition           date      lev  size[Kb]
98   0  daily\-05:                   19991005    \-         \-
99   1  cuisun15:/cuisun15/home     19991005    1        96
100   2  cuinfs:/export/dentiste     19991005    1        96
101   ...
102 103  cuisg11:/                   19991005    0   4139136
103 103  total:                      \-           \-  16716288
104
105 .fi
106 .RE
107 .SH "USAGE"
108 .PP
109 The easiest way to use it is to run
110 \fBamtoc\fR
111 right after
112 \fIamdump\fR
113 in the
114 \fIcron job:\fR
115 .sp
116 .RS 4
117 .nf
118 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log.*.[0\-9] | head \-1` ; amtoc \-a $log
119 .fi
120 .RE
121 .sp
122 .PP
123 which will generate /usr/local/etc/amanda//daily/\fItape_label\fR.toc. You may also want to call
124 \fBamtoc\fR
125 after an
126 \fIamflush\fR.
127 .SH "SEE ALSO"
128 .PP
129 \fBamanda\fR(8),
130 \fBamdump\fR(8),
131 \fBamflush\fR(8),
132 \fBamgetconf\fR(8), cron, perl
133 .SH "AUTHOR"
134 .PP
135 Nicolas Mayencourt
136 <Nicolas.Mayencourt@cui.unige.ch>, University of Geneva/Switzerland : Original text
137 .PP
138 Stefan G. Weichinger,
139 <sgw@amanda.org>, maintainer of the
140 \fIAmanda\fR\-documentation: XML\-conversion