933b877cd7b7a46489505a265ac7ea7b6b84a1aa
[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 </refmeta>
17 <refnamediv>
18 <refname>amgetconf</refname>
19 <refpurpose>look up amanda.conf variables</refpurpose>
20 </refnamediv>
21 <!-- body begins here -->
22 <refsynopsisdiv>
23 <cmdsynopsis>
24   <command>amgetconf</command>    
25     <arg choice='opt'><replaceable>config</replaceable></arg>
26     <arg choice='opt'><replaceable>--list</replaceable></arg>
27     <arg choice='plain'><replaceable>parameter</replaceable></arg>
28     <arg choice='plain' rep='repeat'><group><arg choice='plain'>-o </arg><replaceable>configoption</replaceable></group></arg>
29 </cmdsynopsis>
30 </refsynopsisdiv>
31
32
33 <refsect1><title>DESCRIPTION</title>
34 <para><emphasis remap='B'>Amgetconf</emphasis>
35 looks up parameters in
36 <emphasis remap='I'>amanda.conf</emphasis>,
37 the &A; configuration file,
38 or from the build and runtime environment,
39 and returns their corresponding value.</para>
40
41 <para>If
42 <emphasis remap='I'>config</emphasis>
43 is not specified,
44 <command>amgetconf</command>
45 assumes it is being run from the configuration directory and that
46 <emphasis remap='I'>amanda.conf</emphasis>
47 is present.</para>
48
49 <para>If
50 <emphasis remap='I'>parameter</emphasis>
51 begins with
52 <emphasis remap='I'>build.</emphasis>,
53 the (case insensitive) string following the period
54 is a build environment variable.
55 Variables without a value (e.g.
56 <emphasis remap='I'>XFSDUMP</emphasis>
57 on a system that does not support that type of file system)
58 will not report an error and will return an empty string as the value.
59 Flag variables (e.g.
60 <emphasis remap='I'>USE_AMANDAHOSTS</emphasis>)
61 will return
62 <literal>1</literal>
63 if the flag is set or an empty string if it is not.</para>
64
65 <para>If
66 <emphasis remap='I'>parameter</emphasis>
67 begins with
68 <emphasis remap='I'>dbopen.</emphasis>,
69 the string following the period is a program name and an &A; debug
70 file will be created for the caller.
71 The name of the file is returned.</para>
72
73 <para>If
74 <emphasis remap='I'>parameter</emphasis>
75 begins with
76 <emphasis remap='I'>dbclose.</emphasis>,
77 the string following the period is a program name previously used with
78 <emphasis remap='I'>dbopen.</emphasis>,
79 followed by a colon (:) and the previously opened file name.</para>
80
81 <para>See the
82 <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>
83 man page for more details about &A;.</para>
84 </refsect1>
85
86 <refsect1><title>OPTIONS</title>
87 <variablelist remap='TP'>
88
89   <varlistentry>
90   <term><emphasis remap='B'>--list</emphasis></term>
91   <listitem>
92 <para>The parameter must be 'tapetype', 'dumptype, 'holdingdisk' or 'interface'. It will output, one by line, the list of identifier for the parameter.</para>
93 <variablelist remap='TP'>
94 <varlistentry>
95   <term>--list tapetype</term>
96   <listitem>
97     <para>Output the list of tapetype, one by line.</para>
98   </listitem>
99 </varlistentry>
100 <varlistentry>
101   <term>--list dumptype</term>
102   <listitem>
103     <para>Output the list of dumptype, one by line.</para>
104   </listitem>
105 </varlistentry>
106 <varlistentry>
107   <term>--list holdingdisk</term>
108   <listitem>
109     <para>Output the list of holdingdisk, one by line.</para>
110   </listitem>
111 </varlistentry>
112 <varlistentry>
113   <term>--list interface</term>
114   <listitem>
115     <para>Output the list of interface, one by line.</para>
116   </listitem>
117 </varlistentry>
118 </variablelist>
119   </listitem>
120   </varlistentry>
121
122   <varlistentry>
123   <term><emphasis remap='B'>parameter</emphasis></term>
124   <listitem>
125     <para>It could be one of the below format:</para>
126 <variablelist remap='TP'>
127 <varlistentry>
128     <term>runtapes</term><listitem><para></para></listitem>
129 </varlistentry>
130 <varlistentry>
131     <term>DUMPTYPE:no-compress:compress</term><listitem><para></para></listitem>
132 </varlistentry>
133 <varlistentry>
134     <term>TAPETYPE:HP-DAT:length</term><listitem><para></para></listitem>
135 </varlistentry>
136 <varlistentry>
137     <term>INTERFACE:local:use</term><listitem><para></para></listitem>
138 </varlistentry>
139 <varlistentry>
140     <term>HOLDINGDISK:hd1:use</term><listitem><para></para></listitem>
141 </varlistentry>
142 </variablelist>
143   </listitem>
144   </varlistentry>
145
146 <varlistentry>
147 <term><emphasis remap='B'>-o</emphasis> <replaceable>configoption</replaceable></term>
148   <listitem>
149 <para>See the "<emphasis remap='B'>CONFIGURATION OVERWRITE</emphasis>" section in <citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
150   </listitem>
151   </varlistentry>
152
153
154 </variablelist>
155 </refsect1>
156
157 <refsect1><title>EXAMPLE</title>
158 <para>Find out the path to the log file directory:</para>
159
160 <!-- .RS -->
161 <literallayout remap='.nf'>
162 % amgetconf daily logdir
163 /usr/local/etc/amanda//daily
164 </literallayout> <!-- .fi -->
165
166 <para>Find out the current tape type:</para>
167
168 <!-- .RS -->
169 <literallayout remap='.nf'>
170 % amgetconf daily tapetype
171 DLT4000-IV
172 </literallayout> <!-- .fi -->
173
174 <para>Find out the default configuration directory:</para>
175
176 <!-- .RS -->
177 <literallayout remap='.nf'>
178 % amgetconf daily build.CONFIG_DIR
179 /usr/local/etc/amanda/
180 </literallayout> <!-- .fi -->
181
182 <para>Create, use and close a debug file in a script:</para>
183
184 <!-- .RS -->
185 <literallayout remap='.nf'>
186 % set debug_file = `amgetconf daily dbopen.myscript`
187 % echo debug information &gt;&gt; $debug_file
188 % amgetconf daily dbclose.myscript:$debug_file
189 </literallayout> <!-- .fi -->
190 </refsect1>
191
192 <refsect1><title>MESSAGES</title>
193 <variablelist remap='TP'>
194   <varlistentry>
195   <term>amgetconf: no such parameter <emphasis remap='I'>param</emphasis></term>
196   <listitem>
197 <para>Parameter
198 <emphasis remap='I'>param</emphasis>
199 is not a known keyword
200 (e.g. not a valid
201 <emphasis remap='I'>amanda.conf</emphasis>
202 keyword).
203 </para>
204   </listitem>
205   </varlistentry>
206 </variablelist>
207 </refsect1>
208
209 <refsect1><title>SEE ALSO</title>
210 <para><citerefentry><refentrytitle>amanda</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
211 </refsect1>
212 </refentry>
213