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