Imported Upstream version 2.5.1p1
[debian/amanda] / docs / amanda.8.txt
1
2                                amanda
3 Prev  Chapter 36. The Amanda Manual Pages.  Next
4
5 -------------------------------------------------------------------------------
6
7 Name
8
9 amanda \14 Advanced Maryland Automatic Network Disk Archiver
10
11 Synopsis
12
13 amadmin config command [options]
14 amcheck [options] config
15 amcheckdb config
16 amcleanup config
17 amcrypt
18 amdd [options]
19 amdump config
20 amaespipe
21 amflush [-f ] config
22 amgetconf [config] parameter
23 amlabel config label [ slot slot ]
24 ammt [options]
25 amoverview config [options]
26 amplot [options] amdump-files
27 amrecover [config] [options]
28 amreport [config] [options]
29 amrestore [options] tapedevice [ hostname [diskname]]
30 amfetchdump [options] config [ hostname [ diskname [ date [level]]]]
31 amrmtape [options] config label
32 amstatus config [options]
33 amtape config command [options]
34 amtapetype [options]
35 amtoc [options] logfile
36 amverify config
37 amverifyrun config
38
39 DESCRIPTION
40
41 Amanda is the "Advanced Maryland Automatic Network Disk Archiver". This manual
42 page gives an overview of the Amanda commands and configuration files for quick
43 reference.
44 Here are all the Amanda commands. Each one has its own manual page. See them
45 for all the gory details.
46
47
48   amdump
49       Take care of automatic Amanda backups. This is normally executed by cron
50       on a computer called the tape server host and requests backups of file
51       systems located on backup clients. Amdump backs up all disks in the
52       disklist file (discussed below) to tape or, if there is a problem, to a
53       special holding disk. After all backups are done, amdump sends mail
54       reporting failures and successes.
55
56   amflush
57       Flush backups from the holding disk to tape. Amflush is used after amdump
58       has reported it could not write backups to tape for some reason. When
59       this happens, backups stay in the holding disk. Run amflush after the
60       tape problem is corrected to write backups from the holding disk to tape.
61
62   amcleanup
63       Clean up after an interrupted amdump. This command is only needed if
64       amdump was unable to complete for some reason, usually because the tape
65       server host crashed while amdump was running.
66
67   amrecover
68       Provides an interactive interface to browse the Amanda index files
69       (backup image catalogues) and select which tapes to recover files from.
70       It can also run amrestore and a restore program (e.g. tar) to actually
71       recover the files.
72
73   amrestore
74       Read an Amanda tape, searching for requested backups. Amrestore is
75       suitable for everything from interactive restores of single files to a
76       full restore of all partitions on a failed disk.
77
78   amfetchdump
79       Performs Amanda tape restoration, similar to amrestore. Additional
80       capabilities include "hands-off" searching of multiple tapes, automatic
81       retrieval of specific dump files based on dump logs, and assembly of
82       tape-spanning split dump files.
83
84   amlabel
85       Write an Amanda format label onto a tape. All Amanda tapes must be
86       labeled with amlabel. Amdump and amflush will not write to an unlabeled
87       tape (see TAPE MANAGEMENT below).
88
89   amcheck
90       Verify the correct tape is mounted and all file systems on all backup
91       client systems are ready to be backed up. Often run by cron before amdump
92       to generate a mail warning that backups might fail unless corrective
93       action is taken.
94
95   amadmin
96       Take care of administrative tasks like finding out which tapes are needed
97       to restore a filesystem, forcing hosts to do full backups of selected
98       disks and looking at schedule balance information.
99
100   amtape
101       Take care of tape changer control operations like loading particular
102       tapes, ejecting tapes and scanning the tape storage slots.
103
104   amverify
105       Check Amanda backup tapes for errors.
106
107   amrmtape
108       Delete a tape from the Amanda databases.
109
110   amstatus
111       Report the status of a running or completed amdump.
112
113   amoverview
114       Display a chart of hosts and file systems backed up every run.
115
116   amplot
117       Generate utilization plots of Amanda runs for performance tuning.
118
119   amreport
120       Generate an Amanda summary E-mail report.
121
122   amtoc
123       Generate table of content files for Amanda tapes.
124
125   amcheckdb
126       Verify every tape Amanda knows about is consistent in the database.
127
128   amgetconf
129       Look up parameters in the Amanda configuration file.
130
131   amtapetype
132       Generate a tapetype definition.
133
134   amaespipe
135       Wrapper program from aespipe (data encryption utility)
136
137   amcrypt
138       Reference encryption program for Amanda symmetric data encryption
139
140
141 CONFIGURATION
142
143 There are three user-editable files that control the behavior of Amanda.
144 The first is amanda.conf, the main configuration file. It contains parameters
145 to customize Amanda for the site. Refer to the amanda.conf(5), manpage for
146 details on Amanda configuration parameters.
147 Second is the disklist file, which lists hosts and disk partitions to back up.
148 Third is the tapelist file, which lists tapes that are currently active. These
149 files are described in more detail in the following sections.
150 All files are stored in individual configuration directories under /usr/local/
151 etc/amanda/. A site will often have more than one configuration. For example,
152 it might have a normal configuration for everyday backups and an archive
153 configuration for infrequent full archival backups. The configuration files
154 would be stored under directories /usr/local/etc/amanda/normal/ and /usr/local/
155 etc/amanda/archive/, respectively. Part of the job of an Amanda administrator
156 is to create, populate and maintain these directories.
157 All log and database files generated by Amanda go in corresponding directories
158 somewhere. The exact location is controlled by entries in amanda.conf. A
159 typical location would be under /var/adm/amanda. For the above example, the
160 files might go in /var/adm/amanda/normal/ and /var/adm/amanda/archive/.
161 As log files are no longer needed (no longer contain relevant information),
162 Amanda cycles them out in various ways, depending on the type of file.
163 Detailed information about amdump runs are stored in files named amdump.NN
164 where NN is a sequence number, with 1 being the most recent file. Amdump
165 rotates these files each run, keeping roughly the last tapecycle (see below)
166 worth of them.
167 The file used by amreport to generate the mail summary is named log.YYYYMMDD.NN
168 where YYYYMMDD is the datestamp of the start of the amdump run and NN is a
169 sequence number started at 0. At the end of each amdump run, log files for runs
170 whose tapes have been reused are renamed into a subdirectory of the main log
171 directory (see the logdir parameter below) named oldlog. It is up to the Amanda
172 administrator to remove them from this directory when desired.
173 Index (backup image catalogue) files older than the full dump matching the
174 oldest backup image for a given client and disk are removed by amdump at the
175 end of each run.
176
177 DISKLIST FILE
178
179 The disklist file determines which disks will be backed up by Amanda. The file
180 usually contains one line per disk:
181
182   hostname diskname [diskdevice] dumptype [spindle [interface] ]
183
184 All pairs [ hostname diskname ] must be unique.
185 Lines starting with # are ignored, as are blank lines. The fields have the
186 following meanings:
187
188
189   hostname
190       The name of the host to be backed up. If diskdevice refers to a PC share,
191       this is the host Amanda will run the Samba smbclient program on to back
192       up the share.
193
194   diskname
195       The name of the disk (a label). In most case, you set your diskname to
196       the diskdevice and you don't set the diskdevice. If you want multiple
197       entries with the same diskdevice, you must set a different diskname for
198       each entry. It's the diskname that you use on the commandline for any
199       Amanda command. Look at the example/disklist file for example.
200
201   diskdevice
202       Default: same as diskname. The name of the disk device to be backed up.
203       It may be a full device name, a device name without the /dev/ prefix,
204       e.g. sd0a, or a mount point such as /usr.
205       It may also refer to a PC share by starting the name with two (forward)
206       slashes, e.g. //some-pc/home. In this case, the program option in the
207       associated dumptype must be entered as GNUTAR. It is the combination of
208       the double slash disk name and program GNUTAR in the dumptype that
209       triggers the use of Samba.
210
211   dumptype
212       Refers to a dumptype defined in the amanda.conf file. Dumptypes specify
213       backup related parameters, such as whether to compress the backups,
214       whether to record backup results in /etc/dumpdates, the disk's relative
215       priority, etc.
216
217   spindle
218       Default: -1. A number used to balance backup load on a host. Amanda will
219       not run multiple backups at the same time on the same spindle, unless the
220       spindle number is -1, which means there is no spindle restriction.
221
222   interface
223       Default: local. The name of a network interface definition in the
224       amanda.conf file, used to balance network load.
225
226 Instead of naming a dumptype, it is possible to define one in-line, enclosing
227 dumptype options within curly braces, one per line, just like a dumptype
228 definition in amanda.conf. Since pre-existing dumptypes are valid option names,
229 this syntax may be used to customize dumptypes for particular disks.
230 A line break must follow the left curly bracket.
231 For instance, if a dumptype named normal is used for most disks, but use of the
232 holding disk needs to be disabled for the file system that holds it, this would
233 work instead of defining a new dumptype:
234
235   hostname diskname [ diskdevice ] {
236     normal
237     holdingdisk never
238   } [ spindle [ interface ] ]
239
240
241 TAPE MANAGEMENT
242
243 The tapelist file contains the list of tapes in active use. This file is
244 maintained entirely by Amanda and should not be created or edited during normal
245 operation. It contains lines of the form:
246
247   YYYYMMDD label flags
248
249 Where YYYYMMDD is the date the tape was written, label is a label for the tape
250 as written by amlabel and flags tell Amanda whether the tape may be reused, etc
251 (see the reuse options of amadmin).
252 Amdump and amflush will refuse to write to an unlabeled tape, or to a labeled
253 tape that is considered active. There must be more tapes in active rotation
254 (see the tapecycle option) than there are runs in the backup cycle (see the
255 dumpcycle option) to prevent overwriting a backup image that would be needed to
256 do a full recovery.
257
258 OUTPUT DRIVERS
259
260 The normal value for the tapedev parameter, or for what a tape changer returns,
261 is a full path name to a non-rewinding tape device, such as /dev/nst0 or /dev/
262 rmt/0mn or /dev/nst0.1 or whatever conventions the operating system uses.
263 Amanda provides additional application level drivers that support non-
264 traditional tape-simulations or features. To access a specific output driver,
265 set tapedev (or configure your changer to return) a string of the form driver:
266 driver-info where driver is one of the supported drivers and driver-info is
267 optional additional information needed by the driver.
268 The supported drivers are:
269
270
271   tape
272       This is the default driver. The driver-info is the tape device name.
273       Entering
274
275         tapedev /dev/rmt/0mn
276
277       is really a short hand for
278
279         tapedev tape:/dev/rmt/0mn
280
281       .
282
283   null
284       This driver throws away anything written to it and returns EOF for any
285       reads except a special case is made for reading a label, in which case a
286       "fake" value is returned that Amanda checks for and allows through
287       regardless of what you have set in labelstr. The driver-info field is not
288       used and may be left blank:
289
290         tapedev null:
291
292       The length value from the associated tapetype is used to limit the amount
293       of data written. When the limit is reached, the driver will simulate end
294       of tape.
295
296       Note
297
298       This driver should only be used for debugging and testing, and probably
299       only with the record option set to no.
300
301   rait
302       Redundant Array of Inexpensive (?) Tapes. Reads and writes tapes mounted
303       on multiple drives by spreading the data across N-1 drives and using the
304       last drive for a checksum. See docs/RAIT for more information.
305       The driver-info field describes the devices to use. Curly braces indicate
306       multiple replacements in the string. For instance:
307
308         tapedev rait:/dev/rmt/tps0d{4,5,6}n
309
310       would use the following devices:
311       /dev/rmt/tps0d4n /dev/rmt/tps0d5n /dev/rmt/tps0d6n
312
313
314
315   file
316       This driver emulates a tape device with a set of files in a directory.
317       The driver-info field must be the name of an existing directory. The
318       driver will test for a subdirectory of that named data and return offline
319       until it is present. When present, the driver uses two files in the data
320       subdirectory for each tape file. One contains the actual data. The other
321       contains record length information.
322       The driver uses a file named status in the file device directory to hold
323       driver status information, such as tape position. If not present, the
324       driver will create it as though the device is rewound.
325       The length value from the associated tapetype is used to limit the amount
326       of data written. When the limit is reached, the driver will simulate end
327       of tape.
328       One way to use this driver with a real device such as a CD-writer is to
329       create a directory for the file device and one or more other directories
330       for the actual data. Create a symlink named data in the file directory to
331       one of the data directories. Set the tapetype length to whatever the
332       medium will hold.
333       When Amanda fills the file device, remove the symlink and (optionally)
334       create a new symlink to another data area. Use a CD writer software
335       package to burn the image from the first data area.
336       To read the CD, mount it and create the data symlink in the file device
337       directory.
338
339
340 AUTHORIZATION
341
342 Amanda processes on the tape server host run as the dumpuser user listed in
343 amanda.conf. When they connect to a backup client, they do so with an Amanda-
344 specific protocol. They do not, for instance, use rsh or ssh directly.
345 On the client side, the amandad daemon validates the connection using one of
346 several methods, depending on how it was compiled and on options it is passed:
347
348
349   .rhosts
350       Even though Amanda does not use rsh, it can use .rhosts-style
351       authentication and a .rhosts file.
352
353   .amandahosts
354       This is essentially the same as .rhosts authentication except a different
355       file, with almost the same format, is used. This is the default mechanism
356       built into Amanda.
357       The format of the .amandahosts file is:
358       hostname [ username [ service ]*]
359       If username is ommitted, it defaults to the user running amandad, i.e.
360       the user listed in the inetd or xinetd configuration file.
361       The service is a list of the service the client is authorized to execute:
362       amdump, noop, selfcheck, sendsize, sendbackup, amindexd, amidxtaped.
363       amdump is a shortcut for "noop selfcheck sendsize sendbackup"
364
365   Kerberos
366       Amanda may use the Kerberos authentication system. Further information is
367       in the docs/KERBEROS file that comes with an Amanda distribution.
368       For Samba access, Amanda needs a file on the Samba server (which may or
369       may not also be the tape server) named /etc/amandapass with share names,
370       (clear text) passwords and (optional) domain names, in that order, one
371       per line, whitespace separated. By default, the user used to connect to
372       the PC is the same for all PC's and is compiled into Amanda. It may be
373       changed on a host by host basis by listing it first in the password field
374       followed by a percent sign and then the password. For instance:
375
376           //some-pc/home normalpw
377           //another-pc/disk otheruser%otherpw
378
379       With clear text passwords, this file should obviously be tightly
380       protected. It only needs to be readable by the Amanda-user on the Samba
381       server.
382       You can find further information in the docs/SAMBA file that comes with
383       an Amanda distribution.
384
385
386 HOST & DISK EXPRESSION
387
388 All host and disk arguments to programs are special expressions. The command
389 applies to all disks that match your arguments. This section describes the
390 matcher.
391 The matcher matches by word, each word is a glob expression, words are
392 separated by the separator '.' for host and '/' for disk. You can anchor the
393 expression at left with a '^'. You can anchor the expression at right with a
394 '$'. The matcher is case insensitive for host but is case sensitive for disk. A
395 match succeeds if all words in your expression match contiguous words in the
396 host or disk.
397
398 .  word separator for a host
399 /  word separator for a disk
400 ^  anchor at left
401 $  anchor at right
402 ?  match exactly one character except the separator
403 *  match zero or more characters except the separator
404 ** match zero or more characters including the separator
405 Some examples:
406
407 EXPRESSION     WILL MATCH           WILL NOT MATCH
408 hosta          hosta                hostb
409                hoSTA.dOMAIna.ORG 
410                foo.hosta.org 
411 host           host                 hosta
412 host?          hosta                host
413                hostb 
414 ho*na          hoina                ho.aina.org
415 ho**na         hoina 
416                ho.aina.org 
417 ^hosta         hosta                foo.hosta.org
418 sda*           /dev/sda1 
419                /dev/sda12 
420 /opt/          opt (disk)           opt (host)
421 .opt.          opt (host)           opt (disk)
422 /              /                    any other disk
423 /usr           /usr 
424                /usr/opt 
425 /usr$          /usr                 /usr/opt
426
427 DATESTAMP EXPRESSION
428
429 A datestamp expression is a range expression where we only match the prefix.
430 Leading ^ is removed. Trailing $ forces an exact match.
431  _________________________________________________________________________
432 |20001212-14|match_all_dates_beginning_with_20001212,_20001213_or_20001214|
433 |20001212-4_|same_as_previous_____________________________________________|
434 |20001212-24|match_all_dates_between_20001212_and_20001224________________|
435 |2000121____|match_all_dates_that_start_with_2000121_(20001210-20001219)__|
436 |2__________|match_all_dates_that_start_with_2_(20000101-29991231)________|
437 |2000-10____|match_all_dates_between_20000101-20101231____________________|
438 |200010$____|match_only_200010____________________________________________|
439
440
441 CONFIGURATION OVERWRITE
442
443 Most command allow to overwrite any configuration parameter on the command line
444 with the -o option.
445 -o NAME=value
446 eg. -o runtapes=2
447 eg. -o DUMPTYPE:no-compress:compress="server fast"
448 eg. -o TAPETYPE:HP-DAT:length=2000m
449 eg. -o INTERFACE:local:use="2000 kbps"
450
451 AUTHOR
452
453 James da Silva, <jds@amanda.org> : Original text
454 Stefan G. Weichinger, <sgw@amanda.org>, maintainer of the Amanda-documentation:
455 XML-conversion, major update
456
457 SEE ALSO
458
459 amadmin(8), amanda.conf(5), amanda-client.conf(5), amcheck(8), amcheckdb(8),
460 amcleanup(8), amdd(8), amdump(8), amfetchdump(8) amflush(8), amgetconf(8),
461 amlabel(8), ammt(8), amoverview(8), amplot(8), amrecover(8), amreport(8),
462 amrestore(8), amrmtape(8), amstatus(8), amtape(8), amtapetype(8), amtoc(8),
463 amverify(8), amverifyrun(8)
464 -------------------------------------------------------------------------------
465
466 Prev        Up          Next
467 amaespipe  Home  amanda.conf
468