1337822e33273c5e35134ff90afe509d530e046e
[debian/amanda] / man / xml-source / amanda.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 'global.entities'>
7   %global_entities;
8 ]>
9
10 <!-- lifted from troff+man by doclifter -->
11 <refentry id='amanda.8'>
12
13 <refmeta>
14 <refentrytitle>amanda</refentrytitle>
15 <manvolnum>8</manvolnum>
16 &rmi.source;
17 &rmi.version;
18 &rmi.manual.8;
19 </refmeta>
20 <refnamediv>
21 <refname>amanda</refname>
22 <refpurpose>The Open Source Backup Platform</refpurpose>
23 </refnamediv>
24 <refentryinfo>
25 &author.jds;
26 &author.sgw.xml;
27 </refentryinfo>
28 <!-- body begins here -->
29
30 <refsect1><title>DESCRIPTION</title>
31 <para>This manual page gives an overview of the Amanda commands and
32 configuration files for quick reference.</para>
33
34 <!--
35  - NOTE: the comma after each citerefentry works around a bug in the docbook-to-man conversion; using &nbsp;
36  - causes problems in the docbook-to-html conversion.
37 -->
38
39 <refsect2><title>COMMANDS</title> <!-- a.k.a. any section 8 manpage -->
40 <para>Here are all the Amanda commands.  Each one has its own manual page.  See them for all the gory details.</para>
41 <itemizedlist>
42 <listitem>
43 <manref name="amaddclient" vol="8"/>,
44 </listitem>
45 <listitem>
46 <manref name="amadmin" vol="8"/>,
47 </listitem>
48 <listitem>
49 <manref name="amaespipe" vol="8"/>,
50 </listitem>
51 <listitem>
52 <manref name="amarchiver" vol="8"/>,
53 </listitem>
54 <listitem>
55 <manref name="amcheck" vol="8"/>,
56 </listitem>
57 <listitem>
58 <manref name="amcheckdb" vol="8"/>,
59 </listitem>
60 <listitem>
61 <manref name="amcheckdump" vol="8"/>,
62 </listitem>
63 <listitem>
64 <manref name="amcleanup" vol="8"/>,
65 </listitem>
66 <listitem>
67 <manref name="amcrypt-ossl-asym" vol="8"/>,
68 </listitem>
69 <listitem>
70 <manref name="amcrypt-ossl" vol="8"/>,
71 </listitem>
72 <listitem>
73 <manref name="amcrypt" vol="8"/>,
74 </listitem>
75 <listitem>
76 <manref name="amcryptsimple" vol="8"/>,
77 </listitem>
78 <listitem>
79 <manref name="amdevcheck" vol="8"/>,
80 </listitem>
81 <listitem>
82 <manref name="amdump" vol="8"/>,
83 </listitem>
84 <listitem>
85 <manref name="amfetchdump" vol="8"/>,
86 </listitem>
87 <listitem>
88 <manref name="amflush" vol="8"/>,
89 </listitem>
90 <listitem>
91 <manref name="amgetconf" vol="8"/>,
92 </listitem>
93 <listitem>
94 <manref name="amgpgcrypt" vol="8"/>,
95 </listitem>
96 <listitem>
97 <manref name="amgtar" vol="8"/>,
98 </listitem>
99 <listitem>
100 <manref name="amlabel" vol="8"/>,
101 </listitem>
102 <listitem>
103 <manref name="amoverview" vol="8"/>,
104 </listitem>
105 <listitem>
106 <manref name="ampgsql" vol="8"/>,
107 </listitem>
108 <listitem>
109 <manref name="amplot" vol="8"/>,
110 </listitem>
111 <listitem>
112 <manref name="amraw" vol="8"/>,
113 </listitem>
114 <listitem>
115 <manref name="amrecover" vol="8"/>,
116 </listitem>
117 <listitem>
118 <manref name="amreport" vol="8"/>,
119 </listitem>
120 <listitem>
121 <manref name="amrestore" vol="8"/>,
122 </listitem>
123 <listitem>
124 <manref name="amrmtape" vol="8"/>,
125 </listitem>
126 <listitem>
127 <manref name="amsamba" vol="8"/>,
128 </listitem>
129 <listitem>
130 <manref name="amserverconfig" vol="8"/>,
131 </listitem>
132 <listitem>
133 <manref name="amservice" vol="8"/>,
134 </listitem>
135 <listitem>
136 <manref name="amstar" vol="8"/>,
137 </listitem>
138 <listitem>
139 <manref name="amstatus" vol="8"/>,
140 </listitem>
141 <listitem>
142 <manref name="amsuntar" vol="8"/>,
143 </listitem>
144 <listitem>
145 <manref name="amtape" vol="8"/>,
146 </listitem>
147 <listitem>
148 <manref name="amtapetype" vol="8"/>,
149 </listitem>
150 <listitem>
151 <manref name="amtoc" vol="8"/>,
152 </listitem>
153 <listitem>
154 <manref name="amvault" vol="8"/>,
155 </listitem>
156 <listitem>
157 <manref name="amzfs-sendrecv" vol="8"/>,
158 </listitem>
159 <listitem>
160 <manref name="amzfs-snapshot" vol="8"/>,
161 </listitem>
162 <listitem>
163 <manref name="script-email" vol="8"/>,
164 </listitem>
165 </itemizedlist>
166 </refsect2>
167 <refsect2><title>CONFIGURATION FILES</title> <!-- a.k.a. most section 5 manpages -->
168 <itemizedlist>
169 <listitem>
170 <manref name="amanda.conf" vol="5"/>,
171 </listitem>
172 <listitem>
173 <manref name="amanda-client.conf" vol="5"/>,
174 </listitem>
175 <listitem>
176 <manref name="disklist" vol="5"/>,
177 </listitem>
178 <listitem>
179 <manref name="tapelist" vol="5"/>,
180 </listitem>
181 </itemizedlist>
182 </refsect2>
183 <refsect2><title>DATA FORMATS</title> <!-- a.k.a. section 5 manpages about internal data formats -->
184 <itemizedlist>
185 <listitem>
186 <manref name="amanda-archive-format" vol="5"/>,
187 </listitem>
188 </itemizedlist>
189 </refsect2>
190 <refsect2><title>CONCEPTS</title> <!-- a.k.a. any section 7 manpage -->
191 <itemizedlist>
192 <listitem>
193 <manref name="amanda-applications" vol="7"/>,
194 </listitem>
195 <listitem>
196 <manref name="amanda-auth" vol="7"/>,
197 </listitem>
198 <listitem>
199 <manref name="amanda-changers" vol="7"/>,
200 </listitem>
201 <listitem>
202 <manref name="amanda-compatibility" vol="7"/>,
203 </listitem>
204 <listitem>
205 <manref name="amanda-devices" vol="7"/>,
206 </listitem>
207 <listitem>
208 <manref name="amanda-scripts" vol="7"/>,
209 </listitem>
210 <listitem>
211 <manref name="amanda-taperscan" vol="7"/>,
212 </listitem>
213 </itemizedlist>
214 </refsect2>
215 </refsect1>
216
217 <refsect1><title>CONFIGURATION</title>
218 <para>There are four user-editable files that control the behavior of Amanda.
219 </para>
220 <para>
221 The first two are &amconf; and &amclientconf;,
222 the main configuration files for the server and client, respectively.
223 They contain parameters to customize Amanda for the site.
224 </para>
225 <para>
226 Next is the &disklist; file, which lists hosts and disk partitions to back up.
227 </para>
228 <para>
229 Last is the seldom-edited &tapelist;
230 file, which lists tapes that are currently active.
231 These files are described in more detail in the following sections.</para>
232
233 <para>All configuration files are stored in individual configuration
234 directories, usually under <filename>/etc/amanda/</filename>.
235 A site will often have more than
236 one configuration.
237 For example, it might have a
238 <emphasis remap='I'>normal</emphasis>
239 configuration for everyday backups and an
240 <emphasis remap='I'>archive</emphasis>
241 configuration for infrequent full archival backups.
242 The configuration files would be stored under directories
243 <filename>/etc/amanda/normal/</filename> and
244 <filename>/etc/amanda/archive/</filename>, respectively.
245 Part of the job of an Amanda administrator is to create,
246 populate and maintain these directories.</para>
247
248 <para>Most Amanda applications take a "config" parameter; this is generally the
249 (unqualified) name of the configuration directory, e.g.,
250 <filename>normal</filename>.  If the parameter is <filename>.</filename> (dot),
251 the current directory is used.  This feature is present for backward
252 compatibility, but is not commonly used.</para>
253
254 </refsect1>
255
256 <refsect1><title>LOG FILES</title>
257 <para>All log and database files generated by Amanda go in corresponding
258 directories somewhere.
259 The exact location is controlled by entries in
260 <manref name="amanda.conf" vol="5"/>.
261 A typical location would be under <filename>/var/adm/amanda</filename>.
262 For the above example, the files might go in
263 <filename>/var/adm/amanda/normal/</filename> and
264 <filename>/var/adm/amanda/archive/</filename>.
265 </para>
266
267 <para>As log files are no longer needed (no longer contain relevant information),
268 Amanda cycles them out in various ways, depending on the type of file.</para>
269
270 <para>Detailed information about
271 <command>amdump</command>
272 runs are stored in dump logs -- files named
273 <emphasis remap='B'>amdump.</emphasis><emphasis remap='I'>NN</emphasis>
274 where
275 <emphasis remap='I'>NN</emphasis>
276 is a sequence number, with 1 being the most recent file.
277 <emphasis remap='B'>Amdump</emphasis>
278 rotates these files each run, keeping roughly the last
279 <emphasis remap='B'>tapecycle</emphasis>
280 (see below)
281 worth of them.</para>
282
283 <para>The file used by
284 <emphasis remap='B'>amreport</emphasis>
285 to generate the mail summary is the trace log.  This file constitutes the "catalog"
286 describing the data on the tapes written in a run.  It is named
287 <emphasis remap='B'>log.</emphasis><emphasis remap='I'>YYYYMMDDHHMMSS.NN</emphasis>
288 where
289 <emphasis remap='I'>YYYYMMDDHHMMSS</emphasis>
290 is the datestamp of the start of the
291 <command>amdump</command> or <command>amflush</command>
292 run and
293 <emphasis remap='I'>NN</emphasis>
294 is a sequence number started at 0.
295 At the end of each
296 <command>amdump</command>
297 run,
298 log files for runs whose tapes have been reused are renamed
299 into a subdirectory of the main log directory (see the
300 <emphasis remap='B'>logdir</emphasis>
301 parameter below)
302 named
303 <emphasis remap='B'>oldlog</emphasis>.
304 It is up to the Amanda administrator to remove them from this
305 directory when desired.</para>
306
307 <para>Index (backup image catalogue) files older than the full dump
308 matching the oldest backup image for a given client and disk
309 are removed by
310 <command>amdump</command>
311 at the end of each run.</para>
312 </refsect1>
313
314
315 <refsect1><title>Using Samba</title>
316 <para>For Samba access, Amanda needs a file on the Samba server (which may
317 or may not also be the tape server) named
318 <filename>/etc/amandapass</filename>
319 with share names, (clear text) passwords and (optional) domain names,
320 in that order, one per line, whitespace separated.
321 By default, the user used to connect to the PC is the same for all
322 PC's and is compiled into Amanda.
323 It may be changed on a host by host basis
324 by listing it first in the password field followed
325 by a percent sign and then the password.
326 For instance:</para>
327 <programlisting>
328   //some-pc/home normalpw
329   //another-pc/disk otheruser%otherpw
330 </programlisting>
331 <para>With clear text passwords, this file should obviously be tightly protected.
332 It only needs to be readable by the Amanda-user on the Samba server.  </para>
333 </refsect1>
334
335 <refsect1><title>HOST &amp; DISK EXPRESSION</title>
336 <para>All host and disk arguments to programs are special expressions.
337 The command applies to all DLEs that match the arguments.
338 This section describes the matcher.</para>
339
340 <para>The matcher matches by word, each word is a glob expression, words
341 are separated by the separator '.' for host and '/' for disk. You
342 can anchor the expression at left with a '^'. You can
343 anchor the expression at right with a '$'. The matcher
344 is case insensitive for host but is case sensitive for disk. A match
345 succeeds if all words in your expression match contiguous words in 
346 the host or disk.</para>
347
348 <para>If the disk is a UNC ("\\windows\share") then all '\' are converted to '/' before the match.  Using '\' is complicated because of the extra quoting required by the shell and amanda. It's easier to use '/' because it require less quoting ("//windows/share")</para>
349
350 <variablelist remap='TP'>
351
352     <varlistentry>
353     <term>dot (.)</term> <!-- troff gets confused by a plain dot -->
354     <listitem><para>word separator for a host</para></listitem>
355     </varlistentry>
356
357     <varlistentry>
358     <term>/</term>
359     <listitem><para>word separator for a disk</para></listitem>
360     </varlistentry>
361
362     <varlistentry>
363     <term>\</term>
364     <listitem><para>word separator for a UNC disk</para></listitem>
365     </varlistentry>
366
367     <varlistentry>
368     <term>^</term>
369     <listitem><para>anchor at left</para></listitem>
370     </varlistentry>
371
372     <varlistentry>
373     <term>$</term>
374     <listitem><para>anchor at right</para></listitem>
375     </varlistentry>
376
377     <varlistentry>
378     <term>?</term>
379     <listitem><para>match exactly one character except the separator</para></listitem>
380     </varlistentry>
381
382     <varlistentry>
383     <term>*</term>
384     <listitem><para>match zero or more characters except the separator</para></listitem>
385     </varlistentry>
386
387     <varlistentry>
388     <term>**</term>
389     <listitem><para>match zero or more characters including the separator</para></listitem>
390     </varlistentry>
391
392     <varlistentry>
393     <term>[...]</term>
394     <listitem><para>match a single character, namely any of the characters
395         enclosed  by the brackets.</para></listitem>
396     </varlistentry>
397
398     <varlistentry>
399     <term>[!...]</term>
400     <listitem><para>match a single character, namely any characters that is not
401          enclosed by the brackets.</para></listitem>
402     </varlistentry>
403
404 </variablelist>
405
406 <para>The shell interpret some of these characters, they must be escaped by a backslash '\' and/or the expression must be enclosed in simple or double quote.</para>
407
408 <para>Some examples:</para>
409
410 <variablelist remap='TP'>
411     <varlistentry>
412     <term>hosta</term>
413     <listitem><para>
414     Will match <filename>hosta</filename>, <filename>foo.hosta.org</filename>, and
415     <filename>hoSTA.dOMAIna.ORG</filename> but not <filename>hostb</filename>.
416     </para></listitem>
417     </varlistentry>
418
419     <varlistentry>
420     <term>host</term>
421     <listitem><para>
422     Will match <filename>host</filename> but not <filename>hosta</filename>.
423     </para></listitem>
424     </varlistentry>
425
426     <varlistentry>
427     <term>host?</term>
428     <listitem><para>
429     Will match <filename>hosta</filename> and <filename>hostb</filename>, but
430     not <filename>host</filename>.
431     </para></listitem>
432     </varlistentry>
433
434     <varlistentry>
435     <term>ho*na</term>
436     <listitem><para>
437     Will match <filename>hoina</filename>
438     but not <filename>ho.aina.org</filename>.
439     </para></listitem>
440     </varlistentry>
441
442     <varlistentry>
443     <term>ho**na</term>
444     <listitem><para>
445     Will match <filename>hoina</filename>
446     and <filename>ho.aina.org</filename>.
447     </para></listitem>
448     </varlistentry>
449
450     <varlistentry>
451     <term>^hosta</term>
452     <listitem><para>
453     Will match <filename>hosta</filename>
454     but not <filename>foo.hosta.org</filename>.
455     </para></listitem>
456     </varlistentry>
457
458     <varlistentry>
459     <term>sda*</term>
460     <listitem><para>
461     Will match <filename>/dev/sda1</filename>
462     and <filename>/dev/sda12</filename>.
463     </para></listitem>
464     </varlistentry>
465
466     <varlistentry>
467     <term>/opt</term>
468     <listitem><para>
469     Will match the disk <filename>opt</filename>
470     but not the host <filename>opt</filename>.
471     </para></listitem>
472     </varlistentry>
473
474     <varlistentry>
475     <term>(note dots:) .opt.</term> <!-- nroff gets confused by dots -->
476     <listitem><para>
477     Will match the host <filename>opt</filename>
478     but not the disk <filename>opt</filename>.
479     </para></listitem>
480     </varlistentry>
481
482     <varlistentry>
483     <term>/</term>
484     <listitem><para>
485     Will match the disk <filename>/</filename>
486     but no other disk.
487     </para></listitem>
488     </varlistentry>
489
490     <varlistentry>
491     <term>/usr</term>
492     <listitem><para>
493     Will match the disks <filename>/usr</filename>
494     and <filename>/usr/local</filename>.
495     </para></listitem>
496     </varlistentry>
497
498     <varlistentry>
499     <term>/usr$</term>
500     <listitem><para>
501     Will match the disks <filename>/usr</filename>
502     but not <filename>/usr/local</filename>.
503     </para></listitem>
504     </varlistentry>
505
506     <varlistentry>
507     <term>share</term>
508     <listitem><para>
509     Will match the disks <filename>\\windows1\share</filename> and <filename>\\windows2\share</filename>.
510     </para></listitem>
511     </varlistentry>
512
513     <varlistentry>
514     <term>share*</term>
515     <listitem><para>
516     Will match the disks <filename>\\windows\share1</filename> and <filename>\\windows\share2</filename>.
517     </para></listitem>
518     </varlistentry>
519
520     <varlistentry>
521     <term>//windows/share</term>
522     <listitem><para>
523     Will match the disk <filename>\\windows\share</filename>.
524     </para></listitem>
525     </varlistentry>
526
527 </variablelist>
528
529
530 </refsect1>
531
532 <refsect1><title>DATESTAMP EXPRESSION</title>
533 <para>A
534 <emphasis remap='I'>datestamp</emphasis>
535 expression is a range expression where we only match the prefix.
536 Leading ^ is removed. Trailing $ forces an exact match.</para>
537
538 <variablelist remap="TP">
539
540     <varlistentry>
541     <term>20001212-14</term>
542     <listitem><para>match all dates beginning with 20001212, 20001213 or 20001214</para></listitem>
543     </varlistentry>
544
545     <varlistentry>
546     <term>20001212-4</term>
547     <listitem><para>same as previous</para></listitem>
548     </varlistentry>
549
550     <varlistentry>
551     <term>20001212-24</term>
552     <listitem><para>match all dates between 20001212 and 20001224</para></listitem>
553     </varlistentry>
554
555     <varlistentry>
556     <term>2000121</term>
557     <listitem><para>match all dates that start with 2000121 (20001210-20001219)</para></listitem>
558     </varlistentry>
559
560     <varlistentry>
561     <term>2</term>
562     <listitem><para>match all dates that start with 2 (20000101-29991231)</para></listitem>
563     </varlistentry>
564
565     <varlistentry>
566     <term>2000-10</term>
567     <listitem><para>match all dates between 20000101-20101231</para></listitem>
568     </varlistentry>
569
570     <varlistentry>
571     <term>200010$</term>
572     <listitem><para>match only 200010</para></listitem>
573     </varlistentry>
574
575 </variablelist>
576
577 </refsect1>
578
579 <refsect1><title>DUMP SPECIFICATIONS</title> <para>A dump
580 specification selects one or more dumps.  It has the form <emphasis
581 remap="I">[host][:disk][@datestamp]</emphasis>, where each component
582 is a pattern as described above.  If a component is missing, it
583 is treated as a wildcard.  The characters ':', '@', and '\' may be
584 escaped within any component by preceding them with a '\'.</para>
585
586 <para>Some examples:</para>
587
588 <variablelist remap='TP'>
589     <varlistentry>
590     <term>client17</term>
591     <listitem><para>all dumps of client17</para></listitem>
592     </varlistentry>
593
594     <varlistentry>
595     <term>@20080615</term>
596     <listitem><para>All dumps on with datestamps matching 20080615</para></listitem>
597     </varlistentry>
598
599     <varlistentry>
600     <term>webserver:/var/www</term>
601     <listitem><para>All dumps of /var/www on host webserver</para></listitem>
602     </varlistentry>
603
604     <varlistentry>
605     <term>webserver:/var/www@200806150317</term>
606     <listitem><para>The dump of webserver with datestamp 200806150317</para></listitem>
607     </varlistentry>
608
609     <varlistentry>
610     <term>:/var/www</term>
611     <listitem><para>All dumps of /var/www on any host</para></listitem>
612     </varlistentry>
613 </variablelist>
614
615
616 </refsect1>
617
618 <refsect1><title>CONFIGURATION OVERRIDE</title>
619 <para>Most commands allow the override of specific
620 configuration options on the command line, using the <arg
621 choice="plain">-o</arg> option.  This option has the form <arg
622 choice="plain">-o</arg><replaceable>name</replaceable>=<replaceable>value</replaceable>.
623 An optional space is allowed after the <arg choice="plain">-o</arg>.
624 Each configuration option should be specified in a separate
625 command-line option.</para>
626
627 <para>For global options, <replaceable>name</replaceable> is simply the name of the option, e.g.,
628 <programlisting>
629 amdump -oruntapes=2
630 </programlisting>
631 For options in a named section of the configuration, <replaceable>name</replaceable> has the
632 form <replaceable>SECTION</replaceable>:<replaceable>section_name</replaceable>:<replaceable>name</replaceable>,
633 where <replaceable>SECTION</replaceable> is one of TAPETYPE, DUMPTYPE, HOLDINGDISK, or INTERFACE, and
634 <replaceable>section_name</replaceable> is the name of the tapetype, dumptype, holdingdisk, or interface.
635 Examples:
636 <programlisting>
637 amdump -o TAPETYPE:HP-DAT:length=2000m
638 amdump -o DUMPTYPE:no-compress:compress="server fast"
639 amdump -o HOLDINGDISK:hd1:use="-100 mb"
640 amdump -o INTERFACE:local:use="2000 kbps"
641 </programlisting>
642 </para>
643
644 <para>When overriding device properties, one must carefully quote the
645   command line to simulate the syntax of real configuration files. The
646   following example should serve as a guide:
647 <programlisting>
648 amdump -o 'device-property="PROPERTY_MAX_VOLUME_USAGE" "100000"'
649 </programlisting></para>
650
651 <para>Note that configuration overrides are not effective for tape
652 changers, which supply a tapedev based on their own configuration.  In order to
653 override <emphasis remap="I">tapedev</emphasis>, you must also disable any changer:
654 <programlisting>
655 amdump -otapedev=/dev/nst1 -otpchanger=''
656 </programlisting>
657 </para>
658
659 </refsect1>
660
661 </refentry>
662