493bb74797296cbce4722f125b71ac5f8f637cc1
[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 '../entities/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 </refmeta>
17 <refnamediv>
18 <refname>amanda</refname>
19 <refpurpose>Advanced Maryland Automatic Network Disk Archiver</refpurpose>
20 </refnamediv>
21 <!-- body begins here -->
22 <refsynopsisdiv>
23
24 <cmdsynopsis>
25     <command>amadmin</command>
26     <arg choice='plain'><replaceable>config</replaceable></arg>
27     <arg choice='plain'><replaceable>command</replaceable></arg>
28     <arg choice='opt'><replaceable>options</replaceable></arg>
29     <sbr/>
30 </cmdsynopsis>
31
32 <cmdsynopsis>
33     <command>amcheck</command>
34     <arg choice='opt'><replaceable>options</replaceable></arg>
35     <arg choice='plain'><replaceable>config</replaceable></arg>
36     <sbr/>
37 </cmdsynopsis>
38
39 <cmdsynopsis>
40     <command>amcheckdb</command>
41     <arg choice='plain'><replaceable>config</replaceable></arg>
42     <sbr/>
43 </cmdsynopsis>
44
45
46 <cmdsynopsis>
47     <command>amcleanup</command>
48     <arg choice='plain'><replaceable>config</replaceable></arg>
49     <sbr/>
50 </cmdsynopsis>
51
52 <cmdsynopsis>
53     <command>amcrypt</command>
54     <sbr/>
55 </cmdsynopsis>
56
57 <cmdsynopsis>
58   <command>amdd</command>    
59     <arg choice='opt'><replaceable>options</replaceable></arg>
60 </cmdsynopsis>
61
62 <cmdsynopsis>
63   <command>amdump</command>    
64     <arg choice='plain'><replaceable>config</replaceable></arg>
65     <sbr/>
66 </cmdsynopsis>
67
68 <cmdsynopsis>
69     <command>amaespipe</command>
70     <sbr/>
71 </cmdsynopsis>
72
73 <cmdsynopsis>
74   <command>amflush</command>    
75     <arg choice='opt'>-f </arg>
76     <arg choice='plain'><replaceable>config</replaceable></arg>
77     <sbr/>
78 </cmdsynopsis>
79
80 <cmdsynopsis>
81     <command>amgetconf</command>
82     <arg choice='opt'><replaceable>config</replaceable></arg>
83     <arg choice='plain'><replaceable>parameter</replaceable></arg>
84     <sbr/>
85 </cmdsynopsis>
86
87 <cmdsynopsis>
88     <command>amlabel</command>
89     <arg choice='plain'><replaceable>config</replaceable></arg>
90     <arg choice='plain'><replaceable>label</replaceable></arg>
91     <arg choice='opt'><arg choice='plain'><replaceable>slot</replaceable></arg><arg choice='plain'><replaceable>slot</replaceable></arg></arg>
92     <sbr/>
93 </cmdsynopsis>
94
95 <cmdsynopsis>
96   <command>ammt</command>    
97     <arg choice='opt'><replaceable>options</replaceable></arg>
98 </cmdsynopsis>
99
100 <cmdsynopsis>
101     <command>amoverview</command>
102     <arg choice='plain'><replaceable>config</replaceable></arg>
103     <arg choice='opt'><replaceable>options</replaceable></arg>
104     <sbr/>
105 </cmdsynopsis>
106
107 <cmdsynopsis>
108     <command>amplot</command>
109     <arg choice='opt'><replaceable>options</replaceable></arg>
110     <arg choice='plain'><replaceable>amdump-files</replaceable></arg>
111     <sbr/>
112 </cmdsynopsis>
113
114 <cmdsynopsis>
115     <command>amrecover</command>
116     <arg choice='opt'><replaceable>config</replaceable></arg>
117     <arg choice='opt'><replaceable>options</replaceable></arg>
118     <sbr/>
119 </cmdsynopsis>
120
121 <cmdsynopsis>
122     <command>amreport</command>
123     <arg choice='opt'><replaceable>config</replaceable></arg>
124     <arg choice='opt'><replaceable>options</replaceable></arg>
125     <sbr/>
126 </cmdsynopsis>
127
128 <cmdsynopsis>
129     <command>amrestore</command>
130     <arg choice='opt'><replaceable>options</replaceable></arg>
131     <arg choice='plain'><replaceable>tapedevice</replaceable></arg>
132     <arg choice='opt'><arg choice='plain'><replaceable>hostname</replaceable></arg><arg choice='opt'><replaceable>diskname</replaceable></arg></arg>
133     <sbr/>
134 </cmdsynopsis>
135
136 <cmdsynopsis>
137     <command>amfetchdump</command>
138     <arg choice='opt'><replaceable>options</replaceable></arg>
139     <arg choice='plain'><replaceable>config</replaceable></arg>
140     <arg choice='opt'><arg choice='plain'><replaceable>hostname</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>diskname</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>date</replaceable></arg><arg choice='opt'>level</arg></arg></arg></arg>
141 </cmdsynopsis>
142
143 <cmdsynopsis>
144     <command>amrmtape</command>
145     <arg choice='opt'><replaceable>options</replaceable></arg>
146     <arg choice='plain'><replaceable>config</replaceable></arg>
147     <arg choice='plain'><replaceable>label</replaceable></arg>
148     <sbr/>
149 </cmdsynopsis>
150
151 <cmdsynopsis>
152     <command>amstatus</command>
153     <arg choice='plain'><replaceable>config</replaceable></arg>
154     <arg choice='opt'><replaceable>options</replaceable></arg>
155     <sbr/>
156 </cmdsynopsis>
157
158 <cmdsynopsis>
159     <command>amtape</command>
160     <arg choice='plain'><replaceable>config</replaceable></arg>
161     <arg choice='plain'><replaceable>command</replaceable></arg>
162     <arg choice='opt'><replaceable>options</replaceable></arg>
163     <sbr/>
164 </cmdsynopsis>
165
166 <cmdsynopsis>
167   <command>amtapetype</command>    
168     <arg choice='opt'><replaceable>options</replaceable></arg>
169 </cmdsynopsis>
170
171 <cmdsynopsis>
172     <command>amtoc</command>
173     <arg choice='opt'><replaceable>options</replaceable></arg>
174     <arg choice='plain'><replaceable>logfile</replaceable></arg>
175     <sbr/>
176 </cmdsynopsis>
177
178 <cmdsynopsis>
179     <command>amverify</command>
180     <arg choice='plain'><replaceable>config</replaceable></arg>
181     <sbr/>
182 </cmdsynopsis>
183
184 <cmdsynopsis>
185   <command>amverifyrun</command>    
186     <arg choice='plain'><replaceable>config</replaceable></arg>
187 </cmdsynopsis>
188
189 </refsynopsisdiv>
190
191
192 <refsect1><title>DESCRIPTION</title>
193 <para>&A; is the 
194 &quot;Advanced Maryland Automatic Network Disk Archiver&quot;.
195 This manual page gives an overview of the &A; commands and
196 configuration files for quick reference.</para>
197
198 <para>Here are all the &A; commands.
199 Each one has its own manual page.
200 See them for all the gory details.</para>
201 <variablelist remap='TP'>
202   <varlistentry>
203   <term><emphasis remap='B'>amdump</emphasis></term>
204   <listitem>
205 <para>Take care of automatic &A; backups.
206 This is normally executed by
207 <emphasis remap='B'>cron</emphasis>
208 on a computer called the
209 <emphasis remap='I'>tape server host</emphasis>
210 and requests backups of file systems located on
211 <emphasis remap='I'>backup</emphasis>
212 <emphasis remap='I'>clients</emphasis>.
213 <emphasis remap='B'>Amdump</emphasis>
214 backs up all disks in the
215 <emphasis remap='I'>disklist</emphasis>
216 file (discussed below) to tape or, if there is a problem, to a special
217 <emphasis remap='I'>holding</emphasis>
218 <emphasis remap='I'>disk</emphasis>.
219 After all backups are done,
220 <command>amdump</command>
221 sends mail reporting failures and successes.</para>
222   </listitem>
223   </varlistentry>
224   <varlistentry>
225   <term><emphasis remap='B'>amflush</emphasis></term>
226   <listitem>
227 <para>Flush backups from the holding disk to tape.
228 <emphasis remap='B'>Amflush</emphasis>
229 is used after
230 <command>amdump</command>
231 has reported it could not write backups to tape for some reason.
232 When this happens, backups stay in the holding disk.
233 Run <emphasis remap='B'>amflush</emphasis> after the tape problem is corrected
234 to write backups from the holding disk to tape.</para>
235   </listitem>
236   </varlistentry>
237   <varlistentry>
238   <term><emphasis remap='B'>amcleanup</emphasis></term>
239   <listitem>
240 <para>Clean up after an interrupted
241 <command>amdump</command>.
242 This command is only needed if
243 <command>amdump</command>
244 was unable to complete for some reason, usually because the
245 tape server host crashed while
246 <command>amdump</command>
247 was running.</para>
248   </listitem>
249   </varlistentry>
250   <varlistentry>
251   <term><emphasis remap='B'>amrecover</emphasis></term>
252   <listitem>
253 <para>Provides an interactive interface to browse the &A; index files
254 (backup image catalogues)
255 and select which tapes to recover files from.
256 It can also run
257 <emphasis remap='B'>amrestore</emphasis>
258 and a restore program (e.g.
259 <emphasis remap='B'>tar</emphasis>)
260 to actually recover the files.</para>
261   </listitem>
262   </varlistentry>
263   <varlistentry>
264   <term><emphasis remap='B'>amrestore</emphasis></term>
265   <listitem>
266 <para>Read an &A; tape, searching for requested backups.
267 <emphasis remap='B'>Amrestore</emphasis>
268 is suitable for everything from interactive restores of single files
269 to a full restore of all partitions on a failed disk.</para>
270   </listitem>
271   </varlistentry>
272   <varlistentry>
273   <term><emphasis remap='B'>amfetchdump</emphasis></term>
274   <listitem>
275 <para>Performs &A; tape restoration, similar to <emphasis
276   remap='B'>amrestore</emphasis>. Additional capabilities include
277   "hands-off" searching of multiple tapes, automatic
278   retrieval of specific dump files based on dump logs, and assembly of
279   tape-spanning split dump files.</para>
280   </listitem>
281   </varlistentry>
282   <varlistentry>
283   <term><emphasis remap='B'>amlabel</emphasis></term>
284   <listitem>
285 <para>Write an &A; format label onto a tape.
286 All &A; tapes must be labeled with
287 <emphasis remap='B'>amlabel</emphasis>.
288 <emphasis remap='B'>Amdump</emphasis>
289 and
290 <emphasis remap='B'>amflush</emphasis>
291 will not write to an unlabeled tape (see TAPE MANAGEMENT below).</para>
292   </listitem>
293   </varlistentry>
294   <varlistentry>
295   <term><emphasis remap='B'>amcheck</emphasis></term>
296   <listitem>
297 <para>Verify the correct tape is mounted and all file systems on all backup client systems
298 are ready to be backed up. Often run by
299 <emphasis remap='B'>cron</emphasis>
300 before
301 <command>amdump</command>
302 to generate a mail warning that backups might fail
303 unless corrective action is taken.</para>
304   </listitem>
305   </varlistentry>
306   <varlistentry>
307   <term><emphasis remap='B'>amadmin</emphasis></term>
308   <listitem>
309 <para>Take care of administrative tasks like finding out which
310 tapes are needed to restore a filesystem,
311 forcing hosts to do full backups of selected disks
312 and looking at schedule balance information.</para>
313   </listitem>
314   </varlistentry>
315   <varlistentry>
316   <term><emphasis remap='B'>amtape</emphasis></term>
317   <listitem>
318 <para>Take care of tape changer control operations like loading particular tapes,
319 ejecting tapes and scanning the tape storage slots.</para>
320   </listitem>
321   </varlistentry>
322   <varlistentry>
323   <term><emphasis remap='B'>amverify</emphasis></term>
324   <listitem>
325 <para>Check &A; backup tapes for errors.</para>
326   </listitem>
327   </varlistentry>
328   <varlistentry>
329   <term><emphasis remap='B'>amrmtape</emphasis></term>
330   <listitem>
331 <para>Delete a tape from the &A; databases.</para>
332   </listitem>
333   </varlistentry>
334   <varlistentry>
335   <term><emphasis remap='B'>amstatus</emphasis></term>
336   <listitem>
337 <para>Report the status of a running or completed
338 <command>amdump</command>.</para>
339   </listitem>
340   </varlistentry>
341   <varlistentry>
342   <term><emphasis remap='B'>amoverview</emphasis></term>
343   <listitem>
344 <para>Display a chart of hosts and file systems backed up every run.</para>
345   </listitem>
346   </varlistentry>
347   <varlistentry>
348   <term><emphasis remap='B'>amplot</emphasis></term>
349   <listitem>
350 <para>Generate utilization plots of &A; runs for performance tuning.</para>
351   </listitem>
352   </varlistentry>
353   <varlistentry>
354   <term><emphasis remap='B'>amreport</emphasis></term>
355   <listitem>
356 <para>Generate an &A; summary E-mail report.</para>
357   </listitem>
358   </varlistentry>
359   <varlistentry>
360   <term><emphasis remap='B'>amtoc</emphasis></term>
361   <listitem>
362 <para>Generate table of content files for &A; tapes.</para>
363   </listitem>
364   </varlistentry>
365   <varlistentry>
366   <term><emphasis remap='B'>amcheckdb</emphasis></term>
367   <listitem>
368 <para>Verify every tape &A; knows about is consistent in the database.</para>
369   </listitem>
370   </varlistentry>
371   <varlistentry>
372   <term><emphasis remap='B'>amgetconf</emphasis></term>
373   <listitem>
374 <para>Look up parameters in the &A; configuration file.</para>
375   </listitem>
376   </varlistentry>
377   <varlistentry>
378   <term><emphasis remap='B'>amtapetype</emphasis></term>
379   <listitem>
380 <para>Generate a tapetype definition.</para>
381   </listitem>
382   </varlistentry>
383   <varlistentry>
384   <term><emphasis remap='B'>amaespipe</emphasis></term>
385   <listitem>
386 <para>Wrapper program from aespipe (data encryption utility)</para>
387   </listitem>
388   </varlistentry>
389   <varlistentry>
390   <term><emphasis remap='B'>amcrypt</emphasis></term>
391   <listitem>
392 <para>Reference encryption program for Amanda symmetric data encryption</para>
393   </listitem>
394   </varlistentry>
395 </variablelist>
396 </refsect1>
397
398 <refsect1><title>CONFIGURATION</title>
399 <para>There are three user-editable files that control the behavior of &A;.
400 </para>
401 <para>
402 The first is
403 <emphasis remap='B'>amanda.conf</emphasis>,
404 the main configuration file.
405 It contains parameters to customize &A; for the site.
406 Refer to the 
407 <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
408 manpage for details on &A; configuration parameters.
409 </para>
410 <para>
411 Second is the
412 <emphasis remap='I'>disklist</emphasis>
413 file, which lists hosts and disk partitions to back up.
414 </para>
415 <para>
416 Third is the
417 <emphasis remap='I'>tapelist</emphasis>
418 file, which lists tapes that are currently active.
419 These files are described in more detail in the following sections.</para>
420
421 <para>All files are stored in individual configuration
422 directories under <filename>/usr/local/etc/amanda/</filename>.
423 A site will often have more than
424 one configuration.
425 For example, it might have a
426 <emphasis remap='I'>normal</emphasis>
427 configuration for everyday backups and an
428 <emphasis remap='I'>archive</emphasis>
429 configuration for infrequent full archival backups.
430 The configuration files would be stored under directories
431 <filename>/usr/local/etc/amanda/normal/</filename> and
432 <filename>/usr/local/etc/amanda/archive/</filename>, respectively.
433 Part of the job of an &A; administrator is to create,
434 populate and maintain these directories.</para>
435
436 <para>All log and database files generated by &A; go in corresponding
437 directories somewhere.
438 The exact location is controlled by entries in
439 <emphasis remap='B'>amanda.conf</emphasis>.
440 A typical location would be under <filename>/var/adm/amanda</filename>.
441 For the above example, the files might go in
442 <filename>/var/adm/amanda/normal/</filename> and
443 <filename>/var/adm/amanda/archive/</filename>.
444 </para>
445
446 <para>As log files are no longer needed (no longer contain relevant information),
447 &A; cycles them out in various ways, depending on the type of file.</para>
448
449 <para>Detailed information about
450 <command>amdump</command>
451 runs are stored in files named
452 <emphasis remap='B'>amdump.</emphasis><emphasis remap='I'>NN</emphasis>
453 where
454 <emphasis remap='I'>NN</emphasis>
455 is a sequence number, with 1 being the most recent file.
456 <emphasis remap='B'>Amdump</emphasis>
457 rotates these files each run, keeping roughly the last
458 <emphasis remap='B'>tapecycle</emphasis>
459 (see below)
460 worth of them.</para>
461
462 <para>The file used by
463 <emphasis remap='B'>amreport</emphasis>
464 to generate the mail summary is named
465 <emphasis remap='B'>log.</emphasis><emphasis remap='I'>YYYYMMDD.NN</emphasis>
466 where
467 <emphasis remap='I'>YYYYMMDD</emphasis>
468 is the datestamp of the start of the
469 <command>amdump</command>
470 run and
471 <emphasis remap='I'>NN</emphasis>
472 is a sequence number started at 0.
473 At the end of each
474 <command>amdump</command>
475 run,
476 log files for runs whose tapes have been reused are renamed
477 into a subdirectory of the main log directory (see the
478 <emphasis remap='B'>logdir</emphasis>
479 parameter below)
480 named
481 <emphasis remap='B'>oldlog</emphasis>.
482 It is up to the &A; administrator to remove them from this
483 directory when desired.</para>
484
485 <para>Index (backup image catalogue) files older than the full dump
486 matching the oldest backup image for a given client and disk
487 are removed by
488 <command>amdump</command>
489 at the end of each run.</para>
490 </refsect1>
491
492 <refsect1><title>DISKLIST FILE</title>
493 <para>The
494 <emphasis remap='I'>disklist</emphasis>
495 file determines which disks will be backed up by &A;.
496 The file usually contains one line per disk:</para>
497
498 <programlisting>
499 <emphasis>hostname diskname</emphasis> [<emphasis>diskdevice</emphasis>] <emphasis>dumptype</emphasis> [<emphasis>spindle</emphasis> [<emphasis>interface</emphasis>] ]
500 </programlisting>
501
502 <para>All pairs [ <emphasis>hostname diskname</emphasis> ] must be unique.</para>
503
504 <para>Lines starting with # are ignored, as are blank lines.
505 The fields have the following meanings:</para>
506 <variablelist remap='TP'>
507   <varlistentry>
508   <term><emphasis remap='I'>hostname</emphasis></term>
509   <listitem>
510 <para>The name of the host to be backed up.
511 If
512 <emphasis remap='B'>diskdevice</emphasis>
513 refers to a PC share, this is the host &A; will run the Samba
514 <emphasis remap='B'>smbclient</emphasis> program on to back up the share.</para>
515   </listitem>
516   </varlistentry>
517   <varlistentry>
518   <term><emphasis remap='I'>diskname</emphasis></term>
519   <listitem>
520 <para>The name of the disk (a label).
521 In most case, you set your
522 <emphasis remap='B'>diskname</emphasis>
523 to the
524 <emphasis remap='B'>diskdevice</emphasis>
525 and you don't set the
526 <emphasis remap='B'>diskdevice.</emphasis>
527 If you want multiple entries with the same
528 <emphasis remap='B'>diskdevice</emphasis>,
529 you must set a different
530 <emphasis remap='B'>diskname</emphasis>
531 for each entry. It's the
532 <emphasis remap='B'>diskname</emphasis>
533 that you use on the commandline for any &A; command.
534 Look at the example/disklist file for example.</para>
535   </listitem>
536   </varlistentry>
537   <varlistentry>
538   <term><emphasis remap='I'>diskdevice</emphasis></term>
539   <listitem>
540 <para>Default: same as diskname.
541 The name of the disk device to be backed up. It may be a full device name,
542 a device name without the
543 <filename>/dev/</filename>
544 prefix, e.g.
545 <emphasis remap='I'>sd0a</emphasis>,
546 or a mount point such as
547 <filename>/usr</filename>.</para>
548
549 <para>It may also refer to a PC share by starting the name with two (forward) slashes, e.g.
550 <filename>//some-pc/home</filename>.
551 In this case, the
552 <emphasis remap='B'>program</emphasis>
553 option in the associated
554 <emphasis remap='B'>dumptype</emphasis>
555 must be entered as
556 <emphasis remap='B'>GNUTAR</emphasis>.
557 It is the combination of the double slash disk name and
558 <emphasis remap='B'>program GNUTAR</emphasis>
559 in the
560 <emphasis remap='B'>dumptype</emphasis>
561 that triggers the use of Samba.</para>
562 </listitem>
563 </varlistentry>
564   
565   <varlistentry>
566   <term><emphasis remap='I'>dumptype</emphasis></term>
567   <listitem>
568 <para>Refers to a
569 <emphasis remap='B'>dumptype</emphasis>
570 defined in the
571 <emphasis remap='B'>amanda.conf</emphasis>
572 file.
573 <emphasis remap='I'>Dumptype</emphasis>s
574 specify backup related parameters,
575 such as whether to compress the backups,
576 whether to record backup results in
577 <filename>/etc/dumpdates</filename>, the disk's relative priority, etc.</para>
578   </listitem>
579   </varlistentry>
580   <varlistentry>
581   <term><emphasis remap='I'>spindle</emphasis></term>
582   <listitem>
583 <para>Default:
584 <option>-1</option>.
585 A number used to balance backup load on a host.
586 &A; will not run multiple backups at the same time
587 on the same spindle, unless the spindle number is -1,
588 which means there is no spindle restriction.</para>
589   </listitem>
590   </varlistentry>
591   <varlistentry>
592   <term><emphasis remap='I'>interface</emphasis></term>
593   <listitem>
594 <para>Default:
595 <emphasis remap='I'>local</emphasis>.
596 The name of a network interface definition in the
597 <emphasis remap='B'>amanda.conf</emphasis>
598 file, used to balance network load.</para>
599   </listitem>
600   </varlistentry>
601 </variablelist>
602
603 <para>Instead of naming a
604 <emphasis remap='B'>dumptype</emphasis>,
605 it is possible to define one in-line, enclosing
606 <emphasis remap='B'>dumptype</emphasis>
607 options within curly braces, one per line, just like a
608 <emphasis remap='B'>dumptype</emphasis>
609 definition in
610 <emphasis remap='B'>amanda.conf</emphasis>.
611 Since pre-existing
612 <emphasis remap='B'>dumptype</emphasis>s
613 are valid option names, this syntax may be used to customize
614 <emphasis remap='B'>dumptype</emphasis>s
615 for particular disks.</para>
616
617 <para>A line break
618 <emphasis remap='B'>must</emphasis>
619 follow the left curly bracket.</para>
620
621 <para>For instance, if a
622 <emphasis remap='B'>dumptype</emphasis>
623 named
624 <emphasis remap='I'>normal</emphasis>
625 is used for most disks, but use of the holding disk needs to be disabled
626 for the file system that holds it, this would work instead of defining
627 a new dumptype:</para>
628
629 <programlisting>
630 <emphasis remap='I'>hostname diskname</emphasis> [ <emphasis remap='I'>diskdevice</emphasis> ] {
631   normal
632   holdingdisk no
633 } [ <emphasis remap='I'>spindle</emphasis> [ <emphasis remap='I'>interface</emphasis> ] ]
634 </programlisting>
635
636 </refsect1>
637
638 <refsect1><title>TAPE MANAGEMENT</title>
639 <para>The
640 <emphasis remap='I'>tapelist</emphasis>
641 file contains the list of tapes in active use.
642 This file is maintained entirely by &A; and should not be created
643 or edited during normal operation.
644 It contains lines of the form:</para>
645
646 <para><programlisting>YYYYMMDD label flags
647 </programlisting></para>
648
649 <para>Where
650 <emphasis remap='I'>YYYYMMDD</emphasis>
651 is the date the tape was written,
652 <emphasis remap='I'>label</emphasis>
653 is a label for the tape as written by
654 <emphasis remap='B'>amlabel</emphasis>
655 and
656 <emphasis remap='I'>flags</emphasis>
657 tell &A; whether the tape may be reused, etc (see the
658 <emphasis remap='B'>reuse</emphasis>
659 options of
660 <emphasis remap='B'>amadmin</emphasis>).</para>
661
662 <para><emphasis remap='B'>Amdump</emphasis>
663 and
664 <emphasis remap='B'>amflush</emphasis>
665 will refuse to write to an unlabeled tape, or to a labeled tape that is considered active.
666 There must be more tapes in active rotation (see the
667 <emphasis remap='B'>tapecycle</emphasis>
668 option) than there are runs in the backup cycle (see the
669 <emphasis remap='B'>dumpcycle</emphasis>
670 option) to prevent overwriting a backup image that would be needed to do a full recovery.</para>
671 </refsect1>
672
673 <refsect1 id='output_drivers'><title>OUTPUT DRIVERS</title>
674 <para>The normal value for the
675 <emphasis remap='B'>tapedev</emphasis>
676 parameter, or for what a tape changer returns,
677 is a full path name to a non-rewinding tape device, such as
678 <filename>/dev/nst0</filename>
679 or
680 <filename>/dev/rmt/0mn</filename>
681 or
682 <filename>/dev/nst0.1</filename>
683 or whatever conventions the operating system uses. &A; provides additional application level drivers that
684 support non-traditional tape-simulations or features. To access a specific output driver, set
685 <emphasis remap='B'>tapedev</emphasis>
686 (or configure your changer to return) a string of the form
687 <emphasis remap='I'>driver</emphasis>:<emphasis remap='I'>driver-info</emphasis>
688 where
689 <emphasis remap='I'>driver</emphasis>
690 is one of the supported drivers and
691 <emphasis remap='I'>driver-info</emphasis>
692 is optional additional information needed by the driver.</para>
693
694 <para>The supported drivers are:</para>
695 <variablelist remap='TP'>
696   <varlistentry>
697   <term><emphasis remap='I'>tape</emphasis></term>
698   <listitem>
699 <para>This is the default driver.
700 The
701 <emphasis remap='I'>driver-info</emphasis>
702 is the tape device name.
703 Entering
704 <programlisting>tapedev /dev/rmt/0mn
705 </programlisting>
706 is really a short hand for
707 <programlisting>tapedev tape:/dev/rmt/0mn
708 </programlisting>.</para>
709   </listitem>
710   </varlistentry>
711   <varlistentry>
712   <term><emphasis remap='I'>null</emphasis></term>
713   <listitem>
714 <para>This driver throws away anything written to it and returns EOF
715 for any reads except a special case is made for reading a label,
716 in which case a &quot;fake&quot; value is returned that &A; checks for
717 and allows through regardless of what you have set in
718 <emphasis remap='B'>labelstr</emphasis>.
719 The
720 <emphasis remap='I'>driver-info</emphasis>
721 field is not used and may be left blank:</para>
722
723 <para><programlisting>tapedev null:
724 </programlisting></para>
725
726 <para>The <emphasis remap='I'>length</emphasis>
727 value from the associated
728 <emphasis remap='B'>tapetype</emphasis>
729 is used to limit the amount of data written. When the limit is reached, the driver will simulate end of tape.</para>
730
731 <note>This driver should only be used for debugging and testing,
732 and probably only with the
733 <emphasis remap='B'>record</emphasis>
734 option set to
735 <emphasis remap='I'>no</emphasis>.</note>
736   </listitem>
737   </varlistentry>
738
739   <varlistentry>
740   <term><emphasis remap='I'>rait</emphasis></term>
741   <listitem>
742 <para><emphasis remap='I'>R</emphasis>edundant
743 <emphasis remap='I'>A</emphasis>rray
744 of
745 <emphasis remap='I'>I</emphasis>nexpensive (?)
746 <emphasis remap='I'>T</emphasis>apes.
747 Reads and writes tapes mounted on multiple drives by spreading
748 the data across N-1 drives and using the last drive for a checksum.
749 See docs/RAIT for more information.</para>
750
751 <para>The
752 <emphasis remap='I'>driver-info</emphasis>
753 field describes the devices to use. Curly braces indicate multiple replacements in the string.
754 For instance:</para>
755
756 <para><programlisting>tapedev rait:/dev/rmt/tps0d{4,5,6}n
757 </programlisting></para>
758
759 <para>would use the following devices:</para>
760
761 <para><filename>/dev/rmt/tps0d4n</filename>
762 <filename>/dev/rmt/tps0d5n</filename>
763 <filename>/dev/rmt/tps0d6n</filename>
764 </para>
765   </listitem>
766   </varlistentry>
767 </variablelist>
768 <variablelist remap='TP'>
769   <varlistentry>
770   <term><emphasis remap='I'>file</emphasis></term>
771   <listitem>
772 <para>This driver emulates a tape device with a set of files in a directory.
773 The
774 <emphasis remap='I'>driver-info</emphasis>
775 field must be the name of an existing directory.
776 The driver will test for a subdirectory of that named
777 <emphasis remap='I'>data</emphasis>
778 and return
779 <emphasis remap='B'>offline</emphasis>
780 until it is present.
781 When present, the driver uses two files in the
782 <emphasis remap='I'>data</emphasis>
783 subdirectory for each tape file. One contains the actual data.
784 The other contains record length information.</para>
785
786 <para>The driver uses a file named
787 <emphasis remap='I'>status</emphasis>
788 in the
789 <emphasis remap='B'>file</emphasis>
790 device directory to hold driver status information, such as tape position.
791 If not present, the driver will create it as though the device is rewound.</para>
792
793 <para>The
794 <emphasis remap='I'>length</emphasis>
795 value from the associated
796 <emphasis remap='B'>tapetype</emphasis>
797 is used to limit the amount of data written.
798 When the limit is reached, the driver will simulate end of tape.</para>
799
800 <para>One way to use this driver with a real device such as a CD-writer is to
801 create a directory for the
802 <emphasis remap='B'>file</emphasis>
803 device and one or more other directories for the actual data.
804 Create a symlink named
805 <emphasis remap='I'>data</emphasis>
806 in the
807 <emphasis remap='B'>file</emphasis>
808 directory to one of the data directories.
809 Set the
810 <emphasis remap='B'>tapetype</emphasis>
811 length to whatever the medium will hold.</para>
812
813 <para>When &A; fills the
814 <emphasis remap='B'>file</emphasis>
815 device, remove the symlink and (optionally) create a new symlink to another
816 data area.
817 Use a CD writer software package to burn the image from the first data area.</para>
818
819 <para>To read the CD, mount it and create the
820 <emphasis remap='I'>data</emphasis>
821 symlink in the
822 <emphasis remap='B'>file</emphasis>
823 device directory.</para>
824 </listitem>
825 </varlistentry>
826 </variablelist>
827 </refsect1>
828
829 <refsect1><title>AUTHORIZATION</title>
830 <para>&A; processes on the tape server host run as the
831 <emphasis remap='B'>dumpuser</emphasis>
832 user listed in
833 <emphasis remap='B'>amanda.conf</emphasis>.
834 When they connect to a backup client, they do so with an &A;-specific protocol.
835 They do not, for instance, use
836 <emphasis remap='B'>rsh</emphasis>
837 or
838 <emphasis remap='B'>ssh</emphasis>
839 directly.</para>
840
841 <para>On the client side, the
842 <emphasis remap='B'>amandad</emphasis>
843 daemon validates the connection using one of several methods,
844 depending on how it was compiled and on options it is passed:</para>
845
846 <variablelist remap='IP'>
847   <varlistentry>
848   <term>.rhosts</term>
849   <listitem>
850 <para>Even though &A; does not use
851 <emphasis remap='B'>rsh</emphasis>,
852 it can use
853 <markup>.rhosts</markup>-style
854 authentication and a
855 <markup>.rhosts</markup>
856 file.</para>
857   </listitem>
858   </varlistentry>
859   <varlistentry>
860   <term>.amandahosts</term>
861   <listitem>
862 <para>This is essentially the same as
863 <markup>.rhosts</markup>
864 authentication except a different file, with almost the same format, is used.
865 This is the default mechanism built into &A;.</para>
866
867 <para>The format of the
868 <filename>.amandahosts</filename>
869 file is:</para>
870
871 <para><emphasis remap='I'>hostname</emphasis>
872 [
873 <emphasis remap='I'>username</emphasis>
874 ]</para>
875
876 <para>If
877 <emphasis remap='I'>username</emphasis>
878 is ommitted, it defaults to the user running
879 <emphasis remap='B'>amandad</emphasis>,
880 i.e. the user listed in the
881 <emphasis remap='B'>inetd</emphasis>
882 or
883 <emphasis remap='B'>xinetd</emphasis>
884 configuration file.</para>
885   </listitem>
886   </varlistentry>
887   <varlistentry>
888   <term>Kerberos</term>
889   <listitem>
890 <para>&A; may use the Kerberos authentication system.
891 Further information is in the
892 <emphasis remap='B'>docs/KERBEROS</emphasis>
893 <!-- TODO: edit link -->
894 file that comes with an &A; distribution.</para>
895
896 <para>For Samba access,
897 &A; needs a file on the Samba server (which may
898 or may not also be the tape server) named
899 <filename>/etc/amandapass</filename>
900 with share names, (clear text) passwords and (optional) domain names,
901 in that order, one per line, whitespace separated.
902 By default, the user used to connect to the PC is the same for all
903 PC's and is compiled into &A;.
904 It may be changed on a host by host basis
905 by listing it first in the password field followed
906 by a percent sign and then the password.
907 For instance:</para>
908
909 <programlisting>
910   //some-pc/home normalpw
911   //another-pc/disk otheruser%otherpw</programlisting>
912
913 <para>With clear text passwords, this file should obviously be tightly protected.
914 It only needs to be readable by the &A;-user on the Samba server.</para>
915
916 <para>You can find further information in the
917 <emphasis remap='B'>docs/SAMBA</emphasis>
918 <!-- TODO: edit link -->
919 file that comes with an &A; distribution.</para>
920
921 </listitem>
922 </varlistentry>
923 </variablelist>
924 </refsect1>
925
926 <refsect1><title>HOST &amp; DISK EXPRESSION</title>
927 <para>All host and disk arguments to programs are special expressions.
928 The command applies to all disks that match your arguments.
929 This section describes the matcher.</para>
930
931 <para>The matcher matches by word, each word is a glob expression, words
932 are separated by the separator '.' for host and '/' for disk. You
933 can anchor the expression at left with a '^'. You can
934 anchor the expression at right with a '$'. The matcher
935 is case insensitive for host but is case sensitive for disk. A match
936 succeeds if all words in your expression match contiguous words in 
937 the host or disk.</para>
938
939
940 <literallayout remap='.nf'>
941 .       word separator for a host
942 /       word separator for a disk
943 ^       anchor at left
944 $       anchor at right
945 ?       match exactly one character except the separator
946 *       match zero or more characters except the separator
947 **      match zero or more characters including the separator
948 </literallayout>
949
950
951 <para>Some examples:</para>
952
953 <literallayout remap='.nf'>
954 EXPRESSION     WILL MATCH           WILL NOT MATCH
955 hosta          hosta                hostb
956                hoSTA.dOMAIna.ORG 
957                foo.hosta.org 
958 host           host                 hosta
959 host?          hosta                host
960                hostb 
961 ho*na          hoina                ho.aina.org
962 ho**na         hoina 
963                ho.aina.org 
964 ^hosta         hosta                foo.hosta.org
965 sda*           /dev/sda1 
966                /dev/sda12 
967 /opt/          opt (disk)           opt (host)
968 .opt.          opt (host)           opt (disk)
969 /              /                    any other disk
970 /usr           /usr 
971                /usr/opt 
972 /usr$          /usr                 /usr/opt
973 </literallayout>
974
975
976 </refsect1>
977
978 <refsect1><title>DATESTAMP EXPRESSION</title>
979 <para>A
980 <emphasis remap='I'>datestamp</emphasis>
981 expression is a range expression where we only match the prefix.
982 Leading ^ is removed. Trailing $ forces an exact match.</para>
983
984 <informaltable frame="all">
985 <tgroup cols="2" alignment="left">
986 <tbody>
987
988 <row>
989 <entry>20001212-14</entry>
990 <entry>match all dates beginning with 20001212, 20001213 or 20001214</entry>
991 </row>
992
993 <row>
994 <entry>20001212-4</entry>
995 <entry>same as previous</entry>
996 </row>
997
998 <row>
999 <entry>20001212-24</entry>
1000 <entry>match all dates between 20001212 and 20001224</entry>
1001 </row>
1002
1003 <row>
1004 <entry>2000121</entry>
1005 <entry>match all dates that start with 2000121 (20001210-20001219)</entry>
1006 </row>
1007
1008 <row>
1009 <entry>2</entry>
1010 <entry>match all dates that start with 2 (20000101-29991231)</entry>
1011 </row>
1012
1013 <row>
1014 <entry>2000-10</entry>
1015 <entry>match all dates between 20000101-20101231</entry>
1016 </row>
1017
1018 <row>
1019 <entry>200010$</entry>
1020 <entry>match only 200010</entry>
1021 </row>
1022
1023 </tbody>
1024 </tgroup>
1025 </informaltable>
1026 <para/>
1027
1028 </refsect1>
1029
1030 <refsect1><title>AUTHOR</title>
1031 <para>James da Silva, &email.jds; : Original text</para>
1032 <para>&maintainer.sgw;: XML-conversion, major update</para>
1033 </refsect1>
1034
1035 <refsect1><title>SEE ALSO</title>
1036 <para>
1037 <citerefentry><refentrytitle>amadmin</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1038 <citerefentry><refentrytitle>amanda.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1039 <citerefentry><refentrytitle>amcheck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1040 <citerefentry><refentrytitle>amcheckdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1041 <citerefentry><refentrytitle>amcleanup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1042 <citerefentry><refentrytitle>amdd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1043 <citerefentry><refentrytitle>amdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1044 <citerefentry><refentrytitle>amfetchdump</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1045 <citerefentry><refentrytitle>amflush</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1046 <citerefentry><refentrytitle>amgetconf</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1047 <citerefentry><refentrytitle>amlabel</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1048 <citerefentry><refentrytitle>ammt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1049 <citerefentry><refentrytitle>amoverview</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1050 <citerefentry><refentrytitle>amplot</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1051 <citerefentry><refentrytitle>amrecover</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1052 <citerefentry><refentrytitle>amreport</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1053 <citerefentry><refentrytitle>amrestore</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1054 <citerefentry><refentrytitle>amrmtape</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1055 <citerefentry><refentrytitle>amstatus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1056 <citerefentry><refentrytitle>amtape</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1057 <citerefentry><refentrytitle>amtapetype</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1058 <citerefentry><refentrytitle>amtoc</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1059 <citerefentry><refentrytitle>amverify</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1060 <citerefentry><refentrytitle>amverifyrun</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
1061 </refsect1>
1062 </refentry>
1063