Imported Upstream version 2.4.4p3
[debian/amanda] / man / amtoc.8.in
1 .TH AMTOC 8 
2 .de CP
3 .ie '\\$3'' \\fB\\$1\\fP \\fI\\$2\\fP
4 .el .ie '\\$2'' \\fB\\$1\\fP [ \\fI\\$3\\fP ]
5 .el \\fB\\$1\\fP \\fI\\$2\\fP [ \\fI\\$3\\fP ]
6 ..
7 .SH NAME 
8 amtoc \- generate TOC (Table Of Contents) for an Amanda run
9 .SH SYNOPSIS
10 .B
11 .I amtoc
12 [
13 .B \-a
14 ] [
15 .B \-i
16 ] [
17 .B \-t
18 ] [
19 .B \-f
20 .I file
21 ] [
22 .B \-s
23 .I subs
24 ] [
25 .B \-w
26 ] [
27 .B \--
28 ]
29 .I logfile
30 .SH DESCRIPTION
31 .I Amtoc 
32 generates a table of contents for an Amanda run.
33 It's a perl script (if you don't have perl, install it first!).
34 .SH OPTIONS
35 .TP
36 .B \-a
37 The output file name will be
38 .IR label-of-the-tape .toc
39 in the same directory as
40 .IR logfile .
41 .TP
42 .B \-i
43 Display help about
44 .BR amtoc .
45 .TP
46 .B \-t
47 Generate the output in tabular form.
48 .TP
49 .B \-f file
50 Write the output to a file ('-' for stdout).
51 .TP 
52 .B \-s subs
53 Evaluate the output file name from
54 .IR subs ,
55 with $_ set to
56 .IR label-of-the-tape .
57 The
58 .B -a
59 option is equivalent to
60 .B -s
61 .IR 's/$_/.toc/' .
62 .TP
63 .B \-w
64 Separate tapes with form-feeds and display blank lines before totals.
65 .TP
66 .B \-\-
67 Marks the last option so the next parameter is the
68 .IR logfile .
69 .TP
70 .B logfile
71 (use '-' for stdin)
72 .SH OUTPUT FORMAT
73 The standard output has five fields separated by two spaces:
74 .LP
75 .RS
76 .nf
77 #  Server:/partition  date  level  size[Kb]
78 0  daily-05:  19991005  -  -
79 1  cuisun15:/cuisun15/home  19991005  1  96
80 2  cuinfs:/export/dentiste  19991005  1  96
81   ...
82 103  cuisg11:/  19991005  0  4139136
83 103  total:  -  -  16716288
84 .RE
85 .LP
86 In tabular format (-t), this would look like:
87 .LP
88 .RS
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 .RE
98 .SH USAGE
99 The easiest way to use it is to run
100 .I amtoc
101 right after
102 .I amdump
103 in the
104 .I
105 cron job:
106 .LP
107 .RS  
108 .nf
109 amdump @DEFAULT_CONFIG@ ; logdir=`amgetconf @DEFAULT_CONFIG@ logdir` ; log=`ls -1t $logdir/log.*.[0-9] | head -1` ; amtoc -a $log
110 .fi
111 .RE  
112 .LP
113 which will generate @CONFIG_DIR@/@DEFAULT_CONFIG@/\fItape_label\fR.toc.
114 You may also want to call
115 .I amtoc
116 after an
117 .IR amflush .
118 .SH SEE ALSO
119 amanda(8),
120 amdump(8),
121 amflush(8),
122 amgetconf(8),
123 cron,
124 perl
125 .SH AUTHOR
126 Nicolas MAYENCOURT <Nicolas.Mayencourt@cui.unige.ch>
127 .br
128 University of Geneva/Switzerland