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