Imported Upstream version 2.5.2p1
[debian/amanda] / man / amgetconf.8
1 .\"     Title: amgetconf
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
4 .\"      Date: 06/06/2007
5 .\"    Manual: 
6 .\"    Source: 
7 .\"
8 .TH "AMGETCONF" "8" "06/06/2007" "" ""
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 amgetconf \- look up amanda.conf variables
15 .SH "SYNOPSIS"
16 .HP 10
17 \fBamgetconf\fR [\fIconfig\fR] [\fI\-\-list\fR] \fIparameter\fR [\-o\ \fIconfigoption\fR]...
18 .SH "DESCRIPTION"
19 .PP
20 \fBAmgetconf\fR
21 looks up parameters in
22 \fIamanda.conf\fR, the
23 \fIAmanda\fR
24 configuration file, or from the build and runtime environment, and returns their corresponding value.
25 .PP
26 If
27 \fIconfig\fR
28 is not specified,
29 \fBamgetconf\fR
30 assumes it is being run from the configuration directory and that
31 \fIamanda.conf\fR
32 is present.
33 .PP
34 If
35 \fIparameter\fR
36 begins with
37 \fIbuild.\fR, the (case insensitive) string following the period is a build environment variable. Variables without a value (e.g.
38 \fIXFSDUMP\fR
39 on a system that does not support that type of file system) will not report an error and will return an empty string as the value. Flag variables (e.g.
40 \fIUSE_AMANDAHOSTS\fR) will return
41 1
42 if the flag is set or an empty string if it is not.
43 .PP
44 If
45 \fIparameter\fR
46 begins with
47 \fIdbopen.\fR, the string following the period is a program name and an
48 \fIAmanda\fR
49 debug file will be created for the caller. The name of the file is returned.
50 .PP
51 If
52 \fIparameter\fR
53 begins with
54 \fIdbclose.\fR, the string following the period is a program name previously used with
55 \fIdbopen.\fR, followed by a colon (:) and the previously opened file name.
56 .PP
57 See the
58 \fBamanda\fR(8)
59 man page for more details about
60 \fIAmanda\fR.
61 .SH "OPTIONS"
62 .PP
63 \fB\-\-list\fR
64 .RS 4
65 The parameter must be 'tapetype', 'dumptype, 'holdingdisk' or 'interface'. It will output, one by line, the list of identifier for the parameter.
66 .RS 4
67 .PP
68 \-\-list tapetype
69 .RS 4
70 Output the list of tapetype, one by line.
71 .RE
72 .PP
73 \-\-list dumptype
74 .RS 4
75 Output the list of dumptype, one by line.
76 .RE
77 .PP
78 \-\-list holdingdisk
79 .RS 4
80 Output the list of holdingdisk, one by line.
81 .RE
82 .PP
83 \-\-list interface
84 .RS 4
85 Output the list of interface, one by line.
86 .RE
87 .RE
88 .RE
89 .PP
90 \fBparameter\fR
91 .RS 4
92 It could be one of the below format:
93 .RS 4
94 .PP
95 runtapes
96 .RS 4
97 .RE
98 .PP
99 DUMPTYPE:no\-compress:compress
100 .RS 4
101 .RE
102 .PP
103 TAPETYPE:HP\-DAT:length
104 .RS 4
105 .RE
106 .PP
107 INTERFACE:local:use
108 .RS 4
109 .RE
110 .PP
111 HOLDINGDISK:hd1:use
112 .RS 4
113 .RE
114 .RE
115 .RE
116 .PP
117 \fB\-o\fR \fIconfigoption\fR
118 .RS 4
119 See the "\fBCONFIGURATION OVERRIDE\fR" section in
120 \fBamanda\fR(8).
121 .RE
122 .SH "EXAMPLE"
123 .PP
124 Find out the path to the log file directory:
125 .sp
126 .RS 4
127 .nf
128 % amgetconf daily logdir
129 /usr/local/etc/amanda//daily
130 .fi
131 .RE
132 .sp
133 .PP
134 Find out the current tape type:
135 .sp
136 .RS 4
137 .nf
138 % amgetconf daily tapetype
139 DLT4000\-IV
140 .fi
141 .RE
142 .sp
143 .PP
144 Find out the default configuration directory:
145 .sp
146 .RS 4
147 .nf
148 % amgetconf daily build.CONFIG_DIR
149 /usr/local/etc/amanda/
150 .fi
151 .RE
152 .sp
153 .PP
154 Create, use and close a debug file in a script:
155 .sp
156 .RS 4
157 .nf
158 % set debug_file = `amgetconf daily dbopen.myscript`
159 % echo debug information >> $debug_file
160 % amgetconf daily dbclose.myscript:$debug_file
161 .fi
162 .RE
163 .sp
164 .SH "MESSAGES"
165 .PP
166 amgetconf: no such parameter \fIparam\fR
167 .RS 4
168 Parameter
169 \fIparam\fR
170 is not a known keyword (e.g. not a valid
171 \fIamanda.conf\fR
172 keyword).
173 .RE
174 .SH "SEE ALSO"
175 .PP
176 \fBamanda\fR(8)