5be005a1054a87833e177b1c785ed2b180aa2400
[debian/amanda] / man / xml-source / amgetconf.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4 [
5   <!-- entities files to use -->
6   <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amgetconf.8'>
12
13 <refmeta>
14 <refentrytitle>amgetconf</refentrytitle>
15 <manvolnum>8</manvolnum>
16 &rmi.source;
17 &rmi.version;
18 &rmi.manual.8;
19 </refmeta>
20 <refnamediv>
21 <refname>amgetconf</refname>
22 <refpurpose>look up configuration parameters and manipulate debug logs</refpurpose>
23 </refnamediv>
24 <refentryinfo>
25 &author.jlm;
26 </refentryinfo>
27 <!-- body begins here -->
28 <refsynopsisdiv>
29 <cmdsynopsis>
30   <command>amgetconf</command>    
31     <arg choice='opt'><replaceable>-l|--list</replaceable></arg>
32     <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
33     <arg choice='opt'><replaceable>--client</replaceable></arg>
34     <arg choice='opt'><replaceable>--execute-where client|server</replaceable></arg>
35     <arg choice='opt'><replaceable>config</replaceable></arg>
36     <arg choice='plain'><replaceable>parameter</replaceable></arg>
37 </cmdsynopsis>
38 </refsynopsisdiv>
39
40 <refsect1><title>DESCRIPTION</title>
41
42 <para><emphasis remap='B'>Amgetconf</emphasis> has three main jobs:
43 <!-- itemizedlist doesn't work in translation to a manpage.. --> to
44 fetch configuration information from the Amanda configuration; to fetch
45 build-time configuration values; and to open and close debug logs for
46 shell scripts.  Each is treated in its own subsection, below.</para>
47
48 <para>If <emphasis remap='I'>config</emphasis> is not
49 specified, <command>amgetconf</command> assumes it is
50 being run from the configuration directory and that <emphasis
51 remap='I'>amanda.conf</emphasis> is present. The order of options and
52 arguments does not matter.  <emphasis remap='I'>parameter</emphasis>
53 is always case-insensitive, and '-' and '_' are treated as identical, just
54 as in <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
55
56 <para>See the "<emphasis
57 remap='B'>CONFIGURATION OVERRIDE</emphasis>" section in
58 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
59 for information on the <literal>-o</literal> option.</para>
60
61 <refsect2><title>AMANDA CONFIGURATION</title>
62
63 <para>If <emphasis remap='I'>parameter</emphasis> is a configuration
64 keyword (from <citerefentry> <refentrytitle>amanda.conf</refentrytitle>
65 <manvolnum>5</manvolnum> </citerefentry>), then amgetconf will return
66 the corresponding value.  For keywords which can take multiple values,
67 amgetconf will return all values, one on each line.</para>
68
69 <para>Values in configuration subsections are specified with
70 parameters of the form <literal>TYPE:NAME:PARAMETER</literal>,
71 where <literal>TYPE</literal> is the subsection type (one
72 of <literal>dumptype</literal>, <literal>tapetype</literal>,
73 <literal>interface</literal>, <literal>holdingdisk</literal>,
74 <literal>application-tool</literal>, or <literal>script-tool</literal>;
75 <literal>NAME</literal> is the name of the subsection (e.g.,
76 <literal>user-tar</literal>), and <literal>PARAMETER</literal> is
77 the name of the disired parameter within that subsection.</para>
78
79 <para>The <literal>--list</literal> option lists the subsections of
80 a certain type, where the type is givein as the parameter.</para>
81
82 <para>The <literal>--client</literal> option is equivalent to 
83 <literal>--execute-where server</literal> (below).</para>
84
85 <para>The <literal>--execute-where</literal> option tells amgetconf whether
86 to operate on the client or the server; the server is the default.</para>
87
88 </refsect2>
89
90 <refsect2><title>BUILD CONFIGURATION</title>
91
92 <para>If <emphasis remap='I'>parameter</emphasis> begins
93 with <literal>build.</literal>, then the following name is a
94 build environment variable.  Variables without a value (e.g.
95 <literal>XFSDUMP</literal> on a system that does not support that
96 type of file system) will not report an error and will return an
97 empty string as the value.  Some boolean variables (e.g.  <emphasis
98 remap='I'>USE_AMANDAHOSTS</emphasis>) will return <literal>1</literal>
99 if the flag is set or an empty string if it is not, while others
100 return <literal>yes</literal> or <literal>no</literal>, as indicated
101 below (the difference is historical).</para>
102
103 <para>Combining the <literal>--list</literal> option with the parameter
104 <literal>build</literal> will enumerate all available build parameters.</para>
105
106 <variablelist><title>Build Parameters</title>
107  <varlistentry><term><literal>bindir</literal></term>
108                <term><literal>sbindir</literal></term>
109                <term><literal>libexecdir</literal></term>
110                <term><literal>mandir</literal></term>
111   <listitem><para>Install directories</para></listitem>
112  </varlistentry>
113
114  <varlistentry><term><literal>AMANDA_TMPDIR</literal></term>
115                <term><literal>CONFIG_DIR</literal></term>
116                <term><literal>AMANDA_DBGDIR</literal></term>
117                <term><literal>GNUTAR_LISTED_INCREMENTAL_DIR</literal></term>
118   <listitem><para>Runtime directories</para></listitem>
119  </varlistentry>
120  <varlistentry><term><literal>listed_inc_dir</literal></term>
121   <listitem><para>Same as <literal>GNUTAR_LISTED_INCREMENTAL_DIR</literal></para></listitem>
122  </varlistentry>
123
124  <varlistentry><term><literal>CC</literal></term>
125                <term><literal>VERSION</literal></term>
126                <term><literal>ASSERTIONS</literal></term>
127                <term><literal>LOCKING</literal></term>
128                <term><literal>USE_VERSION_SUFFIXES</literal></term>
129
130   <listitem><para>Build information.  <literal>ASSERTIONS</literal>
131   is 1 or empty, while <literal>USE_VERSION_SUFFIXES</literal> is
132   yes/no.</para></listitem>
133  </varlistentry>
134
135  <varlistentry><term><literal>DUMP</literal></term>
136                <term><literal>RESTORE</literal></term>
137                <term><literal>VDUMP</literal></term>
138                <term><literal>VRESTORE</literal></term>
139                <term><literal>XFSDUMP</literal></term>
140                <term><literal>XFSRESTORE</literal></term>
141                <term><literal>VXDUMP</literal></term>
142                <term><literal>VXRESTORE</literal></term>
143                <term><literal>SAMBA_CLIENT</literal></term>
144                <term><literal>GNUTAR</literal></term>
145                <term><literal>STAR</literal></term>
146                <term><literal>COMPRESS_PATH</literal></term>
147                <term><literal>UNCOMPRESS_PATH</literal></term>
148   <listitem><para>Paths to various utility progarms (empty if they
149   are not found or not used)</para></listitem>
150  </varlistentry>
151
152  <varlistentry><term><literal>AIX_BACKUP</literal></term>
153   <listitem><para>Is <literal>DUMP</literal> the AIX backup program? (empty or 1)</para></listitem>
154  </varlistentry>
155
156  <varlistentry><term><literal>DUMP_RETURNS_1</literal></term>
157   <listitem><para>Does <literal>DUMP</literal> return 1 on success? (empty or 1)</para></listitem>
158  </varlistentry>
159
160  <varlistentry><term><literal>BSD_SECURITY</literal></term>
161                <term><literal>BSDUDP_SECURITY</literal></term>
162                <term><literal>BSDTCP_SECURITY</literal></term>
163                <term><literal>KRB4_SECURITY</literal></term>
164                <term><literal>KRB5_SECURITY</literal></term>
165                <term><literal>SSH_SECURITY</literal></term>
166                <term><literal>RSH_SECURITY</literal></term>
167   <listitem><para>Indicate which authentication mechanisms are
168   available (yes or no).</para></listitem>
169  </varlistentry>
170
171  <varlistentry><term><literal>USE_AMANDAHOSTS</literal></term>
172   <listitem><para>Should the "bsd" authentication mechanism use
173   <filename>amandahosts</filename>?  (yes or no).</para></listitem>
174  </varlistentry>
175
176  <varlistentry><term><literal>AMANDA_DEBUG_DAYS</literal></term>
177   <listitem><para>Number of days after which debug logs are deleted.</para></listitem>
178  </varlistentry>
179
180  <varlistentry><term><literal>DEFAULT_SERVER</literal></term>
181                <term><literal>DEFAULT_CONFIG</literal></term>
182                <term><literal>DEFAULT_TAPE_SERVER</literal></term>
183                <term><literal>DEFAULT_TAPE_DEVICE</literal></term>
184   <listitem><para>Default values for configuration parameters</para></listitem>
185  </varlistentry>
186
187  <varlistentry><term><literal>CLIENT_LOGIN</literal></term>
188   <listitem><para>Userid under which the client runs (from
189   <literal>--with-user</literal>).</para></listitem>
190  </varlistentry>
191
192  <varlistentry><term><literal>USE_RUNDUMP</literal></term>
193   <listitem><para>Should Amanda use the <literal>rundump</literal>
194   wrapper? (empty or 1)</para></listitem>
195  </varlistentry>
196
197  <varlistentry><term><literal>CHECK_USERID</literal></term>
198   <listitem><para>Does Amanda check that userids are correct? (empty or 1)</para></listitem>
199  </varlistentry>
200
201  <varlistentry><term><literal>COMPRESS_SUFFIX</literal></term>
202                <term><literal>COMPRESS_FAST_OPT</literal></term>
203                <term><literal>COMPRESS_BEST_OPT</literal></term>
204                <term><literal>UNCOMPRESS_OPT</literal></term>
205   <listitem><para>Command-line options for the compression program.</para></listitem>
206  </varlistentry>
207
208  <varlistentry><term><literal>TICKET_LIFETIME</literal></term>
209                <term><literal>SERVER_HOST_PRINCIPAL</literal></term>
210                <term><literal>SERVER_HOST_INSTANCE</literal></term>
211                <term><literal>SERVER_HOST_KEY_FILE</literal></term>
212                <term><literal>CLIENT_HOST_PRINCIPAL</literal></term>
213                <term><literal>CLIENT_HOST_INSTANCE</literal></term>
214                <term><literal>CLIENT_HOST_KEY_FILE</literal></term>
215   <listitem><para>Kerberos parameters.</para></listitem>
216  </varlistentry>
217 </variablelist>
218
219 </refsect2>
220
221 <refsect2><title>DEBUG LOG MANAGEMENT</title>
222
223 <note>That this application is responsible for debug logs is a
224 historical quirk, but the functionality is widely used.</note>
225
226 <para>If <emphasis remap='I'>parameter</emphasis> begins with <emphasis
227 remap='I'>dbopen.</emphasis>, the string following the period is a
228 program name and an &A; debug file will be created for the caller.
229 The name of the logfile is returned.</para>
230
231 <para>If <emphasis remap='I'>parameter</emphasis> begins with
232 <emphasis remap='I'>dbclose.</emphasis>, the string following
233 the period is a program name previously used with <emphasis
234 remap='I'>dbopen.</emphasis>, followed by a colon (:) and
235 the previously opened file name.  The name of the logfile is
236 returned.</para>
237
238 </refsect2>
239 </refsect1>
240
241
242 <refsect1><title>EXAMPLES</title>
243 <para>Find out the path to the log file directory:</para>
244
245 <programlisting remap='.nf'>
246 % amgetconf daily logdir
247 /usr/local/etc/amanda/daily/logs
248 </programlisting>
249
250 <para>Find out the current tape type:</para>
251 <programlisting remap='.nf'>
252 % amgetconf daily tapetype
253 DLT4000-IV
254 </programlisting>
255
256 <para>Find out that tape type's length:</para>
257 <programlisting remap='.nf'>
258 % amgetconf daily tapetype:DLT4000-IV:length
259 1024000
260 </programlisting>
261
262 <para>List the other available tapetype:</para>
263 <programlisting remap='.nf'>
264 % amgetconf daily --list tapetype
265 DISK
266 QIC-60
267 DEC-DLT2000
268 ...
269 </programlisting>
270
271 <para>Find out the configuration directory:</para>
272 <programlisting remap='.nf'>
273 % amgetconf build.CONFIG_DIR
274 /usr/local/etc/amanda/
275 </programlisting>
276
277 <para>List all build-time parameters</para>
278 <programlisting remap='.nf'>
279 % amgetconf --list build
280 AIX_BACKUP
281 AMANDA_DBGDIR
282 AMANDA_DEBUG_DAYS
283 ...
284 </programlisting>
285
286 <para>Create, use and close a debug file in a script:</para>
287 <programlisting remap='.nf'>
288 % debug_file=`amgetconf daily dbopen.myscript`
289 % echo debug information &gt;&gt; $debug_file
290 % amgetconf daily dbclose.myscript:$debug_file
291 </programlisting>
292 </refsect1>
293
294 <refsect1><title>MESSAGES</title>
295 <variablelist remap='TP'>
296   <varlistentry>
297   <term>amgetconf: no such parameter <emphasis remap='I'>param</emphasis></term>
298
299   <listitem><para>Parameter <emphasis remap='I'>param</emphasis>
300   is not a known keyword (e.g. not a valid <emphasis
301   remap='I'>amanda.conf</emphasis> keyword).</para></listitem>
302   </varlistentry>
303 </variablelist>
304 </refsect1>
305
306 <refsect1><title>SEE ALSO</title>
307 <para>
308   <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
309   <ulink url="http://wiki.zmanda.com"/>
310 </para>
311 </refsect1>
312 </refentry>