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