8b8a291331e1b814864a744747727ab047c50fca
[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: 11/05/2009
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 2.6.1p2
8 .\"  Language: English
9 .\"
10 .TH "AMTOC" "8" "11/05/2009" "Amanda 2\&.6\&.1p2" "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 \fIAmanda\fR 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
30 \fIAmanda\fR
31 run\&. It\'s a perl script (if you don\'t have perl, install it first!)\&.
32 .SH "OPTIONS"
33 .PP
34 \fB\-a\fR
35 .RS 4
36 The output file name will be
37 \fIlabel\-of\-the\-tape\fR\&.toc in the same directory as
38 \fIlogfile\fR\&.
39 .RE
40 .PP
41 \fB\-i\fR
42 .RS 4
43 Display help about
44 \fBamtoc\fR\&.
45 .RE
46 .PP
47 \fB\-t\fR
48 .RS 4
49 Generate the output in tabular form\&.
50 .RE
51 .PP
52 \fB\-f file\fR
53 .RS 4
54 Write the output to a file (\'\-\' for stdout)\&.
55 .RE
56 .PP
57 \fB\-s subs\fR
58 .RS 4
59 Evaluate the output file name from
60 \fIsubs\fR, with $_ set to
61 \fIlabel\-of\-the\-tape\fR\&. The
62 \fB\-a\fR
63 option is equivalent to
64 \fB\-s\fR
65 \fI\'s/$_/\&.toc/\'\fR\&.
66 .RE
67 .PP
68 \fB\-w\fR
69 .RS 4
70 Separate tapes with form\-feeds and display blank lines before totals\&.
71 .RE
72 .PP
73 \fB\-\-\fR
74 .RS 4
75 Marks the last option so the next parameter is the
76 \fIlogfile\fR\&.
77 .RE
78 .PP
79 \fBlogfile\fR
80 .RS 4
81 (use \'\-\' for stdin)
82 .RE
83 .SH "OUTPUT FORMAT"
84 .PP
85 The standard output has five fields separated by two spaces:
86 .nf
87 #  Server:/partition  date  level  size[Kb]
88 0  daily\-05:  19991005  \-  \-
89 1  cuisun15:/cuisun15/home  19991005  1  96
90 2  cuinfs:/export/dentiste  19991005  1  96
91   \&.\&.\&.
92 103  cuisg11:/  19991005  0  4139136
93 103  total:  \-  \-  16716288
94 .fi
95 .PP
96 In tabular format (\-t), this would look like:
97 .nf
98   #  Server:/partition           date      lev  size[Kb]
99   0  daily\-05:                   19991005    \-         \-
100   1  cuisun15:/cuisun15/home     19991005    1        96
101   2  cuinfs:/export/dentiste     19991005    1        96
102   \&.\&.\&.
103 103  cuisg11:/                   19991005    0   4139136
104 103  total:                      \-           \-  16716288
105 .fi
106 .SH "USAGE"
107 .PP
108 The easiest way to use it is to run
109 \fBamtoc\fR
110 right after
111 \fIamdump\fR
112 in the
113 \fIcron job:\fR
114 .nf
115 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log\&.*\&.[0\-9] | head \-1` ; amtoc \-a $log
116 .fi
117 .PP
118 which will generate /usr/local/etc/amanda//daily/\fItape_label\fR\&.toc\&. You may also want to call
119 \fBamtoc\fR
120 after an
121 \fIamflush\fR\&.
122 .SH "SEE ALSO"
123 .PP
124 \fBamanda\fR(8),
125 \fBamdump\fR(8),
126 \fBamflush\fR(8),
127 \fBamgetconf\fR(8), cron, perl,
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\&>