045ff1d9c9299a89b17d88a729a8a9b04ce2218f
[debian/amanda] / man / amtoc.8
1 .\"     Title: amtoc
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4 .\"      Date: 08/22/2008
5 .\"    Manual: 
6 .\"    Source: 
7 .\"
8 .TH "AMTOC" "8" "08/22/2008" "" ""
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 .nf
79 #  Server:/partition  date  level  size[Kb]
80 0  daily\-05:  19991005  \-  \-
81 1  cuisun15:/cuisun15/home  19991005  1  96
82 2  cuinfs:/export/dentiste  19991005  1  96
83   \.\.\.
84 103  cuisg11:/  19991005  0  4139136
85 103  total:  \-  \-  16716288
86 .fi
87 .PP
88 In tabular format (\-t), this would look like:
89 .nf
90   #  Server:/partition           date      lev  size[Kb]
91   0  daily\-05:                   19991005    \-         \-
92   1  cuisun15:/cuisun15/home     19991005    1        96
93   2  cuinfs:/export/dentiste     19991005    1        96
94   \.\.\.
95 103  cuisg11:/                   19991005    0   4139136
96 103  total:                      \-           \-  16716288
97 .fi
98 .SH "USAGE"
99 .PP
100 The easiest way to use it is to run
101 \fBamtoc\fR
102 right after
103 \fIamdump\fR
104 in the
105 \fIcron job:\fR
106 .nf
107 amdump daily ; logdir=`amgetconf daily logdir` ; log=`ls \-1t $logdir/log\.*\.[0\-9] | head \-1` ; amtoc \-a $log
108 .fi
109 .PP
110 which will generate /usr/local/etc/amanda//daily/\fItape_label\fR\.toc\. You may also want to call
111 \fBamtoc\fR
112 after an
113 \fIamflush\fR\.
114 .SH "SEE ALSO"
115 .PP
116 \fBamanda\fR(8),
117 \fBamdump\fR(8),
118 \fBamflush\fR(8),
119 \fBamgetconf\fR(8), cron, perl,
120 : http://wiki.zmanda.com
121 .SH "AUTHOR"
122 .PP
123 Nicolas Mayencourt
124 <Nicolas\.Mayencourt@cui\.unige\.ch>, University of Geneva/Switzerland : Original text
125 .PP
126 Stefan G\. Weichinger,
127 <sgw@amanda\.org>, maintainer of the
128 \fIAmanda\fR\-documentation: XML\-conversion